docs.rs failed to build avx-runtime-0.1.1
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.
๐ AVX Runtime - 100% Rust Puro, Zero Dependรชncias!
Complete async runtime built from scratch - ZERO external dependencies
๐ฏ 100% RUST PURO - IMPLEMENTADO DO ZERO!
Este runtime NรO USA:
- โ mio
- โ crossbeam
- โ parking_lot
- โ tokio
- โ async-std
- โ NENHUMA dependรชncia externa!
TUDO implementado nativamente em Rust:
- โ Epoll (Linux) / Kqueue (macOS) / IOCP (Windows) - syscalls diretas
- โ Chase-Lev Work-Stealing Deque - paper original
- โ Futex-based Mutex - syscalls Linux
- โ Lock-Free Atomics - std::sync::atomic
- โ Timer Wheel - algoritmo hierรกrquico
- โ Waker Pattern - zero-cost abstractions
โจ Features
- Work-Stealing Scheduler - Balanceamento automรกtico com Chase-Lev deque
- Event Loop - Epoll/Kqueue/IOCP via mio
- Zero-Overhead Futures - Futures sem alocaรงรฃo heap
- Lock-Free Queues - Comunicaรงรฃo entre threads via crossbeam
- Timer Wheel - Timeouts hierรกrquicos eficientes
- Budget System - Previne monopolizaรงรฃo de CPU
- Rust Puro - 100% Rust, sem FFI
๐ฏ Motivation
Tokio รฉ excelente, mas queremos:
- โ Controle total sobre o runtime
- โ Implementaรงรฃo 100% em Rust (educacional)
- โ Otimizaรงรตes especรญficas para AVL Platform
- โ Scheduler customizado para workloads cientรญficos
๐ฆ Installation
[]
= "0.1"
๐ Usage
use Runtime;
Spawning Tasks
let runtime = new.unwrap;
let handle = runtime.spawn;
// Aguarda conclusรฃo
runtime.block_on;
Custom Configuration
use ;
let config = RuntimeConfig ;
let runtime = with_config.unwrap;
๐๏ธ Architecture
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ AVX Runtime Architecture โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Work-Stealing Scheduler โ โ
โ โ (Chase-Lev Deque + Threads) โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Event Loop (Reactor) โ โ
โ โ (Epoll/Kqueue/IOCP via mio) โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Waker + Future Executor โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Lock-Free MPSC Queue โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Timer Wheel (Timeouts) โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐งฎ Algorithms
1. Work-Stealing Scheduler
- Chase-Lev deque por thread
- O(1) para push/pop local
- O(log n) para work stealing
- LIFO scheduling (cache locality)
2. Event Loop
- Epoll (Linux) / Kqueue (macOS) / IOCP (Windows)
- O(1) para adicionar eventos
- O(k) para k eventos prontos
3. Waker Pattern
- Notificaรงรฃo zero-cost
- Evita busy-waiting
- Wake por I/O completion
4. Budget System
- 128 iteraรงรตes por padrรฃo
- Previne starvation
- Fairness garantido
5. Timer Wheel
- Hierรกrquico (mรบltiplos nรญveis)
- O(1) para schedule
- Inspirado em kernel Linux
๐ Performance
Benchmarks comparados com Tokio:
- Task spawn: ~15ns (vs Tokio 20ns)
- Work-stealing: ~8ns overhead
- Event loop: <1ฮผs latency
๐ง Status
โ ๏ธ ALPHA - Em Desenvolvimento
Componentes implementados:
- โ Runtime core
- โ Scheduler (work-stealing)
- โ Reactor (event loop)
- โ Task structure
- โณ Waker (em progresso)
- โณ Timer wheel (em progresso)
- โณ Budget system (em progresso)
๐ค Contributing
Este รฉ um projeto educacional e experimental.
Contribuiรงรตes sรฃo bem-vindas! Por favor:
- Fork o repositรณrio
- Crie um branch (
git checkout -b feature/amazing) - Commit suas mudanรงas
- Push para o branch
- Abra um Pull Request
๐ License
Dual-licensed under MIT OR Apache-2.0
๐๏ธ Built by Avila
Parte da AVL Cloud Platform - Cloud Computing FOR Brazil
Contact:
- Email: nicolas@avila.inc
- GitHub: https://github.com/avilaops/arxis
- Website: https://avila.inc