Includes a simple permissions model and the following WASI support.
wasi_snapshot_preview1.args_sizes_get
wasi_snapshot_preview1.args_get
wasi_snapshot_preview1.environ_sizes_get
wasi_snapshot_preview1.environ_get
wasi_snapshot_preview1.random_get
wasi_snapshot_preview1.clock_time_get
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:
[ ] Update docs to capture permission settings.
[ ] Update README with WASI defaults.
[ ] Deny WASI behaviour without killing module. It seems AssemblyScript and Grain kill the module if an error is returned from wasi_snapshot_preview1:fd_write. Currently returning __WASI_ERRNO_ACCES[sic].
Includes a simple permissions model and the following WASI support.
wasi_snapshot_preview1.args_sizes_get
wasi_snapshot_preview1.args_get
wasi_snapshot_preview1.environ_sizes_get
wasi_snapshot_preview1.environ_get
wasi_snapshot_preview1.random_get
wasi_snapshot_preview1.clock_time_get
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'sCrypto.generate_random_bytes()
, system time requested bywasi_snapshot_preview1.clock_time_get
usesTime.get_unix_time_from_system()
,wasi_snapshot_preview1.args_get
usesOS.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:
wasi_snapshot_preview1:fd_write
. Currently returning__WASI_ERRNO_ACCES
[sic].