Skip to main content

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:

Python Swift

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 under Frameworks, Libraries, and Embedded Content in the General 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 with pip
  • 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

License

This project is licensed under either of

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

iroh-0.1.0-py3-none-win_amd64.whl (7.6 MB view hashes)

Uploaded Python 3 Windows x86-64

iroh-0.1.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.5 MB view hashes)

Uploaded Python 3 manylinux: glibc 2.17+ x86-64

iroh-0.1.0-py3-none-macosx_10_7_x86_64.whl (9.0 MB view hashes)

Uploaded Python 3 macOS 10.7+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page