4 ms·
> What extra info are you looking for? Essentially, a complete executable example of a simple ASM.js program that involves a foreign function, including proces
by jvilk 12y ago
> What extra info are you looking for?
Essentially, a complete executable example of a simple ASM.js program that involves a foreign function, including processing return values. (I imagine if it's this simple, then return values are handled using the same annotations as ASM.js functions?)
While I understand that specs don't necessarily have to have examples, I believe it would benefit the community to have one in the ASM.js spec.
Thanks for clarifying here, though! I now understand.
- azakai 12y agoYeah, ffis are just calls like any other, with the usual annotations and types on parameters and return values, etc. They just happen to be to functions on the outside of the asm module. edit: btw, there is a full example here https://github.com/dherman/asm.js/#example https://github.com/dherman/asm.js/#example
- jvilk 12y agoAh, I wasn't aware there was an actual repo associated with ASM.js. The example doesn't show how you call into the module with `consoleDotLog` defined, though. I know that sounds like a triviality, but complete examples are really useful to cut through any possible ambiguity! I would definitely lobby to get something smaller and concise into the spec under the "Putting it All Together" heading! You could modify the existing example in the spec to include an external function definition and call.
- deleted 12y ago[deleted]