mirror of
https://github.com/stakwork/sphinx-key.git
synced 2025-12-17 07:14:23 +01:00
release profile
This commit is contained in:
12
Makefile
Normal file
12
Makefile
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
|
||||||
|
prepare-android:
|
||||||
|
rustup toolchain install stable
|
||||||
|
rustup target add x86_64-linux-android
|
||||||
|
rustup target add x86_64-unknown-linux-gnu
|
||||||
|
rustup target add aarch64-linux-android
|
||||||
|
rustup target add armv7-linux-androideabi
|
||||||
|
rustup target add i686-linux-android
|
||||||
|
make install-uniffi-bindgen
|
||||||
|
|
||||||
|
install-uniffi-bindgen:
|
||||||
|
cargo install uniffi_bindgen --version 0.19.2
|
||||||
@@ -5,19 +5,26 @@ authors = ["Evan Feenstra <evanfeenstra@gmail.com>"]
|
|||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
crate-type = ["cdylib"]
|
|
||||||
name = "crypter"
|
name = "crypter"
|
||||||
|
crate-type = ["staticlib", "cdylib"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
sphinx-key-crypter = { path = "../crypter" }
|
sphinx-key-crypter = { path = "../crypter" }
|
||||||
uniffi = "0.19.2"
|
uniffi = "0.19.2"
|
||||||
hex = "0.4.3"
|
hex = "0.4.3"
|
||||||
thiserror = "1.0.31"
|
thiserror = "1.0.31"
|
||||||
uniffi_macros = "0.11.0"
|
uniffi_macros = "0.19.2"
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
uniffi_build = "0.19.2"
|
uniffi_build = "0.19.2"
|
||||||
|
|
||||||
|
[profile.release]
|
||||||
|
opt-level = 'z' # Optimize for size.
|
||||||
|
lto = true # Enable Link Time Optimization
|
||||||
|
codegen-units = 1 # Reduce number of codegen units to increase optimizations.
|
||||||
|
# panic = 'abort' # Abort on panic
|
||||||
|
debug = true # Enable debug symbols. For example, we can use `dwarfdump` to check crash traces.
|
||||||
|
|
||||||
[patch.crates-io]
|
[patch.crates-io]
|
||||||
getrandom = { version = "0.2", git = "https://github.com/esp-rs-compat/getrandom.git" }
|
getrandom = { version = "0.2", git = "https://github.com/esp-rs-compat/getrandom.git" }
|
||||||
secp256k1 = { git = "https://github.com/Evanfeenstra/rust-secp256k1", branch = "v0.22.0-new-rand" }
|
secp256k1 = { git = "https://github.com/Evanfeenstra/rust-secp256k1", branch = "v0.22.0-new-rand" }
|
||||||
|
|||||||
@@ -1,8 +1,21 @@
|
|||||||
uniffi-bindgen --version
|
uniffi-bindgen --version
|
||||||
|
|
||||||
should match the uniffi version in Cargo.toml
|
should match the uniffi version in Cargo.toml
|
||||||
|
|
||||||
|
### kotlin
|
||||||
|
|
||||||
|
rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android x86_64-unknown-linux-gnu
|
||||||
|
|
||||||
uniffi-bindgen generate src/crypter.udl --language kotlin
|
uniffi-bindgen generate src/crypter.udl --language kotlin
|
||||||
|
|
||||||
|
cargo build --target aarch64-linux-android --release
|
||||||
|
cargo build --target armv7-linux-androideabi --release
|
||||||
|
cargo build --target i686-linux-android --release
|
||||||
|
|
||||||
|
cross build --target aarch64-linux-android --release
|
||||||
|
|
||||||
|
### swift
|
||||||
|
|
||||||
uniffi-bindgen generate src/crypter.udl --language swift
|
uniffi-bindgen generate src/crypter.udl --language swift
|
||||||
|
|
||||||
### manually build the C ffi
|
### manually build the C ffi
|
||||||
|
|||||||
Reference in New Issue
Block a user