Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions packages/cachekit-core-ts/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# @cachekit-io/cachekit-core-ts

Native Rust bindings for [`@cachekit-io/cachekit`](https://www.npmjs.com/package/@cachekit-io/cachekit). Provides byte-storage (LZ4 + xxHash3), HKDF key derivation, and AES-256-GCM encryption primitives via N-API.

> **Version note**: 0.1.1 was tagged in git but never published to npm (a CI flag-rename bug in @napi-rs/cli v3, fixed in #51). Published versions on npm jump 0.1.0 → 0.1.2. If you're pinning, use 0.1.2 or later.

## Installation

You shouldn't need to install this directly — it's a peer of `@cachekit-io/cachekit`. Installing the main SDK pulls in the right platform binary automatically:

Comment thread
27Bslash6 marked this conversation as resolved.
```bash
npm install @cachekit-io/cachekit
```

## Platform support

Prebuilt binaries are shipped via per-platform npm packages, selected at install time by the `optionalDependencies` mechanism:

| Platform | Target | Package |
| --------------------- | --------------------------- | ----------------------------------------------- |
| Linux x86_64 (glibc) | `x86_64-unknown-linux-gnu` | `@cachekit-io/cachekit-core-ts-linux-x64-gnu` |
| Linux aarch64 (glibc) | `aarch64-unknown-linux-gnu` | `@cachekit-io/cachekit-core-ts-linux-arm64-gnu` |
| macOS x86_64 | `x86_64-apple-darwin` | `@cachekit-io/cachekit-core-ts-darwin-x64` |
| macOS arm64 | `aarch64-apple-darwin` | `@cachekit-io/cachekit-core-ts-darwin-arm64` |
| Windows x86_64 (MSVC) | `x86_64-pc-windows-msvc` | `@cachekit-io/cachekit-core-ts-win32-x64-msvc` |

If your platform isn't listed, the package will fail to load at runtime. Open an issue if you need an additional target.

## API surface

Public exports (consumed by `@cachekit-io/cachekit`):

- `ByteStorage` — LZ4 compression + xxHash3-64 integrity envelope
- `TenantKeys` — HKDF-SHA256 per-tenant derived keys with `ZeroizeOnDrop`
- `deriveKey` — single-domain HKDF key derivation
- `encrypt` / `decrypt` — AES-256-GCM with AAD binding
- `version` — version string from the underlying Cargo crate

See the [main SDK README](https://www.npmjs.com/package/@cachekit-io/cachekit) for usage; this package isn't intended for direct consumption.

## Requirements

- Node.js 22+

## License

MIT
4 changes: 3 additions & 1 deletion packages/cachekit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

Production-ready Redis caching for TypeScript/Node.js. Hybrid TypeScript-Rust design with L1 in-memory cache, SWR, circuit breaker, and optional client-side encryption.

> **Version note**: 0.1.1 was tagged in git but never published to npm (a CI auth bug, fixed in #45). Published versions on npm jump 0.1.0 → 0.1.2. If you're pinning, use 0.1.2 or later.

## Features

- **Dual-layer caching**: L1 in-memory (~50ns) + L2 Redis (~2-50ms)
Expand Down Expand Up @@ -225,7 +227,7 @@ const cache = createCache({

## Requirements

- Node.js 18+
- Node.js 22+
- Redis 6+

## License
Expand Down