facebook / facebook/buck2

Consider wasm instead of (in addition to?) Starlark

Open
#171 10 comments 3 reactions 0 assignees View on GitHub
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.