Closed kubkon closed 5 years ago
I strongly suspect you are missing this runtime configuration.
@jdm Sweet, worked like a charm! Thanks a bunch! Man, I wish I posted a question here a tad bit sooner :wink: Anyhow, thanks again!
On a different yet somewhat related note, would you welcome any help with some more extensive docs? Say, guides, or examples in the actual rust-docs? If so, I'd be happy to spend some time on this and submit a couple of PRs.
We would be very grateful for documentation improvements!
This might be related to #403 but I'd assume that the update has since come from the upstream? Also, I'm not sure whether this repo is the best place to report this potential issue, or perhaps servo/mozjs would have been a better fit.
Anyhow, assuming that #403 has successfully been addressed, while playing a bit with standalone SP and rust bindings, I've come across a rather unnerving issue with synchronous execution of Wasm. The Wasm binary was cross-compiled with
rustc
usingwasm32-unknown-emscripten
target with async calls purposely disabled. I've then tried parsing it in rust and injecting it into SP via a standard C callback mechanism like so (full code can be found here):When the program is run, an out-of-memory error is thrown when the following line (in the glue JS code) is being executed:
Now, I don't know whether that's an issue with the way I set up the SP using the provided
rust-mozjs
bindings, or whether the issue is more subtle than this. I do know that by now I've looked pretty much everywhere imaginable but alas failed to find an answer. So any help would be greatly appreciated! 😺