Skip to content

Commit

Permalink
example config updated
Browse files Browse the repository at this point in the history
  • Loading branch information
milyin committed Dec 2, 2024
1 parent bfe4d2e commit 28242d8
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 19 deletions.
12 changes: 12 additions & 0 deletions EXAMPLE_CONFIG.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
mode: 'router',
plugins_loading: {
enabled: true,
search_dirs: ['./target/debug', '~/.zenoh/lib']
},
plugins: {
remote_api: {
"__config__": "zenoh-plugin-remote-api/EXAMPLE_CONFIG.json5"
}
}
}
23 changes: 18 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ The `zenohd` router and its pluigns should be built with exactly the same versio
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:
Therefore one of these methodds is recommended:

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

Expand All @@ -49,20 +49,33 @@ Therefore one of these methodds are recommended:
sudo apt install zenoh-plugin-remote-api
```

Mac-OS:
```sh
zenohd
brew tap eclipse-zenoh/homebrew-zenoh
brew install zenoh
brew install zenoh-plugin-remote-api
```

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)
2. Build the plugin and the router locally:

Build the `zenoh-plugin-remote-api`

```sh
cargo build
```

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

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

Use this command to run local zenoh router version instead of just `zenohd --config config.json5` in the examples below

```sh
cargo bin zenohd
cargo bin zenohd -- --config config.json5
```

## Building the Typescript project
Expand Down
15 changes: 1 addition & 14 deletions zenoh-plugin-remote-api/EXAMPLE_CONFIG.json5
Original file line number Diff line number Diff line change
@@ -1,16 +1,3 @@
{
mode: 'router',
plugins_loading: {
enabled: true,
search_dirs: ['./target/debug', '~/.zenoh/lib']
},
plugins: {
remote_api: {
websocket_port: '10000',
secure_websocket: {
certificate_path: 'path/to/certificate_path',
private_key_path: 'path/to/private_key_path'
}
}
}
websocket_port: '10000'
}

0 comments on commit 28242d8

Please sign in to comment.