The United Kingdom and Singapore are now first-class jurisdictions in Legalis-RS — and the test suite jumped from 6,100+ to 9,568 along the way.
Today we released Legalis-RS 0.1.1 — our first patch on the legal-DX framework, adding two common-law jurisdictions and a big test-coverage jump.
No C. No C++. No Fortran. No JVM. Where closed legal SaaS, academic tools like Catala, the Z3 SMT solver (C++), and Java/Python legal-reasoning stacks dominate the field, Legalis-RS is Pure Rust to the core. The result compiles to a single static binary or to WASM, so the same statute engine runs on a server, in a CLI, or in the browser — with no native runtime to install and no foreign-language toolchain to drag along.
Legalis-RS turns statutes into structured, machine-verifiable code, cleanly separating Deterministic Logic (what the law mechanically computes) from Judicial Discretion (what a court must still decide). That is the whole bet of Legal DX, and 0.1.1 is about proving the bet holds across more than one legal tradition.
Why 0.1.1 matters
The 0.1.0 debut proved the engine worked. 0.1.1 proves it generalizes.
- Beyond civil law. Until now the strongest jurisdictions were civil-law systems (Japan, Germany, France). 0.1.1 brings the engine into common law with the United Kingdom — a different legal lineage entirely, modelled with the same
Condition/Effect/Statuteprimitives. - A mixed-system Asian hub. Singapore joins as a jurisdiction that blends common-law foundations with modern statutory regimes (the Companies Act, PDPA, Payment Services), validating the model against a deliberately heterogeneous legal stack.
- A hardening pass. Test coverage grew from 6,100+ to 9,568 tests across all crates, and clippy warnings were driven to near-zero with comprehensive crate-level
#![allow(...)]directives for accepted patterns. - Cleaner examples. Jurisdiction-specific examples were renamed with prefixes (
de-,fr-,jp-,uk-) to remove filename collisions across the workspace.
This is our first patch release, and the test suite already jumped by more than 3,000 cases — exactly the kind of momentum we wanted out of the gate.
What’s New in 0.1.1
New jurisdictions (2):
legalis-uk— United Kingdom: Employment, Consumer Rights, Financial Services, Companies, and Contract law.legalis-sg— Singapore: Companies Act, Employment Act, PDPA, IP Laws, Banking, and Payment Services.
Improvements:
- Test coverage expanded from 6,100+ to 9,568 tests across all crates.
- Clippy compliance: warnings reduced to near-zero with comprehensive crate-level
#![allow(...)]directives. - Example collision fix: jurisdiction-specific examples renamed with
de-,fr-,jp-,uk-prefixes to avoid filename collisions.
Bug fixes:
legalis-dsl: fixed anever_loopclippy error in LSP call-hierarchy preparation.legalis-jp: fixedlabor_law_edge_cases.rs(correct struct field names and enum variants).legalis-sg: fixed thedirector_compliance_check.rsexample (correct type definitions).legalis-jp(tort): added missing re-exports forarticle_715_1andArticle715Builder.- Refactored Levenshtein-distance implementations to satisfy
needless_range_loop. - Implemented proper
DefaultforHistoricalBacktester(fixingshould_implement_trait). - Fixed doc-comment formatting (
///!→//!) in the synthetic_data module.
Code quality: 50+ clippy auto-fixes; crate-level #![allow(...)] for accepted patterns (type_complexity, too_many_arguments); converted unwrap()-after-is_some() into idiomatic if let Some(...).
Statistics (0.1.1):
- Crates: 23 (16 core + 7 jurisdictions)
- Rust files: 1,062
- Lines of code: 509,385
- Tests: 9,568 passing
- Examples: 29 comprehensive examples
- Jurisdictions: 7 — DE, EU, FR, JP, SG, UK, US
Under the hood the architecture from 0.1.0 still applies: a Core layer (legalis-core / legalis-dsl / legalis-registry), an Intelligence layer (legalis-llm + legalis-verifier), a Simulation layer (legalis-sim / legalis-diff), plus i18n/porting, interop, visualization/chain/lod, audit/api, and the legalis CLI on top. 0.1.1 leaves that stack intact and focuses on breadth (UK + SG) and quality.
Getting Started
Add the core library:
cargo add legalis-core
The library crate is legalis-core; the CLI binary is legalis.
Then build a statute directly in Rust:
use legalis_core::{Statute, Condition, Effect, EffectType, ComparisonOp};
let statute = Statute::new(
"voting-rights",
"Voting Rights Act",
Effect::new(EffectType::Grant, "Right to vote in elections"),
)
.with_precondition(Condition::Age {
operator: ComparisonOp::GreaterOrEqual,
value: 18,
});
The same primitives that express this rule now back the UK and Singapore jurisdictions too — a UK Employment rule and a Singapore PDPA rule are described with the identical Condition / Effect / Statute vocabulary.
Tips
-
One engine, two legal traditions. The same
Condition/Effect/Statutetypes now back UK (common law) and SG (mixed system) alongside JP/DE/FR (civil law). You can compare jurisdictions side by side without switching engines or data models. -
Good starting points for compliance. The
legalis-sgPDPA module and thelegalis-ukConsumer Rights module are clean entry points if you are encoding compliance checks rather than full statutes. -
No Z3 needed by default. A plain
cargo buildrequires no external solver. The optionalz3-solverfeature onlegalis-verifierenables rigorous SMT proofs and needs a system-installed Z3; turn it on only when you want formal verification.use legalis_verifier::StatuteVerifier; let verifier = StatuteVerifier::new(); let result = verifier.verify(&statutes); if !result.passed { for error in result.errors { eprintln!("Verification error: {}", error); } } -
Updating example crates from 0.1.0? Note the new
de-,fr-,jp-,uk-example-name prefixes — if you referenced jurisdiction examples by filename, the names changed in 0.1.1. -
Stress a rule before you trust it. Use
legalis-simto run a statute against a synthetic population and see how it behaves at scale before shipping it.
The COOLJAPAN ecosystem
Legalis-RS is a Pure-Rust COOLJAPAN library, built in the same spirit as siblings like SciRS2 — fast, dependency-light, and free of foreign-language runtimes in the core.
Repository: https://github.com/cool-japan/legalis
Star the repo if a Pure Rust legal-DX framework is something you want to see grow. Pure Rust legal-tech is here — fast, safe, and sovereign.
— KitaSan at COOLJAPAN OÜ January 10, 2026