Skip to content

Commit 27f4cf2

Browse files
committed
chore: add vendored_openssl feature
1 parent 92a751b commit 27f4cf2

File tree

8 files changed

+123
-92
lines changed

8 files changed

+123
-92
lines changed

frontend/Makefile.toml

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ extend = [
1414
on_error_task = "catch"
1515

1616
[tasks.catch]
17-
run_task = {name = ["restore-crate-type"]}
17+
run_task = { name = ["restore-crate-type"] }
1818

1919
[env]
2020
RUST_LOG = "info"
@@ -42,8 +42,8 @@ PRODUCT_NAME = "AppFlowy"
4242
CRATE_TYPE = "staticlib"
4343
SDK_EXT = "a"
4444
APP_ENVIRONMENT = "local"
45-
FLUTTER_FLOWY_SDK_PATH="app_flowy/packages/flowy_sdk"
46-
PROTOBUF_DERIVE_CACHE="../shared-lib/flowy-derive/src/derive_cache/derive_cache.rs"
45+
FLUTTER_FLOWY_SDK_PATH = "app_flowy/packages/flowy_sdk"
46+
PROTOBUF_DERIVE_CACHE = "../shared-lib/flowy-derive/src/derive_cache/derive_cache.rs"
4747

4848
[env.development-mac-arm64]
4949
RUST_LOG = "info"
@@ -139,8 +139,7 @@ LINUX_ARCH = "arm64"
139139
APP_ENVIRONMENT = "production"
140140

141141
[tasks.echo_env]
142-
script = [
143-
'''
142+
script = ['''
144143
echo "-------- Env Parameters --------"
145144
echo CRATE_TYPE: ${CRATE_TYPE}
146145
echo BUILD_FLAG: ${BUILD_FLAG}
@@ -151,8 +150,7 @@ script = [
151150
echo APP_ENVIRONMENT: ${APP_ENVIRONMENT}
152151
echo ${platforms}
153152
echo ${BUILD_ARCHS}
154-
'''
155-
]
153+
''']
156154
script_runner = "@shell"
157155

158156
[env.production-ios]
@@ -166,6 +164,14 @@ BUILD_FLAG = "debug"
166164
TARGET_OS = "android"
167165
CRATE_TYPE = "cdylib"
168166
FLUTTER_OUTPUT_DIR = "Debug"
167+
FEATURES = "flutter,openssl_vendored"
168+
169+
[env.production-android]
170+
BUILD_FLAG = "release"
171+
TARGET_OS = "android"
172+
CRATE_TYPE = "cdylib"
173+
FLUTTER_OUTPUT_DIR = "Release"
174+
FEATURES = "flutter,openssl_vendored"
169175

170176
[tasks.setup-crate-type]
171177
private = true
@@ -192,11 +198,9 @@ script = [
192198
script_runner = "@duckscript"
193199

194200
[tasks.test-build]
195-
condition = { env_set = [ "FLUTTER_FLOWY_SDK_PATH"] }
196-
script = [
197-
"""
201+
condition = { env_set = ["FLUTTER_FLOWY_SDK_PATH"] }
202+
script = ["""
198203
cd ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/rust-lib/flowy-net
199204
cargo build -vv --features=dart
200-
""",
201-
]
205+
"""]
202206
script_runner = "@shell"

frontend/app_flowy/packages/flowy_infra_ui/pubspec.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ dependencies:
2929
path: flowy_infra_ui_web
3030
appflowy_popover:
3131
path: ../appflowy_popover
32-
33-
# Flowy packages
3432
flowy_infra:
3533
path: ../flowy_infra
3634

frontend/app_flowy/pubspec.lock

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,21 @@ packages:
3535
path: "packages/appflowy_editor"
3636
relative: true
3737
source: path
38-
version: "0.0.4"
38+
version: "0.0.5"
3939
appflowy_popover:
4040
dependency: "direct main"
4141
description:
4242
path: "packages/appflowy_popover"
4343
relative: true
4444
source: path
4545
version: "0.0.1"
46+
archive:
47+
dependency: transitive
48+
description:
49+
name: archive
50+
url: "https://pub.dartlang.org"
51+
source: hosted
52+
version: "3.3.1"
4653
args:
4754
dependency: transitive
4855
description:
@@ -660,6 +667,13 @@ packages:
660667
url: "https://pub.dartlang.org"
661668
source: hosted
662669
version: "0.17.0"
670+
intl_utils:
671+
dependency: transitive
672+
description:
673+
name: intl_utils
674+
url: "https://pub.dartlang.org"
675+
source: hosted
676+
version: "2.7.0"
663677
io:
664678
dependency: transitive
665679
description:

frontend/rust-lib/dart-ffi/Cargo.toml

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,30 +12,32 @@ crate-type = ["staticlib"]
1212

1313

1414
[dependencies]
15-
allo-isolate = {version = "^0.1", features = ["catch-unwind",]}
16-
byteorder = {version = "1.3.4"}
17-
ffi-support = {version = "0.4.2"}
18-
protobuf = {version = "2.20.0"}
15+
allo-isolate = { version = "^0.1", features = ["catch-unwind"] }
16+
byteorder = { version = "1.3.4" }
17+
ffi-support = { version = "0.4.2" }
18+
protobuf = { version = "2.20.0" }
1919
tokio = { version = "1", features = ["rt", "rt-multi-thread"] }
2020
log = "0.4.14"
2121
serde = { version = "1.0", features = ["derive"] }
22-
serde_json = {version = "1.0"}
22+
serde_json = { version = "1.0" }
2323
bytes = { version = "1.0" }
2424
once_cell = "1"
2525
crossbeam-utils = "0.8.7"
2626

2727

28-
lib-dispatch = {path = "../lib-dispatch" }
29-
flowy-sdk = {path = "../flowy-sdk"}
30-
dart-notify = {path = "../dart-notify" }
31-
flowy-derive = {path = "../../../shared-lib/flowy-derive" }
28+
lib-dispatch = { path = "../lib-dispatch" }
29+
flowy-sdk = { path = "../flowy-sdk" }
30+
dart-notify = { path = "../dart-notify" }
31+
flowy-derive = { path = "../../../shared-lib/flowy-derive" }
3232

3333
[features]
3434
default = ["flowy-sdk/dart", "dart-notify/dart", "flutter"]
3535
flutter = []
3636
http_sync = ["flowy-sdk/http_sync", "flowy-sdk/use_bunyan"]
37-
#use_serde = ["bincode"]
38-
#use_protobuf= ["protobuf"]
37+
openssl_vendored = ["flowy-sdk/openssl_vendored"]
3938

4039
[build-dependencies]
41-
lib-infra = { path = "../../../shared-lib/lib-infra", features = ["protobuf_file_gen", "dart"] }
40+
lib-infra = { path = "../../../shared-lib/lib-infra", features = [
41+
"protobuf_file_gen",
42+
"dart",
43+
] }
Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
1-
[package]
2-
name = "flowy-database"
3-
version = "0.1.0"
4-
edition = "2018"
5-
6-
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
7-
8-
[dependencies]
9-
diesel = {version = "1.4.8", features = ["sqlite"]}
10-
diesel_derives = {version = "1.4.1", features = ["sqlite"]}
11-
diesel_migrations = {version = "1.4.0", features = ["sqlite"]}
12-
lib-sqlite = { path = "../lib-sqlite" }
13-
log = "0.4"
14-
lazy_static = "1.4.0"
1+
[package]
2+
name = "flowy-database"
3+
version = "0.1.0"
4+
edition = "2018"
5+
6+
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
7+
8+
[dependencies]
9+
diesel = { version = "1.4.8", features = ["sqlite"] }
10+
diesel_derives = { version = "1.4.1", features = ["sqlite"] }
11+
diesel_migrations = { version = "1.4.0", features = ["sqlite"] }
12+
lib-sqlite = { path = "../lib-sqlite" }
13+
log = "0.4"
14+
lazy_static = "1.4.0"
15+
16+
[features]
17+
openssl_vendored = ["lib-sqlite/openssl_vendored"]
Lines changed: 52 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,52 @@
1-
[package]
2-
name = "flowy-sdk"
3-
version = "0.1.0"
4-
edition = "2018"
5-
6-
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
7-
8-
[dependencies]
9-
lib-dispatch = { path = "../lib-dispatch" }
10-
lib-log = { path = "../lib-log" }
11-
flowy-user = { path = "../flowy-user" }
12-
flowy-net = { path = "../flowy-net" }
13-
flowy-folder = { path = "../flowy-folder", default-features = false }
14-
flowy-grid = { path = "../flowy-grid", default-features = false }
15-
flowy-grid-data-model = { path = "../../../shared-lib/flowy-grid-data-model" }
16-
flowy-database = { path = "../flowy-database" }
17-
flowy-text-block = { path = "../flowy-text-block", default-features = false }
18-
flowy-revision = { path = "../flowy-revision" }
19-
20-
tracing = { version = "0.1" }
21-
log = "0.4.14"
22-
futures-core = { version = "0.3", default-features = false }
23-
color-eyre = { version = "0.5", default-features = false }
24-
bytes = "1.0"
25-
tokio = { version = "1", features = ["rt"] }
26-
parking_lot = "0.11"
27-
28-
flowy-sync = { path = "../../../shared-lib/flowy-sync" }
29-
lib-ws = { path = "../../../shared-lib/lib-ws" }
30-
lib-infra = { path = "../../../shared-lib/lib-infra" }
31-
32-
[dev-dependencies]
33-
serde = { version = "1.0", features = ["derive"] }
34-
bincode = { version = "1.3"}
35-
protobuf = {version = "2.24.1"}
36-
claim = "0.5.0"
37-
tokio = { version = "1", features = ["full"]}
38-
futures-util = "0.3.15"
39-
40-
[features]
41-
http_sync = ["flowy-folder/cloud_sync", "flowy-text-block/cloud_sync"]
42-
native_sync = ["flowy-folder/cloud_sync", "flowy-text-block/cloud_sync"]
43-
use_bunyan = ["lib-log/use_bunyan"]
44-
dart = ["flowy-user/dart", "flowy-net/dart", "flowy-folder/dart", "flowy-sync/dart", "flowy-grid/dart", "flowy-text-block/dart"]
1+
[package]
2+
name = "flowy-sdk"
3+
version = "0.1.0"
4+
edition = "2018"
5+
6+
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
7+
8+
[dependencies]
9+
lib-dispatch = { path = "../lib-dispatch" }
10+
lib-log = { path = "../lib-log" }
11+
flowy-user = { path = "../flowy-user" }
12+
flowy-net = { path = "../flowy-net" }
13+
flowy-folder = { path = "../flowy-folder", default-features = false }
14+
flowy-grid = { path = "../flowy-grid", default-features = false }
15+
flowy-grid-data-model = { path = "../../../shared-lib/flowy-grid-data-model" }
16+
flowy-database = { path = "../flowy-database" }
17+
flowy-text-block = { path = "../flowy-text-block", default-features = false }
18+
flowy-revision = { path = "../flowy-revision" }
19+
20+
tracing = { version = "0.1" }
21+
log = "0.4.14"
22+
futures-core = { version = "0.3", default-features = false }
23+
color-eyre = { version = "0.5", default-features = false }
24+
bytes = "1.0"
25+
tokio = { version = "1", features = ["rt"] }
26+
parking_lot = "0.11"
27+
28+
flowy-sync = { path = "../../../shared-lib/flowy-sync" }
29+
lib-ws = { path = "../../../shared-lib/lib-ws" }
30+
lib-infra = { path = "../../../shared-lib/lib-infra" }
31+
32+
[dev-dependencies]
33+
serde = { version = "1.0", features = ["derive"] }
34+
bincode = { version = "1.3" }
35+
protobuf = { version = "2.24.1" }
36+
claim = "0.5.0"
37+
tokio = { version = "1", features = ["full"] }
38+
futures-util = "0.3.15"
39+
40+
[features]
41+
http_sync = ["flowy-folder/cloud_sync", "flowy-text-block/cloud_sync"]
42+
native_sync = ["flowy-folder/cloud_sync", "flowy-text-block/cloud_sync"]
43+
use_bunyan = ["lib-log/use_bunyan"]
44+
dart = [
45+
"flowy-user/dart",
46+
"flowy-net/dart",
47+
"flowy-folder/dart",
48+
"flowy-sync/dart",
49+
"flowy-grid/dart",
50+
"flowy-text-block/dart",
51+
]
52+
openssl_vendored = ["flowy-database/openssl_vendored"]

frontend/rust-lib/flowy-text-block/src/editor.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ use tokio::sync::{mpsc, oneshot};
2424

2525
pub struct TextBlockEditor {
2626
pub doc_id: String,
27+
#[allow(dead_code)]
2728
rev_manager: Arc<RevisionManager>,
2829
#[cfg(feature = "sync")]
2930
ws_manager: Arc<flowy_revision::RevisionWebSocketManager>,

frontend/rust-lib/lib-sqlite/Cargo.toml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,15 @@ edition = "2018"
77

88
[dependencies]
99
r2d2 = "0.8.9"
10-
libsqlite3-sys = {version = ">=0.8.0, <0.24.0", features = ["bundled"]}
11-
diesel = {version = "1.4.8", features = ["sqlite"]}
12-
diesel_derives = {version = "1.4.1", features = ["sqlite"]}
13-
diesel_migrations = {version = "1.4.0", features = ["sqlite"]}
10+
libsqlite3-sys = { version = ">=0.8.0, <0.24.0", features = ["bundled"] }
11+
diesel = { version = "1.4.8", features = ["sqlite"] }
12+
diesel_derives = { version = "1.4.1", features = ["sqlite"] }
13+
diesel_migrations = { version = "1.4.0", features = ["sqlite"] }
1414
lazy_static = "1.4.0"
1515
scheduled-thread-pool = "0.2.5"
1616
error-chain = "=0.12.0"
1717
log = "0.4.11"
18-
openssl = { version = "0.10.38", features = ["vendored"] }
19-
#[features]
20-
#windows = ["libsqlite3-sys/bundled-windows"]
18+
openssl = { version = "0.10.38", optional = true }
19+
20+
[features]
21+
openssl_vendored = ["openssl/vendored"]

0 commit comments

Comments
 (0)