Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Wasm reference type #36

Open
ashtonmeuser opened this issue May 9, 2023 · 3 comments
Open

Support Wasm reference type #36

ashtonmeuser opened this issue May 9, 2023 · 3 comments
Labels
blocked Blocked by dependency

Comments

@ashtonmeuser
Copy link
Owner

ashtonmeuser commented May 9, 2023

See Wasm proposal.

Blocked by wasmerio/wasmer#3858.

@ashtonmeuser ashtonmeuser added the blocked Blocked by dependency label May 12, 2023
@fire
Copy link

fire commented May 22, 2023

@ashtonmeuser Do you think this will get unblocked from the wasmer codebase in the next 6 months?

A workaround may be needed since there is no activity on the issue.

@ashtonmeuser
Copy link
Owner Author

Good question. I truly don't know. I'll ping the maintainer because that seems like a massive gap in their C(++) library. I'm also a little hesitant to use a workaround for this as it's quite a bit more involved than the simple patch applied earlier.

Once Wasmer enables reference types, implementation on our end should be relatively straightforward (see https://github.com/ashtonmeuser/godot-wasm/tree/wip/reference).

@ashtonmeuser
Copy link
Owner Author

@fire No response from the Wasmer folks. I'll poke around with using Wasmtime as the runtime as it should be pretty much a drop in replacement as Godot Wasm uses no bespoke Wasmer API and instead sticks purely to the WASM C API to which Wasmtime also conforms.

In the meantime, have you considered simply passing the object instance ID to the module as an int and then to peel the "reference" out of Wasm simply use godot_instance_from_id? It's completely opaque to the module. If you're super super concerned about safety (e.g. one module brute forces a Node instance ID it should know), you could keep a whitelist of instance IDs accessible to each Wasm module on the Godot side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Blocked by dependency
Projects
None yet
Development

No branches or pull requests

2 participants