mirror of
https://github.com/gorules/zen.git
synced 2026-11-28 08:06:20 +00:00
* feat(trace): trace format v1 with TraceCollector on the compiled engine Adds trace format v1 to the compiled engine, recorded by explicit trace recorders and written natively. The interpreted engine keeps the legacy trace. - EvaluationOptions.trace is a TraceFormat (off, v1, legacy). Legacy traces are produced directly from the same recording. - zen_engine::trace exposes convert, restore and inspect for stored documents, with redaction and truncation markers. - The trace header takes evaluatedAt, timezone and seed from the evaluation context, so an evaluation replays from its own trace. - Batch and columnar evaluations record events as columns and write one document per row. - Bindings accept the trace format (true, 'v1', 'legacy'); the Node binding ships TypeScript types for the v1 document. - Golden, fixture and damaged-document tests cover byte identity with the legacy trace, restore, interop with the reference fixtures and malformed input. * perf(trace): build columnar request rows once with precomputed paths * perf(trace): write a node's edits from its written columns * perf(trace): capture node columns instead of row values in the columnar plan * perf(trace): reuse a node's rendered body for rows with the same rule and cell values * perf(trace): size the batch trace buffer up front, key node bodies on typed column words, share request rows as the input * perf(trace): read the request from input columns and build request rows only on demand * perf(trace): key node bodies on per-column codes and precompute node heads and result labels * perf(trace): keep first-hit table facts and their referenced fields as columns * perf(trace): write per-row expression results in the batch writer * perf(columnar): write result rows as JSON straight from output columns * perf(trace): keep collect-policy rule hits as columns and reuse hit text * perf(trace): pack loop results from columns and resolve result column accessors once per batch * perf(trace): share row-wise node outputs with the trace when nothing can alias them * perf(trace): pack lists without a string per distinct item * perf(trace): write new lists from columns and decide references by where a list came from * perf(trace): write wide list items from columns while the list has never been built * perf(trace): read list cells once while rendering * feat(trace): list table inputs once per node and key rule cells by column id * feat(trace): name matched policy table rows by rule id * feat(trace): store loop results as one column per key * build: optimise test builds
83 lines
2.8 KiB
TOML
83 lines
2.8 KiB
TOML
[package]
|
|
authors = ["GoRules Team <bot@gorules.io>"]
|
|
description = "Business rules engine"
|
|
name = "zen-engine"
|
|
license = "MIT"
|
|
version = "2.1.6"
|
|
edition = "2021"
|
|
repository = "https://github.com/gorules/zen.git"
|
|
homepage = "https://gorules.io"
|
|
|
|
[lib]
|
|
doctest = false
|
|
|
|
[dependencies]
|
|
chrono = { workspace = true }
|
|
ahash = { workspace = true }
|
|
anyhow = { workspace = true }
|
|
base64 = "0.22"
|
|
itoa = "1"
|
|
regex = { workspace = true }
|
|
thiserror = { workspace = true }
|
|
petgraph = { workspace = true }
|
|
serde_json = { workspace = true, features = ["raw_value"] }
|
|
serde = { workspace = true, features = ["derive", "rc"] }
|
|
serde_path_to_error = "0.1"
|
|
strum = { workspace = true, features = ["derive"] }
|
|
once_cell = { workspace = true }
|
|
json_dotpath = { workspace = true }
|
|
rust_decimal = { workspace = true, features = ["maths-nopanic"] }
|
|
fixedbitset = "0.5"
|
|
tokio = { workspace = true, features = ["sync", "time"] }
|
|
rquickjs = { version = "0.10", features = ["macro", "loader", "rust-alloc", "futures", "either", "properties"] }
|
|
zen-types = { path = "../types", version = "2.1.6" }
|
|
zen-expression = { path = "../expression", version = "2.1.6" }
|
|
zen-tmpl = { path = "../template", version = "2.1.6" }
|
|
smallvec = { version = "1", features = ["union"] }
|
|
nohash-hasher = { workspace = true }
|
|
downcast-rs = { version = "2.0", features = ["std", "sync"] }
|
|
arc-swap = "1"
|
|
flate2 = { version = "1", features = ["rust_backend"] }
|
|
zip = { version = "8", default-features = false, features = ["deflate-flate2"] }
|
|
swc_ts_fast_strip = "53.0.0"
|
|
swc_common = "23"
|
|
swc_ecma_parser = "41"
|
|
swc_ecma_ast = "25"
|
|
typed-arena = "2"
|
|
self_cell = "1"
|
|
|
|
[dev-dependencies]
|
|
serde_json = { workspace = true, features = ["unbounded_depth"] }
|
|
tokio = { workspace = true, features = ["rt-multi-thread", "macros"] }
|
|
criterion = { workspace = true, features = ["async_tokio"] }
|
|
insta = { version = "1.43", features = ["yaml", "redactions"] }
|
|
toml = "0.8"
|
|
mimalloc = "0.1.52"
|
|
ctor = "1.0.13"
|
|
|
|
[target.'cfg(not(target_family = "wasm"))'.dependencies]
|
|
recursive = { workspace = true }
|
|
async-trait = { version = "0.1" }
|
|
http = { version = "1.3" }
|
|
reqwest = { version = "0.12", features = ["json", "rustls-tls"], default-features = false }
|
|
reqsign = { version = "0.20", features = ["aws", "azure", "google", "default-context"] }
|
|
sha2 = { version = "0.10" }
|
|
jsonschema = { version = "0.49" }
|
|
|
|
[target.'cfg(target_family = "wasm")'.dependencies]
|
|
jsonschema = { version = "0.49", default-features = false }
|
|
rquickjs = { version = "0.10", features = ["macro", "loader", "rust-alloc", "futures", "either", "properties", "bindgen"] }
|
|
|
|
[[bench]]
|
|
harness = false
|
|
name = "engine"
|
|
|
|
[features]
|
|
default = []
|
|
bindgen = ["rquickjs/bindgen"]
|
|
arbitrary_precision = ["serde_json/arbitrary_precision", "zen-expression/arbitrary_precision", "zen-types/arbitrary_precision", "zen-tmpl/arbitrary_precision"]
|
|
|
|
[[test]]
|
|
name = "golden"
|
|
required-features = ["arbitrary_precision"]
|