|
| 1 | +[workspace] |
| 2 | +resolver = "3" |
| 3 | + |
| 4 | +members = [ |
| 5 | + "crates/benten-core", # Node, Edge, Value, content hashing, version chains |
| 6 | + "crates/benten-graph", # Storage (KVBackend trait + redb impl), indexes, MVCC |
| 7 | + "crates/benten-ivm", # IVM (Algorithm B) — subscribes to graph changes (STUB) |
| 8 | + "crates/benten-caps", # Capability types + pre-write hook + NoAuthBackend default (STUB) |
| 9 | + "crates/benten-eval", # 12 primitives, evaluator, transaction primitive, SANDBOX host (STUB) |
| 10 | + "crates/benten-engine", # Orchestrator: public API |
| 11 | + "bindings/napi", # napi-rs v3 bindings (native + WASM) |
| 12 | +] |
| 13 | + |
| 14 | +[workspace.package] |
| 15 | +version = "0.1.0" |
| 16 | +edition = "2024" |
| 17 | +rust-version = "1.85" |
| 18 | +license = "MIT OR Apache-2.0" |
| 19 | +authors = ["BentenAI"] |
| 20 | +repository = "https://github.com/BentenAI/benten-engine" |
| 21 | + |
| 22 | +[workspace.lints.rust] |
| 23 | +unsafe_op_in_unsafe_fn = "deny" |
| 24 | +unused_must_use = "warn" |
| 25 | + |
| 26 | +[workspace.lints.clippy] |
| 27 | +# Start strict and relax only where justified. |
| 28 | +all = { level = "warn", priority = -1 } |
| 29 | +pedantic = { level = "warn", priority = -1 } |
| 30 | +todo = "warn" |
| 31 | +dbg_macro = "warn" |
| 32 | +print_stdout = "warn" |
| 33 | +print_stderr = "warn" |
| 34 | +unwrap_used = "warn" |
| 35 | +expect_used = "warn" |
| 36 | + |
| 37 | +# Relaxed defaults: |
| 38 | +module_name_repetitions = "allow" |
| 39 | +must_use_candidate = "allow" |
| 40 | +missing_errors_doc = "allow" |
| 41 | + |
| 42 | +[workspace.dependencies] |
| 43 | +# Core engine |
| 44 | +blake3 = { version = "1.8", default-features = false } |
| 45 | +serde = { version = "1", default-features = false, features = ["derive", "alloc"] } |
| 46 | +serde_bytes = { version = "0.11", default-features = false, features = ["alloc"] } |
| 47 | +serde_json = "1" |
| 48 | +serde_ipld_dagcbor = "0.6.4" |
| 49 | +multihash = "0.19" |
| 50 | +redb = "4" |
| 51 | + |
| 52 | +# Concurrency & allocator |
| 53 | +papaya = "0.2" |
| 54 | +mimalloc = { version = "0.1", default-features = false } |
| 55 | + |
| 56 | +# Error handling & observability |
| 57 | +thiserror = "2" |
| 58 | +tracing = "0.1" |
| 59 | + |
| 60 | +# WASM sandbox (SANDBOX primitive) |
| 61 | +wasmtime = "35" |
| 62 | + |
| 63 | +# Dev |
| 64 | +criterion = { version = "0.8", features = ["html_reports"] } |
| 65 | +proptest = "1.11" |
| 66 | +tempfile = "3" |
| 67 | + |
| 68 | +# Bindings (napi-rs v3 handles native + WASM) |
| 69 | +napi = { version = "3", default-features = false } |
| 70 | +napi-derive = "3" |
| 71 | + |
| 72 | +# Phase 3 (sync/identity) — reserved versions for future use: |
| 73 | +# iroh = "0.97" |
| 74 | +# loro = "1" |
| 75 | +# ed25519-dalek = "2" |
| 76 | +# uhlc = "0.2" |
| 77 | + |
| 78 | +# Dependency workaround: the `core2` 0.4.0 crate was archived upstream on |
| 79 | +# 2026-04-14 ("No longer supported. Use core directly.") and yanked from |
| 80 | +# crates.io. It is pulled in transitively via two chains: |
| 81 | +# 1. cid -> ipld-core -> serde_ipld_dagcbor (direct in our hash path) |
| 82 | +# 2. multihash + multihash-derive (via cid's feature wiring) |
| 83 | +# |
| 84 | +# We resolve chain 1 by patching `cid` to our fork, which replaces the core2 |
| 85 | +# dependency with `no_std_io2` (same approach as multiformats/rust-multihash#407, |
| 86 | +# pending upstream review in multiformats/rust-cid). |
| 87 | +# |
| 88 | +# We resolve chain 2 temporarily by patching `core2` to the technocreatives |
| 89 | +# community fork at a pinned commit. This entry can be removed once |
| 90 | +# multiformats/rust-multihash#407 merges and a release is cut, which will |
| 91 | +# propagate a core2-free multihash through to the ipld-core / serde_ipld_dagcbor |
| 92 | +# chain as well. |
| 93 | +# |
| 94 | +# See SPIKE-phase-1-stack-RESULTS.md "Surprises" #1 and "Next Actions" #1. |
| 95 | +[patch.crates-io] |
| 96 | +cid = { git = "https://github.com/BentenAlignmentInc/rust-cid", rev = "e11cf45399c951597725a9bc3ed49c805f7aa640" } |
| 97 | +core2 = { git = "https://github.com/technocreatives/core2", rev = "545e84bcb0f235b12e21351e0c69767958efe2a7" } |
| 98 | + |
| 99 | +[profile.release] |
| 100 | +lto = "thin" |
| 101 | +codegen-units = 1 |
| 102 | +opt-level = 3 |
| 103 | +strip = "symbols" |
| 104 | + |
| 105 | +[profile.bench] |
| 106 | +lto = "thin" |
| 107 | +codegen-units = 1 |
| 108 | + |
| 109 | +[profile.dev] |
| 110 | +opt-level = 0 |
| 111 | +debug = 2 |
0 commit comments