-
Notifications
You must be signed in to change notification settings - Fork 691
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
Define a start method #495
Conversation
IIUC this isn't the same thing as what @lukewagner suggested in #398 (comment) ? |
Yes exactly, he asked me to do a PR, so here it is: #398 (comment) |
lgtm, thanks! |
I expected something more concrete, mentioning |
Added an example for JF |
|
||
or | ||
|
||
```(start 0)``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you explain what this would do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done I think :)
lgtm with small explanation. Thanks! |
As spec'd in: WebAssembly/design#495 And discussed in: WebAssembly/spec#231 This will make it simpler and more uniform to add a start entry point. s2wasm is the right place to add start because it'll eventually need to do other basic setup, e.g. put code in start to setup the stack, as dschuff is doing in: #179 Or rather, the linker is the right place and s2wasm happens to act as our linker right now.
As spec'd in: WebAssembly/design#495 And discussed in: WebAssembly/spec#231 This will make it simpler and more uniform to add a start entry point. s2wasm is the right place to add start because it'll eventually need to do other basic setup, e.g. put code in start to setup the stack, as dschuff is doing in: #179 Or rather, the linker is the right place and s2wasm happens to act as our linker right now.
We've started some discussion about how this should integrate with emscripten in emscripten-core/emscripten#4218 It's not really clear from the current text in the design repo how it should work with the web embedding. e.g. when you instantiate the module, is the VM expected to call the start function automatically (if so, when? before I think it should be put under the control of the JS code. For example (as a strawman) the instance object returned by |
oh oops, I meant to post this in #398, not in this PR. |
Adding the definition of a start method that would be a top-level module statement.