Skip to content

Native compiler — executable trace

This trace runs a real self-hosted Native compiler. It downloads the immutable experimental bootstrap seed for your platform, verifies its SHA-256 digest, checks a tiny TypeRB program, and emits QBE IL.

Which source does this executable contain?

Section titled “Which source does this executable contain?”
Identity Value How to use it
Default executed artifact bootstrap-seed-2026-08-30 Reproducible compiler binary downloaded by the script
Seed source revision 0058818 Exact source that explains this trace’s emitted symbols and lines
Code-clinic source the same 0058818314977633c50393796ef9b9f8f1fda50f revision Short, line-linked reading path for this output
Big-map revision Native 0.1.0-dev at ae9b9d6 A newer architecture and source-address snapshot

The seed revision is an ancestor of the map revision; the map is 69 commits later. Both use the compiler/gate4 application path, but they are not the same source. Follow trace output in the Native code clinic. Use the big map to navigate the newer implementation.

Setting TYPE_RB_NATIVE_COMPILER bypasses the seed download and digest check. The script labels that compiler as supplied, and the clinic may no longer match its output. Record the supplied compiler’s source identity when using the override as evidence.

The published seed used by this trace supports:

  • macOS on arm64; and
  • Linux on arm64.

The script stops with a plain explanation on other platforms. You can also set TYPE_RB_NATIVE_COMPILER to a compatible compiler executable you already have.

From the contributor-guide repository:

Terminal window
./scripts/trace-native.sh

The first run needs curl and network access to download the seed.

  1. Select and verify the seed

    The script selects the platform asset from the immutable bootstrap-seed-2026-08-30 prerelease. It compares the file to the digest recorded by that release.

  2. Read the source

    The complete input is traces/native/hello.trb.

  3. Check with the Native frontend

    The seed runs its TypeRB-authored lexer, parser, resolver, and checker. A successful check prints ok.

  4. Emit QBE IL

    The same compiler emits a deterministic QBE program. The trace prints the small data item for the greeting and the exported main entry.

  5. Optionally build the executable

    If qbe and cc are on your PATH, the script asks the Native compiler to build and run the executable. Without them, it stops cleanly at the documented backend boundary.

Expected final program output when QBE is available:

hello from TypeRB Native
hello.trb
-> downloaded Native seed
-> Native lexer, parser, resolver, and checker
-> Native QBE emitter
-> program.ssa
-> optional QBE + cc
-> optional native executable

This is deliberately different from the reference trace. It exposes the QBE boundary and the trust identity of the compiler seed.

Use Read the Native evidence to separate what the seed digest, frontend result, QBE output, optional executable, and broader bootstrap checks can each establish.

Change the greeting text and run the trace again. Find the changed UTF-8 bytes in QBE data. Then introduce an unsupported construct. The compiler should return a deterministic diagnostic rather than silently compile it with different language behavior.