Skip to content

couchbaselabs/wasmcloud-provider-couchbase

Repository files navigation

wasmcloud-provider-couchbase

This is a capability provider for wasmCloud to provide Couchbase KV connectivity to Wasm applications via wasi-keyvalue. At the moment it supports the wasi:keyvalue/store@0.2.0-draft interface.

This provider uses the RawJSONTranscoder for Couchbase, storing any new keys as binary data. Since the wasi-keyvalue interface works entirely in storing and retrieving binary data, the deserialization into a struct or structured data must be done on the component side.

Build

Prerequisites:

Build this capability provider with:

wash build

Run

Prerequisites:

  • wash 0.29 or later
  • A built couchbase capability provider, see #build
  • Setup Couchbase server with the required configuration for testing using docker-compose.yaml in the repo.
    docker-compose up -d
    
    Alternatively, you can use Quick Install guide with a bucket named test created.
wash up -d
wash app deploy ./wadm.yaml

Then you can test the increment functionality with cURL:

curl localhost:8080/couchbase

Test

To test the WIT bindings, download [wit-bindgen][wit-bindgen] and run the following:

wit-deps && wit-bindgen rust --out-dir /tmp/wit wit/

This will attempt to generate Rust based bindings, in a folder under /tmp (which will be cleaned up eventually), but in doing so, will check that the WIT definitions are valid (as they must be to complete binding generation).

About

Wasmcloud Couchbase capabilities provider

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors 4

  •  
  •  
  •  
  •