{"id":13862929,"url":"https://github.com/anzbert/rusty_link","last_synced_at":"2025-07-14T13:33:01.649Z","repository":{"id":61089644,"uuid":"538306852","full_name":"anzbert/rusty_link","owner":"anzbert","description":"Rust wrapper for Ableton Link","archived":false,"fork":false,"pushed_at":"2024-02-02T14:46:49.000Z","size":154,"stargazers_count":18,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-04-16T05:00:52.887Z","etag":null,"topics":["ableton","link","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/anzbert.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"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}},"created_at":"2022-09-19T02:37:16.000Z","updated_at":"2024-04-14T21:14:14.000Z","dependencies_parsed_at":"2024-02-02T15:44:18.923Z","dependency_job_id":"f596ac98-d2d9-4d6a-a2bf-23c1b93b8abb","html_url":"https://github.com/anzbert/rusty_link","commit_stats":{"total_commits":109,"total_committers":2,"mean_commits":54.5,"dds":0.3302752293577982,"last_synced_commit":"43c2ce047bde977648c971b79062b23bd02f0d8a"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anzbert%2Frusty_link","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anzbert%2Frusty_link/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anzbert%2Frusty_link/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anzbert%2Frusty_link/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anzbert","download_url":"https://codeload.github.com/anzbert/rusty_link/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225980898,"owners_count":17554919,"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":["ableton","link","rust"],"created_at":"2024-08-05T06:01:56.411Z","updated_at":"2024-11-22T23:30:34.258Z","avatar_url":"https://github.com/anzbert.png","language":"Rust","funding_links":["https://ko-fi.com/S6S8SP865'"],"categories":["Rust"],"sub_categories":[],"readme":"[![Crate](https://img.shields.io/crates/v/rusty_link.svg)](https://crates.io/crates/rusty_link)\n[![API](https://docs.rs/rusty_link/badge.svg)](https://docs.rs/rusty_link)\n\n\u003ca href='https://ko-fi.com/S6S8SP865' target='_blank'\u003e\u003cimg height='36' style='border:0px;height:36px;' src='https://storage.ko-fi.com/cdn/kofi4.png?v=3' border='0' alt='Buy Me a Coffee at ko-fi.com' /\u003e\u003c/a\u003e\n\n# rusty_link\n\n`rusty_link` is a Rust wrapper for Ableton Link through the official C 11 wrapper extension, [abl_link](https://github.com/Ableton/link/tree/master/extensions/abl_link).\nThis library attempts to be mostly unopinionated and plain in\ncopying the functionality of abl_link, while providing some of Rust's safety guarantees.\n\n[Ableton Link](http://ableton.github.io/link) is a technology that synchronizes musical beat, tempo,\nphase, and start/stop commands across multiple applications running\non one or more devices. Applications on devices connected to a local\nnetwork discover each other automatically and form a musical session\nin which each participant can perform independently: anyone can start\nor stop while still staying in time. Anyone can change the tempo, the\nothers will follow. Anyone can join or leave without disrupting the session.\n\n## Changelog\n\nRelease notes can be seen on the project GitHub page [here](https://github.com/anzbert/rusty_link/blob/master/CHANGELOG.md).\n\n## Examples\n\nTo run the examples, clone this repository and change into its directory. Then fetch the Ableton Link source by initializing the git submodules with:\n\n```\ngit submodule update --init --recursive\n```\n\n[**link_hut_silent**](https://github.com/anzbert/rusty_link/blob/master/examples/link_hut_silent/main.rs): A Rust port [from C](https://github.com/Ableton/link/blob/master/extensions/abl_link/examples/link_hut/main.c) of the simple 'LinkHut' example without sound by Ableton. To run it:\n\n```\ncargo run --release --example link_hut_silent\n```\n\n[**link_hut**](https://github.com/anzbert/rusty_link/tree/master/examples/link_hut): A Rust port [from C++](https://github.com/Ableton/link/tree/master/examples) of the more complex 'LinkHut' example **with** sound by Ableton. Run it like this:\n\n```\ncargo run --release --example link_hut\n```\n\nSee the [cpal documentation](https://github.com/RustAudio/cpal) for ASIO and Jack support, if required.\n\n## Requirements\n\nRequires a recent version of CMake (3.14 or newer) to be installed and available in your terminal. Test with `cmake --version`.\n\nLinux _may_ require a few more system libraries to be installed for C compilation, depending on your distro, like `build-essential`, `libclang-dev` or `libasound2-dev` and `pkg-config` for examples, etc...\n\n## Thread and Realtime Safety\n\n['abl_link.h'](https://github.com/Ableton/link/blob/master/extensions/abl_link/include/abl_link.h) has doc comments about thread and realtime safety on some of its functions. Those comments have been copied to the functions of this library. A short explainer on what they mean:\n\n- [Thread Safety](https://en.wikipedia.org/wiki/Thread_safety): Thread-safe code only manipulates shared data structures in a manner that ensures that all threads behave properly and fulfil their design specifications without unintended interaction.\n\n- Realtime Safety: These functions can be called in a Realtime environment without blocking the thread. For example, the audio thread/callback.\n\n## Implementation\n\n- `rusty_link` currently wraps around all functions available in ['abl_link.h'](https://github.com/Ableton/link/blob/master/extensions/abl_link/include/abl_link.h) and makes them publicly available as methods on either the `AblLink` or the `SessionState` struct, except for the destructors, which are implemented on the Drop trait.\n- An instance of AblLink can be thought of as an Object with internal mutability. Thread safety is guaranteed in all functions, except for the capture/commit of Session States, with internal Mutexes on the C++ side. Check the function doc comments and official Link documentation for more.\n- Includes a Rust port of the C++ [HostTimeFilter](https://github.com/Ableton/link/blob/master/include/ableton/link/HostTimeFilter.hpp), which can be used in the audio callback to align the host clock with the sample clock.\n- Delete functions have been added to delete previously set `num_peers`, `start_stop` and `tempo` callbacks.\n\n## Testing\n\nAbleton designed a [Test Plan](https://github.com/Ableton/link/blob/master/TEST-PLAN.md) to test if your implementation of Ableton Link in your project meets all the expected requirements.\n\n## Tested Platforms\n\n`rusty_link` itself works on all major platforms. I only had trouble with the example with sound on Linux. Could be my fault for not using `cpal` properly?! Any help with that is appreciated 😘.\nAnyway, this shouldn't stop anyone from using this library in their project. Have fun!\n\n|                            | MacOS M1 | Win 11 WASAPI | Ubuntu 22 on Pi4   |\n| -------------------------- | -------- | ------------- | ------------------ |\n| Building `rusty_link`      | \u0026check;  | \u0026check;       | \u0026check;            |\n| Example: `link_hut_silent` | \u0026check;  | \u0026check;       | \u0026check;            |\n| Example: `link_hut`        | \u0026check;  | \u0026check;       | cpal/ALSA issues?! |\n\n## Feedback\n\nI am not a professional Developer, just doing this as a hobby, so any help with updates and corrections of my work are welcome.\n\n## License\n\nAbleton Link is dual licensed under GPLv2+ and a proprietary [license](https://github.com/Ableton/link/blob/master/LICENSE.md).\n\nThis means that `rusty_link` has to be under the GPLv2+ as well.\n\nIf you would like to incorporate Link into a proprietary software application, please contact Ableton at \u003clink-devs@ableton.com\u003e.\n\n## Credits\n\nThanks to Magnus Herold for [his implementation](https://crates.io/crates/ableton-link).\nI made this library to learn about FFI in Rust and I started it as a fork of his, but then pivotted to using the offical C wrapper by Ableton.\n\nSome code for splitting closures has been borrowed from [ffi_helpers](https://crates.io/crates/ffi_helpers) with altered functionality. Thanks to Michael F Bryan for his work.\n[Pull request](https://github.com/Michael-F-Bryan/ffi_helpers/pull/8) to ffi_helpers pending...\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanzbert%2Frusty_link","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanzbert%2Frusty_link","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanzbert%2Frusty_link/lists"}