mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
opt: build the rust sdk while running the flutter program
This commit is contained in:
parent
c5881daddd
commit
d30ee5db89
@ -10,7 +10,7 @@ CARGO_MAKE_CRATE_NAME = "dart-ffi"
|
|||||||
DEV = true
|
DEV = true
|
||||||
LIB_OUT_DIR = "debug"
|
LIB_OUT_DIR = "debug"
|
||||||
RELEASE = false
|
RELEASE = false
|
||||||
TARGET_OS = "unknown"
|
#TARGET_OS = "unknown"
|
||||||
|
|
||||||
[tasks.setup-crate-type]
|
[tasks.setup-crate-type]
|
||||||
private = true
|
private = true
|
||||||
|
3
app_flowy/.vscode/launch.json
vendored
3
app_flowy/.vscode/launch.json
vendored
@ -9,7 +9,8 @@
|
|||||||
"request": "launch",
|
"request": "launch",
|
||||||
"program": "${workspaceRoot}/lib/main.dart",
|
"program": "${workspaceRoot}/lib/main.dart",
|
||||||
"type": "dart",
|
"type": "dart",
|
||||||
// "preLaunchTask": "build rust sdk"
|
"preLaunchTask": "BuildRust",
|
||||||
|
"cwd": "${workspaceRoot}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "app_flowy (profile mode)",
|
"name": "app_flowy (profile mode)",
|
||||||
|
4
app_flowy/.vscode/tasks.json
vendored
4
app_flowy/.vscode/tasks.json
vendored
@ -13,7 +13,7 @@
|
|||||||
// ${cwd}: the current working directory of the spawned process
|
// ${cwd}: the current working directory of the spawned process
|
||||||
|
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"command": "sh ${workspaceFolder}/../scripts/build_sdk.sh",
|
"command": "sh ./scripts/build_sdk.sh",
|
||||||
"group": "build",
|
"group": "build",
|
||||||
"options": {
|
"options": {
|
||||||
"cwd": "${workspaceFolder}/../"
|
"cwd": "${workspaceFolder}/../"
|
||||||
@ -21,7 +21,7 @@
|
|||||||
"problemMatcher": [
|
"problemMatcher": [
|
||||||
"$rustc"
|
"$rustc"
|
||||||
],
|
],
|
||||||
"label": "build rust sdk"
|
"label": "BuildRust"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -21,7 +21,7 @@ impl std::default::Default for ObservableSubject {
|
|||||||
category: "".to_string(),
|
category: "".to_string(),
|
||||||
ty: 0,
|
ty: 0,
|
||||||
subject_id: "".to_string(),
|
subject_id: "".to_string(),
|
||||||
subject_payload: None,
|
subject_payload: None
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
[toolchain]
|
[toolchain]
|
||||||
|
#rustup override set nightly-2021-04-24
|
||||||
channel = "nightly-2021-04-24"
|
channel = "nightly-2021-04-24"
|
||||||
targets = [ "aarch64-apple-darwin", "x86_64-apple-darwin", "aarch64-apple-ios", "x86_64-apple-ios" ]
|
targets = [ "aarch64-apple-darwin", "x86_64-apple-darwin", "aarch64-apple-ios", "x86_64-apple-ios" ]
|
@ -3,4 +3,14 @@
|
|||||||
echo 'Start building rust sdk'
|
echo 'Start building rust sdk'
|
||||||
rustup show
|
rustup show
|
||||||
|
|
||||||
cargo make desktop
|
#Env check
|
||||||
|
#1. rustc --version will be the same as cargo --version
|
||||||
|
#2. override the toolchain if the current toolchain not equal to the rust-toolchain file specified.
|
||||||
|
# rustup override set nightly-2021-04-24
|
||||||
|
#3. Check your cargo env using the same source by: which cargo
|
||||||
|
# 1. ~/.bash_profile,
|
||||||
|
# 2. ~/.bashrc
|
||||||
|
# 3. ~/.profile
|
||||||
|
# 4. ~/.zshrc
|
||||||
|
cargo make desktop
|
||||||
|
|
||||||
|
@ -16,6 +16,7 @@ condition = { env_true = ["RELEASE"] }
|
|||||||
env = { DESKTOP_TARGET = "x86_64-apple-darwin" }
|
env = { DESKTOP_TARGET = "x86_64-apple-darwin" }
|
||||||
private = true
|
private = true
|
||||||
run_task = "desktop-build"
|
run_task = "desktop-build"
|
||||||
|
|
||||||
[tasks.desktop-build]
|
[tasks.desktop-build]
|
||||||
category = "Build"
|
category = "Build"
|
||||||
condition = { platforms = ["mac"], env_true = ["DEV"] }
|
condition = { platforms = ["mac"], env_true = ["DEV"] }
|
||||||
|
Loading…
Reference in New Issue
Block a user