Add Web export presets and update Rust configuration for Emscripten
This commit is contained in:
20
rust/.cargo/config.toml
Normal file
20
rust/.cargo/config.toml
Normal file
@@ -0,0 +1,20 @@
|
||||
[target.wasm32-unknown-emscripten]
|
||||
rustflags = [
|
||||
"-C",
|
||||
"link-args=-pthread", # Required for Thread Support
|
||||
"-C",
|
||||
"target-feature=+atomics", # Required for Thread Support
|
||||
"-C",
|
||||
"link-args=-sSIDE_MODULE=2", # Compiles as a dynamic library for Godot to load
|
||||
"-C",
|
||||
"llvm-args=-enable-emscripten-cxx-exceptions=0",
|
||||
"-Z",
|
||||
"default-visibility=hidden", # Prevents symbol conflicts
|
||||
"-Z",
|
||||
"link-native-libraries=no",
|
||||
"-Z",
|
||||
"emscripten-wasm-eh=false",
|
||||
]
|
||||
|
||||
[env]
|
||||
GODOT4_BIN = { value = "/usr/bin/godot", force = true }
|
||||
Reference in New Issue
Block a user