whatisgithub

What is serde-starlark?

dtolnay/serde-starlark — explained in plain English

Analysis updated 2026-07-17 · repo last pushed 2026-02-16

71RustAudience · developerComplexity · 3/5MaintainedSetup · moderate

In one sentence

A Rust library that generates valid Starlark build configuration files automatically from Rust structs, for use with Bazel, Buck, Pants, or Please build systems.

Mindmap

mindmap
  root((repo))
    What it does
      Generates Starlark files
      From Rust structs
      Uses Serde framework
    Tech stack
      Rust
      Serde
      Starlark
    Use cases
      Bazel build targets
      Buck configurations
      Automated generation
    Audience
      Build infra engineers
      Rust developers
      Bazel teams

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Generate Bazel or Buck build target files programmatically instead of writing Starlark by hand.

USE CASE 2

Define build targets as type-safe Rust structs and serialize them into valid Starlark syntax.

USE CASE 3

Automate generation of hundreds of similar build targets for large build infrastructure.

USE CASE 4

Catch build-configuration mistakes at compile time using Rust's type system before generating output.

What is it built with?

RustSerdeStarlark

How does it compare?

dtolnay/serde-starlarktrystan-sa/rprockitlangton/cellshot
Stars717172
LanguageRustRustRust
Last pushed2026-02-16
MaintenanceMaintained
Setup difficultymoderateeasymoderate
Complexity3/52/53/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Copy-paste prompts

Prompt 1
Show me how to define a Rust struct for a library build target and use serde-starlark to serialize it into Starlark syntax.
Prompt 2
Walk me through setting up serde-starlark in a Rust project to generate a Bazel BUILD file.
Prompt 3
Explain how serde-starlark maps Rust collections and structs to Starlark arrays and function calls.
Prompt 4
I need to generate hundreds of similar Buck build targets. How can serde-starlark help automate that from Rust code?

Frequently asked questions

What is serde-starlark?

A Rust library that generates valid Starlark build configuration files automatically from Rust structs, for use with Bazel, Buck, Pants, or Please build systems.

What language is serde-starlark written in?

Mainly Rust. The stack also includes Rust, Serde, Starlark.

Is serde-starlark actively maintained?

Maintained — commit in last 6 months (last push 2026-02-16).

How hard is serde-starlark to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is serde-starlark for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.