Skip to content

Commit

Permalink
Prepare v0.1.2 release
Browse files Browse the repository at this point in the history
  • Loading branch information
sophokles73 committed Jul 18, 2024
1 parent 2808424 commit 946d2fa
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 22 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ name = "up-rust"
readme = "README.md"
repository = "https://github.com/eclipse-uprotocol/up-rust"
rust-version = "1.74.1"
version = "0.1.1"
version = "0.1.2"

[features]
default = ["communication"]
Expand Down
47 changes: 27 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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`:
Expand All @@ -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).
Expand Down

0 comments on commit 946d2fa

Please sign in to comment.