docs.rs failed to build native-executor-0.4.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
native-executor-0.5.1
Native Executor
Platform-native async task executor that leverages OS event loops (GCD, GDK) for optimal performance.
Features
- Platform-native scheduling: Direct GCD integration on Apple platforms
- Priority-aware execution: Background vs default task prioritization
- Thread-local safety: Non-Send future execution with compile-time guarantees
- High-precision timers: OS-native timing without busy-waiting
- Thread-safe utilities:
LocalValue
,OnceValue
,MainValue
containers - Zero-cost abstractions: Direct OS API usage, no additional runtime
Installation
Add this to your Cargo.toml
:
[]
= "0.2.0"
Quick Start
use ;
use Duration;
// Spawn a task with default priority
let handle = spawn_local;
// Keep the main thread alive to allow tasks to complete
sleep;
Core Components
Task Spawning
use ;
spawn;
spawn_local;
spawn_main;
spawn_with_priority;
Timers
use ;
use Duration;
# async ;
Thread-Safe Containers
use ;
// Thread-local access only
let local = new;
assert_eq!;
// Single-consumption semantics
let once = new;
let value = once.take;
// Cross-thread with main-thread execution
let main_val = new;
# async ;
Platform Support
Current: Apple platforms (macOS, iOS, tvOS, watchOS) via Grand Central Dispatch
Planned: Linux (GDK), Windows (IOCP), Android (Looper), WebAssembly
Unsupported platforms fail at compile-time with clear error messages.
Examples
License
This project is licensed under the MIT License.