Skip to content

Conversation

@joepio
Copy link
Member

@joepio joepio commented Oct 31, 2021

Get Wasmer running, so users can describe endpoints / plugins using Atomic Data + WASM code.

  • So far, this is the only system I actually got running
  • Providing an HTTP / fetch interface is something that wasmer doesn't really seem to have an answer for. Not sure if I should write some wrapper?

#73

Accessing Store data inside wasmer

This seems to be my biggest challenge. How do I access data from within WASM?
I basically want to define functions in my WASM context, and call these from outside with arguments and data from the outside. Some of these functions will need access to data from the store. I want them to be able to perform queries. But getting the Query out of WASM, and into the Host (Atomic-Server) sometimes feels impossible.

Approaches:

  • Use WASI pipes, which is basically STDIN + STDOUT. Seems like a really weird API, but at least I can get strings across!
  • Clone data to the wasmer memory / context. Use bincode to serialize struct to memory, pass pointer to function, then read it from wasmer.
  • Have some shared memory, share a pointer (not sure what this means, but it's what feather seems to talk about)
  • UPDATE: Use fp-bindgen! Seems like the most realistic approach for now

@joepio joepio marked this pull request as draft October 31, 2021 21:59
@joepio joepio changed the title Wasm plugin #73 #73 wasmer plugin Feb 11, 2022
@joepio joepio closed this Oct 26, 2022
@joepio joepio mentioned this pull request Jan 7, 2026
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants