diff --git a/Cargo.lock b/Cargo.lock index 2ac6104..94118ff 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -748,6 +748,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c10584274047cb335c23d3e61bcef8e323adae7c5c8c760540f73610177fc3f" dependencies = [ "cc", + "openssl-sys", "pkg-config", "vcpkg", ] @@ -1012,6 +1013,15 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" +[[package]] +name = "openssl-src" +version = "300.2.3+3.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cff92b6f71555b61bb9315f7c64da3ca43d87531622120fea0195fc761b4843" +dependencies = [ + "cc", +] + [[package]] name = "openssl-sys" version = "0.9.102" @@ -1020,6 +1030,7 @@ checksum = "c597637d56fbc83893a35eb0dd04b2b8e7a50c91e64e9493e398b5df4fb45fa2" dependencies = [ "cc", "libc", + "openssl-src", "pkg-config", "vcpkg", ] diff --git a/example/rusqlite/Cargo.toml b/example/rusqlite/Cargo.toml index 6d7b383..8c4c3bc 100755 --- a/example/rusqlite/Cargo.toml +++ b/example/rusqlite/Cargo.toml @@ -11,7 +11,7 @@ crate-type = ["cdylib"] [dependencies] napi-ohos = { version = "*",features = ["error_anyhow"] } napi-derive-ohos = { version = "*" } -rusqlite = { version = "0.31", features = ["bundled"] } +rusqlite = { version = "0.31", features = ["bundled","bundled-sqlcipher-vendored-openssl"] } [build-dependencies] napi-build-ohos = { version = "*" } diff --git a/example/rusqlite/prepare.sh b/example/rusqlite/prepare.sh new file mode 100644 index 0000000..4414e70 --- /dev/null +++ b/example/rusqlite/prepare.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +export OPENSSL_NO_VENDOR=1 +export AARCH64_UNKNOWN_LINUX_OHOS_OPENSSL_DIR="${PWD}/../../ohos-openssl/prelude/arm64-v8a/" +export ARMV7_UNKNOWN_LINUX_OHOS_OPENSSL_DIR="${PWD}/../../ohos-openssl/prelude/armeabi-v7a/" +export X86_64_UNKNOWN_LINUX_OHOS_OPENSSL_DIR="${PWD}/../../ohos-openssl/prelude/x86_64/"