From 6264445fdd714b38e3fbf8bcde1a19a54b696703 Mon Sep 17 00:00:00 2001 From: Leon Scroggins III Date: Fri, 29 Nov 2024 11:05:38 -0500 Subject: [PATCH] Add missing rustflags With these flags, we can properly export to HTML! --- rust/.cargo/config.toml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/rust/.cargo/config.toml b/rust/.cargo/config.toml index 0fb7191..7c1530e 100644 --- a/rust/.cargo/config.toml +++ b/rust/.cargo/config.toml @@ -3,6 +3,12 @@ rustflags = [ "-C", "link-args=-sSIDE_MODULE=2", "-C", "link-args=-pthread", # was -sUSE_PTHREADS=1 in earlier emscripten versions "-C", "target-feature=+atomics,+bulk-memory,+mutable-globals", - "-Zlink-native-libraries=no" + "-Zlink-native-libraries=no", + "-Clink-arg=-fwasm-exceptions", + "-Clink-args=-sDISABLE_EXCEPTION_CATCHING=1", + "-Clink-args=-sEXPORT_ALL=1", + "-Clink-args=-sSUPPORT_LONGJMP=wasm", + "-Cllvm-args=-enable-emscripten-cxx-exceptions=0", + "-Cllvm-args=-wasm-enable-sjlj", ]