Consider wasm instead of (in addition to?) Starlark
- Dominant language
- Rust
- Stars
- 4.4k
- Forks
- 394
- PR merge metrics
- No merged PRs in 30d
Description
👋, excited to see buck2 official, looks great!
Starlark was the right choice in the past, the right choice if you are a python shop, and the right choice to stick close to bazel. I can't help but think it is skating to where the puck is rather than where it will be though. Using wasm for rule definition seems like a better choice in the long term, though admittedly I haven't thought deeply about this space in a while.
Wasm would allow companies to write rules in their language of choice and perhaps even multiple langs (which sounds like a nightmare but I've seen worse🤷♂️). I am starting a rust-only company and have zero desire to write rules in Starlark vs Rust for example.
To reduce complexity of the rules one could sandbox execution and limit the wasm host APIs that buck2 exposes. As a transition, the project could add a starlark -> wasm compiler, essentially treating starlark as just another language that compiles to wasm.
Contributor guide
Research direction
No files, tests, or entry points are identified. The issue proposes evaluating WebAssembly rule definitions alongside Starlark; start by finding the current rule-definition architecture and determining whether a concrete design has been agreed, with an accepted scope and implementation plan as the definition of done.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, wasm
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100