You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+27-20Lines changed: 27 additions & 20 deletions
Original file line number
Diff line number
Diff line change
@@ -7,14 +7,39 @@ The crate can be used to
7
7
* 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.
8
8
* 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).
9
9
10
-
## Building
10
+
## Using the Crate
11
+
<!--
12
+
`uman~up-language-using~1`
13
+
Covers:
14
+
- req~up-language-documentation~
15
+
-->
16
+
The crate needs to be added to the `[dependencies]` section of the `Cargo.toml` file:
17
+
18
+
```toml
19
+
[dependencies]
20
+
up-rust = { version = "0.1" }
21
+
```
22
+
23
+
Most developers will want to use the Communication Level API and its default implementation
24
+
which are provided by the `communication` module.
25
+
26
+
## Building from Source
11
27
<!--
12
28
`uman~up-language-building~1`
13
29
Covers:
14
30
- req~up-language-documentation~1
15
31
-->
16
32
17
-
The crate can be built using the [Cargo package manager](https://doc.rust-lang.org/cargo/) from the root folder:
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.
40
+
If the repository has already been cloned without the parameter, the submodule can be initialized manually using `git submodule update --init --recursive`.
41
+
42
+
The crate can then be built using the [Cargo package manager](https://doc.rust-lang.org/cargo/) from the root folder:
18
43
<!--
19
44
`impl~use-cargo-build-system~1`
20
45
Covers:
@@ -26,8 +51,6 @@ Covers:
26
51
cargo build
27
52
```
28
53
29
-
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.
30
-
31
54
The crate has some (optional) _features_ as documented in [lib.rs](src/lib.rs).
32
55
33
56
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
46
69
cargo doc --no-deps --all-features --open
47
70
```
48
71
49
-
## Using the Crate
50
-
<!--
51
-
`uman~up-language-using~1`
52
-
Covers:
53
-
- req~up-language-documentation~
54
-
-->
55
-
The crate needs to be added to the `[dependencies]` section of the `Cargo.toml` file:
56
-
57
-
```toml
58
-
[dependencies]
59
-
up-rust = { version = "0.1" }
60
-
```
61
-
62
-
Most developers will want to use the Communication Level API and its default implementation
63
-
which are provided by `communication` module.
64
-
65
72
## License
66
73
67
74
The crate is published under the terms of the [Apache License 2.0](LICENSE).
0 commit comments