Skip to content

Update the docs for Rue 0.13.0 - #16

Merged
Rigidity merged 1 commit into
mainfrom
rigidity/update-docs-rue-0-13-0
Nov 23, 2026
Merged

Rigidity merged 1 commit into
mainfrom
rigidity/update-docs-rue-0-13-0

Conversation

@Rigidity

Copy link
Copy Markdown
Collaborator

Updates the docs for Rue 0.12.0..0.13.0. Every claim was checked against the 0.13.0 source and CLI, and all 185 rue blocks pass scripts/check-rue-examples.py with 0.13.0.

Changes

  • New pages:
    • Match (docs/match.md): arms by type, narrowing, exhaustiveness, bindings in arms, arm conditions, match statements, inline match, the match lints, and why arms can't inspect function values.
    • Loops (docs/loops.md): for expressions that map, filter and fold, loops, several lists at once, for x, rest in xs, patterns, ...for, and how loops compile.
    • Enums (docs/type-system/enums.md): discriminants, how variants are represented at runtime, field-less enums as atoms, generic enums, and gotchas.
  • Language:
    • Control flow: if statements anywhere in a block, assert messages, Never conditions.
    • Functions: -> Never, and the inlining rules.
    • Constants: constants as programs.
    • Modules: namespaces, inline module scoping and prelude_over_enclosing_item, project::, the private re-export rules, named imports over globs.
    • Operators: indexing in the precedence table, &&/|| returning the right operand, bool_operator_may_raise.
    • Bindings: where patterns are used, and destructured values being evaluated once.
  • Type system:
    • Atoms: string escapes and '...', byte indexing and slicing, Never, hex literals assigned to Int.
    • Guards: narrowing that keeps semantics, pairs with precise remainders, function values, imprecise_narrowing, the size limits.
    • Unions: redundant_union_member and indistinguishable_union_member.
    • Generics: the wider inference, and leaked generics being rejected.
    • Structs: struct update syntax, defaults, initializers before a body.
    • Aliases and casting: smaller updates.
  • Library and builtins:
    • Builtins: substr removed, keccak256_verify, modpow/keccak256 requiring hard_fork_2, operand limits, spreads into list builtins.
    • Standard library: enum Condition, the removed opcode field, length/reverse/contains, merge_list removed.
  • Tooling:
    • CLI, testing and debugging: --operand-limits, --hard-fork-2, --debug-metadata, stack traces. All output is pasted from real runs.
    • Lints: tables regenerated from rue lints.
    • Projects and formatting: operand_limits, hard_fork_2 (with a Targeting Mainnet section), single_quote, and the rue init manifest.
    • Installation: the language server features and the inlayHints setting.
  • Security: release builds keeping checks that can fail.
  • Site:
    • Sidebar entries for the new pages.
    • The highlighter covers the new keywords (in/fold only in for headers), '...' strings, escapes, .. and Never, and no longer colours keywords like let ( as calls.
  • Example check: a hard_fork_2 info string compiles a block with --hard-fork-2, for the modpow and keccak256 examples. It's documented in the script and the update-rue-docs skill.

Tutorials

Not re-tested. No chia-wallet-sdk release uses Rue 0.13.0 yet (0.39.0 depends on rue-compiler ^0.12.0), so their "last tested with" versions are unchanged.

Possible compiler or CLI issues (documented as they behave)

  • const main warns: the release notes suggest const main as a way to make a constant the program, but const main: Int = 42; always triggers naming_convention (SCREAMING_SNAKE_CASE). The constants page recommends export const with rue build --export instead.
  • A Never call doesn't end a branch: if v is Int { fail("x"); }, where fail returns Never, doesn't narrow the code after the if, while raise and return fail("x"); do. The functions page documents this.
  • rue debug drops raised values: it prints only Error: clvm raise, while rue test shows the raised value.
  • unchecked_cast(x) is Bytes32: the release notes say this now checks at runtime, but it's a "Cannot infer generic" error. The guards page uses unchecked_cast::<Any>(x) is Bytes32.

Note

Low Risk

Only documentation, the syntax highlighter and the docs' example checker change. The example check, prettier, typecheck and build (which fails on broken links and anchors) all pass, and two independent reviews checked the prose against the 0.13.0 source. The worst case is an inaccurate statement in the docs.

  • Docs: 3 new pages, and updates to 23 existing pages.
  • Site: sidebar entries and highlighter rules.
  • Tooling: the hard_fork_2 info string in scripts/check-rue-examples.py and the skill.

@Rigidity
Rigidity merged commit 7d2406b into main Nov 23, 2026
3 checks passed
@Rigidity
Rigidity deleted the rigidity/update-docs-rue-0-13-0 branch November 23, 2026 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant