VX
Vexel Tutorial Learn the shape before reading every rule

Role: Tutorial

Vexel is learned by observing what the compiler can prove.

This route uses runnable examples from examples/tutorial/. For each step: run in playground, inspect emitted files, and check what was folded or removed.

Tutorial teaches shape; it does not legislate language law.

How to Run Each Step

  1. Open the linked file in playground.html.
  2. Compile with backend c first.
  3. Check output files and build log.
  4. Identify what became compile-time known and what remained runtime.

Guided Steps

1. Quick Add

Objective: recognize baseline shape and exported entrypoint behavior.

Inspect: folded constant in emitted output.

2. Hello + extern

Objective: understand external ABI boundary (&!) and side effects.

Inspect: extern declaration and emitted call boundary.

3. Structs + methods

Objective: see named type behavior and operator/method syntax.

Inspect: lowered representation and method dispatch shape.

4. Arrays + shapes

Objective: nested arrays and per-element arithmetic.

Inspect: shape preservation and operator lowering.

5. std::math arrays

Objective: bundled std lift behavior and folding scope.

Inspect: where math calls collapse vs remain runtime.

6. std::bits reinterpret

Objective: explicit bit reinterpretation contract.

Inspect: preserved semantics and target mapping hints.

7. Constexpr + DCE

Objective: verify that unused paths are removed.

Inspect: symbol reachability and residual output.

8. Prime sieve

Objective: stress compile-time loop evaluation.

Inspect: runtime residue vs compile-time collapse.

9. Multi-file module

Objective: understand module import and symbol flow.

Inspect: import resolution and emitted dependencies.

Related Routes