OpenPay (3 crates, ~13k LOC, 175 tests) op-connect sub-merchant onboarding + KYB + split-payments + payouts + 1099-K op-3ds2 3DS2.3 SCA processor (AReq/ARes/CReq/CRes/RReq/RRes + exemptions) op-tax US/EU/UK/AU/CA/IN tax with Avalara/Stripe/CCH/Vertex/TaxJar adapters Smart Byte (3 crates, ~7k LOC, 57 tests) smart-byte-libp2p libp2p transport (kad/gossipsub/mdns/autonat/relay/dcutr/identify/ping/req_resp) smart-byte-crdt LWW/GCounter/PnCounter/OrSet/LwwMap/RgaList/2P-Set + HLC + vector clock + Automerge/Yjs interop smart-byte-keri-witness KERI key-rotation cycle + witness layer + watchers + recovery + delegation EOC (3 crates, ~8k LOC, 108 tests) eoc-tools function-calling across Anthropic/OpenAI/Google/Mistral/Cohere + parallel exec + sandbox eoc-multimodal vision (CLIP/SigLIP/ColPali) + audio (Whisper/MMS) + video sampling + modality router eoc-spec-decode vanilla + SpS-with-temp + lookahead speculative decoding + EAGLE/Medusa stubs All three workspaces compile cleanly. Forbidden-unsafe, no unwrap outside tests. Co-Authored-By: Claude Opus 4.7 <[email protected]>
25 lines
821 B
Rust
25 lines
821 B
Rust
//! Materialise the bundled rate-table snapshot to `data/rate_table_v1.cbor`.
|
|
//!
|
|
//! Run from the repo root:
|
|
//!
|
|
//! ```text
|
|
//! cargo run -p op-tax --example gen_snapshot
|
|
//! ```
|
|
//!
|
|
//! The output is a CBOR file consumed by `RateTable::load_cbor`. Tests
|
|
//! that need the snapshot read it via the path in
|
|
//! `tests/integration.rs`; production deployments typically replace
|
|
//! this with a daily-refreshed file from a vendor feed.
|
|
|
|
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|
let t = op_tax::RateTable::bundled();
|
|
let out_path = std::path::Path::new(env!("CARGO_MANIFEST_DIR")).join("data/rate_table_v1.cbor");
|
|
let f = std::fs::File::create(&out_path)?;
|
|
t.write_cbor(f)?;
|
|
println!(
|
|
"Wrote {} entries to {}",
|
|
t.entries.len(),
|
|
out_path.display()
|
|
);
|
|
Ok(())
|
|
}
|