A WASM component client for Valkey (and Redis).
A dev container is available that contains the necessary tools and configuration out of the box.
Prereqs:
- a rust toolchain
cargo-binstall, optional, to download prebuilt tools instead of building them
make componentsThe build creates each component in components into target/components, e.g. the cli at target/components/cli/cli.wasm, along with target/components/interface.wasm, the componentized:valkey WIT package. Each component is also built with debug info, e.g. target/components/cli/cli.debug.wasm.
The cli tools the build uses, wasm-tools, wac, wasmtime and wkg, are pinned in tools/Cargo.toml and installed into target/tools/<platform>, e.g. target/tools/aarch64-apple-darwin, as needed, or ahead of time with make tools. Dependabot bumps the pinned versions.
Prereqs:
- build the components (see above)
- a
wasi:cli/commandcompatible runtime (like wasmtime) - access to a running Valkey server
wasmtime run -Sinherit-network -Sallow-ip-name-lookup target/components/cli/cli.wasm keys '*'- use
--hostto specify a host other than127.0.0.1 - use
--portto specify a port other than6379 -Sallow-ip-name-lookupis only required if a hostname is used for the connection instead of an IP address.
To aid incremental development a make target is available to rebuild and run the CLI:
make run cmd="hello"The Componentized project follow the Contributor Covenant Code of Conduct. In short, be kind and treat others with respect.
General discussion and questions about the project can occur in the project's GitHub discussions.
The Componentized project team welcomes contributions from the community. A contributor license agreement (CLA) is not required. You own full rights to your contribution and agree to license the work to the community under the Apache License v2.0, via a Developer Certificate of Origin (DCO). For more detailed information, refer to CONTRIBUTING.md.
This project was conceived in discussion between Mark Fisher and Scott Andrews.
Apache License v2.0: see LICENSE for details.