Skip to content

docs: bounds on types in the IDL guide - #142

Merged
Kinflou merged 2 commits into
mainfrom
docs/bounds-guide
Nov 3, 2026
Merged

Kinflou merged 2 commits into
mainfrom
docs/bounds-guide

Conversation

@Kinflou

@Kinflou Kinflou commented Nov 3, 2026

Copy link
Copy Markdown
Member

Documents bounds on types (core#98, rollout step 12), now that steps 1-6 are merged in core, generation, comline-rust and comline-typescript. Follows the "Docs follow-ups" in core#197.

Pages

  • guide/idl/types.md: char; T[max N] and T[N]; the required maximum and where it comes from (the position, a settings default, @unverified; no built-in default); how a bounded alias is used (no [...] suffix on an alias of a string or list where used); a note that generators don't enforce maxima yet and refuse char.
  • guide/idl/const.md: sizes taken from constants (char[max NAME_MAX], u8[max u16::MAX]), replacing "array sizes take a literal only".
  • guide/idl/settings.md: bounds.string.max, bounds.array.max, bounds.depth.max: units, ranges, layering, scoped keys, stored resolved, own package only.
  • guide/idl/annotations.md: @max_depth.
  • guide/idl/validator.md: any[] targets, bounds ignored when matching, a section on the std validators (NonEmpty, MinChars, MinItems, IntRange, StringBounds) and the build checks against a type's maximum.
  • guide/idl/use.md: the std table and example.
  • getting-started.md: the sample schema uses char[max 256].
  • Proposals: the type-bounds index no longer says "not settled" (decided: size bounds only; minimum validators shipped); proposals index and design record status updated.
  • reference/languages/{index,rust,typescript}.md: regenerated with scripts/sync-language-support.py (new bounds and chars features, vector counts).

Checks

  • scripts/check-idl-drift.py: no drift (was: char and max undocumented).
  • scripts/sync-language-support.py --check: up to date.
  • Std drift will still fail. The CLI that renders std/*.md pins the pre-bounds core and can't parse char[max N]. That clears when the CLI moves to the bounded core (bounds step 10). Not fixed here.

Other guide pages still use a bare string or T[] in short examples; types.md says so. They build once a default is set.

Refs ComlineProject/core#98, ComlineProject/core#197

@Kinflou
Kinflou merged commit fcc80cc into main Nov 3, 2026
4 checks passed
@Kinflou
Kinflou deleted the docs/bounds-guide branch November 3, 2026 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant