Coder Social home page Coder Social logo

Comments (1)

mathetake avatar mathetake commented on July 26, 2024 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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.