ashtonmeuser / godot-wasm

Interact with WebAssembly modules from Godot
https://github.com/ashtonmeuser/godot-wasm/wiki
MIT License
197 stars 12 forks source link

Extended WASI support #40

Closed ashtonmeuser closed 1 year ago

ashtonmeuser commented 1 year ago

Includes a simple permissions model and the following WASI support.

All bindings defer to Godot's implementation of required functionality. For example, using wasi_snapshot_preview1.random_get, a random buffer is filled with Godot's Crypto.generate_random_bytes(), system time requested by wasi_snapshot_preview1.clock_time_get uses Time.get_unix_time_from_system(), wasi_snapshot_preview1.args_get uses OS.get_cmdline_user_args().

Permissions can be set via Wasm.set_permssions(). This lays the groundwork for more impactful WASI behaviour e.g. filesystem access.

Todo: