All Projects → zebp → worker-kv

zebp / worker-kv

Licence: Unknown, MIT licenses found Licenses found Unknown LICENSE-APACHE MIT LICENSE-MIT
Rust bindings to Cloudflare Worker KV Stores

Programming Languages

rust
11053 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to worker-kv

telegram-bot-api-worker
Take an alternate route to Telegram Bot API :)
Stars: ✭ 75 (+108.33%)
Mutual labels:  cloudflare, cloudflare-worker
DNS-over-Discord
A 1.1.1.1 DNS resolver built for Discord
Stars: ✭ 228 (+533.33%)
Mutual labels:  cloudflare, cloudflare-worker
cloudflare-worker-app-kit
☁✨ A handy set of tools for creating a Cloudflare Worker app.
Stars: ✭ 75 (+108.33%)
Mutual labels:  cloudflare, cloudflare-worker
IPFS PHOTO SHARE
💰用甚嚒服务器,ServerLess搭建一个图片分享站点!| 基于CloudFlareWorker无服务器函数和IPFS去中心化存储的图片分享网站
Stars: ✭ 76 (+111.11%)
Mutual labels:  cloudflare, cloudflare-worker
cloudflare-worker-router
A super lightweight router (1.3K) with middleware support and ZERO dependencies for CloudFlare Workers.
Stars: ✭ 144 (+300%)
Mutual labels:  cloudflare, cloudflare-worker
cloudflare-worker-routing
A simple Cloudflare Worker with built-in routing
Stars: ✭ 38 (+5.56%)
Mutual labels:  cloudflare, cloudflare-worker
inkrss
Notify when rss feeds are updated | RSS 更新通知
Stars: ✭ 234 (+550%)
Mutual labels:  cloudflare
worker-auth-providers
worker-auth-providers is an open-source providers to make authentication easy with workers. Very lightweight script which doesn't need a lot of dependencies. Plug it with any framework or template of workers.
Stars: ✭ 85 (+136.11%)
Mutual labels:  cloudflare
BlackIQ.ir
BlackIQ.ir Source Code
Stars: ✭ 14 (-61.11%)
Mutual labels:  cloudflare
fa.BlackIQ.ir
Persion version of BlackIQ.ir
Stars: ✭ 16 (-55.56%)
Mutual labels:  cloudflare
terraform-cloudflare-maintenance
Terraform module to create a responsive Maintenance Page using Cloudflare Workers.
Stars: ✭ 111 (+208.33%)
Mutual labels:  cloudflare
cloudflare
Bypass Cloudflare's anti-bot page
Stars: ✭ 15 (-58.33%)
Mutual labels:  cloudflare
cfw-easy-utils
An in-depth library to assist with common tasks with CF Workers. Includes utils for responses, cookies, and more!
Stars: ✭ 52 (+44.44%)
Mutual labels:  cloudflare
nebula
Source Code for the Home Server setup.
Stars: ✭ 48 (+33.33%)
Mutual labels:  cloudflare
Cloudflare-dns-update
Allows me to update my CloudFlare dns record so that I can have access to my server with a dynamic IP
Stars: ✭ 35 (-2.78%)
Mutual labels:  cloudflare
VestaWebInterface
PHP interface for VestaCP, providing a beautiful UI, UX, features & integrations.
Stars: ✭ 92 (+155.56%)
Mutual labels:  cloudflare
ddos-prot-mc-servers
DDoS Protection for your minecraft server!
Stars: ✭ 36 (+0%)
Mutual labels:  cloudflare
kul
A unique textual notation that can be used as both a data format and a markup language and that has powerful extensibility of both lexical syntax and semantics, and a Rust library for parsing it.
Stars: ✭ 12 (-66.67%)
Mutual labels:  crate
warpy
A command-line program to get WARP+ as WireGuard written in python
Stars: ✭ 57 (+58.33%)
Mutual labels:  cloudflare
carrierwave-cloudflare
🎑 This Rails gem integrates Carrierwave with Cloudflare Image Resizing
Stars: ✭ 24 (-33.33%)
Mutual labels:  cloudflare

worker-kv

Docs.rs Crates.io MIT Apache 2

Rust bindings to Cloudflare Worker KV Stores using wasm-bindgen and js-sys.

Example

let kv = KvStore::create("Example")?; // or KvStore::from_this(&this, "Example") if using modules format Workers

// Insert a new entry into the kv.
kv.put("example_key", "example_value")?
    .metadata(vec![1, 2, 3, 4]) // Use some arbitrary serialiazable metadata
    .execute()
    .await?;

// NOTE: kv changes can take a minute to become visible to other workers.
// Get that same metadata.
let (value, metadata) = kv.get("example_key").text_with_metadata::<Vec<usize>>().await?;

For a more complete example check out the full example.

How do I use futures in WebAssembly?

There currently is not a way to use a Future natively from WebAssembly but with the future_to_promise function from wasm_bindgen_futures we can convert it to a standard JavaScript promise, which can be awaited in the regular JavaScript context.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].