Crates.io | strangemeadowlark |
lib.rs | strangemeadowlark |
version | 0.3.0 |
source | src |
created_at | 2023-11-01 12:38:49.235344 |
updated_at | 2024-09-24 15:36:43.942993 |
description | Parser for the Starlark configuration language. Ported from https://github.com/google/starlark-go |
homepage | |
repository | https://github.com/google/strangemeadowlark/ |
max_upload_size | |
id | 1020973 |
size | 248,804 |
This is a parser for the Starlark language, a dialect of Python intended for use as a configuration language (for example, to configure builds in bazel).
This implementation is a port of starlark-go to Rust.
This library uses bumpalo
and an AST that is using references. This has the
advantage of enabling pattern matching on ASTs. However as the docs bumpalo will not call Drop
and that makes
it very easy to leak memory.
RUSTFLAGS="-Z sanitizer=leak -Zexport-executable-symbols" cargo test --target x86_64-unknown-linux-gnu
The -Zexport-executable-symbols
is a workaround.
The stacktraces will not be useful, unless they are symbolized. For that, you
want llvm-symbolizer
in your path.