Skip to content

Commit

Permalink
build: Release v1.0.0-rc.60-hotfix.1
Browse files Browse the repository at this point in the history
  • Loading branch information
OtaK committed May 13, 2024
1 parent 100e7d9 commit e27f73c
Show file tree
Hide file tree
Showing 14 changed files with 719 additions and 166 deletions.
580 changes: 524 additions & 56 deletions CHANGELOG.md

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion CHANGELOG.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,15 @@ Platform support legends:
* Note: the papercuts will majorly be with the build process. Things might be very rough to integrate as no polish at all has been given yet.
* ❌ = tier 3 support. It doesn't work just yet, but we plan to make it work.

## [1.0.0-rc.60-hotfix.1] - 2024-05-06

* Tentative fix for the Android/iOS FFI errors causing buffer issues within UniFFI

## [1.0.0-rc.60] - 2024-05-06

<details>
<summary>git-conventional changelog</summary>
{{git-cliff tag="v1.0.0-rc.60" unreleased=true}}
{{git-cliff tag="v1.0.0-rc.60"}}
</details>

* Fixed an issue on WASM using `createConversation()` with external senders, as the ciphersuite was ignored in parsing External Senders
Expand Down
2 changes: 1 addition & 1 deletion crypto-attributes/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "core-crypto-attributes"
description = "Macros for core-crypto"
repository = "https://github.com/wireapp/core-crypto"
version = "1.0.0-rc.60"
version = "1.0.0-rc.60-hotfix.1"
edition = "2021"
license = "GPL-3.0-only"

Expand Down
20 changes: 11 additions & 9 deletions crypto-ffi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "core-crypto-ffi"
description = "Platform-specific bindings (Android, iOS, WASM) for CoreCrypto"
repository = "https://github.com/wireapp/core-crypto"
version = "1.0.0-rc.60"
version = "1.0.0-rc.60-hotfix.1"
edition = "2021"
license = "GPL-3.0-only"
publish = false
Expand All @@ -19,7 +19,7 @@ required-features = ["uniffi/cli"]
[features]
default = ["proteus"]
proteus = ["core-crypto/proteus", "core-crypto/cryptobox-migrate"]
debug-logging = ["dep:log", "dep:femme"] # HAZMAT: Will dump dangerous data
debug-logging = ["dep:log", "dep:femme"] # HAZMAT: Will dump dangerous data

[dependencies]
thiserror = "1.0"
Expand All @@ -35,10 +35,7 @@ femme = { version = "2", optional = true }
[dependencies.log]
version = "0.4"
optional = true
features = [
"max_level_trace",
"release_max_level_trace"
]
features = ["max_level_trace", "release_max_level_trace"]

# see https://github.com/RustCrypto/hashes/issues/404
[target.'cfg(not(any(target_arch = "aarch64", target_arch = "x86_64", target_arch = "x86")))'.dependencies]
Expand All @@ -47,7 +44,7 @@ sha2 = { version = "0.10", features = ["force-soft"] }
[target.'cfg(not(target_family = "wasm"))'.dependencies]
# UniFFI - Android + iOS bindings - Runtime support
uniffi = { workspace = true }
core-crypto = { version = "^1.0.0-rc.60", path = "../crypto" }
core-crypto = { version = "^1.0.0-rc.60-hotfix.1", path = "../crypto" }

[target.wasm32-unknown-unknown.dependencies]
wasm-bindgen = "0.2"
Expand All @@ -58,7 +55,7 @@ serde = { version = "1.0", features = ["derive"] }
js-sys = "0.3"
web-sys = "0.3"
strum = "0.26"
core-crypto = { version = "^1.0.0-rc.60", path = "../crypto" }
core-crypto = { version = "^1.0.0-rc.60-hotfix.1", path = "../crypto" }


# UniFFI - Android + iOS bindings - Build support
Expand All @@ -76,4 +73,9 @@ wasm-bindgen-test = "0.3"
wasm-opt = false

[package.metadata.wasm-pack.profile.release]
wasm-opt = ["-Os", "--enable-mutable-globals", "--enable-threads", "--detect-features"]
wasm-opt = [
"-Os",
"--enable-mutable-globals",
"--enable-threads",
"--detect-features",
]
148 changes: 97 additions & 51 deletions crypto-ffi/Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,16 @@ script = '''
dependencies = ["docs-kotlin-install-deps"]
command = "java"
args = [
"-jar", "../target/_kotlin_docs_tmp/dokka-cli-${DOKKA_VERSION}.jar",
"-moduleName", "CoreCrypto",
"-jar",
"../target/_kotlin_docs_tmp/dokka-cli-${DOKKA_VERSION}.jar",
"-moduleName",
"CoreCrypto",
"-pluginsClasspath",
"../target/_kotlin_docs_tmp/dokka-base-${DOKKA_VERSION}.jar;../target/_kotlin_docs_tmp/dokka-analysis-${DOKKA_VERSION}.jar;../target/_kotlin_docs_tmp/dokka-analysis-intellij-${DOKKA_VERSION}.jar;../target/_kotlin_docs_tmp/dokka-analysis-compiler-${DOKKA_VERSION}.jar;../target/_kotlin_docs_tmp/kotlinx-coroutines-core-1.6.4.jar;../target/_kotlin_docs_tmp/kotlinx-html-jvm-0.8.1.jar;../target/_kotlin_docs_tmp/freemarker-2.3.31.jar",
"-sourceSet", "-src ./bindings/jvm/src/main/kotlin",
"-outputDir", "../target/doc/core_crypto_ffi/bindings/kotlin",
"-sourceSet",
"-src ./bindings/jvm/src/main/kotlin",
"-outputDir",
"../target/doc/core_crypto_ffi/bindings/kotlin",
]

[tasks.docs-rust-wasm]
Expand All @@ -85,11 +89,16 @@ args = ["install"]
dependencies = ["npm-deps"]
command = "npx"
args = [
"-y", "typedoc",
"--basePath", "./bindings/js",
"--entryPoints", "./bindings/js/CoreCrypto.ts",
"--tsconfig", "./bindings/js/tsconfig.json",
"--out", "../target/doc/core_crypto_ffi/bindings/typescript"
"-y",
"typedoc",
"--basePath",
"./bindings/js",
"--entryPoints",
"./bindings/js/CoreCrypto.ts",
"--tsconfig",
"./bindings/js/tsconfig.json",
"--out",
"../target/doc/core_crypto_ffi/bindings/typescript",
]

#[tasks.docs-swift]
Expand All @@ -102,11 +111,15 @@ command = "wasm-pack"
# env = { "WASM_BINDGEN_WEAKREF" = 1, "WASM_BINDGEN_EXTERNREF" = 1 }
args = [
"build",
"--out-dir", "bindings/js/wasm",
"--out-name", "core-crypto-ffi",
"--mode", "normal",
"--target", "web",
"${@}"
"--out-dir",
"bindings/js/wasm",
"--out-name",
"core-crypto-ffi",
"--mode",
"normal",
"--target",
"web",
"${@}",
]

# Quiets warning related to wasm-opt. Used to generate bindings and check Typescript wrapper
Expand All @@ -125,12 +138,17 @@ dependencies = ["release-build"]
command = "cargo"
args = [
"run",
"--features", "uniffi/cli",
"--bin", "uniffi-bindgen",
"--features",
"uniffi/cli",
"--bin",
"uniffi-bindgen",
"generate",
"--language", "swift",
"--out-dir", "./bindings/swift/WireCoreCrypto/WireCoreCrypto",
"--library", "../target/release/libcore_crypto_ffi.${LIBRARY_EXTENSION}"
"--language",
"swift",
"--out-dir",
"./bindings/swift/WireCoreCrypto/WireCoreCrypto",
"--library",
"../target/release/libcore_crypto_ffi.${LIBRARY_EXTENSION}",
]

[tasks.ffi-swift]
Expand All @@ -145,25 +163,23 @@ dependencies = ["release-build"]
command = "cargo"
args = [
"run",
"--features", "uniffi/cli",
"--bin", "uniffi-bindgen",
"--features",
"uniffi/cli",
"--bin",
"uniffi-bindgen",
"generate",
"--language", "kotlin",
"--out-dir", "./bindings/jvm/src/main/kotlin/",
"--library", "../target/release/libcore_crypto_ffi.${LIBRARY_EXTENSION}"
"--language",
"kotlin",
"--out-dir",
"./bindings/jvm/src/main/kotlin/",
"--library",
"../target/release/libcore_crypto_ffi.${LIBRARY_EXTENSION}",
]

[tasks.ffi-kotlin]
dependencies = ["compile-ffi-kotlin"]
script = '''
mv ./bindings/jvm/src/main/kotlin/com/wire/crypto/core_crypto_ffi.kt ./bindings/jvm/src/main/kotlin/com/wire/crypto/CoreCrypto.kt
sed -i.bak \
-e 's/\CryptoException\b/CryptoError/g' \
-e 's/\bE2eIdentityException\b/E2eIdentityError/g' \
./bindings/jvm/src/main/kotlin/uniffi/core_crypto/core_crypto.kt
rm ./bindings/jvm/src/main/kotlin/uniffi/core_crypto/core_crypto.kt.bak
'''

[tasks.ffi]
Expand All @@ -178,36 +194,52 @@ plugin = "detect-release"
dependencies = ["ffi-swift"]
condition = { platforms = ["mac"] }
command = "cargo"
args = ["rustc", "--target", "aarch64-apple-ios", "--crate-type=cdylib", "--crate-type=staticlib", "--release", "--", "-C", "strip=symbols"]
args = [
"rustc",
"--target",
"aarch64-apple-ios",
"--crate-type=cdylib",
"--crate-type=staticlib",
"--release",
"--",
"-C",
"strip=symbols",
]

[tasks.ios-simulator-x86]
dependencies = ["ffi-swift"]
condition = { platforms = ["mac"] }
command = "cargo"
args = [
"rustc",
"--target", "x86_64-apple-ios",
"--target",
"x86_64-apple-ios",
"--crate-type=cdylib",
"--crate-type=staticlib",
"--release",
"--",
"-C", "strip=symbols"
"-C",
"strip=symbols",
]

[tasks.ios-simulator-arm]
dependencies = ["ffi-swift"]
# override CFLAGS to fix ring compilation
env = { "CRATE_CC_NO_DEFAULTS" = 1, "TARGET_CFLAGS" = { script = ["echo \"--target=arm64-apple-ios14.0.0-simulator -mios-simulator-version-min=14.0 -isysroot `xcrun --show-sdk-path --sdk iphonesimulator`\""] } }
env = { "CRATE_CC_NO_DEFAULTS" = 1, "TARGET_CFLAGS" = { script = [
"echo \"--target=arm64-apple-ios14.0.0-simulator -mios-simulator-version-min=14.0 -isysroot `xcrun --show-sdk-path --sdk iphonesimulator`\"",
] } }
condition = { platforms = ["mac"] }
command = "cargo"
args = [
"rustc",
"--target", "aarch64-apple-ios-sim",
"--target",
"aarch64-apple-ios-sim",
"--crate-type=cdylib",
"--crate-type=staticlib",
"--release",
"--",
"-C", "strip=symbols"
"-C",
"strip=symbols",
]

[tasks.ios]
Expand All @@ -232,51 +264,59 @@ plugin = "android-env"
command = "cargo"
args = [
"rustc",
"--target", "armv7-linux-androideabi",
"--target",
"armv7-linux-androideabi",
"--crate-type=cdylib",
"--crate-type=staticlib",
"--release",
"--",
"-C", "strip=symbols"
"-C",
"strip=symbols",
]
dependencies = ["ffi-kotlin", "android-env"]

[tasks.android-armv8]
command = "cargo"
args = [
"rustc",
"--target", "aarch64-linux-android",
"--target",
"aarch64-linux-android",
"--crate-type=cdylib",
"--crate-type=staticlib",
"--release",
"--",
"-C", "strip=symbols"
"-C",
"strip=symbols",
]
dependencies = ["ffi-kotlin", "android-env"]

[tasks.android-x86]
command = "cargo"
args = [
"rustc",
"--target", "x86_64-linux-android",
"--target",
"x86_64-linux-android",
"--crate-type=cdylib",
"--crate-type=staticlib",
"--release",
"--",
"-C", "strip=symbols"
"-C",
"strip=symbols",
]
dependencies = ["ffi-kotlin", "android-env"]

[tasks.android-i686]
command = "cargo"
args = [
"rustc",
"--target", "i686-linux-android",
"--target",
"i686-linux-android",
"--crate-type=cdylib",
"--crate-type=staticlib",
"--release",
"--",
"-C", "strip=symbols"
"-C",
"strip=symbols",
]
dependencies = ["ffi-kotlin", "android-env"]

Expand Down Expand Up @@ -317,12 +357,14 @@ cp ${from} ${to}
command = "cargo"
args = [
"rustc",
"--target", "x86_64-apple-darwin",
"--target",
"x86_64-apple-darwin",
"--crate-type=cdylib",
"--crate-type=staticlib",
"--release",
"--",
"-C", "strip=symbols"
"-C",
"strip=symbols",
]
dependencies = ["ffi-kotlin"]
condition = { platforms = ["mac"] }
Expand All @@ -331,12 +373,14 @@ condition = { platforms = ["mac"] }
command = "cargo"
args = [
"rustc",
"--target", "aarch64-apple-darwin",
"--target",
"aarch64-apple-darwin",
"--crate-type=cdylib",
"--crate-type=staticlib",
"--release",
"--",
"-C", "strip=symbols"
"-C",
"strip=symbols",
]
dependencies = ["ffi-kotlin"]
condition = { platforms = ["mac"] }
Expand All @@ -345,12 +389,14 @@ condition = { platforms = ["mac"] }
command = "cargo"
args = [
"rustc",
"--target", "x86_64-unknown-linux-gnu",
"--target",
"x86_64-unknown-linux-gnu",
"--crate-type=cdylib",
"--crate-type=staticlib",
"--release",
"--",
"-C", "strip=symbols"
"-C",
"strip=symbols",
]
dependencies = ["ffi-kotlin"]
condition = { platforms = ["linux"] }
Expand Down
2 changes: 1 addition & 1 deletion crypto-ffi/bindings/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ kotlin.code.style=official

# gradle-maven-publish configuration
GROUP=com.wire
VERSION_NAME=1.0.0-rc.60
VERSION_NAME=1.0.0-rc.60-hotfix.1
SONATYPE_HOST=DEFAULT
SONATYPE_AUTOMATIC_RELEASE=true
RELEASE_SIGNING_ENABLED=true
Expand Down
Loading

0 comments on commit e27f73c

Please sign in to comment.