{"id":21040205,"url":"https://github.com/samuelsadok/fibre","last_synced_at":"2025-04-10T00:19:44.451Z","repository":{"id":49307030,"uuid":"118344107","full_name":"samuelsadok/fibre","owner":"samuelsadok","description":"Abstraction layer for painlessly building object oriented distributed systems that just work","archived":false,"fork":false,"pushed_at":"2023-01-16T20:01:54.000Z","size":5007,"stargazers_count":121,"open_issues_count":10,"forks_count":39,"subscribers_count":6,"default_branch":"devel","last_synced_at":"2025-04-02T02:57:15.832Z","etag":null,"topics":["communication-protocol","distributed-systems"],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/samuelsadok.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-01-21T14:53:30.000Z","updated_at":"2025-03-10T03:10:12.000Z","dependencies_parsed_at":"2023-02-10T06:00:48.130Z","dependency_job_id":null,"html_url":"https://github.com/samuelsadok/fibre","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samuelsadok%2Ffibre","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samuelsadok%2Ffibre/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samuelsadok%2Ffibre/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samuelsadok%2Ffibre/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samuelsadok","download_url":"https://codeload.github.com/samuelsadok/fibre/tar.gz/refs/heads/devel","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248131634,"owners_count":21052887,"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":["communication-protocol","distributed-systems"],"created_at":"2024-11-19T13:45:15.940Z","updated_at":"2025-04-10T00:19:44.427Z","avatar_url":"https://github.com/samuelsadok.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fibre\n\n## Overview\n\nThe goal of Fibre is to provide a framework to make suckless distributed applications easier to program.\n\nIn particular:\n\n - Nobody likes boiler plate code. Using a remote object should feel almost\n   exactly as if it was local. No matter if it's in a different process, on\n   a USB device, connected via Bluetooth, over the Internet or all at the\n   same time.\n   All complexity arising from the system being distributed should be taken\n   care of by Fibre while still allowing the application developer to easily\n   fine-tune things.\n\n - Fibre has the ambition to run on most major platforms and provide bindings\n   for the most popular languages. Even bare metal embedded systems with very\n   limited resources. See the Compatibility section for the current status.\n\n - Once you deployed your application and want to change the interface, don't\n   worry about breaking other applications. With Fibre's object model, the\n   most common updates like adding methods, properties or arguments won't\n   break anything. Sometimes you can get away with removing methods if they\n   weren't used by other programs. **This is not implemented yet.**\n\n## Platform Compatibility\n\nFibre can be compiled for many of platforms and work on many kinds of transport layers. But to make life simple Fibre already ships with built-in support for a couple of backends which can be enabled/disabled selectively. The [official precompiled binaries](https://github.com/samuelsadok/fibre/releases) (and by extension all language bindings) have all available backends enabled. These backends are available:\n\n|                           | Windows      | macOS [1]    | Linux        | Web [2]      |\n|---------------------------|--------------|--------------|--------------|--------------|\n| USB (`usb`)               | yes (libusb) | yes (libusb) | yes (libusb) | yes (WebUSB) |\n| TCP client (`tcp-server`) | no           | no           | yes          | no           |\n| TCP server (`tcp-client`) | no           | no           | yes          | no           |\n\n - [1] macOS 10.9 (Mavericks) or later\n - [2] see [fibre-js](js/README.md)\n\n## Channel Specs\n\nWhen discovering objects and publishing objects, the caller usually specifies which backends to discover/publish on. This is specified through a channel spec string.\n\nThe channel spec string has the form `backend1:key1=val1,key2=val2;backend2:key1=val1,key2=val2;backend3`. The following sections describe the available backends and the arguments they support. Integers can be in decimal as well as hexadecimal notation (`0x1234`).\n\n### `usb`\n\n**Compile option:** `FIBRE_ENABLE_LIBUSB_BACKEND`\n\n**Parameters:**\n\n - `bus` (int): Only accept devices on this bus number.\n - `address` (int): Only accept the USB device with this device address. The device address usually changes when the device is replugged.\n - `idVendor` (int): Only accept devices with this Vendor ID.\n - `idProduct` (int): Only accept devices with this Product ID.\n - `bInterfaceClass` (int): The interface class of the compatible interface or interface association.\n - `bInterfaceSubClass` (int): The interface subclass of the compatible interface or interface association.\n - `bInterfaceProtocol` (int): The protocol of the compatible interface or interface association.\n\nOmitted parameters are ignored during filtering.\n\n**Example:** `usb:idVendor=0x1209,idVendor=0x0d32` looks for channels on USB devices with VID:PID 1209:0d32.\n\n### `tcp-client`\n\n - `address` (string): The IP address or hostname of the remote server to connect to.\n - `port` (int): The port on which to connect.\n\n### `tcp-server`\n\n - `address` (string): The IP address of the local server on which to listen.\n - `port` (int): The port on which to listen.\n\n### `serial`\n\n - `path` (int): The name or path of the serial port. On Unix systems this is usually something like `/dev/ttyACM0` and on Windows something like `COM1`.\n\n**Example:** `serial:path=/dev/ttyACM0` looks for channels on the serial port /dev/ttyACM0.\n\n## Implementations\n\n * **C++**: See [fibre-cpp](cpp/README.md).\n * **C**: See [fibre-cpp](cpp/README.md), specifically `libfibre.h`.\n * **Python**: See [PyFibre](python/README.md).\n * **JavaScript**: See [fibre-js](js/README.md).\n\nUnder the hood all language-specific implementations bind to the C++ implementation which we provide as a [precompiled library](https://github.com/samuelsadok/fibre/releases) `libfibre`.\n\n## Adding Fibre to your project\n\nWe recommend Git subtrees if you want to include the Fibre source code in another project.\nOther contributors don't need to know anything about subtrees. To them the Fibre repo will be like any other normal directory.\n\n#### Adding the repo\n```\ngit remote add fibre-origin git@github.com:samuelsadok/fibre.git\ngit fetch fibre-origin\ngit subtree add --prefix=fibre --squash fibre-origin master\n```\n\nIf you only need support for a specific programming language you can also just include the language-specific repository Instead of the whole main repository.\n\n#### Pulling updates from upstream\n```\ngit subtree pull --prefix=fibre --squash fibre-origin master\n```\n\n#### Contributing changes back to upstream\nThis requires push access to `fibre-origin`.\n```\ngit subtree push --prefix=fibre fibre-origin master\n```\n\n## Projects using Fibre ##\n\n - [ODrive](https://github.com/madcowswe/ODrive): High performance motor control\n - [lightd](https://github.com/samuelsadok/lightd): Service that can be run on a Raspberry Pi (or similar) to control RGB LED strips\n\n## Contribute ##\n\nThis project losely adheres to the [Google C++ Style Guide](https://google.github.io/styleguide/cppguide.html).\n\n## Credits ##\n\nA significant portion of the code in this repository was written for and financed by [ODrive Robotics Inc](https://odriverobotics.com/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamuelsadok%2Ffibre","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamuelsadok%2Ffibre","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamuelsadok%2Ffibre/lists"}