Comments (4)
There is a subtlety here: at the time when the wasm start function is called, code outside the module cannot access the module's exports. So if the wasm start function calls some code that expects to be able to call back into the wasm, it won't work. It remains an open question whether such cyclic dependency patterns should be supported in wasm. The WASI libc uses an exported function named _start
right now, instead of a wasm start function, to avoid these issues.
from lucet.
@sunfishcode ah, because the start function is intended to be called during instantiation of the module right? That makes sense. So I guess the real issue is that lucet is throwing an exception when "_start" isn't exported whereas wasmtime is not (or it is but is swallowing the exception). Also, perhaps a different name than "_start" so it doesn't get as easily confused with the start function (like it did for me)? "_main" or "_entry" perhaps?
from lucet.
I agree, _start
is confusing. I filed WebAssembly/WASI#19 to track changing the name.
from lucet.
I'm going to close this for now; we'll be sure to adapt what lucet-wasi
does to match the behavior that results from the WebAssembly/WASI#19 discussion. Until then, we will need to keep the current behavior of running the wasm start function on instantiation, and then calling an exported _start
function for the main program.
from lucet.
Related Issues (20)
- Errors while executing hello world example with lucetc-wasi HOT 5
- Arrch64:Do we have plan to support aarch64 HOT 1
- Add command-line option to `lucetc` to limit the globals size of produced modules.
- Reduce the reliance on strings in error types
- Difference between Lucet and other standalone Wasm runtimes like WAVM or Wasmer HOT 1
- LimitsExceeded("heap spec initial size: HeapSpec ... HOT 1
- Unable to get hostcall examples working: lucetc errors with both Rust and AssemblyScript version HOT 1
- CNCF-Runtime discussion/presentation
- cargo cannot resolve dependency HOT 3
- Rust runtime is unable to find symbol "main" of Hello World example HOT 1
- Aarch64 support: What is missing? HOT 2
- Calling guest function via get_func_from_idx() can trigger "Invalid Hostcall" HOT 2
- why is Lucet slower than wasmtime HOT 4
- Screencast in README is too fast to read HOT 2
- "Getting Started" link broken HOT 1
- Access Lucet from REST/Web Server? HOT 1
- lucet-runtime-example doesn't work when specifying latest crate version (0.6.1)
- RuntimeTerminated(TerminationDetails::BlockOnNeedsAsync) HOT 2
- [Documentation] seems a little bit outdated HOT 5
- Any plan to support X86-32? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lucet.