Skip to content

grayscale: v0.9.0

Choose a tag to compare

@github-actions github-actions released this 19 Sep 22:45
5383c1c

0.9.0 (2026-09-19)

Features

  • arrays: add binary_search, rotate, min_index, max_index (#2436) (474d171)
  • chars: add width, string_width for Unicode display width (#2638) (7b9d786)
  • json: struct field tags for #json serialization (#2722) (ad75a7c)
  • json: support enum fields in #json structs, serialized by backing type (#2564) (e63f1eb)
  • os: add home_dir, lookup_env, environ (#2438) (5870485)
  • structs: fixed-size array struct fields (#2609) (e84dea5)

Bug Fixes

  • arrays: correct byte/char stride in min_index/max_index/binary_search (#2436) (daee179)
  • arrays: correct byte/char stride in sort_asc/sort_desc (07ac8c1)
  • cli: keep #doc when another attribute sits between it and the declaration (#2762) (ae395f5)
  • cli: keep raw C compiler warnings off stderr for a build that succeeds (#2757) (f0918df)
  • cli: make gray check reach extern.func()/extern.CONST validation (7316919)
  • cli: make gray cross build produce a binary for the linux and mac targets (#2763) (ef0fdab)
  • cli: match the compiler's macro-redefinition warning by text both gcc and clang emit (36e0824)
  • cli: report a native crash and keep the program's real exit status (#2758) (f9fb2dc)
  • cli: report two imported C headers that declare a symbol differently (#2756) (a876c65)
  • cli: wire formatGraySource into gray fmt (#2690) (c1c3a7a)
  • codegen: compile an opaque runtime handle global declared with no initializer (#2760) (0e5966a)
  • codegen: defer value-less file-scope struct globals with array/map fields (eb072e9)
  • codegen: disambiguate same-named local C headers from different directories (#2729) (563fdd9)
  • codegen: generate a dedicated json.stringify path for arrays of #json structs (67ed49c)
  • codegen: keep file-scope struct globals' deferred-init placeholder a C constant (c381e06)
  • codegen: only range-check uint/u64 narrowing for extern-sourced values (701a98c)
  • codegen: parse a wide-integer parameter default through the bigint path (b640d67)
  • codegen: parse a wide-integer struct field default through the bigint path (#2750) (1b8091d)
  • codegen: range-check an extern C-interop result narrowed to uint/u64 by declaration or cast (a811fec)
  • codegen: range-check uint/u64 narrowing for extern C-interop values (#2726) (969dc24)
  • codegen: read is_sorted's narrower-than-int64 elements at their real width (8515371)
  • codegen: recursively default fixed-array fields when a struct is zero-constructed (1aa330f)
  • codegen: ring-buffer the module-qualified C type name in gray_type_to_c_codegen (fe9cbdc)
  • codegen: ring-buffer the user-struct C type name in gray_type_to_c_codegen (#2736) (d001707)
  • codegen: sort enum-element arrays at their real width in arrays.sort_asc/sort_desc (765f06f)
  • imports: resolve local extern import headers against the importing file's directory (#2729) (1b60e1b)
  • imports: warn instead of erroring on a directory-then-file redundant import (#2743) (a25d537)
  • json: scope #json field tag consistency (E3171) per struct (#2722) (89257a5)
  • lexer: don't lex !in as the not_in operator when 'in' starts a longer identifier (#2631) (73f2170)
  • main: diagnose a misspelled extern.func()/extern.CONST name (#2730) (2e0e805)
  • main: parse E5050 param count for C functions returning a function pointer (#2728) (ccdeaef)
  • main: stop E6015 help text from claiming a per-target import guard exists (#2734) (da14687)
  • parser: parse a hex/octal/binary literal wider than 64 bits into a wide integer (#2764) (76292c7)
  • runtime: make a bare panic() inside a #test fail only that test (#2761) (e39b5de)
  • stdlib: add unsigned paths to math.abs/min/max/clamp (#2737) (7ee9991)
  • stdlib: decode/encode UTF-8 codepoints in strings.to_chars/from_chars (#2747) (39e7b13)
  • stdlib: make time module's calendar/formatting functions UTC, not local time (#2753) (f824482)
  • stdlib: UTF-8-encode the pad character in fmt.pad_left/pad_right/center (#2748) (825b166)
  • typechecker: accept pointer parameters and returns in a C callback (#2742) (e02b327)
  • typechecker: apply E5051 fixed-array guard through pointer auto-deref (#2609) (6c8f33d)
  • typechecker: auto-address the receiver when a pointer-receiver struct function is called through an instance (#2744) (a417a50)
  • typechecker: catch E5051 through a fixed struct field passed by mutable reference param (84e7e18)
  • typechecker: check fixed-size struct field length on reassignment, not just construction (c13b979)
  • typechecker: coerce arrays.reduce's literal initial value to the accumulator type (#2741) (834888a)
  • typechecker: exempt int-backed enum arrays from the arrays sum/min/max numeric check (53f0c33)
  • typechecker: keep a const-sourced pointer read-only through function returns, struct fields, array elements and map values (#2766) (ad410ae)
  • typechecker: let #strict when over a bool subject be satisfied by handling true and false (#2751) (2944960)
  • typechecker: propagate E3154 stack-address-to-C guard through pointer-parameter functions (#2732) (c12a3a6)
  • typechecker: reject a #flags enum variant whose value is not a single bit (#2765) (9231c27)
  • typechecker: reject a literal zero/negative fixed-size array size (fe1d587)
  • typechecker: reject a multi-value or fallible call as a defer/ensure statement (#2745) (d3db697)
  • typechecker: reject a pointer to a const-declared variable passed to a function that writes through it (1a85922)
  • typechecker: reject a private func/const/mut used by bare name from a sibling file of its directory module (#2739) (2a401e6)
  • typechecker: reject arrays.fill on a fixed struct field when count doesn't match its size (e62c48b)
  • typechecker: reject bare function references to generic functions (#2735) (3456f9f)
  • typechecker: reject fallible/multi-return calls in parameter defaults (#2746) (e549305)
  • typechecker: reject string/array/map/struct C-callback params (#2727) (faad15a)
  • typechecker: reject struct-element arrays in arrays functions requiring a comparable type (c2c018e)
  • typechecker: report a generic function body's diagnostics once, not again per instantiation (#2749) (e51103c)
  • typechecker: require the #json attribute at json.parse/stringify call sites (3a9b350)
  • typechecker: resolve E3158 C-callback check through variable indirection (#2731) (3837f80)
  • typechecker: stop #strict on err.code from flooding 19 redundant E3056 errors (#2752) (e454f1e)
  • typechecker: stop E3163 from naming the same variable in both message slots (#2755) (2a9976e)
  • typechecker: stop rejecting a pointer passed through a callback-taking function whose callback is known and safe (#2754) (da75341)
  • typechecker: type-check struct field default values (#2740) (e879416)
  • typechecker: validate an extern C call's declared or cast type against the real C return type (#2738) (02dfa59)
  • typechecker: validate arrays.rotate's shift-count argument type (44aef60)
  • typechecker: validate C-callback return type for E3158 (#2733) (6c13f02)