Bytes. Distributed. For all languages.
Project description
iroh-ffi
Foreign Function Interface (FFI) bindings for Iroh
This repo defines Python & Swift bindings for iroh, which is written in Rust.
Published Packages:
Planned Support:
We're hoping to ship support for the following langauges in the future
- Go
- Kotlin
Library Compilation
Running cargo build --release
will produce a dynamic library and a static library.
For builds targeting older versions of MacOS, build with with: MACOSX_DEPLOYMENT_TARGET=10.7 && cargo build --target x86_64-apple-darwin --release
.
Swift
Xcode and IOS
- Run
make.sh
. - Add
IrohLib
as a local package dependency underFrameworks, Libraries, and Embedded Content
in theGeneral
settings of your project. - Run
Build
- Check that it is now listed under
Frameworks, Libraries, and Embedded Content
, if not click+
again and add it from the list. - Add
SystemConfiguration
as a Framework. - Now you can just import the library in Swift with a standard import statement like
import IrohLib
.
Python
- Install
maturin
for python development and packaging. - Install
uniffi-bindgen
withpip
maturin develop
will build your package
Building wheels
Invoking maturin build
will build a wheel in target/wheels
. This
will likely only work on your specific platform. To build a portable
wheel for linux use:
docker run --rm -v $(pwd):/mnt -w /mnt quay.io/pypa/manylinux2014_x86_64 /mnt/build-wheel.sh
Development
- This uses https://mozilla.github.io/uniffi-rs/ for building the interface
License
This project is licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this project by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Hashes for iroh-0.1.0-py3-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 80987e31a692504d55029fa4ec6c3328cc5abd3ab9538a967061e360d867c73a |
|
MD5 | 897288e6c62e74b9ab9a69cdecddb9a2 |
|
BLAKE2b-256 | ce78bc87d6e4f59229cca68dc38846b52c6232ab569db9fe5850d3a05d65474d |
Hashes for iroh-0.1.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c563eaac7ba622741bbcf781fca5e039b96d7816286d40ff210a9a5d6b2c5495 |
|
MD5 | c76d8a5908a99160e62b24187f2d3113 |
|
BLAKE2b-256 | 907207c831cd2599555895a25021a25ef0b1a274c1d487602758c29abea02648 |
Hashes for iroh-0.1.0-py3-none-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e8f4c995f3987c0c1180470b41fedde5b1e4048847d537628e0ab571afde2b86 |
|
MD5 | 3f1ac416207ac1f35b22f41cc3c9664a |
|
BLAKE2b-256 | 4e035950fc301172d6dcecde7abff0693c7520e324e28b0c9692bdc38af81792 |