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

wasi calls from wasm start function #616

Open
yamt opened this issue Aug 9, 2024 · 5 comments
Open

wasi calls from wasm start function #616

yamt opened this issue Aug 9, 2024 · 5 comments

Comments

@yamt
Copy link
Contributor

yamt commented Aug 9, 2024

is it allowed to call wasi functions from wasm start function?

i suppose the answer is no because, with some embedder apis, it's tricky or impossible to get a reference to the exported memory before the start function is called.
anyway, is it specified anywhere in the spec?

@sbc100
Copy link
Member

sbc100 commented Aug 9, 2024

Yes, this issue has been much discussed.

See WebAssembly/design#1160 and
#487
#19

I'm not sure if any of those discussions lets to documentation changes anywhere.

@sbc100
Copy link
Member

sbc100 commented Aug 9, 2024

The status quo is that _start is reserved for use by the linker (at least with llvm/wasm-ld) and cannot run user code.

@yamt
Copy link
Contributor Author

yamt commented Aug 13, 2024

The status quo is that _start is reserved for use by the linker (at least with llvm/wasm-ld) and cannot run user code.

do you mean wasm start function?

@sbc100
Copy link
Member

sbc100 commented Aug 13, 2024

Yes, sorry I meant the wasm start function.

@sbc100
Copy link
Member

sbc100 commented Aug 13, 2024

As you can see the terminology is confusing here :)

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

2 participants