fast

Crates.iofast
lib.rsfast
version0.4.0
created_at2025-01-12 20:13:52.095844+00
updated_at2025-07-18 00:22:53.187669+00
descriptionA helper library
homepage
repositoryhttps://github.com/towerstrike/fast
max_upload_size
id1513584
size298,696
Sol Midnight (solmidnight)

documentation

README

fast

A zero-dependency, high-performance async runtime for Rust built on io_uring and direct syscalls.

Overview

fast is an experimental async runtime designed as a safe, testable, and efficient alternative to async-std. It leverages Linux's io_uring for high-performance I/O operations and implements core async primitives without external dependencies.

Status: Early Alpha - API subject to change

Features

Implemented

  • Sync Primitives: Channels, duplex communication, locks, mutexes, once cells, queues, ring buffers, slabs
  • Runtime Core: Thread-local runtime management, task spawning infrastructure
  • Linux Integration: io_uring bindings, syscall wrappers for x86_64 and aarch64
  • Networking: TCP/UDP traits and Linux-specific implementations
  • Filesystem: Basic file operations framework

Architecture

  • #![no_std] - Works without standard library
  • Zero external runtime dependencies (only build dependencies)
  • Platform-specific optimizations via conditional compilation
  • Memory-safe abstractions over unsafe system interfaces

Usage

// Coming soon - API still stabilizing

Current Limitations

  • Linux-only (io_uring requirement)
  • x86_64 and aarch64 architectures only
  • Many APIs still contain todo!() implementations
  • No stable API guarantees

TODO

Immediate Priority

  • Complete io_uring event loop implementation
  • Implement spawn/spawn_local functionality in runtime
  • Fix compilation warnings (unused imports, mutable variables)
  • Complete TCP/UDP socket implementations
  • Implement file I/O operations
  • Add basic examples and tests

Core Runtime

  • Implement work-stealing scheduler
  • Add timer/delay support via io_uring timeout operations
  • Multi-threaded executor with thread pool
  • Signal handling integration
  • Proper error propagation and panic handling

Networking

  • Complete TCP accept/connect/read/write
  • UDP send/recv operations
  • Socket options (SO_REUSEADDR, etc.)
  • Unix domain socket support
  • TLS support (rustls integration?)

Filesystem

  • Async file read/write/seek
  • Directory operations
  • File metadata queries
  • Watch file changes (inotify integration)

Performance

  • Benchmark suite comparing to tokio/async-std
  • Memory pool for io_uring operations
  • Zero-copy optimizations
  • NUMA awareness for multi-socket systems

Future Ideas

Platform Expansion

  • Windows IOCP: Add Windows support with I/O Completion Ports
  • macOS/BSD kqueue: Extend to other Unix platforms
  • WASM Support: Explore browser/WASI compatibility

Advanced Features

  • io_uring Extensions:
    • Multi-shot accept/recv
    • Registered buffers/files
    • Kernel polling mode
    • Linked operations
  • Structured Concurrency: Nursery/scope-based task management
  • Tracing Integration: Built-in async-aware diagnostics
  • HTTP/3 Support: QUIC protocol implementation
  • gRPC: High-performance RPC framework

Ecosystem Integration

  • Compatibility Layer: async-std/tokio compatibility traits
  • Async Traits: Native async trait support when stabilized
  • Macro-free API: Explore builder patterns vs procedural macros
  • Plugin System: Dynamic loading of protocol handlers

Experimental Ideas

  • Kernel Bypass: DPDK/XDP for ultra-low latency networking
  • GPU Offload: Async GPU computation scheduling
  • Distributed Runtime: Cluster-aware task scheduling
  • Real-time Support: Deadline-based scheduling
  • Memory Safety: Formal verification of unsafe blocks

Contributing

See CONTRIBUTING.md for guidelines.

License

MIT License - see LICENSE for details.

Acknowledgments

Built with ❤️ by Sol Midnight and Angelite, Inc.

Commit count: 0

cargo fmt