Open
Description
Please include the following in your bug report:
Version of emscripten/emsdk:
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 4.0.3 (a9651ff)
Copyright (C) 2014 the Emscripten authors (see AUTHORS.txt)
This is free and open source software under the MIT license.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Failing command line in full:
When using memory64 in Embind, in the __embind_register_std_string function generated by Embind, the line var length = HEAPU64[((value)/8)]; will encounter an error because value is of BigInt type. The operation bigint/8 throws an error: Error: Cannot mix BigInt and other types, use explicit conversions.
function __embind_register_std_string(rawType, name) {
rawType = bigintToI53Checked(rawType);
name = bigintToI53Checked(name);
name = readLatin1String(name);
var stdStringIsUTF8
= true;
registerType(rawType, {
name,
// For some method names we use string keys here since they are part of
// the public/external API and/or used by the runtime-generated code.
'fromWireType'(value) {
var length = HEAPU64[((value)/8)];
var payload = value + 8;