A Rust implementation of the Starlark language
APACHE-2.0 License
reverse()
for SmallMap
.OrderedSet
.OwnedFrozenRef
.call_stack_frame()
function.assert
.dashmap
from 5.4.0 to 5.5.3.hashbrown
from 0.13.2 to 0.14.3.allocative
from 0.3.1 to 0.3.2.Published by ndmitchell 9 months ago
UnpackValue
is no longer implemented for Vec
. Instead, UnpackList
, UnpackTuple
or UnpackListOrTuple
can be used.call_stack()
function.experimental_regex()
function.anyhow::Error
and Diagnostic
to starlark::Error
in many APIs.repr()
for enums.SortedMap
."bool"
are no longer supported. See the revised typing documentation.Published by ndmitchell about 1 year ago
There were over eight hundred commits since the last release, with the main areas of change including:
starlark_syntax
, starlark_lsp
, starlark_bin
crates.starlark_syntax
.{str.type, ""}
becomes dict[str, typing.Any]
.Published by ndmitchell over 1 year ago
There were over one thousand commits since the last release, with the main areas of change including:
Module.names
to get the symbols in a module.Value
to support reduced stack space and enable future garbage collection, removing iterate_collect
and with_iterator
.%
string formatting.StarlarkTypeRepr
as a trait for things that have a type representation.List
/Dict
are specified, making their internals private and introducing ListRef
/DictRef
for pointers to them.AllocStruct
, AllocList
and AllocDict
as helpers to allocate the various types more efficiently.dedupe
Starlark function.allocative
crate to support the Allocative
trait.Trace
implementations.Module.loads
also return the FileSpan
.FrozenModule.get_option
.starlark_map
crate for SmallMap
and optimise it.starlark_type!
macro.Module.extra_v
to be Value<'v>
.FrozenHeap
from Freezer
and GlobalsBuilder
.Value::new_int
.starlark_module
functions must be more explicit - return anyhow::Result
, have an explicit 'v
parameter, explicit heap
/eval
arguments.StringValueLike
to cover string types that are values.json
extension method to be json.encode
and json.decode
.gazebo
library.starlark_module
annotations to be #[starlark(...)]
, #[starlark(require = named)]
for name-only parameters.starlark
binary spawn the REPL by default.Dialect
option to enable types.Published by ndmitchell over 2 years ago
StringValue
and FrozenStringValue
as aliases for ValueTyped<StarlarkStr>
and FrozenValueTyped<StarlarkStr>
respectively.ValueTyped
.FromStr
for ProfileMode
.Eq
for BorrowHashed
.1 << -2
.StarlarkValue::bit_not
for the bit-negation operator.None
values.get_index
to SmallSet
.Regex
type - note this is likely to change API in the next release and is not considered stable.Published by ndmitchell over 2 years ago
MethodsBuilder::alloc
.Published by ndmitchell over 2 years ago
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.
Serialize
, and provide derive(NoSerialize)
to easily add a failing Serialize
.collection_json
.gazebo
dependency.SmallSet
now returns an ExactSizeIterator
.StringValue
type, for Value
s which are known to be strings.SimpleValue
.Span
type.SmallHashResult
to SmallHashValue
.Published by ndmitchell almost 3 years ago
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.
anyhow
.set_loader
.extra_memory
function.Arguments
is now opaque.ConstFrozenString
, which is now StarlarkStrN
.OwnedFrozenValue::owner
.derive
support for Freeze
.StringValue
and ValueTyped
.alloc_tuple
).Display
in preference to collect_repr
.Published by ndmitchell about 3 years ago
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.
starlark_module
crate to starlark_derive
.walk
methods to trace
to align to standard GC literature.derive
for Trace
.StarlarkAttrs
derivation and scheme.SmallMap
API.invoke
to take an Arguments
structure.unsafe
.gazebo
Coerce
trait extensively, in particular required for some of the starlark_value
macros.dict.copy
and list.copy
, since they aren't in the Starlark spec.UnpackValue
no longer takes a heap
argument.Published by ndmitchell over 3 years ago
#[starlark_module]
proc-macro.