fix multithread
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user