Git Product home page Git Product logo

janus-app's Introduction

janus-app

This is an experimental high-level Rust binding to Janus Gateway's application plugin API.

WARNING! This project is an experimental and not tested WIP. Don't try to use it for creating actual plugins.

The concept

There's already janus-plugin crate which enables creating plugins for Janus Gateway but its API is too low-level and unsafe.

This crate enables writing plugins in a more idiomatic Rust way:

  • Plugin code has nothing to do with raw pointers and unsafe C functions. These things are abstracted out by the crate.
  • A plugin is a trait implementation, not a bunch of extern "C" functions.
  • Object-oriented API instead of procedural.
  • A plugin and each of its handles may have their state.
  • Plugin handles' core C state is not mixed together with plugin's Rust state.
  • Dispatching callbacks from other plugin's threads is thread safe. This enables the plugin to handle messages and media events in an asynchronous non-blocking way.
  • Serde library is being used for (de)serialization within the plugin as de-facto Rust's standard. No need to tackle C's Jansson that is being used on the low-level API.
  • Unit testing is possible for plugins because they aren't coupled to C code.

Example plugin

For an example plugin see example sub-crate.

You can build a docker image with Janus Gateway bundled with the plugin:

docker build -t janus-app-example:latest -f docker/Dockerfile .
docker run --rm -it -p 8188:8188 janus-app-example:latest

Documentation

Build documentation with:

cargo doc --no-deps

then open target/doc/janus_app/index.html.

janus-app's People

Contributors

feymartynov avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

unisolzp

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.