Crates.io | up-rust |
lib.rs | up-rust |
version | 0.2.0 |
source | src |
created_at | 2024-07-17 15:17:45.94256 |
updated_at | 2024-08-23 11:34:51.725129 |
description | The Eclipse uProtocol Rust Language Library |
homepage | |
repository | https://github.com/eclipse-uprotocol/up-rust |
max_upload_size | |
id | 1306264 |
size | 468,563 |
This is the uProtocol v1.6.0-alpha.3 Language Library for the Rust programming language.
The crate can be used to
The crate needs to be added to the [dependencies]
section of the Cargo.toml
file:
[dependencies]
up-rust = { version = "0.1" }
Most developers will want to use the Communication Level API and its default implementation
which are provided by the communication
module.
First, the repository needs to be cloned using:
git clone --recurse-submodules git@github.com:eclipse-uprotocol/up-rust
The --recurse-submodules
parameter is important to make sure that the git submodule referring to the uProtocol type definitions is being initialized in the workspace. The proto3 files contained in that submodule define uProtocol's basic types and are being compiled into Rust code as part of the build process.
If the repository has already been cloned without the parameter, the submodule can be initialized manually using git submodule update --init --recursive
.
The crate can then be built using the Cargo package manager from the root folder:
cargo build
The crate has some (optional) features as documented in lib.rs.
VSCode can be instructed to build all features automatically by means of putting the following into ./vscode/settings.json
:
{
"rust-analyzer.cargo.features": "all"
}
The API documentation can be generated using
cargo doc --no-deps --all-features --open
The crate is published under the terms of the Apache License 2.0.
Contributions are more than welcome. Please refer to the Contribution Guide.