A test zone for implementing WASM scripting into the Lyra engine
Go to file
SeanOMik e289cd83a6
Try to get just a sample dotnet wit and wasm project working
2024-11-05 15:10:19 -05:00
.vscode update wasm related dependencies, make it easier to create components on the guest 2024-07-24 20:32:59 -04:00
common-api Expose ecs world view_one and insert to the guest 2024-09-02 20:59:29 -04:00
dotnet-guest-test Try to get just a sample dotnet wit and wasm project working 2024-11-05 15:10:19 -05:00
lyra-engine@7ae0eae6ac Try to get just a sample dotnet wit and wasm project working 2024-11-05 15:10:19 -05:00
src Expose ecs world view_one and insert to the guest 2024-09-02 20:59:29 -04:00
witguest Expose ecs world view_one and insert to the guest 2024-09-02 20:59:29 -04:00
.envrc Simple PoC with Wit and WASMA 2024-04-14 17:02:52 -04:00
.gitignore change how bindings are generated, make it easier to call functions on the guest 2024-07-27 15:24:14 -04:00
.gitmodules PoC for spawning entities with components and querying them 2024-04-14 17:02:53 -04:00
Cargo.lock Try to get just a sample dotnet wit and wasm project working 2024-11-05 15:10:19 -05:00
Cargo.toml change how bindings are generated, make it easier to call functions on the guest 2024-07-27 15:24:14 -04:00
LICENSE Initial commit 2024-04-14 16:58:12 -04:00
README.md change how bindings are generated, make it easier to call functions on the guest 2024-07-27 15:24:14 -04:00
lyra-wasm-scripting-test.sln Try to get just a sample dotnet wit and wasm project working 2024-11-05 15:10:19 -05:00
shell.nix create a 'common-api' crate to make it easier to work with the ecs world 2024-04-14 19:34:07 -04:00

README.md

lyra-wasm-scripting-test

A test zone for implementing WASM scripting into the Lyra engine

Building

Install the wasm32-wasip1 target:

rustup target add wasm32-wasip1

Install wasm-tools:

cargo install wasm-tools

Install cargo-component:

cargo install wasm-tools

Download wasi_snapshot_preview1.reactor.wasm in the witguest folder. Build the witguest project then use an adapter to convert the WASM module to a component:

cd witguest
cargo build --target wasm32-wasip1 && wasm-tools component new ../target/wasm32-wasip1/debug/witguest.wasm -o ../target/wasm32-wasip1/debug/witguest-component.wasm --adapt ../wasi_snapshot_preview1.reactor.wasm