6 个版本
0.0.7 | 2022 年 9 月 16 日 |
---|---|
0.0.6 | 2022 年 9 月 16 日 |
0.0.3 | 2022 年 7 月 29 日 |
0.0.2 | 2022 年 3 月 7 日 |
在 嵌入式开发 中排名 #566
480KB
980 行
aws-greengrass-nucleus-rust
用 Rust 编程语言编写的 aws greengrass nucleus(非官方)
动机
我不能创造的东西,我就不懂。
了解如何解决每一个已被解决的问题。
———— Richard Feynman
在 1988 年 2 月去世时的黑板上;
快速入门
- cargo run -- --version
aws-greengrass-nucleus 0.0.3
- cargo run -- --help
aws-greengrass-nucleus 0.0.3
aws greengrass nucleus in Rust (unofficial)
USAGE:
aws-greengrass-nucleus [OPTIONS] --thing-name <THING_NAME>
OPTIONS:
--aws-region <AWS_REGION>
[default: ap-southeast-1]
--component-default-user <COMPONENT_DEFAULT_USER>
--deploy-dev-tools
...
- cargo run -- --aws-region ap-southeast-1 --thing-name coreName --component-default-user ggc_user:ggc_group --provision
same as original nucleus
核心组件
The Greengrass nucleus component (aws.greengrass.Nucleus) 是一个 必需的 组件,是运行 AWS IoT Greengrass Core 软件在设备上的最低要求。
一点历史
有多大?
v1(可能是 golang?)
- Minimum 128 MB disk space available for the AWS IoT Greengrass Core software. If you use the OTA update agent, the minimum is 400 MB.
- Minimum 128 MB RAM allocated to the AWS IoT Greengrass Core software. With stream manager enabled, the minimum is 198 MB RAM.
v2(Java 开源)
- memory,
The maximum amount of RAM (in kilobytes) that each component's processes can use on the core device.
如何使用 v2?
core-device
- list-core-devices
- get-core-device
- delete-core-device
component
- create-component-version
- describe-component
- delete-component
- get-component
- get-component-version-artifact
- list-component-versions
- list-components
- resolve-component-candidates
deployments
- create-deployment
- list-deployments
- get-deployment
- cancel-deployment
其他
- list-effective-deployments
- list-installed-components
- list-tags-for-resource
- tag-resource
- untag-resource
如何
- 打开文档
cargo doc --open
- 编译本地包及其所有依赖项
cargo b(uild)
- 发布构建
cargo b --release
- 交叉编译
rustup target list rustup target add cargo b --target <>
- 为 Raspberry Pi 交叉编译
- 为 OpenWRT 交叉编译
- 快速检查
cargo c(heck)
- 运行
cargo run (-- 你的参数)
- 测试
cargo test
- 文档测试
- 发布
cargo publish
设计
见 docs/design.md
用例
以下示例展示了 AWS IoT Greengrass 设备如何与 AWS IoT Greengrass 云服务以及 AWS Cloud 中的其他 AWS 服务交互。
依赖项
~73MB
~1M SLoC