emscripten-core / emscripten-core/emscripten

Add option for mapping between int64 and JS number

Open
#20,950 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
27.6k
Forks
3.6k
Avg merge
1d 1h
Merged PRs (30d)
105

Description

It would be nice if there were a compiler flag for automatically downcasting / upcasting between a JS `number` and a wasm int64. JS numbers have a precision between 32 and 64 bits (54 bits I believe). If I know my application needs more than 32 bits but less than 54 bits, it would be nice to just work with numbers rather than having to have bigints all over the place. This would have to be an opt-in option since it would cause overflow in cases where numbers exceed JS's max size.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.