makspll / makspll/bevy_mod_scripting

WASM host

Open
#119 2 comments 7 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

language request
Dominant language
Rust
Stars
649
Forks
59
PR merge metrics
No merged PRs in 30d

Description

Adding a WebAssembly interpreter, that supports the component model, for example the reference implementation wasmtime as a script host will allow using a bunch of languages for scripting (currently JavaScript, Python, Go) and quickly compiled and hot-reloaded rust.

WASM interface definition format also looks like a good fit to describe the scraped bevy API.

Downsides are:

  • the wasmtime dependency is quite large (45 seconds of compilation in an empty project from scratch on my ryzen 9 machine)
    • put it behind a feature flag or
    • seek for an alternative leaner implementation
  • the wasm component model, that includes the WIT seems to still being stabilized

Does this sound like a good idea to explore?
Thank you for developing this!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by evaluating Wasmtime and the WebAssembly component model, including the WIT format, against the existing scripting hosts. Compare the dependency cost and stabilization concerns described in the issue, and determine whether a feature flag or a leaner implementation is viable. Done requires an agreed scope for a WASM host rather than only an exploratory design discussion.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust, wasm
Domain
game-dev, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.