This repo contains libraries, tools, samples and examples for developers who wish to work with the atPlatform from Rust code.
It currently has limited functionality with minimal tests.
The following need to be installed:
rust
- Installation instructionspkg-config
Run cargo test --workspace
to run all tests in the different workspaces.
Add -- --nocapture
to see the logs during the tests.
Run cargo test -p <workspace_name>
to run tests for a specific workspace.
Prefix all commands with RUST_LOG=info
(or debug
or trace
) to see logs.
Get the keys currently in the @sign's server.
Run cargo run --example scan_example -- --help
for more information.
Put data into the @sign's server.
Run cargo run --example put_data_example -- --help
for more information.
Get data from the @sign's server.
Run cargo run --example get_data_example -- --help
for more information.
This repo is broken down into workspaces to help with organization and separation of concerns. It will also make adding implementations for specific harware easier. The workspaces are:
at_chops
(Cryptographic and Hashing Operations (CHOPS)).lib.rs
- Contains the specific combination of crypto operations required by theAtProtocol
.crypto_functions_trait.rs
- A trait which defines the methods thatAtChops
requires.default_crypto_functions.rs
- Contains an implementation of theCryptoFunctions
trait using RustCrypto, a pure Rust implementation of cryptographic algorithms.
at_errors
- Contains the error types that the library can return including associated functions for creating them.at_records
- Contains theAtRecord
struct which is used to store the data that is sent and received.at_secrets
- Contains theAtSecrets
struct which is used to store the secrets required by theAtClient
as well as associated functions for creating them from a file.at_sign
- Contains theAtSign
struct which is used for working with AtSigns.at_tls
- Contains theTlsClient
struct which is used to establish a TLS connection with the atServer and send and receive data.lib.rs
- Contains theTlsClient
struct and methods for TLS related operations.tls_connection_trait.rs
- A trait which defines the signature for creating a connection.rustls_connection.rs
- Contains an implementation of theTlsConnection
trait using Rustls
at_verbs
- Contains a trait that all verbs have to implement. Also contains implementations for the verbs.src
- Contains the main library code.at_client.rs
- Contains theAtClient
struct which is used to interact with the atPlatform.
This library uses the log
crate. This means implementors of this library can use something like env_logger
and get info from the library.
All of our software is open with intent. We welcome contributions - we want pull requests, and we want to hear about issues. See also CONTRIBUTING.md.
- Notifications using the
monitor
verb - Interoperability with other SDKs
- Full test coverage
- Ability to implement different cryptographic and TLS libraries
-
no_std
implementation - Distribute to
crates.io
- Support for
async
runtime - Add default implementations for TLS connection on multiple platforms (ESP32, Linux, Pico W)