-
-
Notifications
You must be signed in to change notification settings - Fork 667
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
AssemblyScript Loader #200
Comments
Thanks, I updated the declaration to Essentially, |
Surely it does, but you'd have to wait for the initialized stream to complete before the module is available, otherwise it'll throw undefined. So I'd have to end up wrapping the stream in a callback like this and wait for it to finish before defining the imports. |
Well, you could also use // (async function() {
var myModule = await ASLoader.instantiateStreaming(...);
...
// })();
... or make use of the Promise as usual: ASLoader.instantiateStreaming(...).then(myModule => {
...
}); |
Already tried that, sadly it doesn't work. |
In node.js |
Closing this issue for now as it hasn't received any replies recently. Feel free to reopen it if necessary! |
I've been trying this project out for a few days, and I must say, usage wise I'm pretty confused.
First of all there's no NPM package for https://github.com/AssemblyScript/assemblyscript/tree/master/lib/loader available as shown in the docs that there should be.
assemblyscript/lib/loader/index.d.ts
Line 48 in 671121b
Should be
Promise<Response>
and notResponse
.assemblyscript/lib/loader/index.d.ts
Line 6 in 671121b
Should be optional.
We need some examples, because I'm really confused on how some things should be done.
E.g using
module.getString
andmodule.newString
, because when I try to log something from myAssemblyScript
file all it logs is a number which makes sense.But what are the purpose of these two functions?
The docs definitely needs to be updated.
The text was updated successfully, but these errors were encountered: