Agent skill

Profiling Wado Compiler

by wado-lang in wado-lang/wado

Profile the native Rust wado binary (compile/serve/run) for host-side bottlenecks — CPU with a sampling profiler, memory with the span trace's RSS and valgrind DHAT.

MITAuto-check: notesDevelopment

Install Profiling Wado Compiler

skills CLI
$ npx skills add wado-lang/wado --skill profiling-wado-compiler -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install wado-lang/wado profiling-wado-compiler --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/wado-lang/wado.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/profiling-wado-compiler .claude/skills/profiling-wado-compiler && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
profiling-wado-compiler
GitHub stars
117
Token cost
~2.9k tokens
SKILL.md length
1,143 words
Files
3 (incl. scripts)
Skills in repo
15
Repo updated
First seen
Licence
MIT

At a glance

Profile the native Rust wado binary (compile/serve/run) for host-side bottlenecks — CPU with a sampling profiler, memory with the span trace's RSS and valgrind DHAT.

  • Works in 3 steps: Auto-detects the symbolicator… → Weights samples by threadCPUDelta (real… → Reports five views
  • Memory profiling
  • SKILL.md covers Pick a build profile, Workflow, Linux setup and How analyze_native_profile.ts…, plus 2 more sections
  • Runs TypeScript scripts from its folder; calls node, cargo and apt-get

What it does

Profiling Wado Compiler is an agent skill from wado-lang/wado. Profile the native Rust wado binary (compile/serve/run) for host-side bottlenecks — CPU with a sampling profiler, memory with the span trace's RSS and valgrind DHAT. Use for native CPU or memory profiling, not guest wasm (see wado-performance for that).

Its SKILL.md is about 2.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including scripts (for example `scripts/analyze_dhat.ts` and `scripts/analyze_native_profile.ts`).

It sits in Development, covering Performance optimization. It works with WebAssembly and Rust. The repository describes itself as: The Wado Programming Language. The licence is MIT.

When your agent uses it

  • Memory profiling
  • Not guest wasm (see wado-performance for that)

Example prompts

  • “/profiling-wado-compiler”

Requirements

  • Node.js

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Auto-detects the symbolicator (--symbolicator auto)
  2. Weights samples by threadCPUDelta (real CPU), not wall-clock
  3. Reports five views

What it can do on your machine

Read from SKILL.md and the folder at commit b1f1e2a. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 2 files in scripts/ (TypeScript), which the agent can run.

    Shell commands in SKILL.md call:

    • node
    • cargo
    • apt-get

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Profiling Wado Compiler loads about 2.9k tokens when it runs. Until then it costs about 70 tokens; SKILL.md has 1,143 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~70
When it runs · the whole SKILL.md, loaded when a task matches
~2.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteRuns commands with sudoSKILL.md:74
    echo '1' | sudo tee /proc/sys/kernel/perf_event_paranoid
  • NoteRuns commands with sudoSKILL.md:77
    addr2line --version >/dev/null || sudo apt-get install -y binutils

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from wado-lang/wado at commit b1f1e2a, republished under its MIT licence (© wado-lang). 1,143 words, ~2,944 tokens.

Download SKILL.mdSave it as .claude/skills/profiling-wado-compiler/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
profiling-wado-compiler
description
Profile the native Rust `wado` binary (compile/serve/run) for host-side bottlenecks — CPU with a sampling profiler, memory with the span trace's RSS and valgrind DHAT. Use for native CPU or memory profiling, not guest wasm (see wado-performance for that).

Profiling the native wado binary

Host-side Rust profiling (the compiler, wado serve, wado run, … including wasmtime/cranelift). For the guest wasm program, use wado-performance instead.

Pick a build profile

Choose based on what you're optimising for:

ProfileCargo flagUse whenTrade-off
profilingcargo build --profile profiling --bin wadoImproving benchmark scores — release-equivalent codegen with debug info kept. Inherits release (thin LTO, codegen-units=1) and adds debug = 2, strip = false.Slow build (LTO), but the CPU profile reflects what users actually run.
devcargo build --bin wadoImproving developer-iteration time — making cargo run -- compile/test/... faster for compiler-hackers. Uses the in-workspace [profile.dev.package.wado-compiler] opt-level = 1, so the compiler itself isn't molasses while everything else stays unoptimised.Fast build, but the absolute numbers are larger than a release run; ratios between hot paths are still actionable.

If unsure: pick profiling for "users complain it's slow", pick dev for "rebuild → run → tweak feels slow during development." The analyzer script and recording flow below are identical for both.

Workflow

sh
# 1. Build with the chosen profile (see table above)
cargo build --profile profiling --bin wado    # benchmark-oriented
# or
cargo build --bin wado                        # dev-iteration-oriented

# 2. Record under load with samply (cargo install samply)
samply record --save-only --rate 1000 -o scratchpad/prof.json -- \
  target/profiling/wado serve --addr 127.0.0.1:8080 app.wado &
SAMPLY_PID=$!
# ... drive load (e.g. oha against benchmark/http_routing) ...

# 3. Stop: SIGTERM the CHILD, not samply. samply finalizes on child exit;
#    signalling samply leaves the child running and the recording hangs.
kill -TERM "$(pgrep -P "$SAMPLY_PID" | head -1)"; wait "$SAMPLY_PID"

# 4. Analyze
node .claude/skills/profiling-wado-compiler/scripts/analyze_native_profile.ts scratchpad/prof.json

Symbols resolve against the path the profile recorded, not the binary that produced it. Rebuilding over target/profiling/wado makes every earlier profile symbolicate against the new build, and its output still looks normal. When you A/B, give each arm its own path: copy the first build aside and profile it there.

For one-shot commands (wado compile foo.wado, wado test foo.wado) there is nothing to drive — samply records until the child exits, so just invoke it directly:

sh
samply record --save-only --rate 1000 -o scratchpad/prof.json -- \
  target/debug/wado test package-gale/tests/driver_rust_test.wado

Interactive call tree (and correct kernel symbols): samply load scratchpad/prof.json opens a browser-based call-tree UI. The CLI analyzer below is for grep-able, transcript-friendly summaries.

The analyzer is a TypeScript script run directly by Node.js (>= 23.6, which strips types with no flags). No build step or dependencies are needed; node analyze_native_profile.ts ... just works.

Linux setup

sh
# samply needs perf_event_paranoid <= 1 for a non-root user
echo '1' | sudo tee /proc/sys/kernel/perf_event_paranoid

# `addr2line` is part of binutils — usually already installed
addr2line --version >/dev/null || sudo apt-get install -y binutils

How analyze_native_profile.ts works

samply's --save-only profile is unsymbolicated: funcTable.name holds the hex relative-virtual-address (RVA), keyed by (lib_index, rva) so the same hex address in two different libs is never merged. The script:

  1. Auto-detects the symbolicator (--symbolicator auto):
    • macOS → atos -o <path> -arch <arch> -l <base> <addrs>; the main executable's __TEXT base is 0x100000000, shared dylibs use base 0.
    • Linux → addr2line -fC -e <path>; PIE binaries store RVAs directly in the profile (no base offset to add). The script reshapes the output to <func> (in <lib>) (<file:line>) so the (in <binary>) filter works on both platforms.
  2. Weights samples by threadCPUDelta (real CPU), not wall-clock weight — otherwise parked tokio/rayon worker threads bury everything.
  3. Reports five views:
    • CPU by library (self) — where the leaf frames land. A high libc.so.6 / libsystem_* ratio means your hot path is in syscalls/memcpy, not Rust code.
    • Top SELF — all — flat hot list with foreign code mixed in. Useful to spot allocator / hashing / memcpy pressure.
    • Top SELF / INCLUSIVE — wado only — the Rust-only view. INCLUSIVE is deduped per sample so recursive frames don't push percentages above 100%.
    • Syscall/alloc CPU attributed to nearest Rust caller — walks up each non-wado leaf stack until it finds a wado frame and credits the cost there. This is how you find which Rust function is responsible for the __memcpy / mmap / mimalloc hot spots.
    • Allocation cost by requesting caller — every sample crossing an allocator entry, credited above the outermost one, skipping the Vec/HashMap growth plumbing. The header is allocation's share of total CPU, so "is this allocation-bound at all" is a number, not a guess.

Common invocations:

sh
# Default: top 30, auto-symbolicator
node .claude/skills/profiling-wado-compiler/scripts/analyze_native_profile.ts scratchpad/prof.json

# Wider view; force Linux symbolicator even on macOS
node .claude/skills/profiling-wado-compiler/scripts/analyze_native_profile.ts \
  scratchpad/prof.json --top 60 --symbolicator addr2line

# Profile a different binary, or a copy of `wado` aside for an A/B arm:
# `--binary` names the file the Rust-only views keep
node .claude/skills/profiling-wado-compiler/scripts/analyze_native_profile.ts \
  scratchpad/prof.json --binary wado-lsp

# Split one function's inclusive cost by the frames it calls
node .claude/skills/profiling-wado-compiler/scripts/analyze_native_profile.ts \
  scratchpad/prof.json --under 'container_sroa::movers_of'

Memory

Measure peak RSS first, per phase second, per allocation site last.

Per phase: the span trace

--log-level debug prints every compiler span with the process's resident set (Linux only). An end line adds the net change in current RSS since the span began:

sh
wado compile --log-level debug hello.wado 2>&1 | grep '<< '
# [00:00:02.1547] << stdlib_snapshot · rss 343/343 MiB (+225)

The pair is current/peak MiB. A span that allocates and frees again nets out near +0, so read a jump in the peak as well as the change. RSS is process-wide, so under wado test with more than one worker the changes mix every worker's compile. Use -p 1 there.

Show full SKILL.md (494 more words)Show less
Per allocation site: DHAT

A heap profiler sees only the system allocator. wado-cli's default mimalloc feature replaces it, so build without it, and copy the binary aside so the next build does not replace it:

sh
cargo build -p wado-cli --bin wado --no-default-features
cp target/debug/wado scratchpad/wado-sysalloc
valgrind --tool=dhat --num-callers=40 --dhat-out-file=scratchpad/dhat.json \
  scratchpad/wado-sysalloc compile -O2 hello.wado -o scratchpad/out.wasm
node .claude/skills/profiling-wado-compiler/scripts/analyze_dhat.ts scratchpad/dhat.json

DHAT runs about 10× slower than native. Its default of 12 frames cuts off the recursive phases, which is why --num-callers=40 is there.

The analyzer reports what was live at the heap's peak (t-gmax), since that sets peak memory, by allocation site and by wado function inclusive. --where RE and --not RE keep or drop stacks, so --where get_or_init_snapshot splits the per-thread stdlib snapshot from the compile itself. --stacks N prints the largest stacks whole.

Non-obvious points

  • Read CPU, not wall-clock. The script weights by threadCPUDelta; otherwise parked tokio/rayon worker threads bury everything.
  • Kernel syscall names from atos are wrong (shared-cache base offset). Read syscall cost via the script's "nearest Rust caller" attribution, not the syscall name.
  • A generic hot spot may be dozens of call sites wearing one name. Identical monomorphizations are folded to a single address, and the symbolicator reports whichever name sorts first. One pass then appears to own cost that belongs to the whole compiler. A dev build folds 125 Body::for_each_child::<closure> instantiations onto one address, and it reads as optimize::drve at ~10 % self CPU while the nir/drve span measures 0.8 %. A span that contradicts the profile is the tell. Before crediting a pass, run nm target/debug/wado | grep <symbol> and count how many names share the address.
  • addr2line outermost-frame only. -i (inlined frames) is intentionally omitted because addr2line does not emit a per-input separator with -i, so the output cannot be reliably split back to addresses. The outermost frame matches the self-CPU bucket — which is what you want. If you need inlined frames, use samply load.
  • Symbolication needs the matching binary. A saved profile holds only addresses; the script resolves them against the binary at the recorded path, so rebuilding target/profiling/wado (or target/debug/wado) makes earlier profiles re-symbolicate to garbage. Analyze before rebuilding, or keep the matching binary.
  • Validate with the profile, not req/s or wall time. The CPU breakdown is reproducible run to run; throughput on a busy dev machine swings by tens of percent. Use the profile to confirm a change landed (e.g. a hot function shrank); measure absolute throughput on a quiet/target host.
  • Choose a target from a fresh profile, never from a WEP's percentages, which predate what has landed since, and profile again after fixing the top item. Estimate a change from where the time goes, not from what it removes: -O3 time is the inliner and the NIR fixed point, so cutting the number of lowered functions buys much less than the count suggests.
  • Linux profile includes the ld-linux frames. Unwinder occasionally attributes a frame to ld-linux-x86-64.so.2 when the RVA happens to collide between the main binary and the dynamic linker mapping. The library breakdown's self-CPU view (which uses the leaf frame's lib) is the trustworthy ratio — incl-by-lib can over-count those frames.

© wado-lang, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (scripts) in .claude/skills/profiling-wado-compiler of wado-lang/wado.

  • SKILL.md
  • scripts/analyze_dhat.ts
  • scripts/analyze_native_profile.ts

Open the folder on GitHubat commit b1f1e2a

Compare with similar skills

Profiling Wado Compiler next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Profiling Wado Compiler compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Profiling Wado Compiler this skillwado-lang/wado117—~2.9kAutomated safety check: NotesMIT
Samplyvortex-data/vortex3.2k—~2.7kAutomated safety check: PassApache-2.0
Investigate User Bugcristicretu/diri427—~1.2kAutomated safety check: PassApache-2.0
Cppcrazyguitar/cppcheatsheet290—~1.8kAutomated safety check: PassMIT
Rust Profilingdiodeme/Gold-Band1431 repos~1.7kAutomated safety check: NotesAGPL-3.0
ProfilingShopify/rubydex364—~2.3kAutomated safety check: NotesCustom licence

Similar skills

  • Samply

    vortex-data/vortex

    Analyze Samply Firefox-profiler output, record focused profiles, summarize hot threads/stacks, inspect symbolication, and compare profile evidence before and after a performance change.

    3.2k GitHub stars~2.7k tokensUpdated today
    DevelopmentAuto-check passed
  • Investigate User Bug

    cristicretu/diri

    Investigate a bug a specific diri user hit (crash, hang, slowness, memory leak, blank or garbled terminal, spawn/resume/remote failure, copy/paste not working) from diri's telemetry with the…

    427 GitHub stars~1.2k tokensUpdated today
    DevelopmentAuto-check passed
  • Cpp

    crazyguitar/cppcheatsheet

    Comprehensive C/C++ programming reference covering everything from C11-C23 and C++11-C++23, system programming, CUDA GPU computing, debugging tools, Rust interop, and advanced topics.

    290 GitHub stars~1.8k tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Rust Profiling

    diodeme/Gold-Band

    Rust profiling skill for performance analysis. An agent skill from diodeme/Gold-Band.

    143 GitHub starsUsed in 1 repo~1.7k tokens
    DevelopmentAuto-check: notes
  • Profiling

    Shopify/rubydex

    Official

    Profile Rubydex indexer performance — CPU flamegraphs, memory usage, phase-level timing.

    364 GitHub stars~2.3k tokensUpdated yesterday
    DevelopmentAuto-check: notes
  • Style Checker

    noumena-labs/Sipp

    Enforces this monorepo's coding style rules by inspecting git diffs, reading .agents/skills/style-checker/references/styleguidance.md, fixing style violations, and reporting the result.

    121 GitHub stars~1.4k tokensUpdated 20 days ago
    DevelopmentAuto-check passed

More from wado-lang/wado

All 15 skills in this repo
  • Wado Performance

    wado-lang/wado

    Analyze and improve the runtime speed of a Wado program's compiled guest Wasm — profile hot functions, read the generated WIR for allocations and copies, reason about the WasmGC cost model, and…

    117 GitHub stars~7.5k tokensUpdated today
    Auto-check passed
  • CI Timing

    wado-lang/wado

    Measure how long GitHub Actions jobs and steps took across past runs, and find the pull request that made CI slower.

    117 GitHub stars~518 tokensUpdated today
    Auto-check passed
  • Investigate and improve code coverage for the wado-compiler crate.

    117 GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Git Upstream Sync

    wado-lang/wado

    The only way to merge origin/main into a branch, conflicts or not.

    117 GitHub stars~855 tokensUpdated today
    Auto-check passed
  • Jco

    wado-lang/wado

    Transpile Wado Wasm components to JS with jco, then run, debug, and benchmark them on Node.

    117 GitHub stars~2.7k tokensUpdated today
    Auto-check passed
  • On Task Done

    wado-lang/wado

    Task-completion flow: /cr (a /code-review answered with /code-review-response, which ends with /distill), update docs (spec/cheatsheet/compiler/optimizer), then run mise run on-task-done (build…

    117 GitHub stars~611 tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about Profiling Wado Compiler

What does Profiling Wado Compiler do?

Profile the native Rust wado binary (compile/serve/run) for host-side bottlenecks — CPU with a sampling profiler, memory with the span trace's RSS and valgrind DHAT. Profiling Wado Compiler is an agent skill from wado-lang/wado. Profile the native Rust wado binary (compile/serve/run) for host-side bottlenecks — CPU with a sampling profiler, memory with the span trace's RSS and valgrind DHAT.

When should I use Profiling Wado Compiler?

Profiling Wado Compiler fits situations like: memory profiling; not guest wasm (see wado-performance for that).

How do I install Profiling Wado Compiler in Claude Code?

Run `npx skills add wado-lang/wado --skill profiling-wado-compiler -a claude-code`. Or copy the skill folder (.claude/skills/profiling-wado-compiler in wado-lang/wado) into .claude/skills/profiling-wado-compiler in your project. Claude Code loads it when a task matches its description.

How do I install Profiling Wado Compiler in Codex?

Run `npx skills add wado-lang/wado --skill profiling-wado-compiler -a codex`. Or copy the skill folder (.claude/skills/profiling-wado-compiler in wado-lang/wado) into .agents/skills/profiling-wado-compiler in your project. Codex loads it when a task matches its description.

Can I use Profiling Wado Compiler in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add wado-lang/wado --skill profiling-wado-compiler -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/profiling-wado-compiler, .gemini/skills/profiling-wado-compiler, .github/skills/profiling-wado-compiler and .opencode/skills/profiling-wado-compiler in your project.

What does Profiling Wado Compiler need to run?

Going by SKILL.md and its folder, Profiling Wado Compiler needs TypeScript for the scripts in its folder and the command-line tools its instructions call (node, cargo and apt-get). Our summary lists: Node.js.

Does Profiling Wado Compiler access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Profiling Wado Compiler safe to install?

Our automated static check of SKILL.md found notes only (runs commands with sudo), nothing it rates as a warning. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Profiling Wado Compiler use?

Profiling Wado Compiler is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Profiling Wado Compiler use?

About 2.9k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Profiling Wado Compiler?

Skills that share tags, products or a category with Profiling Wado Compiler: Samply (vortex-data/vortex, 3.2k stars), Investigate User Bug (cristicretu/diri, 427 stars), Cpp (crazyguitar/cppcheatsheet, 290 stars) and Rust Profiling (diodeme/Gold-Band, 143 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Profiling Wado Compiler?

wado-lang (a GitHub organization) maintains it in wado-lang/wado, which has 117 GitHub stars. The repository holds 15 skills in this directory. The repository was last updated on October 9, 2026.

Source: wado-lang/wado on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.