This guide is for people working on the Fino runtime repository. For a product-level overview, start with README.md.
- Rust toolchain
- Supported UNIX-like environment
- C++ toolchain, Python 3, and libclang (used by the source-built V8 archive)
- Release build for most CLI verification and benchmarks
cargo build
cargo build --releaseUse debug builds for symbolized native profiling. Use release builds for throughput measurements and most CLI verification.
Run a script through Cargo:
cargo run -- path/to/script.tsAfter a release build:
./target/release/fino run path/to/script.ts
./target/release/fino path/to/script.tsRun tests and benchmarks:
./target/release/fino test tests/net/serve.test.ts
./target/release/fino bench benchmarksBuild generated docs locally:
./target/release/fino doc build --types runtime-builtins.d.ts jsdocs/ is generated output and is ignored by git.
src/: Rust host runtime, V8 embedding, loader, FFI, async/runtime bridges, profiler, and platform integration.js/: built-in runtime modules, public guides, globals, CLI command tasks, and higher-level standard-library behavior.tests/:.test.tsintegration tests grouped by runtime area.benchmarks/:.bench.tsand.bench.mjsmicrobenchmarks.runtime-builtins.d.ts: declaration docs for synthetic Rust-backed public modules such asfino:ffiandfino:profiler.research-docs/: design and research notes.
Authored guides live in js/**/*.md. Public JavaScript API documentation is
generated from markdown-first comments in js/**/*.ts and declarations in
runtime-builtins.d.ts.
Use the generated docs command when changing public docs or API comments:
./target/release/fino doc build --format html --types runtime-builtins.d.ts jsThe map of all authored guides is js/documentation.md.
A test (tests/docs/map.test.ts) keeps that map complete: adding or
removing a guide requires updating it.
Useful focused checks while developing:
cargo test --quiet
./target/release/fino test tests/internal/builtin-layout.test.ts
./target/release/fino test tests/docs/doc.test.ts
./target/release/fino test tests/net/serve.test.ts
./target/release/fino test tests/net/socket-class.test.tsFor server or networking work, run the closest affected JS suite. For behavior changes in Rust-hosted features, also run the relevant Rust tests.
Benchmark with unique ports to avoid stale local servers:
PORT=3031 cargo run -- example.ts
autocannon -c 100 -d 10 http://127.0.0.1:3031/
curl http://127.0.0.1:3031/stopUse example_profile.ts when collecting a JS CPU profile:
PORT=3032 cargo run -- example_profile.ts
autocannon -c 100 -d 10 http://127.0.0.1:3032/
curl http://127.0.0.1:3032/stop
go tool pprof profile.pbKeep profiling runs separate from general local testing, and prefer release builds for throughput measurements.