fix multithread

This commit is contained in:
2026-09-01 08:18:26 +07:00
parent 3290f71fa4
commit 6a7bf17e6e
4 changed files with 14 additions and 33 deletions
+5 -3
View File
@@ -37,12 +37,14 @@ fi
# Step 1: Build WASM
#
# Target features and link args (atomics, shared memory, TLS exports) come
# from `web/.cargo/config.toml`, which also enables `-Z build-std` so std is
# rebuilt with atomics support.
# Single-threaded build: `+bulk-memory` only. The multithreaded web backend
# is disabled in `web/src/lib.rs` (gpui's wasm workers freeze their JS event
# loop in `Atomics.wait`, which breaks nostr-sdk's spawn_local-driven client
# and the WebSocket transport), so no atomics/shared-memory flags here.
echo -e "${GREEN}Step 1: Building WASM...${NC}"
cd "$PROJECT_ROOT"
export CARGO_TARGET_DIR="$PROJECT_ROOT/target"
RUSTFLAGS='-C target-feature=+bulk-memory -C link-arg=--max-memory=4294967296' \
cargo build --target wasm32-unknown-unknown $RELEASE_FLAG
# Determine the build directory