Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New @deno/kv npm package. #39

Merged
merged 25 commits into from
Dec 5, 2023
Merged

Conversation

johnspurlock-skymethod
Copy link
Contributor

@johnspurlock-skymethod johnspurlock-skymethod commented Dec 2, 2023

New @deno/kv NPM package, built from code contributed from skymethod/kv-connect-kit.

  • remote client, implements kv connect protocol, including v3 (watch), runs in any JS runtime
  • new node-specific sqlite implementation using a single platform-specific napi module, sharing existing denokv sqlite backend code
  • in-memory implementation for testing, runs in any JS runtime
  • full-fidelity v8 value serialization, using node's v8 module
  • single openKv convenience export, chooses implementation based on path (if http/https -> remote, if blank/empty -> in-memory, else sqlite)
  • code lives in new top-level npm directory
  • napi module lives in npm/napi, leverages NAPI-RS framework to translate Rust -> NAPI
  • script source lives in npm/src, includes end to end tests for the various implementations using deno test
  • automated build process to produce/publish root @deno/kv + 4 arch-specific native subpackages

@johnspurlock-skymethod johnspurlock-skymethod marked this pull request as ready for review December 3, 2023 22:54
.github/workflows/npm.yml Outdated Show resolved Hide resolved
npm/napi/LICENSE Outdated Show resolved Hide resolved
npm/napi/README.md Outdated Show resolved Hide resolved
npm/napi/rustfmt.toml Outdated Show resolved Hide resolved
.github/workflows/npm.yml Show resolved Hide resolved
npm/napi/src/lib.rs Show resolved Hide resolved
npm/src/kv_u64.ts Outdated Show resolved Hide resolved
@igorzi igorzi merged commit 79c0216 into denoland:main Dec 5, 2023
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants