Comments (1)
sorry for the delay - yeah first of all this cryptic panic is indeed a bug, and ExportedFunction should return nil or either panic saying this is forbidden. I will fix it. Having said that, host functions are not designed to be called directly like this vs normal Wasm modules in wazero - host module’s functions are invoked with the caller modules context, meaning it should have the access to the memory of the caller (e.g. wasip1 “host module” should be able to read/write the memory of the caller to perform system call). Which has the totally different semantics of the normal wasm modules obviously. (please note host module is not defined in the spec, but this is how generally host functions are implemented).
That’s the reason why api.Module is not returned by wasi_snapshot_preview1.MustInstantiate or similar functions but instead they just return api.Closer. That is intentional api decision.
copypasta my comment from slack
from wazero.
Related Issues (20)
- Plans to support component model? HOT 4
- wasm debug build crashes HOT 9
- performance issue in browser environment HOT 3
- [help want] the program is hangup when read my net file system HOT 1
- [Question] Compilation cache over different versions HOT 1
- `unreachable` error and stack trace if compiled and extra memory, not otherwise HOT 4
- Clarification on concurrency semantics for invocations HOT 2
- `path_open` with an empty path should fail
- `path_symlink` doesn't work HOT 1
- flaky test: TestEngine_sortedCompiledModules
- Should not be able to open a directory with write
- Path normalization causes more accepted file paths HOT 2
- [Question] How to resolve these imports required by wasm runtime HOT 4
- flaky test: BenchmarkLibsodium/box_seal HOT 9
- Representative benchmarks of wazero for Go compiler perf measurement HOT 9
- Data race in Memory.Grow with concurrency HOT 1
- Standard `os` package test for Go 1.23rc1 is failing on Windows HOT 3
- WASI Preview 2 support HOT 4
- How to use HostFunctionBuilder with multiple goroutines? HOT 2
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 wazero.