Skip to content

Commit bfe4d2e

Browse files
committed
run zenohd with cargo-bin-run
1 parent 4912271 commit bfe4d2e

File tree

3 files changed

+42
-2
lines changed

3 files changed

+42
-2
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
**/build
33
cp_plugin.sh
44
TEST_CONFIG.json5
5+
.bin
56

67
zenoh-ts/dist
78
zenoh-ts/node_modules
@@ -14,4 +15,4 @@ zenoh-plugin-remote-api/target/**
1415
zenoh-plugin-remote-api/bindings/**
1516
**/target/**
1617
**/node_modules/**
17-
**/dist/**
18+
**/dist/**

Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,6 @@ uuid = { version = "1.3.0", default-features = false, features = [
4949
"serde",
5050
] }
5151
uhlc = { version = "0.8.0", default-features = false } # Default features are disabled due to usage in no_std crates
52+
53+
[workspace.metadata.bin]
54+
zenohd = { git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "main", version = "1.0.0-dev" }

README.md

+37-1
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,46 @@ Docs can be accessed at [Docs Link](https://eclipse-zenoh.github.io/zenoh-ts/)
2525

2626
---
2727

28-
## How to build it
28+
## How to build and run it
2929

3030
> :warning: **WARNING** :warning: : Zenoh and its ecosystem are under active development. When you build from git, make sure you also build from git any other Zenoh repository you plan to use (e.g. binding, plugin, backend, etc.). It may happen that some changes in git are not compatible with the most recent packaged Zenoh release (e.g. deb, docker, pip). We put particular effort in maintaining compatibility between the various git repositories in the Zenoh project.
3131
32+
33+
## Executing the `zenohd` with `zenoh-plugin-remote-api` plugin
34+
35+
The `zenohd` router and its pluigns should be built with exactly the same version of rust compiler with the same set of features.
36+
This requirement exists because router and plugins shares common Rust structures and Rust doesn't guarantee the ABI compatibility of
37+
memory representation of these structures.
38+
39+
Therefore one of these methodds are recommended:
40+
41+
1. Install latest release of `zenohd` and `zenoh-plugin-remote-api`
42+
43+
Ubuntu:
44+
45+
```sh
46+
echo "deb [trusted=yes] https://download.eclipse.org/zenoh/debian-repo/ /" | sudo tee -a /etc/apt/sources.list.d/zenoh.list > /dev/null
47+
sudo apt update
48+
sudo apt install zenohd
49+
sudo apt install zenoh-plugin-remote-api
50+
```
51+
52+
```sh
53+
zenohd
54+
```
55+
56+
2. Build `zenoh-plugin-remote-api` locally and build and run exactly the same zenohd version as the one which is used for building the plugin.
57+
The 3-rd party tool https://crates.io/crates/cargo-run-bin is used to build and run zenohd version local to project (in `.bin` directory)
58+
59+
```sh
60+
cargo install cargo-run-bin
61+
cargo bin -i zenohd
62+
```
63+
64+
```sh
65+
cargo bin zenohd
66+
```
67+
3268
## Building the Typescript project
3369

3470
1. Make sure that the following utilities are available on your platform.

0 commit comments

Comments
 (0)