18 unstable releases (3 breaking)

0.4.1 May 23, 2024
0.3.0 May 15, 2024
0.1.10 Mar 24, 2024
0.1.6 Dec 3, 2023
0.1.0 Dec 15, 2022

#535 in Database interfaces

Download history 71/week @ 2024-02-26 18/week @ 2024-03-04 6/week @ 2024-03-11 110/week @ 2024-03-18 25/week @ 2024-03-25 34/week @ 2024-04-01 56/week @ 2024-04-08 20/week @ 2024-04-22 18/week @ 2024-04-29 477/week @ 2024-05-13 1481/week @ 2024-05-20 223/week @ 2024-05-27 141/week @ 2024-06-03 207/week @ 2024-06-10

2,067 downloads per month

Apache-2.0

275KB
2.5K SLoC

Rust 2K SLoC // 0.0% comments TypeScript 337 SLoC // 0.1% comments Swift 35 SLoC // 0.1% comments Java 18 SLoC

Crux Key-Value Store capability

This crate contains the KeyValue capability, which can be used to ask the Shell to read from, and write to, a key-value store.

Currently it provides an interface for getting, setting, and deleting keys, checking if keys exists in the store, and listing keys that start with a prefix.

About Crux Capabilities

Crux capabilities teach Crux how to interact with the shell when performing side effects. They do the following:

  1. define a Request struct to instruct the Shell how to perform the side effect on behalf of the Core
  2. define a Response struct to hold the data returned by the Shell after the side effect has completed
  3. declare one or more convenience methods for invoking the Shell's capability, each of which creates a Command (describing the effect and its continuation) that Crux can "execute"

Note that because Swift has no namespacing, there is currently a requirement to ensure that Request and Response are unambiguously named (e.g. HttpRequest and HttpResponse).

Dependencies

~2.5–3.5MB
~73K SLoC