Crates.io | crux_platform |
lib.rs | crux_platform |
version | 0.1.12 |
source | src |
created_at | 2022-12-15 16:52:17.169483 |
updated_at | 2024-05-23 07:39:22.610903 |
description | Platform capability for use with crux_core |
homepage | |
repository | https://github.com/redbadger/crux/ |
max_upload_size | |
id | 738122 |
size | 8,323 |
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.
Crux capabilities teach Crux how to interact with the shell when performing side effects. They do the following:
Request
struct to instruct the Shell how to perform the side effect on behalf of the CoreResponse
struct to hold the data returned by the Shell after the side effect has completedCommand
(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
andResponse
are unambiguously named (e.g.HttpRequest
andHttpResponse
).