You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looking through the docs, I expected to be able to find a way to directly set a variable and/or function to ruby in javascript using something like vm.set() like some high quality vms like pypy and wasmoon do but seeing that isnt the case that leavs me wondering how exactly can i do so? This features is pretty important for my project seeing as its how i need this to set a library of commands up to work.
The text was updated successfully, but these errors were encountered:
To help us better understand your needs, could you share what kind of API or interface you would ideally like to see for setting Ruby variables or functions from JavaScript?
Thanks!
Ok, sorry for being so vague. I know that ruby doesn't exactly have functions, but methods in ruby are pretty close either way. i'm hoping that we can set variables and methods from ruby to variables and functions from javascript simar to the way the pypy and wasmoon VMs APIs work. In wasmoon you can see a direct example right there in the readme: "lua.global.set('sum', (x, y) => x + y)" i can imagine ruby.wasm's api working similarly with something like "vm.set('sum', (x, y) => x + y)" or "vm.setMethod('sum', (x, y) => x + y)" where set is just used for setting a variable from js. vm.get would obviously work in reverse.
Just in case you need context for what i'm trying to use these features for, here is a link to my repository.
Looking through the docs, I expected to be able to find a way to directly set a variable and/or function to ruby in javascript using something like vm.set() like some high quality vms like pypy and wasmoon do but seeing that isnt the case that leavs me wondering how exactly can i do so? This features is pretty important for my project seeing as its how i need this to set a library of commands up to work.
The text was updated successfully, but these errors were encountered: