wasm-ide is a browser-based IDE for competitive programming, built on top of
WebAssembly. It compiles and runs code inside a Web Worker, stores workspaces in
the browser filesystem, and can optionally integrate with remote evaluation and
contest systems.
First install rustup and make sure ~/.cargo/bin is in
your PATH.
Then install the required Rust tooling:
rustup target add wasm32-unknown-unknown
cargo install --locked trunkYou also need these tools available in PATH:
npmjqbrotli
Runtime configuration is loaded from config.json. If that file is missing, the
build falls back to config.example.json.
The main configuration keys are:
default_ws: files created for a new local workspaceremote_eval: optional remote evaluation endpointterry: optional contest-system endpoint
Compiler artifacts must be downloaded from
olimpiadi-informatica/wasm-compilers
and placed in ./compilers. The build expects the .tar.br files there.
Then build the project with:
trunk build --releaseThe app requires COEP and COOP headers.
A minimal nginx configuration for serving the generated dist/ directory is:
server {
listen 80;
server_name _;
root /path/to/wasm-ide/dist;
index index.html;
add_header Cross-Origin-Embedder-Policy require-corp;
add_header Cross-Origin-Opener-Policy same-origin;
location / {
}
location /compilers/ {
brotli_static on;
}
}brotli_static on; is useful if you want nginx to serve precompressed
compiler archives directly.