Skip to content

Releases

Version 0.14

Choose a tag to compare

@ndmitchell ndmitchell released this 01 Jun 13:16

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

Version 0.13.0

Choose a tag to compare

@ndmitchell ndmitchell released this 13 Dec 15:16

0.13 (Dec 13, 2024)

  • Some API changes (but alas, too many for us to enumerate).
  • Move to more Python-like type annotations, e.g. dict[str, int] now.
  • Support for the set data type.
  • Improve documentation, both the docs and the doc generator.
  • Performance improvements.
  • More trait implementation (Trace, Allocative, AllocValue etc).
  • Bump dependencies.

Version 0.12.0

Choose a tag to compare

@wendy728 wendy728 released this 09 Feb 18:41

0.12.0 (Feb 9, 2024)

  • Implemented reverse() for SmallMap.
  • Added a few more traits and functions to OrderedSet.
  • Fixed "go to label" in bzl LSP.
  • Added OwnedFrozenRef.
  • Added call_stack_frame() function.
  • Categorized lexer errors.
  • Used correct error printing in assert.
  • Cleaned up some code around imports, code consistency, and formatting.
  • Fixed multi-line doc generation.
  • Updated dashmap from 5.4.0 to 5.5.3.
  • Removed autocompletion on reserved words and some trigger chars for Starlark
    LSP.
  • Updated hashbrown from 0.13.2 to 0.14.3.
  • Updated allocative from 0.3.1 to 0.3.2.

Version 0.11.0

Choose a tag to compare

@ndmitchell ndmitchell released this 19 Jan 10:27

0.11.0 (Jan 19, 2024)

  • UnpackValue is no longer implemented for Vec. Instead, UnpackList, UnpackTuple or UnpackListOrTuple can be used.
  • Added call_stack() function.
  • Removed experimental_regex() function.
  • Switched from anyhow::Error and Diagnostic to starlark::Error in many APIs.
  • Fix repr() for enums.
  • Various improvements to DAP support.
  • Add a few more traits and functions to SortedMap.
  • Disable the legacy type representation, types as strings such as "bool" are no longer supported. See the revised typing documentation.

Version 0.10.0

Choose a tag to compare

@ndmitchell ndmitchell released this 17 Oct 20:10

0.10.0 (Oct 16, 2023)

There were over eight hundred commits since the last release, with the main areas of change including:

  • Make it work on 32 bit architectures, including WASM.
  • Introduce starlark_syntax, starlark_lsp, starlark_bin crates.
  • Expose the AST through starlark_syntax.
  • No longer require nightly Rust compiler.
  • Change how types are represented, e.g. {str.type, ""} becomes dict[str, typing.Any].
  • Add static type checking options.
  • Support f-strings extension.

Version 0.9.0

Choose a tag to compare

@ndmitchell ndmitchell released this 05 Jun 17:22

0.9.0 (June 5, 2023)

There were over one thousand commits since the last release, with the main areas of change including:

  • Add Module.names to get the symbols in a module.
  • Change iterators on Value to support reduced stack space and enable future garbage collection, removing iterate_collect and with_iterator.
  • Improve DAP (debugger) support.
  • Improve the performance and fix a few bugs in % string formatting.
  • Introduce StarlarkTypeRepr as a trait for things that have a type representation.
  • Optimise and increase standards conformance of the Starlark standard library.
  • Rework how List/Dict are specified, making their internals private and introducing ListRef/DictRef for pointers to them.
  • Add AllocStruct, AllocList and AllocDict as helpers to allocate the various types more efficiently.
  • Remove the dedupe Starlark function.
  • Integrate with the allocative crate to support the Allocative trait.
  • Add more Trace implementations.
  • Support type annotations on assignments.
  • Make Module.loads also return the FileSpan.
  • Add FrozenModule.get_option.
  • Add support for integers greater than 32 bits.
  • Move to a separate starlark_map crate for SmallMap and optimise it.
  • Require the starlark_type! macro.
  • Change Module.extra_v to be Value<'v>.
  • Expose FrozenHeap from Freezer and GlobalsBuilder.
  • Remove Value::new_int.
  • In starlark_module functions must be more explicit - return anyhow::Result, have an explicit 'v parameter, explicit heap/eval arguments.
  • Add StringValueLike to cover string types that are values.
  • Change the json extension method to be json.encode and json.decode.
  • Support stable Rust.
  • Inline all the relevant pieces of the gazebo library.
  • Change all starlark_module annotations to be #[starlark(...)], #[starlark(require = named)] for name-only parameters.
  • Many performance optimisations.
  • Change the API for profiling and add new profiling features.
  • Make the starlark binary spawn the REPL by default.
  • Many improvements and API changes to the documentation generation code.
  • Many improvements to the LSP code.
  • Add a Dialect option to enable types.

Version 0.8.0

Choose a tag to compare

@ndmitchell ndmitchell released this 09 May 09:38

0.8.0 (May 9, 2022)

  • Redo StringValue and FrozenStringValue as aliases for ValueTyped<StarlarkStr> and FrozenValueTyped<StarlarkStr> respectively.
  • Add more trait implementations for ValueTyped.
  • Format call stack reports more like Python.
  • Implement FromStr for ProfileMode.
  • Impelement Eq for BorrowHashed .
  • Minor optimisations throughout.
  • Better error messages, e.g for 1 << -2.
  • Add StarlarkValue::bit_not for the bit-negation operator.
  • In the REPL print non-None values.
  • Add get_index to SmallSet.
  • Add a Regex type - note this is likely to change API in the next release and is not considered stable.
  • Upgrade dependencies.

Version 0.7.1

Choose a tag to compare

@ndmitchell ndmitchell released this 09 May 07:42

0.7.1 (April 13, 2022)

  • Add MethodsBuilder::alloc.

Version 0.7.0

Choose a tag to compare

@ndmitchell ndmitchell released this 22 Mar 13:44

There have been many changes since the last release, focused on performance and features. These changes caused a number of API changes and behavioural changes, the most significant of which are listed below.

  • Requires all Starlark types support Serialize, and provide derive(NoSerialize) to easily add a failing Serialize.
  • Remove collection_json.
  • Support the latest gazebo dependency.
  • SmallSet now returns an ExactSizeIterator.
  • Many optimisations, particularly around strings.
  • Many optimisations to the bytecode compiler.
  • Rename functions for working with constant strings.
  • Add StringValue type, for Values which are known to be strings.
  • Remove SimpleValue.
  • Remove the Span type.
  • Rename SmallHashResult to SmallHashValue.
  • Improve error messages on the wrong number of positional arguments.
  • Remove some float-related functions from the API.
  • Adjust the profiling API to make it more modular.
  • Add support for validators when freezing.

Version 0.6.0

Choose a tag to compare

@ndmitchell ndmitchell released this 22 Nov 13:13

There have been many changes since the last release, focused on performance, documentation, type safety and profiling. These changes caused a number of API changes and behavioural changes, the most significant of which are listed below.

  • Support for newer versions of anyhow.
  • Some error messages contain "did you mean" suggestions.
  • Addition of a bytecode interpreter, with associated performance gains.
  • Constant propagation and speculative execution during compilation.
  • Removed mutability around the file loader and set_loader.
  • Several new forms of profiling, making use of the new extra_memory function.
  • Improved errors from derivations.
  • Changes around function invocation, in particular Arguments is now opaque.
  • Changes around ConstFrozenString, which is now StarlarkStrN.
  • Add OwnedFrozenValue::owner.
  • Add derive support for Freeze.
  • Add more Starlark typed wrappers, such as StringValue and ValueTyped.
  • Make tuples and lists opaque types, with new functions for allocating them (e.g. alloc_tuple).
  • Make all Starlark types implement Display in preference to collect_repr.
  • Support for documentation annotations on all types.