Summary
Web/src/docs/types/bool.md introduces a "family of explicitly sized boolean types — bool8 through bool512" and lists seven distinct widths. The compiler implements only three: bool8, bool16, bool32, plus bool as an alias for bool8. Code copied from the docs that uses bool64/bool128/bool256/bool512 fails at name resolution.
Compiler reality (source of truth)
Rux/Include/Rux/Type.h:17-50 — TypeRef::Kind defines exactly:
Bool8, Bool16, Bool32,
...
Bool = Bool8, // alias
No Bool64 / Bool128 / Bool256 / Bool512 exist anywhere in the compiler.
Type-name resolution accepts only "bool", "bool8", "bool16", "bool32":
Rux/Source/Hir.cpp:220-222, 687-689
Rux/Source/Sema.cpp:460-462, 1008-1010
For independent corroboration, the codebase already gets this right elsewhere: Web/src/blog/language-without-llvm.md:100 correctly lists "bool8, bool16, bool32" — only this docs page disagrees.
Repro
let a: bool64 = true; // unknown type
let b: bool128 = true; // unknown type
let c: bool256 = true; // unknown type
let d: bool512 = true; // unknown type
All four declarations should compile per the docs; none do.
Every doc/asset that needs editing
Web/src/docs/types/bool.md
- L5 — overview: "Rux provides a family of explicitly sized boolean types —
bool8 through bool512".
- L13-21 — types table; rows for
bool64, bool128, bool256, bool512.
- L28 — example
let c: bool64 = true;.
- L41 — recommendation aside referencing wider types ("FFI requirements or SIMD vectorization") — wording can stay if
bool32 covers it; remove the implication that wider widths exist.
- L57 — example
let z: bool128 = true;.
- L129 — "Wider boolean types (
bool32, bool64, etc.) also support bitwise operations." bool64 doesn't exist; fix the wording (e.g., "bool16 and bool32" or just "wider boolean types").
- L166 — recommendation: "Reserve wider types for SIMD, FFI, and memory-layout-sensitive contexts." Same issue as L41; either point at
bool16/bool32 specifically or scope the claim down.
- L222 — note: "Wider boolean types (
bool256, bool512) are primarily intended for SIMD vector masks and low-level bit manipulation. They may require aligned memory on certain platforms." Whole sentence is fictitious.
Web/src/examples/Bool.rux
- L5-8 —
bool64, bool128, bool256, bool512 declarations.
(L1-4 and L9 onward are correct and should stay.)
Web/.vitepress/grammars/rux.tmLanguage.json
- L562 — bool type-name regex:
\b(bool|bool8|bool16|bool32|bool64|bool128|bool256|bool512)\b — should be \b(bool|bool8|bool16|bool32)\b.
Doc that's already correct (don't touch)
Web/src/api/index.md:415-419 — bool8 Display extension entry is real and matches the stdlib.
Web/src/blog/language-without-llvm.md:100, 128 — already lists the right three widths and uses bool32 for FFI.
Web/src/docs/types/slices.md:63 — bool8[] example is correct.
Suggested fix
Trim docs/example/grammar to match the compiler — bool, bool8, bool16, bool32 only. If wider boolean types are on the roadmap, gate the relevant sections behind a "Planned" / "Not yet implemented" callout instead of presenting them as available.
The "Wider boolean types are primarily intended for SIMD vector masks" sentence at L222 is worth a closer look from a language-design perspective, not just a docs cleanup: the existing bool32 already covers Win32 BOOL interop and 4-byte SIMD lanes; if there's no concrete use case for bool128+, the cleanest fix is to drop those plans rather than promise them.
Summary
Web/src/docs/types/bool.mdintroduces a "family of explicitly sized boolean types —bool8throughbool512" and lists seven distinct widths. The compiler implements only three:bool8,bool16,bool32, plusboolas an alias forbool8. Code copied from the docs that usesbool64/bool128/bool256/bool512fails at name resolution.Compiler reality (source of truth)
Rux/Include/Rux/Type.h:17-50—TypeRef::Kinddefines exactly:No
Bool64/Bool128/Bool256/Bool512exist anywhere in the compiler.Type-name resolution accepts only
"bool","bool8","bool16","bool32":Rux/Source/Hir.cpp:220-222, 687-689Rux/Source/Sema.cpp:460-462, 1008-1010For independent corroboration, the codebase already gets this right elsewhere:
Web/src/blog/language-without-llvm.md:100correctly lists "bool8,bool16,bool32" — only this docs page disagrees.Repro
All four declarations should compile per the docs; none do.
Every doc/asset that needs editing
Web/src/docs/types/bool.mdbool8through bool512".bool64,bool128,bool256,bool512.let c: bool64 = true;.bool32covers it; remove the implication that wider widths exist.let z: bool128 = true;.bool32,bool64, etc.) also support bitwise operations."bool64doesn't exist; fix the wording (e.g., "bool16andbool32" or just "wider boolean types").bool16/bool32specifically or scope the claim down.bool256,bool512) are primarily intended for SIMD vector masks and low-level bit manipulation. They may require aligned memory on certain platforms." Whole sentence is fictitious.Web/src/examples/Bool.ruxbool64,bool128,bool256,bool512declarations.(L1-4 and L9 onward are correct and should stay.)
Web/.vitepress/grammars/rux.tmLanguage.json\b(bool|bool8|bool16|bool32|bool64|bool128|bool256|bool512)\b— should be\b(bool|bool8|bool16|bool32)\b.Doc that's already correct (don't touch)
Web/src/api/index.md:415-419—bool8 Displayextension entry is real and matches the stdlib.Web/src/blog/language-without-llvm.md:100, 128— already lists the right three widths and uses bool32 for FFI.Web/src/docs/types/slices.md:63—bool8[]example is correct.Suggested fix
Trim docs/example/grammar to match the compiler —
bool,bool8,bool16,bool32only. If wider boolean types are on the roadmap, gate the relevant sections behind a "Planned" / "Not yet implemented" callout instead of presenting them as available.The "Wider boolean types are primarily intended for SIMD vector masks" sentence at L222 is worth a closer look from a language-design perspective, not just a docs cleanup: the existing
bool32already covers Win32BOOLinterop and 4-byte SIMD lanes; if there's no concrete use case forbool128+, the cleanest fix is to drop those plans rather than promise them.