Crates.io | jabi |
lib.rs | jabi |
version | 0.1.1 |
source | src |
created_at | 2024-03-21 03:44:52.472018 |
updated_at | 2024-03-24 23:12:53.134673 |
description | Rust library for JABI (Just Another Bridge Interface) |
homepage | |
repository | https://github.com/dragonlock2/JABI |
max_upload_size | |
id | 1181185 |
size | 47,415 |
JABI (Just Another Bridge Interface) makes creating and deploying bridge devices that provide RPC to common microcontroller peripherals simple.
Interfaces are the available methods by which a single client may connect. Multiple interfaces running concurrently is supported. The following interfaces are currently supported.
Microcontroller peripherals are made available over each interface via a custom basic RPC. Each interface listens for request packets and dispatches them to the appropriate peripheral. Multiple instances of each peripheral type is supported. The following peripherals are currently supported.
Clients connect to the microcontroller over any one of the interfaces. The following clients are supported.
pip install pyjabi
cargo add jabi
Follow Zephyr's Getting Started Guide to get dependencies installed. Then create a new workspace using this repo. We'll create it under jabi
, but you can use whatever you want.
west init -m https://github.com/dragonlock2/JABI.git jabi
cd jabi && west update
To port any board, you'll need the following. See firmware/boards for examples.
firmware/boards/<board>.conf
- enable device drivers and any desired settingsfirmware/boards/<board>.overlay
- selects available interfaces and peripheralsNow compile and flash the firmware.
west build -b <board>
west flash
If you want to build from source, you may need to install a few dependencies.
brew install git cmake autoconf automake libtool libusb grpc openssl
apt install git cmake autotools-dev autoconf libtool libusb-1.0-0-dev libssl-dev
libusb
, gRPC
, OpenSSL
, and getopt
.pacman -S mingw-w64-ucrt-x86_64-gcc git mingw-w64-ucrt-x86_64-cmake mingw-w64-ucrt-x86_64-autotools mingw-w64-ucrt-x86_64-libusb mingw-w64-ucrt-x86_64-grpc
x86_64
, your exact package names may be different.C++ support is provided as a CMake library and can be added to any CMake project using add_subdirectory
. An example project is in examples/cpp.
A Python library is published on PyPI. For the latest changes, it can be built and installed locally by running the following. An example using it is in examples/python.
pip install clients/python
Protobuf definitions are located in jabi.proto
. grpc-server
is a reference server implementation that bridges one device to a network and can handle parallel requests. It provides various arguments for selecting the desired device. An example client is in examples/grpc-client.
A Rust crate is published on crates.io. For the latest changes, it can be added locally. An example project is in examples/rust.
The following gRPC clients.
Fun things to look into one day.
/dev