20 releases

0.2.2 Oct 23, 2024
0.2.0 Sep 16, 2024
0.1.12 May 23, 2024
0.1.9 Mar 24, 2024
0.1.0 Dec 15, 2022

#147 in WebAssembly

Download history 45/week @ 2024-08-09 46/week @ 2024-08-16 166/week @ 2024-09-13 24/week @ 2024-09-20 40/week @ 2024-09-27 14/week @ 2024-10-04 22/week @ 2024-10-11 266/week @ 2024-10-18 47/week @ 2024-10-25 34/week @ 2024-11-01 15/week @ 2024-11-08 4/week @ 2024-11-15

131 downloads per month

Apache-2.0

255KB
2K SLoC

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

Crux Platform capability

This crate contains the Platform capability, which can be used to ask the Shell what platform it is running on.

For an example of how to use the capability, see the integration test.

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).


lib.rs:

TODO mod docs

Dependencies

~2.5–4MB
~74K SLoC