BPMN-Lite: Rust-native process vocabulary — compiler, stack VM, FFI catalogue, gRPC server
Rust
0
341 commits
updated Sep 18, 2026
Compilation-and-execution kernel for the V&S v1.1 vocabularies. A single Rust workspace (edition 2024, resolver "3", rust 1.95) ships two compiled vocabularies plus the vocabulary-neutral FFI catalogue that wires them together:
dmn-lite-bridge and invoked in-process from bpmn-lite via Instr::ExecFfi.The dmn-lite repo was consolidated into this workspace during B0 (2026-05-16); both vocabularies now build, test, and version together as 18 peer crates. See CLAUDE.md for the unified crate map, architecture, A-phase status, and test counts.
cargo build --workspace
cargo test --workspace --exclude bpmn-lite-store-postgres
"ob-poc".* database tables.SessionStackState type is imported from ob-poc-types, but it is
copied by value at the integration boundary.process_instances.session_stack and
job_queue.session_stack.Create a dedicated database:
createdb bpmn_lite_test
Start the standalone server with Postgres enabled:
cd bpmn-lite
DATABASE_URL=postgresql:///bpmn_lite_test \
RUST_LOG=info \
cargo run -p bpmn-lite-server-runner --features postgres --bin bpmn-lite-server
On startup the server will:
DATABASE_URLbpmn-lite-core/migrations0.0.0.0:50051 by defaultOverride the bind address if needed:
cd bpmn-lite
DATABASE_URL=postgresql:///bpmn_lite_test \
BPMN_LITE_BIND=127.0.0.1:50061 \
cargo run -p bpmn-lite-server-runner --features postgres --bin bpmn-lite-server
Compile-only checks:
cd bpmn-lite
env RUSTC_WRAPPER= cargo check
env RUSTC_WRAPPER= cargo check -p bpmn-lite-server-runner --features postgres
Schema independence guard:
cd bpmn-lite
env RUSTC_WRAPPER= cargo test test_master_schema_is_standalone_from_ob_poc_namespace -- --nocapture
Copy-by-value session stack tests without Postgres:
cd bpmn-lite
env RUSTC_WRAPPER= cargo test test_start_with_session_stack_copies_value -- --nocapture
env RUSTC_WRAPPER= cargo test test_instance_session_stack_is_not_aliased -- --nocapture
env RUSTC_WRAPPER= cargo test test_job_queue_session_stack_is_not_aliased -- --nocapture
Postgres-backed standalone tests:
cd bpmn-lite
BPMN_LITE_TEST_DATABASE_URL=postgresql:///bpmn_lite_test \
env RUSTC_WRAPPER= cargo test -p bpmn-lite-core --features postgres test_pg_instance_round_trip -- --ignored --nocapture
BPMN_LITE_TEST_DATABASE_URL=postgresql:///bpmn_lite_test \
env RUSTC_WRAPPER= cargo test -p bpmn-lite-core --features postgres test_pg_instance_session_stack_copy_round_trip -- --ignored --nocapture
These Postgres tests use only BPMN-lite tables and mocked SessionStackState
values. They do not require ob-poc migrations or ob-poc database tables.
Run the existing smoke profile against a standalone server:
cd bpmn-lite
cargo run -p xtask -- smoke --spawn-server --database-url postgresql:///bpmn_lite_test
xtask can now spin up isolated Docker deployments where each BPMN-lite server
has its own Postgres container, network, and volume.
Bring up one instance:
cd bpmn-lite
cargo run -p xtask -- docker-up \
--instance-name alpha \
--server-port 50071 \
--db-port 5541
Bring up a second independent instance:
cd bpmn-lite
cargo run -p xtask -- docker-up \
--instance-name beta \
--server-port 50072 \
--db-port 5542
Each instance gets:
Run the harness against a specific isolated instance:
cd bpmn-lite
cargo run -p xtask -- docker-smoke \
--instance-name alpha \
--server-port 50071 \
--db-port 5541
Keep the containers running after the harness:
cd bpmn-lite
cargo run -p xtask -- docker-stress \
--instance-name beta \
--server-port 50072 \
--db-port 5542 \
--keep-running \
--instances 200
Tear down a specific instance cleanly:
cd bpmn-lite
cargo run -p xtask -- docker-down --instance-name alpha
These Docker flows still use the same copy-by-value SessionStackState
contract. The harness can mock session-stack values freely; BPMN-lite persists
its own copies inside the instance/job records and does not depend on ob-poc
database state.
env RUSTC_WRAPPER= cargo checkenv RUSTC_WRAPPER= cargo check -p xtaskcargo run -p xtask -- docker-up --instance-name alpha --server-port 50071 --db-port 5541cargo run -p xtask -- docker-up --instance-name beta --server-port 50072 --db-port 5542cargo run -p xtask -- smoke --server-url http://127.0.0.1:50071cargo run -p xtask -- smoke --server-url http://127.0.0.1:50072process_instances row counts independently in each paired Postgres instance.cargo run -p xtask -- docker-down --instance-name alphacargo run -p xtask -- docker-down --instance-name betadocker ps -a shows no leftover BPMN-lite test containers.Expected result:
SessionStackState is copied by value into BPMN-owned persistence and is not shared by DB reference341 commits
Rust
97.0%
Shell
1.0%
BPMN-Lite: Rust-native process vocabulary — compiler, stack VM, FFI catalogue, gRPC server
Rust
0
341 commits
updated Sep 18, 2026
Compilation-and-execution kernel for the V&S v1.1 vocabularies. A single Rust workspace (edition 2024, resolver "3", rust 1.95) ships two compiled vocabularies plus the vocabulary-neutral FFI catalogue that wires them together:
dmn-lite-bridge and invoked in-process from bpmn-lite via Instr::ExecFfi.The dmn-lite repo was consolidated into this workspace during B0 (2026-05-16); both vocabularies now build, test, and version together as 18 peer crates. See CLAUDE.md for the unified crate map, architecture, A-phase status, and test counts.
cargo build --workspace
cargo test --workspace --exclude bpmn-lite-store-postgres
"ob-poc".* database tables.SessionStackState type is imported from ob-poc-types, but it is
copied by value at the integration boundary.process_instances.session_stack and
job_queue.session_stack.Create a dedicated database:
createdb bpmn_lite_test
Start the standalone server with Postgres enabled:
cd bpmn-lite
DATABASE_URL=postgresql:///bpmn_lite_test \
RUST_LOG=info \
cargo run -p bpmn-lite-server-runner --features postgres --bin bpmn-lite-server
On startup the server will:
DATABASE_URLbpmn-lite-core/migrations0.0.0.0:50051 by defaultOverride the bind address if needed:
cd bpmn-lite
DATABASE_URL=postgresql:///bpmn_lite_test \
BPMN_LITE_BIND=127.0.0.1:50061 \
cargo run -p bpmn-lite-server-runner --features postgres --bin bpmn-lite-server
Compile-only checks:
cd bpmn-lite
env RUSTC_WRAPPER= cargo check
env RUSTC_WRAPPER= cargo check -p bpmn-lite-server-runner --features postgres
Schema independence guard:
cd bpmn-lite
env RUSTC_WRAPPER= cargo test test_master_schema_is_standalone_from_ob_poc_namespace -- --nocapture
Copy-by-value session stack tests without Postgres:
cd bpmn-lite
env RUSTC_WRAPPER= cargo test test_start_with_session_stack_copies_value -- --nocapture
env RUSTC_WRAPPER= cargo test test_instance_session_stack_is_not_aliased -- --nocapture
env RUSTC_WRAPPER= cargo test test_job_queue_session_stack_is_not_aliased -- --nocapture
Postgres-backed standalone tests:
cd bpmn-lite
BPMN_LITE_TEST_DATABASE_URL=postgresql:///bpmn_lite_test \
env RUSTC_WRAPPER= cargo test -p bpmn-lite-core --features postgres test_pg_instance_round_trip -- --ignored --nocapture
BPMN_LITE_TEST_DATABASE_URL=postgresql:///bpmn_lite_test \
env RUSTC_WRAPPER= cargo test -p bpmn-lite-core --features postgres test_pg_instance_session_stack_copy_round_trip -- --ignored --nocapture
These Postgres tests use only BPMN-lite tables and mocked SessionStackState
values. They do not require ob-poc migrations or ob-poc database tables.
Run the existing smoke profile against a standalone server:
cd bpmn-lite
cargo run -p xtask -- smoke --spawn-server --database-url postgresql:///bpmn_lite_test
xtask can now spin up isolated Docker deployments where each BPMN-lite server
has its own Postgres container, network, and volume.
Bring up one instance:
cd bpmn-lite
cargo run -p xtask -- docker-up \
--instance-name alpha \
--server-port 50071 \
--db-port 5541
Bring up a second independent instance:
cd bpmn-lite
cargo run -p xtask -- docker-up \
--instance-name beta \
--server-port 50072 \
--db-port 5542
Each instance gets:
Run the harness against a specific isolated instance:
cd bpmn-lite
cargo run -p xtask -- docker-smoke \
--instance-name alpha \
--server-port 50071 \
--db-port 5541
Keep the containers running after the harness:
cd bpmn-lite
cargo run -p xtask -- docker-stress \
--instance-name beta \
--server-port 50072 \
--db-port 5542 \
--keep-running \
--instances 200
Tear down a specific instance cleanly:
cd bpmn-lite
cargo run -p xtask -- docker-down --instance-name alpha
These Docker flows still use the same copy-by-value SessionStackState
contract. The harness can mock session-stack values freely; BPMN-lite persists
its own copies inside the instance/job records and does not depend on ob-poc
database state.
env RUSTC_WRAPPER= cargo checkenv RUSTC_WRAPPER= cargo check -p xtaskcargo run -p xtask -- docker-up --instance-name alpha --server-port 50071 --db-port 5541cargo run -p xtask -- docker-up --instance-name beta --server-port 50072 --db-port 5542cargo run -p xtask -- smoke --server-url http://127.0.0.1:50071cargo run -p xtask -- smoke --server-url http://127.0.0.1:50072process_instances row counts independently in each paired Postgres instance.cargo run -p xtask -- docker-down --instance-name alphacargo run -p xtask -- docker-down --instance-name betadocker ps -a shows no leftover BPMN-lite test containers.Expected result:
SessionStackState is copied by value into BPMN-owned persistence and is not shared by DB reference341 commits
Rust
97.0%
Shell
1.0%