From 036dead934866be62055cc94580c072d45a63848 Mon Sep 17 00:00:00 2001 From: Ruud van Asseldonk Date: Tue, 7 Oct 2025 22:42:56 +0200 Subject: [PATCH] Dogfood dict unpack syntax in Cargo.rcl files This does look more pleasant, yay! I do notice that I find '...' tedious to write though, and maybe a bit too verbose. Maybe I want to change that to '..' after all, even for dicts. But we can do that later, let's see how this goes. --- fuzz/Cargo.rcl | 15 +++++++-------- grammar/tree-sitter-rcl/Cargo.rcl | 32 ++++++++++++++++--------------- pyrcl/Cargo.rcl | 11 +++++------ wasm/Cargo.rcl | 11 +++++------ 4 files changed, 34 insertions(+), 35 deletions(-) diff --git a/fuzz/Cargo.rcl b/fuzz/Cargo.rcl index 28f3702..96eba1a 100644 --- a/fuzz/Cargo.rcl +++ b/fuzz/Cargo.rcl @@ -1,14 +1,13 @@ let root = import "//Cargo.rcl"; { - package = - root.package - | { - name = "rcl-fuzz", - description = "Fuzz targets and helpers for testing RCL.", - publish = false, - metadata = { cargo-fuzz = true }, - }, + package = { + ...root.package, + name = "rcl-fuzz", + description = "Fuzz targets and helpers for testing RCL.", + publish = false, + metadata = { cargo-fuzz = true }, + }, dependencies = { arbitrary = { version = "1.3.0", features = ["derive"] }, diff --git a/grammar/tree-sitter-rcl/Cargo.rcl b/grammar/tree-sitter-rcl/Cargo.rcl index c53be8b..23670f1 100644 --- a/grammar/tree-sitter-rcl/Cargo.rcl +++ b/grammar/tree-sitter-rcl/Cargo.rcl @@ -1,27 +1,29 @@ let root = import "//Cargo.rcl"; { - package = - root.package - | { - name = "tree-sitter-rcl", - description = "RCL grammar for the tree-sitter parsing library.", - keywords = ["incremental", "parsing", "rcl"], - categories = ["parsing", "text-editors"], - build = "bindings/rust/build.rs", - include = [ - "bindings/rust/*", - "grammar.js", - "queries/*", - "src/*", - ], - }, + package = { + ...root.package, + name = "tree-sitter-rcl", + description = "RCL grammar for the tree-sitter parsing library.", + keywords = ["incremental", "parsing", "rcl"], + categories = ["parsing", "text-editors"], + build = "bindings/rust/build.rs", + include = [ + "bindings/rust/*", + "grammar.js", + "queries/*", + "src/*", + ], + }, + lib = { path = "bindings/rust/lib.rs", }, + dependencies = { tree-sitter = "0.20.10", }, + build-dependencies = { cc = "1.0", }, diff --git a/pyrcl/Cargo.rcl b/pyrcl/Cargo.rcl index 1a9bcdd..8e15350 100644 --- a/pyrcl/Cargo.rcl +++ b/pyrcl/Cargo.rcl @@ -1,12 +1,11 @@ let root = import "//Cargo.rcl"; { - package = - root.package - | { - name = "pyrcl", - description = "Python bindings to the RCL configuration language.", - }, + package = { + ...root.package, + name = "pyrcl", + description = "Python bindings to the RCL configuration language.", + }, lib = { crate-type = ["cdylib"], diff --git a/wasm/Cargo.rcl b/wasm/Cargo.rcl index e673d6c..c40745f 100644 --- a/wasm/Cargo.rcl +++ b/wasm/Cargo.rcl @@ -1,12 +1,11 @@ let root = import "//Cargo.rcl"; { - package = - root.package - | { - name = "rcl-wasm", - description = "WASM entry points for RCL functionality.", - }, + package = { + ...root.package, + name = "rcl-wasm", + description = "WASM entry points for RCL functionality.", + }, lib = { crate-type = ["cdylib"] },