Claude-skill-registry emit
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/emit" ~/.claude/skills/majiayu000-claude-skill-registry-emit && rm -rf "$T"
manifest:
skills/data/emit/SKILL.mdsource content
MIDENC Emit (Intermediate Artifacts) + Macro Expand
Quick start
- Emit all intermediate IRs (WAT + HIR + MASM) into a
directory:ir_dumpMIDENC_EMIT=ir=ir_dump
- Emit HIR to stdout:
MIDENC_EMIT=hir=-
- Emit MASM to a specific file:
MIDENC_EMIT=masm=out.masm
- Dump macro-expanded Rust for integration tests into a
directory:ir_dumpMIDENC_EMIT_MACRO_EXPAND=ir_dump cargo make test
MIDENC_EMIT
(same syntax as --emit
)
MIDENC_EMIT--emitSyntax
- Set
to a comma-delimited list ofMIDENC_EMIT
specs, e.g.:KIND[=PATH]MIDENC_EMIT=wat,hir,masmMIDENC_EMIT=ir=ir_dump
Useful kinds for pipeline debugging
: WebAssembly text format (wat
).wat
: Miden High-level IR (hir
).hir
: Miden Assembly text (masm
).masm- Shorthands:
: emitsir
together (WAT + HIR + MASM)wat,hir,masm
PATH rules (practical)
- Omit
to use the CWD.=PATH - Use
to emit=DIR
for each requested output type:DIR/<stem>.<ext>- Example:
writesMIDENC_EMIT=ir=target/emit
,target/emit/<stem>.wat
,target/emit/<stem>.hir
.target/emit/<stem>.masm
- Example:
- Use
to write textual outputs to stdout (e.g.=-
,hir=-
,wat=-
).masm=-- Note:
is invalid;ir=-
expects a directory (or no path).ir
- Note:
- Use
to write a single output to a specific file path:=FILE- Example:
.MIDENC_EMIT=hir=my_dump.hir
- Example:
MIDENC_EMIT_MACRO_EXPAND
(integration tests only)
MIDENC_EMIT_MACRO_EXPANDWhen you need to see the actual Rust code after macros have expanded (helpful when debugging fixtures that use proc-macros, attribute macros, derives, or cfg-gated code), enable macro expansion dumps.
Behavior
- If
is unset: nothing happens.MIDENC_EMIT_MACRO_EXPAND - If set to an empty value or
: writes1
files into the current working directory.*.expanded.rs - If set to any other non-empty value: treats it as an output directory (created if missing).
- The integration test harness runs
and writes one file per fixture/test:cargo expand<test_name>.expanded.rs
Debugging workflow (recommended)
- Reproduce on a single test case if possible.
- Emit intermediate artifacts to a dedicated folder:
MIDENC_EMIT=ir=target/emit/<case> ...
- If the failing test involves Rust fixtures/macros:
MIDENC_EMIT_MACRO_EXPAND=target/expand/<case> ...