As of https://github.com/AssemblyScript/assemblyscript/pull/111 it appears that I64s will be able to cross the WASM<->JS boundary at some point as BigInts, thus enabling support for long integers in both the assembly and portable as well as generated typescript definitions. One not so obvious prequesite here might be to handle these in (i64-to-i32-lowering) asm.js output as well somehow.
BigInt is now in Chrome, Firefox (behind experimental flag), and NodeJS.
Would love to see 1234n syntax and BigInt type supported in assemblyscript, even if it's just i64 under the hood for now.
BigInt is definitely make sense only for arbitrary precision (actually any large numbers). In other case it will confuse folks
The loader now has BigInt64Array etc. support for what is an Int64Array in AS, and passing i64 <-> BigInt via exports and imports can be achieved by enabling --experimental-wasm-bigint in V8 for example with no further work necessary on our end. As such I consider "passing I64 to/from WASM" resolved, even though we don't have a BigInt class on the AS side yet, which would be a different enhancement to make.
Most helpful comment
BigInt is now in Chrome, Firefox (behind experimental flag), and NodeJS.