UnpackValue
is no longer implemented forVec
. Instead,UnpackList
,UnpackTuple
orUnpackListOrTuple
can be used.- Added
call_stack()
function. - Removed
experimental_regex()
- Switched from
anyhow::Error
andDiagnostic
tostarlark::Error
in many APIs
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, ""}
becomesdict[str, typing.Any]
. - Add static type checking options.
- Support f-strings extension.
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, removingiterate_collect
andwith_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 introducingListRef
/DictRef
for pointers to them. - Add
AllocStruct
,AllocList
andAllocDict
as helpers to allocate the various types more efficiently. - Remove the
dedupe
Starlark function. - Integrate with the
allocative
crate to support theAllocative
trait. - Add more
Trace
implementations. - Support type annotations on assignments.
- Make
Module.loads
also return theFileSpan
. - Add
FrozenModule.get_option
. - Add support for integers greater than 32 bits.
- Move to a separate
starlark_map
crate forSmallMap
and optimise it. - Require the
starlark_type!
macro. - Change
Module.extra_v
to beValue<'v>
. - Expose
FrozenHeap
fromFreezer
andGlobalsBuilder
. - Remove
Value::new_int
. - In
starlark_module
functions must be more explicit - returnanyhow::Result
, have an explicit'v
parameter, explicitheap
/eval
arguments. - Add
StringValueLike
to cover string types that are values. - Change the
json
extension method to bejson.encode
andjson.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.
- Redo
StringValue
andFrozenStringValue
as aliases forValueTyped<StarlarkStr>
andFrozenValueTyped<StarlarkStr>
respectively. - Add more trait implementations for
ValueTyped
. - Format call stack reports more like Python.
- Implement
FromStr
forProfileMode
. - Impelement
Eq
forBorrowHashed
. - 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
toSmallSet
. - Add a
Regex
type - note this is likely to change API in the next release and is not considered stable. - Upgrade dependencies.
- Add
MethodsBuilder::alloc
.
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 providederive(NoSerialize)
to easily add a failingSerialize
. - Remove
collection_json
. - Support the latest
gazebo
dependency. SmallSet
now returns anExactSizeIterator
.- Many optimisations, particularly around strings.
- Many optimisations to the bytecode compiler.
- Rename functions for working with constant strings.
- Add
StringValue
type, forValue
s which are known to be strings. - Remove
SimpleValue
. - Remove the
Span
type. - Rename
SmallHashResult
toSmallHashValue
. - 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.
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 nowStarlarkStrN
. - Add
OwnedFrozenValue::owner
. - Add
derive
support forFreeze
. - Add more Starlark typed wrappers, such as
StringValue
andValueTyped
. - Make tuples and lists opaque types, with new functions for allocating them (e.g.
alloc_tuple
). - Make all Starlark types implement
Display
in preference tocollect_repr
. - Support for documentation annotations on all types.
There have been many changes since the last release, primarily focused on performance (up to 100x in some benchmarks). These changes caused a number of API changes, the most significant of which are listed below.
- Rename the
starlark_module
crate tostarlark_derive
. - Rename the
walk
methods totrace
to align to standard GC literature. - Add
derive
forTrace
. - Add
StarlarkAttrs
derivation and scheme. - Initial start of documentation generation (still unstable).
- More complete
SmallMap
API. - Three profiling modes, heap, flame and statement.
- Changes to
invoke
to take anArguments
structure. - Changed to iteration APIs.
- Many semantic improvements to non-ASCII strings.
- Refinements to types and how they work.
- Mark a few additional APIs as
unsafe
. - Use the
gazebo
Coerce
trait extensively, in particular required for some of thestarlark_value
macros. - Delete
dict.copy
andlist.copy
, since they aren't in the Starlark spec. UnpackValue
no longer takes aheap
argument.
- Change maintainer to Facebook.
- Move repo to https://github.com/facebookexperimental/starlark-rust.
- Switch to a garbage collector.
- Add
#[starlark_module]
proc-macro. - Significant rewrite of most code, changing most APIs.
- Commits and tag exist in https://github.com/indygreg/starlark-rust.
- Changed dependency versions from
X.Y.Z
toX.Y
to allow adopting newer point releases. - lalrpop crate upgraded from 0.16 to 0.19 and code ported to enable building on Rust 1.56+.
- Fixed compiler warnings on Rust 1.56+ related to semicolons in macro expansions.
- The code was developed at https://github.com/google/starlark-rust.