git.delta.rocks / jrsonnet / refs/commits / ede85185f998

difftreelog

chore always use workspace dependencies

rupkpkxxYaroslav Bolyukin2026-05-05parent: #e94fcf5.patch.diff
in: master

8 files changed

modifiedCargo.lockdiffbeforeafterboth
before · Cargo.lock
227 packageslockfile v4
modifiedCargo.tomldiffbeforeafterboth
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,13 @@
 [workspace]
-members = ["crates/*", "bindings/jsonnet", "cmds/*", "tests", "xtask"]
-default-members = ["cmds/jrsonnet"]
+members = [
+  "crates/*",
+  "bindings/jrsonnet-web",
+  "bindings/jsonnet",
+  "cmds/*",
+  "tests",
+  "xtask",
+]
+default-members = ["cmds/jrsonnet", "cmds/jrsonnet-fmt", "bindings/jsonnet"]
 resolver = "2"
 
 [workspace.package]
@@ -22,6 +29,7 @@
 jrsonnet-cli = { path = "./crates/jrsonnet-cli", version = "0.5.0-pre98" }
 jrsonnet-types = { path = "./crates/jrsonnet-types", version = "0.5.0-pre98" }
 jrsonnet-formatter = { path = "./crates/jrsonnet-formatter", version = "0.5.0-pre98" }
+jrsonnet-lexer = { path = "./crates/jrsonnet-lexer", version = "0.5.0-pre98" }
 jrsonnet-gcmodule = { version = "0.4.5" }
 # Diagnostics.
 # hi-doc is my library, which handles text formatting very well, but isn't polished enough yet
@@ -30,8 +38,7 @@
 # I'm against using miette, because I want to reuse data between interpreter and annotations, yet miette
 #   and other libraries want to handle spans etc by itself, which is okay for compiler diagnostics, but is
 #   bad for interpreter, where interpreter and parser are paired much closer.
-hi-doc = "0.3.0"
-annotate-snippets = "0.12.11"
+hi-doc = { version = "0.3.0", default-features = false }
 
 # CLI
 clap = "4.5"
@@ -51,6 +58,13 @@
 # Code formatting
 dprint-core = "0.67.4"
 
+# Evaluator
+stacker = "0.1.23"
+smallvec = "1.15.1"
+educe = { version = "0.6.0", default-features = false }
+url = "2.5.8"
+rustversion = "1.0.22"
+
 # Stdlib hashing functions
 md5 = "0.8.0"
 sha1 = "0.11.0"
@@ -92,6 +106,14 @@
 # Tests/benchmarks
 insta = { version = "1.46", features = ["glob"] }
 criterion = { version = "0.8" }
+strip-ansi-escapes = "0.2.1"
+
+# Web
+wasm-bindgen = "=0.2.106"
+wasm-bindgen-futures = "0.4.56"
+js-sys = "0.3.83"
+console_error_panic_hook = "0.1"
+getrandom = "0.3.4"
 
 [workspace.lints.rust]
 unsafe_op_in_unsafe_fn = "deny"
@@ -150,6 +172,9 @@
 #[profile.test]
 #opt-level = 1
 
+[patch.crates-io]
+jrsonnet-gcmodule = { path = "/home/lach/build/gcmodule" }
+
 [profile.release]
 opt-level = 3
 lto = "fat"
modifiedcmds/jrsonnet/Cargo.tomldiffbeforeafterboth
--- a/cmds/jrsonnet/Cargo.toml
+++ b/cmds/jrsonnet/Cargo.toml
@@ -6,6 +6,7 @@
 license.workspace = true
 repository.workspace = true
 version.workspace = true
+default-run = "jrsonnet"
 
 [lints]
 workspace = true
modifiedcrates/jrsonnet-evaluator/Cargo.tomldiffbeforeafterboth
--- a/crates/jrsonnet-evaluator/Cargo.toml
+++ b/crates/jrsonnet-evaluator/Cargo.toml
@@ -13,9 +13,9 @@
 workspace = true
 
 [features]
-default = ["explaining-traces", "ir-parser"]
+default = ["explaining-traces", "ir-parser", "wasm-bindgen"]
 # Rustc-like trace visualization
-explaining-traces = ["annotate-snippets", "hi-doc"]
+explaining-traces = ["hi-doc"]
 # Allows library authors to throw custom errors
 anyhow-error = ["anyhow"]
 # Use hand-written recursive descent parser
@@ -39,6 +39,7 @@
   "jrsonnet-peg-parser?/exp-null-coaelse",
   "jrsonnet-ir-parser?/exp-null-coaelse",
 ]
+wasm-bindgen = ["dep:wasm-bindgen"]
 
 [dependencies]
 jrsonnet-interner.workspace = true
@@ -61,27 +62,26 @@
 serde.workspace = true
 
 anyhow = { workspace = true, optional = true }
-# Explaining traces
-annotate-snippets = { workspace = true, optional = true }
 # Better explaining traces
 hi-doc = { workspace = true, optional = true }
 # Bigint
 num-bigint = { workspace = true, features = ["serde"], optional = true }
 
-stacker = "0.1.23"
-educe = { version = "0.6.0", default-features = false, features = [
+stacker.workspace = true
+educe = { workspace = true, features = [
   "Clone",
   "Debug",
   "Eq",
   "Hash",
   "PartialEq",
 ] }
-smallvec = "1.15.1"
+smallvec.workspace = true
 drop_bomb.workspace = true
+wasm-bindgen = { workspace = true, optional = true }
 
 [build-dependencies]
-rustversion = "1.0.22"
+rustversion.workspace = true
 
 [dev-dependencies]
 insta.workspace = true
-strip-ansi-escapes = "0.2.1"
+strip-ansi-escapes.workspace = true
modifiedcrates/jrsonnet-formatter/Cargo.tomldiffbeforeafterboth
--- a/crates/jrsonnet-formatter/Cargo.toml
+++ b/crates/jrsonnet-formatter/Cargo.toml
@@ -11,7 +11,7 @@
 hi-doc.workspace = true
 indoc.workspace = true
 insta.workspace = true
-jrsonnet-lexer = { version = "0.5.0-pre97", path = "../jrsonnet-lexer" }
+jrsonnet-lexer.workspace = true
 jrsonnet-rowan-parser.workspace = true
 
 [lints]
modifiedcrates/jrsonnet-ir-parser/Cargo.tomldiffbeforeafterboth
--- a/crates/jrsonnet-ir-parser/Cargo.toml
+++ b/crates/jrsonnet-ir-parser/Cargo.toml
@@ -15,7 +15,7 @@
 insta.workspace = true
 jrsonnet-gcmodule.workspace = true
 jrsonnet-ir.workspace = true
-jrsonnet-lexer = { version = "0.5.0-pre97", path = "../jrsonnet-lexer" }
+jrsonnet-lexer.workspace = true
 
 [lints]
 workspace = true
modifiedcrates/jrsonnet-ir/Cargo.tomldiffbeforeafterboth
--- a/crates/jrsonnet-ir/Cargo.toml
+++ b/crates/jrsonnet-ir/Cargo.toml
@@ -20,6 +20,7 @@
 
 peg.workspace = true
 thiserror.workspace = true
+url.workspace = true
 
 [dev-dependencies]
 insta.workspace = true
modifiedcrates/jrsonnet-rowan-parser/Cargo.tomldiffbeforeafterboth
--- a/crates/jrsonnet-rowan-parser/Cargo.toml
+++ b/crates/jrsonnet-rowan-parser/Cargo.toml
@@ -14,7 +14,7 @@
 drop_bomb.workspace = true
 hi-doc.workspace = true
 indoc.workspace = true
-jrsonnet-lexer = { version = "0.5.0-pre97", path = "../jrsonnet-lexer" }
+jrsonnet-lexer.workspace = true
 rowan.workspace = true
 thiserror.workspace = true
 
@@ -22,4 +22,4 @@
 indoc.workspace = true
 insta.workspace = true
 anyhow.workspace = true
-strip-ansi-escapes = "0.2.1"
+strip-ansi-escapes.workspace = true