wado / wado-cli
AGENTS.md120 starsChanged 14 days agoMITView on GitHub
The wado binary. It drives wado-compiler and wado-lsp, hosts the wasmtime runtime for run / serve / test, and owns the Kiln and dependency backends. How to use the CLI is the wado-cli skill, not this file. - Argument parsing is hand-rolled on lexopt. Do not introduce clap or another parser framework. Each subcommand parses its own options and owns its usage and help text in its own module. run shares its parser with the runners, in wado_host::runner. - Shared…
In this repository37 other files it gives its agents.
- AGENTS.mdAGENTS.md
- benchmark/AGENTS.mdAGENTS.md
- docs/AGENTS.mdAGENTS.md
- package-gale/AGENTS.mdAGENTS.md
- package-grog/AGENTS.mdAGENTS.md
- package-jade/AGENTS.mdAGENTS.md
- package-loam/AGENTS.mdAGENTS.md
- package-re/AGENTS.mdAGENTS.md
- package-wadopoet/AGENTS.mdAGENTS.md
- wado-compiler/AGENTS.mdAGENTS.md
- wado-from-idl/AGENTS.mdAGENTS.md
- wado-host/AGENTS.mdAGENTS.md
- wado-lsp/AGENTS.mdAGENTS.md
- wado-manifest/AGENTS.mdAGENTS.md
- wado-run-pjrt/AGENTS.mdAGENTS.md
- wado-run-webgpu/AGENTS.mdAGENTS.md
- wado-vscode/AGENTS.mdAGENTS.md
- benchmarkSkill
- ci-timingSkill
- code-review-responseSkill
- coverage-investigationSkill
- crSkill
- debuggerSkill
- distillSkill
- git-upstream-syncSkill
- jcoSkill
- markdownSkill
- on-task-doneSkill
- optimizer-debugSkill
- profiling-wado-compilerSkill
- pull-requestSkill
- rust-renameSkill
- rustSkill
- vendor-submodulesSkill
- wado-cliSkill
- wado-performanceSkill
- wasm-optSkill
The file
Files
wado-cli
The wado binary. It drives wado-compiler and wado-lsp, hosts the wasmtime
runtime for run / serve / test, and owns the Kiln and dependency backends.
How to use the CLI is the wado-cli skill, not this file.
Rules
- Argument parsing is hand-rolled on
lexopt. Do not introduce clap or another parser framework. Each subcommand parses its own options and owns its usage and help text in its own module.runshares its parser with the runners, inwado_host::runner. - Shared knobs are declared once in
wado_host::options, in three families.knobs.rsholds what applies them towado's own types.CompileKnobs/CompileKnobOptcarry what the compiler is told:-O,--log-level,--allocator,-f,--no-cache.RuntimeKnobs/RuntimeKnobOptcarry what the wasmtime engine is built with:--collector,--gc-heap-initial,--report-fuel,--deny-process,--process-read,--process-trace.HostKnobs/HostKnobOptcarry how thewadoprocess itself runs:--retain-memory, whichmaininstalls before the subcommand runs. A subcommand lists the subset it accepts and holds one field per family it uses. It declares no field, parse arm, or spec of its own for a shared knob, and a new one is added inwado_host::optionsonly. --profileis not a shared knob, thoughrun,serveandtestall take it. Each accepts different modes and carries a different caveat, so each states its own spec.- A short flag means one thing across the subcommands that compile:
-fis--featurethere, never--filteror--format. Outside that family onlyinit -f(--force) claims it. -Otakes its level attached and explicit (-O2); a bare-Ois an error.process::exitbelongs tomain()alone. A subcommand returnsCliExit(args.rs) from both its parse and its run, so there is exactly one exit path. UseCliExit::silent_failurewhen the subcommand has already printed its own diagnostics.- Adding a subcommand means adding a
Cmdvariant inmain.rs— it must appear inALLand gain aname,args, anddescarm — plus its module. The name is taken for good:external.rsresolves only whatCmddoes not hold, so a new builtin retires that name fromwado-<name>onPATH.helpis the one without a module: it answers out of theCmdtable and thePATHlookup, and both live inmain.rs. - The binary sets mimalloc as the global allocator:
wado serveis allocation-heavy per request and the system allocator contends across threads.
Module Map
The modules a subcommand is named after hold that subcommand. The rest:
runtime.rs— what onlywadoadds to the hostwado_host::guestholds: the test-only imports, and the enginestestandserverun on.kiln_provider.rs,kiln_wit.rs— howwadoresolves a Kiln generator to its component. The pipeline and the runtime it feeds live inwado-host'skiln/.checkruns the same pipelinecompiledoes, writes included.manifest.rs,build.rs,build_dep.rs,dep_component.rs,fetch.rs,git.rs,oci.rs,registry.rs,publish.rs—wado.tomlhandling and the dependency backends behindwado-manifest'sDependencyProviderseam.discover.rs,test_report.rs— source file discovery (shared bytest,format, andquery) and the progress digest. A directory argument goes throughfiles_in_dirand a project-wide walk throughdiscover_tree; a file named directly is taken as given, filters and all. The subcommand supplies only aFilterscallback:filters_atnaming its manifest section, orno_filterswhere a package's excludes must not apply (query referencesspans them). Directory expansion has no second implementation to drift from.external.rs— thewado-<name>files onPATHthatwado --listnames andwado help <name>runs.PATHonly, and never an entry that is empty or relative, which the OS search would read as the current directory. See WEP: External Subcommands.run_cache.rs— what one CLI run resolves once and holds fixed: AOT generator components, generator resolutions, and a watch over the sources it read.wado testshares one across every fixture, so a mid-run edit cannot split the run and is named in the failure at the end. Ascopedview of it also records what one compile read.input_cache.rs,fingerprint.rs— what a compile produced, keyed by the compiler and the run's options and checked against the files and environment variables it read.wado testkeeps a pass in one (test_cache.rs) andrun/servea component (build.rs);core:eval's outcome cache shares the fingerprint. A file in no package caches in the user cache (cache::derived_dir), never beside itself.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

