Skip to content

Commit

Permalink
Use markdown for README
Browse files Browse the repository at this point in the history
crates.io does not support rendering AsciiDoc.
The README has been converted back to plain markdown and the
OFT tags have been hidden inside of HTML comments, in order to
not mess up the rendered document.
  • Loading branch information
sophokles73 committed Jul 18, 2024
1 parent da72285 commit 099ff28
Show file tree
Hide file tree
Showing 5 changed files with 76 additions and 80 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: readme
path: README.adoc
path: README.md

- name: Collect quality artifacts
uses: anotherdaniel/[email protected]
Expand Down Expand Up @@ -133,7 +133,7 @@ jobs:
id: upload_readme
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: README.adoc
file: README.md
tag: ${{ github.ref }}

- name: Gets latest created release info
Expand Down
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.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ exclude = [
keywords = ["uProtocol", "SDK", "communication"]
license = "Apache-2.0"
name = "up-rust"
readme = "README.adoc"
readme = "README.md"
repository = "https://github.com/eclipse-uprotocol/up-rust"
rust-version = "1.74.1"
version = "0.1.0"
version = "0.1.1"

[features]
default = ["communication"]
Expand Down
75 changes: 0 additions & 75 deletions README.adoc

This file was deleted.

71 changes: 71 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Eclipse uProtocol Rust library

This is the [uProtocol v1.6.0-alpha.2 Language Library](https://github.com/eclipse-uprotocol/uprotocol-spec/blob/v1.6.0-alpha.2/languages.adoc) for the Rust programming language.

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
<!--
`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:
<!--
`impl~use-cargo-build-system~1`
Covers:
- req~up-language-build-sys~1
- req~up-language-build-deps~1
-->

```sh
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`:

```json
{
"rust-analyzer.cargo.features": "all"
}
```

### Generating API Documentation

The API documentation can be generated using

```sh
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).

## Contributing

Contributions are more than welcome. Please refer to the [Contribution Guide](CONTRIBUTING.md).

0 comments on commit 099ff28

Please sign in to comment.