This is the workspace containing the logic shared across polyPod platforms: iOS/Android/Web.
This Rust repository follows the Cargo Workspace structure, as follows:
- lib: The top level library that composes together the necessary functionalities.
- ffi: The library meant for exporting the
core
to be used in non Rust environments, such as iOS/Android/Web. - crates: The many small libraries that implement a specific functionality, which are then composed in lib.
- Start by adding a new crate in crates.
- If it is just a supporting crate for other crates, just integrate it with target crates.
- If the new crate functionality needs to be exposed to the platforms:
- Rust toolchain. Core is built with Rust 1.63.0.
Note: RDF functionality is disabled until fully developed, to build core with RDF pass --features "poly_rdf"
to cargo build
.
- Building the whole workspace:
cargo build
- Building a specific crate:
cargo build -p <crate name>
Note: RDF functionality is disabled until fully developed, to build core with RDF pass FEATURES="poly_rdf"
to make
.
It is required to run make
in a bash terminal. MacOS and Linux systems terminal should
already have everything needed. On Windows, a terminal application like
GitBash is needed.
- Building core for ios:
make ios_bindings
-
Building core for android:
Prerequisite: You should install NDK (it is recommended to use Android Studio for installing it). Version r25 should be installed. Make sure that either
NDK_HOME
orANDROID_NDK_HOME
(specifying the path to NDK) is exported as an environment variable on your system.
make android_bindings
- Building for all platforms:
make
Just run:
cargo test
By default core is not built with debugging symbols for the means of optimizing the build performance. When it is needed to have the core built with debug symbols, consider changing the debug
entry in Cargo.toml to appropriate value.