Repository navigation
v0.7.1
Kern v0.7.1
Kern v0.7.1 is a stabilization and distribution release following v0.7.0. It focuses on making the 0.7 language model more reliable in real projects, improving craft build behavior, reducing SDK payload size, and expanding the documentation surface for users who are installing, building, or learning Kern.
Highlights
- Hardened the compiler around const generics, trait solving, associated type projections, trait objects, mutability, static initializers, and pattern exhaustiveness.
- Added a dedicated compiler soundness regression corpus covering trait coherence, orphan rules, projection cycles, const-specific dispatch, static initialization, closure escape checks, and package-boundary cases.
- Improved
craftwith staged build outputs, fetched package resources, build-script SDK support, live progress rendering, stronger locking, and better cross-platform behavior. - Added
-gdebug information plumbing throughcraftandkernc, including line-level locations, local debug declarations, and composite type metadata. - Slimmed end-user SDK archives, especially by separating full source-build-oriented LLVM payloads from the default runtime-complete SDK.
- Reworked installers so existing SDK roots are replaced atomically instead of being merged in place, avoiding stale files after upgrades.
- Expanded website and repository documentation, including language guides, installation/distribution notes, runtime architecture,
craft,kernc, and source-build documentation.
Language And Compiler
Const Generics And Specialization
- Added typed const generic support across semantic analysis, const evaluation, lowering, and dispatch.
- Preserved const arguments through
typeof, anonymous aggregate decay, supertrait upcasts, trait objects, nested pattern types, function item coercions, and const-evaluated calls. - Fixed const-bound method dispatch and const-specific impl specialization so the selected implementation remains consistent through type checking and lowering.
- Improved diagnostics for const specialization recursion and mismatched const trait bounds.
Trait Solver, Associated Types, And Trait Objects
- Strengthened impl coherence and orphan rule enforcement.
- Improved trait obligation matching, including directional matching, impl-head matching before associated proof selection, and most-specific applicable impl selection.
- Hardened associated type projection normalization for concrete projections, chained projections, pointer projections, environment projections, and generic containers.
- Rejected recursive and non-contractive associated projection cycles instead of allowing solver divergence or unsound proof construction.
- Preserved inherited associated bindings across transitive supertraits and specialized supertrait object dispatch.
- Improved trait object pointer projection handling and supertrait upcasts, including const and associated binding preservation.
- Removed inherited/inherent
eqbaggage so equality follows the intended trait-based path.
Mutability, Arrays, Slices, And Closures
- Removed mutable array element types in favor of the current storage-based mutability model.
- Enforced explicit array element mutability and hardened indexed borrow behavior.
- Tightened fat pointer mutability coercions.
- Stabilized slice literal decay and indexed borrows.
- Rejected escaping stack closures when they would be coerced into function-pointer-like values unsafely.
Patterns, Static Initialization, And Control Flow
- Improved nested match pattern exhaustiveness analysis.
- Added struct value-pattern exhaustiveness coverage.
- Hardened static initializer diagnostics, including enum, optional, pointer, struct, and invalid type-namespace cases.
- Rejected type namespaces in value position.
- Preserved block expression values before running
defer, fixing block/defer value ordering. - Fixed
let elserefactor fallout and improved related lowering paths.
Codegen, Debug Info, Inline Assembly, And Intrinsics
- Added debug-info support through
craftandkernc -g, including local variables, line locations, and composite debug type metadata. - Avoided injecting
/usr/includeinto codegen include paths. - Preserved full-width integer constants.
- Selected inline assembly dialect by target and required inline assembly templates to be string literals.
- Lowered void effect intrinsics as rvalues and fixed breakpoint rvalue lowering.
- Trimmed
-O0LLVM object emission overhead. - Improved monomorphization spans and diagnostics for infinite polymorphic recursion.
craft Build System
- Added fetched package resources and turned the Limine smoke package into a fetched template.
- Added staged build outputs and rejected overlapping staged outputs.
- Replaced
link_scriptwith the more explicitlink_arg_pathbuild-script API. - Added
tools/craft/sdk/builder.rnso build scripts can use SDK-provided builder APIs. - Bundled build-script SDK modules correctly.
- Added live execution progress display and made progress output less noisy.
- Surfaced staged tool stderr to make failed build actions easier to diagnose.
- Hardened output handles, source tree handling, generated-source handling, and staged artifact copy paths.
- Improved workspace locking, including lock wait reporting and stale Windows lock reclamation.
- Normalized script paths, native library paths, staged copy paths, and macOS link-search behavior for cross-platform CI stability.
- Split execution orchestration and other hot paths into smaller modules for maintainability.
SDK, Installers, And Release Packaging
- Reduced end-user SDK archive size by trimming non-runtime payloads from the default SDK.
- Slimmed Windows and macOS end-user toolchain payloads.
- Documented the split between the runtime-complete SDK and the full source-build-oriented LLVM toolchain artifact.
- Improved Windows SDK download speed.
- Fixed PowerShell installation from archives that extract into a single SDK root.
- Made Unix, Windows, and Python installer paths replace an existing SDK root atomically through staging and backup directories.
- Clarified Windows offline archive installation and local SDK installation from source-built archives.
- Added release/distribution documentation for Windows, Unix, SDK layout, and controlled host-toolchain packaging.
Libraries And Runtime
- Hardened cfg-gated runtime paths and freestanding runtime-entry behavior.
- Fixed
runtime_entry = nonelinking behavior for freestanding builds. - Updated
rt,sys,std, andbasecode to follow the current pointer, slice, and mutability model. - Replaced free pointer helper functions with
usizemethods such asas_ptr[T]()andas_mut_ptr[T](). - Updated collections, allocators, filesystem, terminal, environment, time, and I/O code for the v0.7.1 compiler semantics.
Incubator Packages
- Updated
json,bed, andbitiofor current language and library behavior. - Added and documented
incubator/limine-smokeas a freestanding Limine smoke-test package. - Added
incubator/limine-mkiso. - Expanded JSON tests and examples around parsing, packed/indexed documents, owned values, rendering, and number decoding.
Documentation And Website
- Added an Astro-based documentation website with guide, reference, install, SDK, source-build, architecture, and tooling sections.
- Added guides covering language basics, pointers and slices, conversions and BNC, traits and generics, const evaluation, inline assembly, intrinsics, ABI/extern, modules, collections, allocators, runtime,
craft,kernc, and freestanding linking. - Expanded repository docs for
craft,kernc, runtime architecture, SDK rebuild/distribution policy, Windows distribution, Unix distribution, and documentation navigation. - Updated README installation, release packaging, local SDK install, and v0.7.1 status text.
- Added website link verification and Node 22 CI support for website builds.
Compatibility Notes
- Kern remains pre-1.0. Historical syntax shims are not preserved when the language or toolchain model is cleaned up.
- Projects should update
Craft.tomlpackage versions tokern = "0.7.1". - Build scripts should prefer
link_arg_pathover the olderlink_scriptshape. - Pointer helper usage should move from free helper functions to
usizemethods such asaddr.as_ptr[T]()andaddr.as_mut_ptr[T](). - Array and slice code should follow storage-based mutability: mutable bindings, mutable pointers, and mutable slices are distinct permissions.
- Trait and const-generic-heavy code may now receive stricter diagnostics where v0.7.0 accepted ambiguous, cyclic, or unsound cases.
- Reinstalling over an existing SDK should now replace the old SDK root rather than merging new files over old files.
Verification Focus
This release added or expanded coverage for:
- const generics and const-specific trait dispatch;
- trait solver coherence, orphan rules, projections, supertraits, and trait objects;
- mutability and slice/array permission boundaries;
- match exhaustiveness and static initializer soundness;
- package-boundary soundness cases;
- Craft staged outputs, generated sources, local packages, external dependencies, runtime caches, and cross-platform artifact behavior;
- platform-specific inline assembly IR attributes;
- documentation website build/link validation.
Full Changelog: v0.7.0...v0.7.1