Advanced
Documentation for advanced use cases.
📄️ Determinism
WebAssembly (WASM) is deterministic - it guarantees that the execution of a given module with the same input values will always produce the same output values, regardless of the platform or implementation used to run the module. This means that the execution of a WebAssembly module is predictable and reproducible.
📄️ Runtime WASM Loading
The basic use of Wasmbox has a WASM/WAT file imported in the editor, to produce a WasmAsset which can be loaded at runtime. However sometimes it is necessary to load a WASM file at runtime, for example loading mods from a folder. This can be done with the DynamicWasmAsset or a custom IWasmAsset.
📄️ Custom WASM Instantiation
Wasmbox provides behaviours to automatically load a WASM asset into a state that allows code to be run. However, it is possible to do this process directly in your own code to take complete control over the entire process.
📄️ Async WASM
Standard WASM execution is synchronous - a function is called, some computation happens and eventually a result it returned. This model does not work well for longer running programs which may need to wait for an event to happen (e.g. IVirtualEventPoll).