Skip to content

Version 0.14

Latest

Choose a tag to compare

@ndmitchell ndmitchell released this 01 Jun 13:16
· 692 commits to main since this release

0.14 (May 20, 2026)

There were nearly five hundred commits since the last release. The highlights
are the bytes type, full expression support in f-strings, a 2x-faster
recursive-descent parser, and a significant rework of heap lifetimes.

Language features

  • Implement the bytes type: b"..." literals, bytes() constructor,
    methods like .elems(), indexing, and slicing.
  • F-string expressions: {} placeholders now accept arbitrary expressions
    (arithmetic, function calls, indexing, comprehensions, conditionals), not
    just identifiers. Adds !s and !r conversion specifiers.
  • Add start and end parameters to str.startswith() and
    str.endswith().
  • Allow default as a named argument in dict.pop().
  • Support Enum.Value syntax for accessing enum variants.
  • Reject unparenthesized trailing-comma tuples (e.g. x = 1,).

Parser

  • Add a hand-written recursive-descent + Pratt expression parser as an
    alternative to LALRPOP, roughly 2x faster on per-parse microbenchmarks.
    Selectable via ParserKind.
  • Expose comment spans from the parser via AstModule::comments().
  • Abstract the parser behind a Parser trait with ParseError.

Breaking API changes

  • Heap lifetime rework: &'v Heap is now Heap<'v> (invariant).
    Module::new is private; use Module::with_heap,
    Module::with_temp_heap, or Module::with_temp_heap_async instead.
    Freezer is now non-owning.
  • FrozenRef removed: FrozenRef and OwnedFrozenRef are deleted.
    Use FrozenValueTyped and FrozenAnyValue<T> / FrozenAnyArray<T>
    instead.
  • Value<'v> is no longer Send + Sync.
  • StarlarkFunction removed in favor of StarlarkCallable.
  • AnyLifetime is now sealed instead of unsafe.
  • Evaluator is covariant over 'a.
  • Starlark values require partial sendness.
  • OwnedFrozenValue::alloc and its Default impl removed.
  • UnpackValue, TyUser::new, and error functions now return
    starlark::Error
    instead of anyhow::Error.
  • StarlarkSerialize / StarlarkDeserialize added as trait bounds on
    StarlarkValue
    (default panic impls are auto-generated by
    #[starlark_value]).
  • exported_name deleted.

New APIs

  • Value::function_name() for def/lambda/native callables.
  • collect_str vtable method on StarlarkValue.
  • callstack_nth_location function.
  • BeforeStmtFunc exported from starlark::eval.
  • OwnedHeap, Heap::temp, HeapSendable for frozen heaps.
  • Module::with_heap, Module::with_temp_heap,
    Module::with_temp_heap_async.
  • access_owned_frozen_value with branded lifetime guarantees.
  • Named frozen heaps (freeze_named / into_ref_named) with reference
    inspection.
  • Heaps can depend on frozen heaps.
  • extra_mut on Evaluator for mutable access to extras.
  • Allow storing peak_allocated_bytes in frozen heap.
  • Expose RecordType and positional from the public API.
  • Open visibility of starlark-syntax crate.
  • unpack_str_err convenience function.
  • Resource limits: instruction count and heap memory limits during
    evaluation.
  • gen_flame_data returns Option instead of panicking.

Trait implementations and derives

  • Implement Freeze for ValueTyped and 5-element tuples.
  • Implement Display for ValueTypedComplex and ValueOf.
  • Derive UnpackValue and StarlarkTypeRepr on single-field structs.
  • #[starlark_module] macro supports generic functions and methods.

starlark_map

  • SmallMap::and_modify entry API method.
  • SmallSet::reserve.
  • SmallSet::hashed().
  • Vec2 pair collection from iterators.

LSP and tooling

  • Add command to restart the Starlark language server.
  • Show variables for all stack frames in the debug adapter.
  • Hover provides docs for functions without docstrings.
  • Go-to-definition works inside #[starlark_value] macro bodies.
  • find_call_by_name supports dot expressions (e.g. foo.bar()).
  • Fix go-to-definition for prelude and native symbols on Windows.
  • Improve newline behavior for single-line # comments.
  • Introduce LspOpError; remove anyhow errors from LSP.
  • Fix VSCode extension build; update vscode-languageclient.

Performance

  • 2x parsing speedup via the new recursive-descent parser.
  • FrozenThinBoxSlice made thinner; add ThinBoxSliceFrozenValue.
  • Avoid tuple allocations in cmd_args.add().
  • Improve statement profiler accuracy.
  • Flame+summary combined profiling mode.
  • Show GC walking vs dropping in time-flame graph.

Bug fixes

  • Fix panic in starlark unpack instruction (now returns an error).
  • Fix WASM compatibility (Instant::now() guarded behind platform checks).
  • Fix starlark debugger crash.
  • Fix for writing empty statement profile.
  • Fix const evaluation panic during rustdoc builds.
  • Record error messages now include the record type name.
  • Fix thread safety bounds on heap reserve.
  • Big integers no longer quoted in JSON output.
  • Fix qualified FreezeResult in Freeze derive macro.
  • Fix lifetimes on OwnedFrozenValueTyped and FrozenHeap allocation.
  • Fix frozen string interning soundness issue.
  • Fix incorrect doc generation name mangling.
  • Ensure instruction-count resource checks run at end of evaluation.

Internal

  • Large-scale starlark-pagable serialization/deserialization infrastructure
    for frozen heap paging (100+ commits).
  • VTable and static value registration infrastructure.
  • Many clippy fixes and dependency bumps.
    2b4032d6ca6528c