Redis driver
WasmEdge provides a Redis driver for Rust developers, enabling developers to build database applications in Rust and then running in WasmEdge.
note
Before we start, ensure you have Rust and WasmEdge installed.
Run the example
The wasmedge-db-example/redis is a Redis connector example written in Rust.
git clone https://github.com/WasmEdge/wasmedge-db-examples
cd wasmedge-db-examples/redis
# Compile the rust code into WASM
cargo build --target wasm32-wasi --release
# Execute Redis command against a Redis instance at redis://localhost/
wasmedge --env "REDIS_URL=redis://localhost/" target/wasm32-wasi/release/wasmedge-redis-client-examples.wasm
Code explanation
info
Work in Progress