From d1851a9137c8f42c12d025fda4058c587ecbf122 Mon Sep 17 00:00:00 2001 From: 27bslash6 <2221076+27Bslash6@users.noreply.github.com> Date: Mon, 16 Mar 2026 09:17:22 +1100 Subject: [PATCH] feat: add wasm32-unknown-unknown platform support cachekit-core now compiles on wasm32 targets (Cloudflare Workers). Encryption uses RustCrypto aes-gcm (pure Rust) on wasm32, ring on native. Both produce identical AES-256-GCM wire format. --- src/lib.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index f3e451e..54f4de8 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -11,9 +11,15 @@ //! |:--------|:------------|:-------:| //! | `compression` | LZ4 compression via `lz4_flex` | Yes | //! | `checksum` | xxHash3-64 integrity verification | Yes | -//! | `encryption` | AES-256-GCM + HKDF-SHA256 | No | +//! | `encryption` | AES-256-GCM + HKDF-SHA256 (ring on native, aes-gcm on wasm32) | No | //! | `ffi` | C header generation | No | //! +//! ## Platform Support +//! +//! Compiles on both native targets and `wasm32-unknown-unknown` (Cloudflare Workers). +//! On wasm32, encryption uses RustCrypto's `aes-gcm` (pure Rust) instead of `ring`. +//! Both backends produce identical AES-256-GCM wire format. +//! //! ## Quick Start //! //! ```rust,no_run