- Rewrote wasm/bots/rusher/src/lib.rs with complete Rusher strategy: - BFS pathfinding to nearest enemy cores - Wall and enemy avoidance - Known enemy core tracking across turns - Minimal JSON parser for state/config - Custom bump allocator using __heap_base - Updated Cargo.toml for no_std build with alloc crate - Updated build.sh to use cargo directly (sandbox expects low-level exports) - Output: 14KB WASM (much smaller than Go's 5MB due to no runtime) The sandbox loader expects pointer-based WASM interface (allocate, init, compute_moves, free_result) not wasm-bindgen's JavaScript bindings. This implementation uses raw WASM exports compatible with createPointerBasedBridge. Closes: bf-2d50
8 lines
327 B
Bash
Executable file
8 lines
327 B
Bash
Executable file
#!/bin/sh
|
|
# Build rusher.wasm from Rust source
|
|
# Uses low-level WASM interface compatible with the sandbox loader
|
|
set -e
|
|
cd "$(dirname "$0")"
|
|
cargo build --target wasm32-unknown-unknown --release
|
|
cp target/wasm32-unknown-unknown/release/rusher_wasm.wasm ../../dist/rusher.wasm
|
|
echo "Built wasm/bots/rusher -> dist/rusher.wasm"
|