mirror of https://codeberg.org/topola/topola.git
Cargo.toml: reduce dependencies of CLI, WASM
This commit is contained in:
parent
507ca01bfc
commit
1ec85552bb
24
Cargo.toml
24
Cargo.toml
|
|
@ -19,7 +19,16 @@ required-features = ["egui"]
|
||||||
[features]
|
[features]
|
||||||
default = ["disable_contracts"]
|
default = ["disable_contracts"]
|
||||||
cli = ["dep:clap"]
|
cli = ["dep:clap"]
|
||||||
egui = ["dep:sys-locale", "dep:unic-langid", "dep:fluent-templates", "dep:eframe", "dep:egui", "dep:rfd", "dep:futures-executor"]
|
egui = [
|
||||||
|
"dep:eframe",
|
||||||
|
"dep:egui",
|
||||||
|
"dep:env_logger",
|
||||||
|
"dep:fluent-templates",
|
||||||
|
"dep:futures-lite",
|
||||||
|
"dep:rfd",
|
||||||
|
"dep:sys-locale",
|
||||||
|
"dep:unic-langid"
|
||||||
|
]
|
||||||
disable_contracts = ["contracts/disable_contracts"]
|
disable_contracts = ["contracts/disable_contracts"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
|
@ -77,12 +86,15 @@ version = "0.28.1"
|
||||||
optional = true
|
optional = true
|
||||||
version = "0.14.0"
|
version = "0.14.0"
|
||||||
|
|
||||||
[dependencies.futures-executor]
|
|
||||||
optional = true
|
|
||||||
version = "0.3.30"
|
|
||||||
|
|
||||||
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
||||||
env_logger = "0.10"
|
|
||||||
|
[target.'cfg(not(target_arch = "wasm32"))'.dependencies.futures-lite]
|
||||||
|
optional = true
|
||||||
|
version = "2.3"
|
||||||
|
|
||||||
|
[target.'cfg(not(target_arch = "wasm32"))'.dependencies.env_logger]
|
||||||
|
optional = true
|
||||||
|
version = "0.11"
|
||||||
|
|
||||||
[target.'cfg(target_arch = "wasm32")'.dependencies]
|
[target.'cfg(target_arch = "wasm32")'.dependencies]
|
||||||
wasm-bindgen-futures = "0.4"
|
wasm-bindgen-futures = "0.4"
|
||||||
|
|
|
||||||
|
|
@ -223,7 +223,7 @@ impl eframe::App for App {
|
||||||
|
|
||||||
#[cfg(not(target_arch = "wasm32"))]
|
#[cfg(not(target_arch = "wasm32"))]
|
||||||
pub fn execute<F: Future<Output = ()> + Send + 'static>(f: F) {
|
pub fn execute<F: Future<Output = ()> + Send + 'static>(f: F) {
|
||||||
std::thread::spawn(move || futures_executor::block_on(f));
|
std::thread::spawn(move || futures_lite::future::block_on(f));
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(target_arch = "wasm32")]
|
#[cfg(target_arch = "wasm32")]
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue