Skip to content

Method with i64 return type fails on Safari 13+14 #127

@yonihemi

Description

@yonihemi

Using JavaScriptKit as only dependency, trying to instantiate a Date() fails on Safari (13.1.1, 14) with:
TypeError: i64 not allowed as return type or argument to an imported function

Stacktrace

TypeError: i64 not allowed as return type or argument to an imported function

wasm-stub
<?>.wasm-function[gettimeofday]
<?>.wasm-function[CFAbsoluteTimeGetCurrent]
<?>.wasm-function[$s10Foundation4DateVACycfC]
<?>.wasm-function[main]
<?>.wasm-function[__original_main]
<?>.wasm-function[_start]
wasm-stub
_start
(anonymous function) — e8900d1b3895f276.js:1:47960
(anonymous function) — e8900d1b3895f276.js:1:184568
asyncFunctionResume
[native code]

Same code runs fine on Chrome and Firefox. Tried with latest blessed carton versions and with latest swiftwasm+JavaScriptKit, same results.

Assuming it's related to swiftwasm/JavaScriptKit#56. Could/should we incorporate this polyfill in JavaScriptKit?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions