Skip to content

zenoh-ts 1.0.2-dev

Install from the command line:
Learn more about npm packages
$ npm install @eclipse-zenoh/zenoh-ts@1.0.2-dev
Install via package.json:
"@eclipse-zenoh/zenoh-ts": "1.0.2-dev"

About this version

⚠️ This is a WIP Active development project: Experiment with with it, but it is Not production Ready!

Discord License

Eclipse Zenoh Typescript / Javascript API

The Eclipse Zenoh: Zero Overhead Pub/sub, Store/Query and Compute.

Zenoh (pronounce /zeno/) unifies data in motion, data at rest and computations. It carefully blends traditional pub/sub with geo-distributed storages, queries and computations, while retaining a level of time and space efficiency that is well beyond any of the mainstream stacks.

Check the website zenoh.io and the roadmap for more detailed information.


Typescript/Javascript API

This repository provides a Typscript / Javascript binding through the use of the remote-api-plugin in this repo. The long term plan is to use zenoh Zenoh written in Rust to target WASM.
In its current state, it is not possible to compile Zenoh (Rust) to target WASM, and will need to undergo a fair amount of refactoring before that can happen.


How to build it

⚠️ 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.

  1. Make sure that the following utilities are available on your platform.
  1. Navigate to the directory zenoh-ts

  2. Run the commands:

  yarn install 
  # 
  yarn run build

Adding Typescript to your application

The TypeScript library can be install from the command line:

npm install @eclipse-zenoh/[email protected]

Or added via package.json

"@eclipse-zenoh/zenoh-ts": "0.0.8"

Note: In order to add this library to your project you must log into the github npm repository,
please refer to this link for more information Accessing github NPM

Generating Documentation

  1. Make sure that the typedoc dependency is installed.

  2. Navigate to the directory zenoh-ts

  3. Run the commands:

  npx typedoc src/index.ts

Build + run the examples

The most simple way to run examples is to install deno, and run each example individually via the command line.

  1. Install deno
  2. Navigate to the /zenoh-ts/examples directory
  3. Install zenoh-ts library by running yarn install
  4. Start a zenohd instance with the Remote API plugin running zenohd --config EXAMPLE CONFIG.json
{
  mode: 'router',
  plugins_loading: {
    enabled: true,
    search_dirs: ['./target/debug', '~/.zenoh/lib']
  },
  plugins: {
    remote_api: {
      websocket_port: '10000',
    }
  }
}
  1. Then run the examples by running yarn run <PATH TO EXAMPLE>, i.e. yarn example src/z_sub.ts

This will start an instance of Deno running the example. The application will attempt to connect to a websocket_port : 10000 where the Remote API plugin is expected to be running.
The javascript runtime deno is expected be consistent with the browser. Note: This library does not support NodeJS

Details


Assets

  • zenoh-ts-1.0.2-dev.tgz

Download activity

  • Total downloads 1
  • Last 30 days 0
  • Last week 0
  • Today 0

Recent versions

View all