GitShow/facebook/starlark-rust
facebook

starlark-rust

A Rust implementation of the Starlark language

by facebook
Star on GitHubFork

Rust

1.0k stars112 forks131 contributorsActive · 7h agoSince 2020v0.14.0Apache-2.0

Meet the team

See all 131 on GitHub →
stepancheg
stepancheg2.9k contributions
ndmitchell
ndmitchell1.5k contributions
JakobDegen
JakobDegen317 contributions
Nero5023
Nero5023282 contributions
cjhopman
cjhopman94 contributions
bobyangyf
bobyangyf63 contributions
christolliday
christolliday45 contributions
jtbraun
jtbraun45 contributions

Languages

View on GitHub →
Rust87.3%
Starlark12.5%
Python0.1%
TypeScript0.1%
HTML0%

Commit activity

Last 12 weeks · 250 commits

Full graph →

Community health

4 of 6 standards met

Community profile →
75
✓README✓License✓Contributing✓Code of Conduct○Issue Template○PR Template

Recent PRs & issues

Active · Last activity 7h ago
See all on GitHub →
Ollie-Pearce
Fix data race in PinnedPagableArc typeOpenPR

When is dropped the pin counter is decremented with a ordering. This can result in a data race when two threads drop an owned instance of a type duplicated via . Reproduction: Test Case: Running with Miri: Miri output: Fix: Synchronise the pin counter with / memory orderings and use a fence before data is unpinned. This mirrors the synchronisation used by . If you'd like to see another example I found a similar bug in the crate

Ollie-Pearce · 15h ago
inducer
[pagable] fails to build on armv7lOpenIssue

(perhaps on all 32-bit architectures?)

inducer · 1d ago

Recent fixes

View closed PRs →
Ollie-Pearce
UB: Reading None's vtable creates an out-of-bounds referenceClosedIssue

Reading a value's vtable creates an instance of , a union whose largest variant (the 16-byte field) sets its size. However, produces a zero-sized value with an 8 byte header, so the reference claims 8 bytes past the bounds of the allocation.

Ollie-Pearce · 16h ago
matts1
Allow custom records to be created from rust.MergedPR

This is a follow-up on #199. This does the following: Add constructor on records, allowing you to create records. Make FrozenRecord and FrozenRecordType pub, allowing you to work directly with frozen records (in my use case, for example, record types are frozen into globals so we don't need unfrozen record types). Add len to record types, allowing you to preallocate capacity via Vec::with_capacity before calling above.

matts1 · 3d ago
renz011tzar
Slicing with a stride of i32::MIN panics: stride.abs() overflows in apply_sliceClosedIssue

Slicing a list, string or tuple with a stride of panics instead of evaluating. Verified at (current ). The published crate has the identical code. Reproduction Same for and . is unaffected — it is lazy and does not reach . Root cause (): is an , and the absolute value of is not representable as an , so overflows. The value reaches line 133 because the two earlier exits do not cover it — returns at , and only reverses. The boundary is unpacked with , so is an accepted value. Its neighbours on both sides behave correctly: So it is a single value between a correct evaluation and a clean error, rather than a range problem. Scope This affects builds with overflow checks on — debug builds and, notably, , since the profile enables by default. With overflow checks off, wraps to , and since for every in-range index, only index survives the filter — which after the reverse is the correct element. I checked a release build against CPython for , and and the output matched in each case. So this is a panic, not a wrong-answer bug, and I don't want to overstate it. Suggested fix returns a , which represents exactly: I applied that locally. The three panicking cases return , and — matching CPython — and passes: 946 + 152 tests, 0 failures*. Happy to send a PR. How this was found Found while evaluating Rust verification tooling. Working this through the midas-lex guidance workflow identifies the spec owner here as a precondition: requires its argument to have a representable absolute value, and unpacking a stride as does not establish that. Stating the obligation in Verus proves that is the unique* accepted stride that violates it, and that is total over the whole accepted range — which is where the boundary table above came from.

renz011tzar · 1w ago
Structured data for AI agents

Repository: facebook/starlark-rust. Description: A Rust implementation of the Starlark language Stars: 1012, Forks: 112. Primary language: Rust. Languages: Rust (87.3%), Starlark (12.5%), Python (0.1%), TypeScript (0.1%), HTML (0%). License: Apache-2.0. Latest release: v0.14.0 (2mo ago). Open PRs: 12, open issues: 27. Last activity: 7h ago. Community health: 75%. Top contributors: stepancheg, ndmitchell, JakobDegen, Nero5023, cjhopman, bobyangyf, christolliday, jtbraun, krallin, perehonchuk and others.

·@ofershap

Replace github.com with gitshow.dev