6 releases

0.2.0 Aug 23, 2024
0.1.5 Jul 31, 2024

#335 in Network programming

Download history 324/week @ 2024-07-15 42/week @ 2024-07-22 520/week @ 2024-07-29 248/week @ 2024-08-05 65/week @ 2024-08-12 156/week @ 2024-08-19 60/week @ 2024-08-26

542 downloads per month
Used in 2 crates

Apache-2.0

390KB
6K SLoC

Eclipse uProtocol Rust library

This is the uProtocol v1.6.0-alpha.3 Language Library for the Rust programming language.

The crate can be used to

  • implement uEntities that communicate with each other using the uProtocol Communication Layer API over one of the supported transport protocols.
  • implement support for an additional transport protocol by means of implementing the Transport Layer API.

Using the Crate

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.

Building from Source

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"
}

Generating API Documentation

The API documentation can be generated using

cargo doc --no-deps --all-features --open

License

The crate is published under the terms of the Apache License 2.0.

Contributing

Contributions are more than welcome. Please refer to the Contribution Guide.

Dependencies

~3.5–8MB
~114K SLoC