Skip to content

Building

The WASM solver bundle

bash
# from rust_solver/ (needs the wasm target + wasm-bindgen)
./build_wasm.sh

This builds fem-wasm for wasm32-unknown-unknown (release) and runs wasm-bindgen --target web, emitting web_demo/fem_wasm.js + fem_wasm_bg.wasm. The Studio and the verification page import that bundle from ../fem_wasm.js.

A larger WASM stack (-zstack-size=16777216) is set so big plate meshes don't overflow the default 1 MB stack at runtime.

Rust workspace

bash
cd rust_solver
cargo test -p fem-core                         # unit tests
cargo run --example verify_analytical -p fem-core   # analytical benchmark suite

Crates: fem-core (solver), fem-wasm (browser bridge), fem-cli.

Running the Studio

Static files - serve the repo root over HTTP:

bash
python3 -m http.server 8800
# http://localhost:8800/web_demo/studio/index.html

This docs site

bash
cd docs-site
npm install
npm run dev      # local preview
npm run build    # static build -> .vitepress/dist

The build is strict: VitePress fails on dead internal links, so a green build is a link-checked build.

Deploying the docs

The static build in .vitepress/dist/ is hosted on Cloudflare Pages. The exact commands and credentials are in docs-site/DEPLOY.md.