{"id":18300527,"url":"https://github.com/eclipse-zenoh/zenoh-ts","last_synced_at":"2025-08-29T13:06:00.054Z","repository":{"id":260113546,"uuid":"785188252","full_name":"eclipse-zenoh/zenoh-ts","owner":"eclipse-zenoh","description":"TypeScript Interface to the Zenoh Protocol.","archived":false,"fork":false,"pushed_at":"2025-04-05T06:01:00.000Z","size":7286,"stargazers_count":16,"open_issues_count":5,"forks_count":5,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-04-05T07:18:30.663Z","etag":null,"topics":["typescript","zenoh"],"latest_commit_sha":null,"homepage":"http://zenoh.io","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eclipse-zenoh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-11T11:31:03.000Z","updated_at":"2025-04-05T06:01:04.000Z","dependencies_parsed_at":"2025-02-20T01:27:43.881Z","dependency_job_id":"b22dca19-a193-483c-8be9-e67b18d1365a","html_url":"https://github.com/eclipse-zenoh/zenoh-ts","commit_stats":null,"previous_names":["eclipse-zenoh/zenoh-ts"],"tags_count":83,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-zenoh%2Fzenoh-ts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-zenoh%2Fzenoh-ts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-zenoh%2Fzenoh-ts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-zenoh%2Fzenoh-ts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eclipse-zenoh","download_url":"https://codeload.github.com/eclipse-zenoh/zenoh-ts/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247352196,"owners_count":20925223,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["typescript","zenoh"],"created_at":"2024-11-05T15:12:43.606Z","updated_at":"2025-08-29T13:06:00.027Z","avatar_url":"https://github.com/eclipse-zenoh.png","language":"TypeScript","funding_links":[],"categories":["Official API"],"sub_categories":[],"readme":"\u003cimg src=\"https://raw.githubusercontent.com/eclipse-zenoh/zenoh/master/zenoh-dragon.png\" height=\"150\"\u003e\n\n[![Discord](https://img.shields.io/badge/chat-on%20discord-blue)](https://discord.gg/2GJ958VuHs)\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n\n# Eclipse Zenoh TypeScript / JavaScript API\n\nEclipse Zenoh: Zero Overhead Pub/sub, Store/Query, and Compute.\n\nZenoh (pronounced _/zeno/_) unifies data in motion, data at rest, and\ncomputations. It carefully blends traditional pub/sub with geo-distributed\nstorage, queries, and computations, while retaining a level of time and space\nefficiency that is well beyond any of the mainstream stacks.\n\nCheck the website [zenoh.io](http://zenoh.io) and the\n[roadmap](https://github.com/eclipse-zenoh/roadmap) for more detailed\ninformation.\n\n---\n\n## TypeScript/JavaScript API\n\nThis repository provides TypeScript / JavaScript bindings through the use of\nthe `zenoh-plugin-remote-api`. The long-term plan is to use\n[Zenoh written in Rust](https://github.com/eclipse-zenoh/zenoh) to target WASM.\nIn its current state, it is not possible to compile Zenoh (Rust) to target WASM,\nand it will need to undergo a fair amount of refactoring before that can happen.\n\nThe latest version of the zenoh-ts library can be installed from npm:\n\n```sh\nnpm install @eclipse-zenoh/zenoh-ts\n```\n\nDocumentation can be accessed at [Docs Link](https://eclipse-zenoh.github.io/zenoh-ts/)\n\nThe library requires a WebSocket connection to the `zenohd` daemon through the\n`zenoh-plugin-remote-api` plugin in the daemon. See the corresponding section below.\n\n---\n\n## How to build and use zenoh-ts\n\n### Executing the remote-api plugin\n\nThe `zenoh-ts` library accesses the zenoh network by establishing a WebSocket connection to\nthe `zenoh-plugin-remote-api` plugin of the zenoh router `zenohd`.\n\nThere is also a standalone executable `zenoh-bridge-remote-api`. This is in fact\nthe same `zenohd` statically linked with `zenoh-plugin-remote-api` and providing convenient\nspecific command-line options, e.g. `--ws-port`.\n\nExamples:\n\nRun bridge on WebSocket port 8080:\n\n```sh\ncargo run -- --ws-port 8080\n```\n\nRun bridge on default port 10000:\n\n```sh\ncargo run\n```\n\nGet help:\n\n```sh\ncargo run -- --help\n```\n\nFor information about dynamically-loading plugin usage, see [zenoh-plugin-remote-api/README.md](zenoh-plugin-remote-api/README.md).\n\n### Building the library from sources\n\n1. Make sure that the following utilities are available on your platform:\n\n   - [NPM](https://www.npmjs.com/package/npm)\n   - [yarn](https://classic.yarnpkg.com/lang/en/docs/install/#debian-stable)\n   - [TypeScript](https://www.typescriptlang.org/download/)\n   - [Rust](https://www.rust-lang.org)\n   - [deno](https://deno.com/) - for command line examples\n\n2. Navigate to the directory `zenoh-ts`\n\n3. Run the commands:\n\n   ```sh\n   yarn install \n   yarn build\n   ```\n\n   The result is placed into the `zenoh-ts/dist` directory.\n\n   Note: `yarn build` defaults to building the library. You can also specify\n   components explicitly: `yarn build library`, `yarn build tests`,\n   `yarn build examples`, or `yarn build ALL` for everything. See all available options by running\n   `yarn build --help`.\n\n   This library is currently compatible with browsers, but not with Node.js due\n   to WebSocket library limitations.\n\n### Build and run examples\n\nFor simplicity, the examples can be executed from the `zenoh-ts` directory. You\nmay also go directly to the `zenoh-ts/examples` directory to explore and run\nexamples there.\n\nThe examples are configured to access the remote-api plugin on `ws://localhost:10000`. To run it, just execute `cargo run` or pass the `DAEMON` parameter to yarn. One daemon for all examples is sufficient, so running it separately with cargo is easier.\n\nTo run an example, execute the command `yarn start [DAEMON] example deno [example_name]` or `yarn start [DAEMON] example browser [example_name]`.\n\nThe following examples are available:\n\n- Command line examples\n  - Publisher and subscriber:\n\n    ```sh\n    cargo run\n    cd zenoh-ts\n    yarn start example deno z_pub\n    yarn start example deno z_sub\n    ```\n\n  - Queryable and get:\n\n    ```sh\n    cargo run\n    cd zenoh-ts\n    yarn start example deno z_queryable\n    yarn start example deno z_get\n    ```\n\n    and many more\n\n- Browser examples:\n\n  - Chat application (simple, Webpack-based):\n\n    ```sh\n    yarn start DAEMON example browser chat\n    ```\n\n    A browser window at [localhost:8080](http://127.0.0.1:8080/index.html) with\n    the chat interface should open. Open another window with the same address, press\n    the \"Connect\" buttons in both and see how they interact.\n\n  - Nuxt.js application (Vue.js framework):\n\n    ```sh\n    yarn start DAEMON example browser nuxt\n    ```\n\n    Open browser at [localhost:3000](http://localhost:3000) to investigate Zenoh\n    functionality\n\n### Generating Documentation\n\n1. Make sure that the [typedoc](https://typedoc.org/) dependency is installed.\n\n2. Navigate to the directory `zenoh-ts`.\n\n3. Run the command:\n\n```bash\nnpx typedoc src/index.ts\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feclipse-zenoh%2Fzenoh-ts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feclipse-zenoh%2Fzenoh-ts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feclipse-zenoh%2Fzenoh-ts/lists"}