Skip to content
Why am I Getting an Illegal Signature Function Call Within JavaScript?
Profile icon
[deleted]

Once I call my function called "main," from /script.js, I get an error, why?
The code seems perfectly valid, in every single way.

You are viewing a single comment. View All
Profile icon
fuzzyastrocat

Sorry that my previous answer did not address the issue, I clearly misinterpreted the question.

However, perhaps this can be of some help. According to this github issue, it appears that importing an i64 from wasm into JS isn't possible. It's a little old, but it might still be relevant since as far as I know JS doesn't have native support for int64's yet.

Perhaps try changing the i64's into i32's, and see if the issue goes away?

Profile icon
[deleted]

@fuzzyastrocat Thank you for acknowledging the problem at hand, I can try changing it, but from I know, i64s are supposed to map directly to JavaScript BigInts, and it appears that Firefox handles it properly.

Profile icon
[deleted]

@fuzzyastrocat And it appears that browser support for i64 => BigInt isn't that great.. thank you for your time! Now to do some wacky stuff with this.

Profile icon
fuzzyastrocat

@JadenGarcia Great, glad to hear you've got it working!