[package]
edition = "2024"
name = "native-executor"
version = "0.8.0"
authors = ["Lexo Liu"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Platform-native async task executor"
readme = "README.md"
keywords = [
"task",
"async",
"concurrency",
"waterui",
]
categories = [
"asynchronous",
"concurrency",
]
license = "MIT"
repository = "https://github.com/waterui/native-executor"
[package.metadata.docs.rs]
rustdoc-args = [
"--cfg",
"docsrs",
]
[features]
default = ["polyfill"]
polyfill = [
"dep:async-executor",
"dep:num_cpus",
"dep:futures-lite",
"dep:async-io",
]
[lib]
name = "native_executor"
path = "src/lib.rs"
[[test]]
name = "android"
path = "tests/android.rs"
[[test]]
name = "apple"
path = "tests/apple.rs"
[[test]]
name = "polyfill"
path = "tests/polyfill.rs"
[[test]]
name = "polyfill_main_unavailable"
path = "tests/polyfill_main_unavailable.rs"
[[test]]
name = "web"
path = "tests/web.rs"
[dependencies.async-task]
version = "4.7.1"
[dependencies.libc]
version = "0.2"
[dev-dependencies.futures-lite]
version = "2.6.1"
[target.'cfg(not(target_arch = "wasm32"))'.dependencies.async-executor]
version = "1.13.3"
optional = true
[target.'cfg(not(target_arch = "wasm32"))'.dependencies.async-io]
version = "2.6.0"
optional = true
[target.'cfg(not(target_arch = "wasm32"))'.dependencies.futures-lite]
version = "2.6.1"
optional = true
[target.'cfg(not(target_arch = "wasm32"))'.dependencies.num_cpus]
version = "1.17.0"
optional = true
[target.'cfg(not(target_os = "android"))'.dependencies.executor-core]
version = "0.7.0"
features = ["async-task"]
[target.'cfg(target_arch = "wasm32")'.dependencies.js-sys]
version = "0.3"
[target.'cfg(target_arch = "wasm32")'.dependencies.wasm-bindgen]
version = "0.2"
[target.'cfg(target_arch = "wasm32")'.dependencies.wasm-bindgen-futures]
version = "0.4"
[target.'cfg(target_arch = "wasm32")'.dev-dependencies.wasm-bindgen-test]
version = "0.3"
[target.'cfg(target_os = "android")'.dependencies.async-io]
version = "2.6.0"
[target.'cfg(target_os = "android")'.dependencies.executor-core]
version = "0.7.0"
features = [
"async-task",
"async-executor",
]
[target.'cfg(target_os = "android")'.dependencies.jni]
version = "0.21"
[target.'cfg(target_os = "android")'.dependencies.ndk]
version = "0.9"
[target.'cfg(target_os = "android")'.dependencies.ndk-sys]
version = "0.6"
[target.'cfg(target_os = "android")'.dependencies.thiserror]
version = "2.0"
[target.'cfg(target_vendor = "apple")'.dependencies.block2]
version = "0.6"
[lints.clippy]
all = "warn"
complexity = "warn"
correctness = "warn"
nursery = "warn"
pedantic = "warn"
perf = "warn"
style = "warn"
suspicious = "warn"
[lints.rust]
missing_debug_implementations = "warn"