-
Notifications
You must be signed in to change notification settings - Fork 2
Implemented a Racket FFI #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: canon
Are you sure you want to change the base?
Conversation
|
Do I understand correctly that this would allow calling Racket from the Wasm redex model? |
|
We want to model the way that Wasm modules can be linked to call Javascript functions, which can then perform certain modifications to the Wasm module from outside the Wasm runtime. This PR adds Racket procedures as part of the The Racket functions called are expected to take a Wasm store as the first argument, then all the arguments for the function, and return a new store, and a list of the return arguments. (It would be nice to return values to reflect how the function takes the Wasm arguments, but afaik there's no way to deal with a variable number of |
|
I think we should ensure that the returned store is an extension of the store that we call the host function with. This will give us Racket errors instead of causing Redex to blow up, which should be more helpful for debugging. It's also a closer approximation of the JS API model. |
|
This PR now includes safe procedures for ffi functions to change some of the state of the wasm program. |
Closes #7