Conversation
Add rust/oh-archive with WASM and N-API bindings. The crate extracts selected entries from untrusted ZIP archives with regex patterns while enforcing entry count, per-entry, and total-byte limits. It rejects encrypted files, path-traversal names, and unsupported compression methods. Also register the new artifact surfaces in costs.json, split the Rust build scripts by crate, and update the rust workspace/README/plan.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Add rust/oh-sqlite with an N-API binding. The crate copies a SQLite database plus its -wal and -journal sidecars into a private output directory, verifies ownership/permissions, checks the SQLite magic header, and enforces per-file and total byte limits. The original files are never modified. Also register rust:sqlite-napi in costs.json, fix rust:check to run from the rust/ directory, and simplify archive N-API error serialization.
Implement the projection semantics from src/projection.ts in Rust: - Dataset, fact, rule pack, and query types with serde support - Naive materialization loop with work-unit and round bounds - Proof tree generation with depth/node/byte budgets - Query evaluation with canonical-JSON tuple keys - WASM binding for Convex/Bun consumers - New engine identity: oh.projection.rust.v1 Includes unit tests for transitive closure and budget enforcement.
- oh-archive::strict ports the Textbutler X-archive ZIP contract to Rust:
EOCD/ZIP64 end records, central-directory validation, local-header
consistency, data-descriptor checks, CRC-32, compression-ratio caps,
NFC names, and pattern-selected in-memory extraction.
- oh-archive-strict-wasm exposes it through a raw extern-C ABI with no
wasm-bindgen imports, so consumers can vendor the .wasm binary directly.
- oh-archive-wasm gains read_zip_entries_strict_js returning
{ name, bytes } objects for bindgen-based callers.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Outcome
Add
rust/oh-archive, a bounded ZIP64 archive extraction crate with WASM andN-API bindings. The crate extracts selected entries from untrusted ZIP archives
with regex patterns while enforcing entry count, per-entry, and total-byte
limits. It rejects encrypted files, path-traversal names, and unsupported
compression methods.
Also register the new artifact surfaces in
costs.json, split the Rust buildscripts by crate, and add the implementation plan under
plans/rust-foundations.md.Contract impact
No persisted or exchanged bytes change. The crate is additive and not yet
consumed by any TypeScript path.
Verification
cargo test -p oh-archivepasses.cargo clippy -- -D warningspasses.bun run rust:buildproduces loadable WASM artifacts for both canonical and archive crates.bun run check:cost-surfacespasses with the newrust:archive-wasmandrust:archive-napisurfaces.