Coder Social home page Coder Social logo

Comments (5)

tprk77 avatar tprk77 commented on May 13, 2024 1

I just updated my project to use the new extend. Very nice, seems to be working great. 🎉

from wasmer.

bjfish avatar bjfish commented on May 13, 2024

@lachlansneff What would you think about representing imports object during instantiation with something like the following?
Vec<(String, String, &Export)> or a struct instead of a tuple. I used &Export here so that the user code can own the export (not move it) and we can clone it during instantiation.

If there were duplicate module/name pairs that would result in an error.

from wasmer.

tprk77 avatar tprk77 commented on May 13, 2024

I want to apologize for my somewhat curt issue description. I was just a bit disappointed that my PR was not going to get merged. But I don't have the same insight into the project, so it's very understandable if there's another solution in mind. (It's your project after all. 😁)

To illustrate the functionality I'm looking for, it might help to show my usage:

https://github.com/tprk77/experiments_in_ros2_rust_and_wasm

Specifically, these lines:

https://github.com/tprk77/experiments_in_ros2_rust_and_wasm/blob/2fce069622477fdb795d839349185650019ccb63/ros2_ws/src/ros2_rust_wasm/src/main.rs#L54-L65

I have two versions of the same "app," one in Rust and one in C++. I want to expose the same API imports to both. But to get the C++ app working, I also need the Emscripten imports. (ros::get_imports() is returning an ImportObject containing a ROS2-like API.)

The actual mechanism doesn't really matter to me, but it would be nice if I could still use the imports! macro because it's so convenient. My concern at the moment is with Emscripten, but I think there's also a more general issue of what to do when there are multiple import objects corresponding to multiple APIs. For example, if the mod sensors supplies an import object for a Sensor API, while the mod motors supplies an import object for the Motors API, how to we use both in the same instance?

from wasmer.

lachlansneff avatar lachlansneff commented on May 13, 2024

@tprk77, we're really sorry about not being responsive enough with your other issue. Things have been quite busy here. I'll make sure to take a look at this pr tomorrow morning.

from wasmer.

MarkMcCaskey avatar MarkMcCaskey commented on May 13, 2024

That's great! We're glad to hear that.

Thanks for your PR by the way, it helped me get adjusted to the Wasmer code base! Best of luck with your project and let us know if there's anything we can do for you to make using Wasmer better!

from wasmer.

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.