Skip to content

Commit

Permalink
run zenohd with cargo-bin-run
Browse files Browse the repository at this point in the history
  • Loading branch information
milyin committed Dec 2, 2024
1 parent 4912271 commit bfe4d2e
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
**/build
cp_plugin.sh
TEST_CONFIG.json5
.bin

zenoh-ts/dist
zenoh-ts/node_modules
Expand All @@ -14,4 +15,4 @@ zenoh-plugin-remote-api/target/**
zenoh-plugin-remote-api/bindings/**
**/target/**
**/node_modules/**
**/dist/**
**/dist/**
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,6 @@ uuid = { version = "1.3.0", default-features = false, features = [
"serde",
] }
uhlc = { version = "0.8.0", default-features = false } # Default features are disabled due to usage in no_std crates

[workspace.metadata.bin]
zenohd = { git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "main", version = "1.0.0-dev" }
38 changes: 37 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,46 @@ Docs can be accessed at [Docs Link](https://eclipse-zenoh.github.io/zenoh-ts/)

---

## How to build it
## How to build and run it

> :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.

## Executing the `zenohd` with `zenoh-plugin-remote-api` plugin

The `zenohd` router and its pluigns should be built with exactly the same version of rust compiler with the same set of features.
This requirement exists because router and plugins shares common Rust structures and Rust doesn't guarantee the ABI compatibility of
memory representation of these structures.

Therefore one of these methodds are recommended:

1. Install latest release of `zenohd` and `zenoh-plugin-remote-api`

Ubuntu:

```sh
echo "deb [trusted=yes] https://download.eclipse.org/zenoh/debian-repo/ /" | sudo tee -a /etc/apt/sources.list.d/zenoh.list > /dev/null
sudo apt update
sudo apt install zenohd
sudo apt install zenoh-plugin-remote-api
```

```sh
zenohd
```

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

```sh
cargo install cargo-run-bin
cargo bin -i zenohd
```

```sh
cargo bin zenohd
```

## Building the Typescript project

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

0 comments on commit bfe4d2e

Please sign in to comment.