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

Are there any plans to support WebAssembly? #297

Open
baoyachi opened this issue Dec 12, 2023 · 2 comments
Open

Are there any plans to support WebAssembly? #297

baoyachi opened this issue Dec 12, 2023 · 2 comments

Comments

@baoyachi
Copy link

No description provided.

@mmastrac
Copy link
Owner

I'm not sure what the best approach might be for WebAssembly. Can a WebAssembly module run code at startup?

Happy to take contributions!

@mpapierski
Copy link

@mmastrac Yes, Wasm can define a start section that points at a function index, and it's supposed to be invoked automatically upon module instantiation as defined here: https://webassembly.github.io/spec/core/syntax/modules.html#syntax-start

From what I know there's an ongoing debate on the rust core and how to approach this best as rust is 'no life before main' and the start section violates that. If there's any way to deal with this with linker magic, that'd be great.

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

No branches or pull requests

3 participants