emit

Emit WAT, HIR, MASM, and macro-expanded Rust artifacts from the Miden compiler.

Updated Jan 1, 2026
One-click install
npx skills add https://github.com/greenhat/agent-skills --skill emit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: emit
Source: https://github.com/greenhat/agent-skills/tree/main/emit
Command: npx skills add https://github.com/greenhat/agent-skills --skill emit

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill enables you to produce and inspect intermediate compiler artifacts (WAT, HIR, MASM) and macro-expanded Rust outputs with ease, streamlining debugging and fixture validation for the Miden toolchain.

Core Features & Use Cases

  • Emit intermediate IRs (WAT, HIR, MASM) into a target directory or stdout for quick inspection.
  • Dump macro-expanded Rust using cargo expand to assist integration tests and compiler change experiments.
  • Use in debugging compiler issues, validating fixtures, and verifying environment-driven outputs during development.

Quick Start

Set MIDENC_EMIT to the desired outputs (e.g., wat, hir, masm) and MIDENC_EMIT_MACRO_EXPAND for macro expansion dumps, then run your Miden-based tests.

Frequently Asked Questions about emit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I emit intermediate compiler artifacts like WAT or MASM from the Miden toolchain?

To dump macro-expanded Rust code during Miden integration tests, set the MIDENC_EMIT_MACRO_EXP environment variable before running your tests. This leverages cargo expand to assist with compiler change experiments.

Can I output Miden compiler HIR to stdout instead of writing to a file?

Yes, you can output Miden compiler HIR to stdout instead of writing to a file. The emission process supports both file-based and stdout outputs for intermediate representations like WAT, HIR, and MASM.

Why do I need to inspect macro-expanded Rust when debugging compiler issues?

Inspecting macro-expanded Rust is needed when debugging compiler issues because it reveals the exact code structure after macro expansion. Dumping these outputs helps validate fixtures and verify environment-driven outputs during development.

What environment variables are required to drive Miden intermediate representation outputs?

The MIDENC_EMIT and MIDENC_EMIT_MACRO_EXP environment variables are required to drive Miden intermediate representation outputs. They configure the emission of WAT, HIR, MASM, and macro-expanded Rust artifacts.