A test zone for implementing WASM scripting into the Lyra engine
Go to file
SeanOMik 4deed47b3d
change how bindings are generated, make it easier to call functions on the guest
2024-07-27 15:24:14 -04: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 change how bindings are generated, make it easier to call functions on the guest 2024-07-27 15:24:14 -04:00
lyra-engine@12c8ece418 improve safety by avoiding raw pointers,improve dynamic view code a bit 2024-04-14 17:02:55 -04:00
src change how bindings are generated, make it easier to call functions on the guest 2024-07-27 15:24:14 -04:00
witguest change how bindings are generated, make it easier to call functions on the guest 2024-07-27 15:24:14 -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 change how bindings are generated, make it easier to call functions on the guest 2024-07-27 15:24:14 -04: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
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