Skip to content
UOR-FoundationPublic

About

Rust to Prism

Resources

Code of conduct

Contributing

Security policy

Stars

3 stars

Watchers

0 watching

Forks

Latest commit

 

History

811 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

UORust provisional banner: Rust implementation, open development. Placeholder, not approved.

Illustrative placeholder artwork, pending UOR Foundation brand approval.

UORust

Understand what your Rust code does, and what has actually been checked.

Programs change faster than their diagrams and documentation. UORust reads a Rust project, creates a structured description linked to the original code, and makes gaps in that description visible. You can see what was checked, what was not, and what needs a closer look.

Bootstrap acceptance Pages deployment Latest GitHub release Minimum supported Rust version 1.89 MIT OR Apache-2.0

Try routing locally · Quick start · Releases · Architecture · Documentation · Conformance evidence

Important limit: UORust does not prove every Rust program correct. It records what was modeled and checked, and which parts still need review. See the conformance evidence and coverage register.

Contents

Why UORust

When you join a software project or review unfamiliar code, you need to know what it really does. But diagrams, notes, and old test reports may not describe the latest version. That gap can lead to mistakes and false confidence.

UORust connects software explanations to the source code. It builds a reviewable model and makes unsupported behavior visible rather than pretending it has been verified.

For example, when it finds an unsafe block, its routing rules can record that block for security review. That does not prove the block safe or mean it contains a vulnerability. It gives reviewers a clear place to investigate.

This helps developers learn a codebase, maintainers check for drift, and reviewers separate verified claims from open questions. It complements tests and audits; it does not replace them.

What UORust does

UORust is a Rust command-line tool that reads Cargo workspace metadata, manifests, the lockfile, and source syntax to create a Prism project. The generated project describes software from multiple angles: architecture, design, features, behavior, security, quality, and release evidence.

Its core contract is route, admit, or refuse, not guess. A fact with a supported and unambiguous route becomes a model record. A fact that cannot be classified or translated is made visible in the resulting evidence. Generated files are designed to be reproducible: uorust check compares an existing projection against the source workspace.

If you want to… Start here
See how a Rust fact is categorized Try routing locally and route definitions
Generate a model from Rust Quick start and uorust project
Check whether a projection is current uorust check and the locked SDK
Understand what is actually proved Conformance evidence, lift register, and verification
Work on the engine or submit a fix Contributing and governance

Key properties

  • Multi-facet projection: one output project containing architecture, design, features, behavior, security, quality, and release descriptions.
  • Source-linked findings: the model and registers retain references to the facts, spans, and identities behind their claims.
  • Typed refusal instead of silent fallback: unsupported or ambiguous inputs do not acquire an invented meaning.
  • Measured proof frontier: lifted, unlifted, foreign, and effect-bound behavior is distinguished in the frontier register.
  • Locked verification: the repository uses PrismPM and LexLean through the SDK selected by prismpm.lock.

Try routing locally

The route table lists recognized kinds of Rust code and where they belong in the generated model. To inspect it from a local checkout:

cargo run --locked -p uorust -- routes

For example, an error-enum fact is routed into the behavior model:

Input:  error-enum
Result: route UR-R12
        fact error-enum
        record LexLean.inductive
        facet behavior

The route table is shared by the Rust router and the LexLean model. Both are checked against common acceptance examples.

Important: This demonstrates categorization, not full translation or verification of an arbitrary Rust project. The prior browser demo URL no longer works, so it is not linked until the replacement deployment is verified.

Quick start

1. Get the CLI

The reproducible path from a tagged source release is:

cargo install --locked --git https://github.com/UOR-Foundation/UORust --tag v0.4.0 uorust
uorust --version

You can instead use a platform archive from the latest release. The tagged example above intentionally pins a version; the release page is the source of truth for newer versions.

2. Generate a Prism project

Run these commands with a local Cargo workspace in place of path/to/workspace:

uorust project path/to/workspace --out path/to/prism-project
uorust check path/to/workspace --out path/to/prism-project

project writes the output; check verifies the output still matches the workspace. The engine uses offline Cargo metadata, so the workspace dependencies must be available locally.

3. Verify its model

From the digest-pinned PrismPM SDK environment:

prismpm --project path/to/prism-project check

A Prism project can contain open claims or unlifted behavior. Successful validation of its structure is not a proof that all source behavior was translated or certified. Inspect its generated registers and verification results.

Working from this repository instead of installing the CLI:

git clone https://github.com/UOR-Foundation/UORust.git
cd UORust
cargo run --locked -p uorust -- routes
cargo run --locked -p uorust -- project path/to/workspace --out path/to/prism-project

The workspace declares Rust 1.89 as its minimum version and pins Rust 1.97.1 in rust-toolchain.toml for repository development.

Install and supported platforms

Route When to use it Availability / qualification
GitHub release archives Download a prebuilt binary and verify its digest and provenance Check the exact assets on the release page
Tagged Cargo source Reproduce a known source version cargo install --locked --git … --tag v0.4.0 uorust
Install scripts / Windows script Scripted installation Read the scripts before executing; they use published release assets
Homebrew formula macOS/Linux package management Formula is generated from release checksums; verify it targets the desired release
Nix flake Build from the pinned Nix configuration nix run github:UOR-Foundation/UORust -- --version
crates.io package / cargo-binstall Registry-based installation Only after the package/version is published in the registry

Windows note: Windows is included in the release build matrix, but it is a non-blocking target. The published v0.4.0 assets include Linux and macOS archives, not a Windows archive. Do not assume a Windows binary is attached to every release.

For exact supported commands, conditional registry publication, and checks, see install.yml and release.yml. Environment overrides for the install scripts include UORUST_VERSION and UORUST_INSTALL_DIR.

Architecture

UORust follows the Foundry pattern: propose a route, admit only supported evidence, then emit a checked projection.

flowchart TD
    A["Cargo workspace<br/>manifests · lockfile · source"] --> B["Ingest<br/>facts + source spans"]
    B --> C["Router<br/>model/routes.toml"]
    C --> D{"Admission"}
    D -->|"Supported and unambiguous"| E["Prism records<br/>multiple facets"]
    D -->|"Unknown / ambiguous / unsupported"| F["Typed refusals<br/>open claims / residue"]
    E --> G["Projected Prism project"]
    F --> G
    H["UORust's LexLean self-model<br/>app/"] --> I["Locked PrismPM SDK<br/>Lean verification"]
    G --> I
    I --> J["Verification evidence<br/>and explicit coverage frontier"]
Loading
Boundary Role Authoritative sources
Ingest and source identity Read the workspace and preserve the origin of facts ingest.rs, facts.rs
Routing Determine the record kind and model facet model/routes.toml, route.rs
Admission and projection Construct accepted records and expose refusal evidence admit.rs, project.rs
Rust-to-LexLean behavior Translate supported Rust behavior; retain residue for unsupported cases lift.rs, frontier.toml
Formal model Define UORust's own model and route-table application app/, Routes.lex.tex
Acceptance Validate locks, model, reproducibility, tests, proof and dependencies Justfile, VERIFICATION.md

The self-model and generated workspace projections are related, but distinct: proof of UORust's router does not automatically prove every program being modeled.

What the project contains

An output projection includes the Prism project configuration (prismpm.toml and lexlean.toml), facet modules and evidence describing admitted Rust facts. Depending on the source and selected workflow, the engine also reports lifted definitions and what remains outside the current proof frontier.

Model facet The questions it addresses
Architecture What components, concerns, stakeholders, and dependencies exist?
Design How do components, processes, calls, and states relate?
Features What functions, interfaces, tests, and journeys are represented?
Behavior Which functions are expressed as LexLean definitions, and which cannot yet be lifted?
Security What capabilities, unsafe boundaries, threats, risks, and controls are observable?
Quality Which quality requirements, lints, measurements, and portability constraints are present?
Release Which packages, artifacts, and release properties are represented?

These are modeling facets, not promises that every real-world property can be inferred from source alone. A generated model remains inspectable and its open claims remain visible.

Routing and explicit refusals

The canonical model/routes.toml defines all route IDs, fact kinds, output record types, facets, and shared acceptance vectors. A few representative examples:

Rust fact kind Prism record Facet
crate-bin-target Foundation.Arch::Component Architecture
pub-fn Feature.calls Features
error-enum LexLean.inductive Behavior
unsafe-block Foundation.Sec::Threat Security
lock-package System.SpdxPackage Release
state-enum Foundation.Arch::UmlState Design

Each request is a set of fact-classification tags, one per line. Two tags naming different routes are ambiguous, not silently assigned one route. Unknown kinds are refused; empty, oversized, invalid UTF-8, and blank-line requests return explicit errors.

The complete and up-to-date catalog belongs in the route source, rather than a second manually maintained copy in this README. Both implementations are checked against that source by the conformance tests.

Self-model and formal verification

UORust models its own architecture, feature journeys, behavior, security controls, quality requirements, design views, and release process in app/src/. The live page is one application of that model, using the verified route table.

Area Model entrypoint
Architecture and relationships Architecture.lex.tex
Design and interactions Design.lex.tex
Features and journeys Features.lex.tex
Routing behavior and proofs Routes.lex.tex
Security, threats, and controls Security.lex.tex
Quality requirements Quality.lex.tex
Release and distribution Release.lex.tex
Page guide and response frame Guide.lex.tex, Frame.lex.tex

The repository's self-model generators bind model records to source spans and identities. Conformance tests reject drift. The locked SDK checks the applicable model, theorem, build and dependency contracts; generated projection coverage must still be assessed independently.

Maturity, evidence, and limitations

Boundary What can be claimed Where to verify
Released Versioned binaries and checksums exist for the platforms attached to a published release GitHub releases, release workflow
Enforced on PRs The repository's acceptance command runs inside a locked SDK on PR CI Bootstrap workflow, just vv
Modeled and checked The registered routes, model facets, tests and specified proof claims have their corresponding verification paths CONFORMANCE.md, app/
Measured, not complete Not all source functions lift; residual, foreign and effect cases remain accounted for frontier.toml, lift verdicts
Under active development More source constructs, foreign models, MIR semantics and certified translation are being integrated Open pull requests, open issues

A passing build or model check certifies the checks it actually ran, not an arbitrary Rust program's total correctness. There is no hidden fallback that upgrades a refusal into a verified claim.

Development and acceptance

The acceptance boundary is just vv, executed inside the exact SDK image selected by prismpm.lock. The devcontainer and bootstrap workflow provide the canonical environments.

Command Purpose
just vv Complete acceptance: formatting, model and template checks, self-model drift, Clippy, tests, dependency policy, app proof and UORust projection checks
just app Check, build and verify UORust's LexLean model and application
just model-write Regenerate CONFORMANCE.md from the capability registers
just self-model-write Regenerate the route-table and facet model outputs from their authoritative inputs
just self-model-check Refuse drift in the committed self-model and generated artifacts
just register Refresh the lift frontier while refusing previously lifted functions that are no longer lifted
just new-capability <ID> <level> <suite> "<statement>" Register a capability with its scenario and initial failing test

For CI evidence see Actions; for the precise contract, VERIFICATION.md, TEMPLATE-CONTRACT.md, and AGENTS.md.

Do not substitute a passing partial Rust test command for just vv. When an external SDK or platform dependency is unavailable, report that as a blocked verification leg, not as a successful full run.

Releases and provenance

The most recent release verified for this README is v0.4.0. Releases contain archives, individual archive hashes, and SHA256SUMS. Build-provenance attestations are attached to qualifying release builds.

Release targets

The following is generated by scripts/self-model/release.py from the release workflow. Do not hand-edit this marked block; just self-model-check verifies its contents.

Target Archive Built on Release waits for it
x86_64-unknown-linux-gnu uorust-x86_64-unknown-linux-gnu.tar.gz ubuntu-24.04 yes
aarch64-unknown-linux-gnu uorust-aarch64-unknown-linux-gnu.tar.gz ubuntu-24.04-arm yes
x86_64-apple-darwin uorust-x86_64-apple-darwin.tar.gz macos-15 yes
aarch64-apple-darwin uorust-aarch64-apple-darwin.tar.gz macos-15 yes
x86_64-pc-windows-msvc uorust-x86_64-pc-windows-msvc.zip windows-2025 no

A target marked no is non-blocking: a release may be published without its artifact. Always consult the release's actual asset list.

Verify an archive

For a Linux x86-64 release, from a directory where you want to keep the downloaded artifacts:

gh release download v0.4.0 --repo UOR-Foundation/UORust \
  --pattern 'uorust-x86_64-unknown-linux-gnu.tar.gz' \
  --pattern SHA256SUMS

sha256sum --check --ignore-missing SHA256SUMS

# Download the attestation bundle from the repository's current location.
gh attestation download uorust-x86_64-unknown-linux-gnu.tar.gz \
  --repo UOR-Foundation/UORust

# The downloaded bundle is named sha256:<archive digest>.jsonl on Linux.
archive_digest=$(sha256sum uorust-x86_64-unknown-linux-gnu.tar.gz | cut -d ' ' -f1)
gh attestation verify uorust-x86_64-unknown-linux-gnu.tar.gz \
  --bundle "sha256:${archive_digest}.jsonl" \
  --repo afflom/UORust \
  --signer-workflow afflom/UORust/.github/workflows/release.yml

The hash check compares the release archive with the published checksum list. The bundle is fetched using the repository's current location, but --repo afflom/UORust and --signer-workflow afflom/UORust/.github/workflows/release.yml deliberately verify the historical signer identity recorded in the v0.4.0 certificate. GitHub CLI checks --repo against the signed source repository identity, not just the download location. If GitHub no longer serves the historical attestation bundle after the transfer, report provenance verification as unavailable instead of silently weakening that identity check. Neither check replaces validation of the model generated from your own workspace.

Documentation and repository map

Where What to find
crates/uorust/ Rust CLI, ingest, routing, admission, behavior lifting, projection, tests
app/ UORust's own LexLean/Prism model and verified application
model/ Route table, capability IDs, authority, comparator and ledger registers
features/suites/ Registered behavioral acceptance scenarios
crates/conformance/ Repository and self-model conformance tests
crates/certified/ Generated/certified translator artifacts and manifests
site/ and try/ Browser-facing route-table page and try experience
.github/workflows/ Acceptance, Pages, release, installation, generation, certification workflows

Reference documents

Contributing and governance

We welcome bug reports, reproduction cases, documentation improvements, and source-to-model coverage work. Start with issues and pull requests.

This repository follows uor/template-contract/1. Review AGENTS.md before changing behavior: new capabilities require registered IDs, acceptance scenarios and failing tests; generated evidence must be regenerated from its authoritative source; refusals must remain explicit. The full acceptance is just vv in the locked SDK. Do not modify the human-reviewed bootstrap trust root to make a proposed change pass.

For security-sensitive discoveries, avoid posting exploit details or secrets in a public issue. Use an appropriate private maintainer contact or GitHub's private vulnerability-reporting surface if it is enabled.

License

Dual licensed under MIT or Apache-2.0, at your option.

About

Rust to Prism

Resources

Code of conduct

Contributing

Security policy

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages