All Projects → bbqsrc → Cargo Ndk

bbqsrc / Cargo Ndk

Licence: other
Compile Rust projects against the Android NDK without hassle

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to Cargo Ndk

Corrosion
Marrying Rust and CMake - Easy Rust and C/C++ Integration!
Stars: ✭ 106 (-24.82%)
Mutual labels:  cargo
Thermite
A Rake-based helper for building and distributing Rust-based Ruby extensions
Stars: ✭ 125 (-11.35%)
Mutual labels:  cargo
Cargo Edit
A utility for managing cargo dependencies from the command line.
Stars: ✭ 2,095 (+1385.82%)
Mutual labels:  cargo
Crashsdk
catch crash on Android(arm/x86)
Stars: ✭ 107 (-24.11%)
Mutual labels:  ndk
Crate2nix
nix build file generator for rust crates
Stars: ✭ 123 (-12.77%)
Mutual labels:  cargo
Native Opencv Android Template
A tutorial for setting up OpenCV 4.5.0 (and other 4.x.y version) for Android in Android Studio with Native Development Kit (NDK) support.
Stars: ✭ 131 (-7.09%)
Mutual labels:  ndk
Termux Ndk
android-ndk for termux
Stars: ✭ 91 (-35.46%)
Mutual labels:  ndk
Stunning Signature
Native Signature Verification For Android (with example)
Stars: ✭ 139 (-1.42%)
Mutual labels:  ndk
Kernel Roulette
A kernel module written in Rust
Stars: ✭ 124 (-12.06%)
Mutual labels:  cargo
Cargo Flash
a cargo extension for programming microcontrollers
Stars: ✭ 134 (-4.96%)
Mutual labels:  cargo
Meta Rust
OpenEmbedded/Yocto layer for Rust and Cargo
Stars: ✭ 108 (-23.4%)
Mutual labels:  cargo
Shadow Rs
A build-time information stored in your rust project.(binary,lib,cdylib,dylib)
Stars: ✭ 117 (-17.02%)
Mutual labels:  cargo
Stegbrute
Fast Steganography bruteforce tool written in Rust useful for CTF's
Stars: ✭ 134 (-4.96%)
Mutual labels:  cargo
Androiddevwithcpp
Android Develop With C++
Stars: ✭ 106 (-24.82%)
Mutual labels:  ndk
Awesome Android Ndk
🔥 全面深入地掌握NDK技术,成为下一波5G时代的浪潮儿~
Stars: ✭ 138 (-2.13%)
Mutual labels:  ndk
Cargo Embed
a cargo extension for working with microcontrollers
Stars: ✭ 100 (-29.08%)
Mutual labels:  cargo
Googleserialport
Android串口通信:抱歉,学会它真的可以为所欲为 ! ! !
Stars: ✭ 130 (-7.8%)
Mutual labels:  ndk
Cargo Husky
Setup Git hooks automatically for cargo projects with 🐶
Stars: ✭ 141 (+0%)
Mutual labels:  cargo
Lpr
Android 车牌识别--OCR
Stars: ✭ 139 (-1.42%)
Mutual labels:  ndk
Byopen
🎉A dlopen library that bypasses mobile system limitation
Stars: ✭ 133 (-5.67%)
Mutual labels:  ndk

cargo-ndk - Build Rust code for Android

This cargo extension handles all the environment configuration needed for successfully building libraries for Android from a Rust codebase, with support for generating the correct jniLibs directory structure.

Installing

cargo install cargo-ndk

You'll also need to install all the toolchains you intend to use. Simplest way is with the following:

rustup target add \
    aarch64-linux-android \
    armv7-linux-androideabi \
    x86_64-linux-android \
    i686-linux-android

Modify as necessary for your use case.

Usage

If you have installed the NDK with Android Studio to its default location, cargo ndk will automatically detect the most recent NDK version and use it. This can be overriden by specifying the path to the NDK root directory in the ANDROID_NDK_HOME environment variable.

Example: building a library for 32-bit and 64-bit ARM systems

cargo ndk -t armeabi-v7a -t arm64-v8a -o ./jniLibs build --release 

This specifies the Android targets to be built, the output directory to use for placing the .so files in the layout expected by Android, and then the ordinary flags to be passed to cargo.

Example

Supported hosts

  • Linux
  • macOS (x86_64 and arm64)
  • Windows

Similar projects

  • cargo-lipo - for building iOS universal Rust libraries

License

This project is licensed under either of

at your option.


Uyghurs are under attack in Xinjiang. The Chinese government is placing millions of people into indoctrination camps and engaging in forced labour.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].