-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2808424
commit 946d2fa
Showing
3 changed files
with
29 additions
and
22 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,14 +7,39 @@ The crate can be used to | |
* implement uEntities that communicate with each other using the uProtocol [Communication Layer API](https://github.com/eclipse-uprotocol/up-spec/blob/v1.6.0-alpha.2/up-l2/api.adoc) over one of the supported transport protocols. | ||
* implement support for an additional transport protocol by means of implementing the [Transport Layer API](https://github.com/eclipse-uprotocol/up-spec/blob/v1.6.0-alpha.2/up-l1/README.adoc). | ||
|
||
## Building | ||
## Using the Crate | ||
<!-- | ||
`uman~up-language-using~1` | ||
Covers: | ||
- req~up-language-documentation~ | ||
--> | ||
The crate needs to be added to the `[dependencies]` section of the `Cargo.toml` file: | ||
|
||
```toml | ||
[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 | ||
<!-- | ||
`uman~up-language-building~1` | ||
Covers: | ||
- req~up-language-documentation~1 | ||
--> | ||
|
||
The crate can be built using the [Cargo package manager](https://doc.rust-lang.org/cargo/) from the root folder: | ||
First, the repository needs to be cloned using: | ||
|
||
```sh | ||
git clone --recurse-submodules [email protected]: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](https://doc.rust-lang.org/cargo/) from the root folder: | ||
<!-- | ||
`impl~use-cargo-build-system~1` | ||
Covers: | ||
|
@@ -26,8 +51,6 @@ Covers: | |
cargo build | ||
``` | ||
|
||
The build requires an active connection to the internet because it needs to download and compile [uProtocol protobuf files](https://github.com/eclipse-uprotocol/up-spec/tree/v1.6.0-alpha.2/up-core-api) which define many of the core types used throughout the library. | ||
|
||
The crate has some (optional) _features_ as documented in [lib.rs](src/lib.rs). | ||
|
||
VSCode can be instructed to build all features automatically by means of putting the following into `./vscode/settings.json`: | ||
|
@@ -46,22 +69,6 @@ The API documentation can be generated using | |
cargo doc --no-deps --all-features --open | ||
``` | ||
|
||
## Using the Crate | ||
<!-- | ||
`uman~up-language-using~1` | ||
Covers: | ||
- req~up-language-documentation~ | ||
--> | ||
The crate needs to be added to the `[dependencies]` section of the `Cargo.toml` file: | ||
|
||
```toml | ||
[dependencies] | ||
up-rust = { version = "0.1" } | ||
``` | ||
|
||
Most developers will want to use the Communication Level API and its default implementation | ||
which are provided by `communication` module. | ||
|
||
## License | ||
|
||
The crate is published under the terms of the [Apache License 2.0](LICENSE). | ||
|