Skip to content

Latest commit

 

History

History
27 lines (19 loc) · 616 Bytes

Prerequisites.md

File metadata and controls

27 lines (19 loc) · 616 Bytes

Prerequisites

Add uniffi as a dependency and build-depedency

In your crate's Cargo.toml add:

[dependencies]
uniffi = { version = "[latest-version]" }

[build-dependencies]
uniffi = { version = "[latest-version]", features = [ "build" ] }

UniFFI has not reached version 1.0 yet. Versions are typically specified as "0.[minor-version]".

Build your crate as a cdylib

Ensure your crate builds as a cdylib by adding

[lib]
crate-type = ["cdylib"]
name = "<library name>"

to your crate's Cargo.toml.

Note: You also need to add staticlib crate type if you target iOS.