#memory #library #replace #embedded #no-alloc #vector #no-std

no-std substd

An unstable replacement for std and core modules with a focus on speed over safety

1 unstable release

0.0.1 Feb 6, 2025

#358 in #library

Download history 132/week @ 2025-02-05 26/week @ 2025-02-12 14/week @ 2025-02-26

172 downloads per month

Apache-2.0

78KB
1.5K SLoC

🌺 SubStd: High-Performance Core Replacement Library 🌺

⚠️ WARNING: This Library is UNSAFE BY DESIGN ⚠️

Welcome to SubStd - an experimental, performance-focused alternative implementation of Rust's std/core modules. This library prioritizes raw speed over safety guarantees! πŸƒβ€β™€οΈπŸ’¨

πŸ’« Overview

SubStd provides blazing-fast alternatives to common std/core functionality by:

  • Removing runtime checks and bounds validation
  • Using unsafe optimizations aggressively
  • Providing zero-cost abstractions
  • Minimizing memory operations

🎯 Goals

  • Maximum performance over safety
  • Drop-in replacement for std/core modules
  • Minimal runtime overhead
  • Platform-specific optimizations

✨ Key Features

  • Unchecked operations for Vec, String, etc
  • Lock-free concurrent structures
  • SIMD-accelerated algorithms
  • Zero-allocation APIs where possible
  • Platform-specific assembly optimizations
  • Smart enough to tell you what caused panic in production

πŸ—ΊοΈ Roadmap

Phase 1

  • Core data structures
  • Basic collections
  • Memory management primitives

Phase 2**

  • Advanced collections
  • Async runtime
  • Platform-specific optimizations

⚑️ Performance

Performance is our #1 priority! Expect:

  • Significantly faster than std for common operations
  • Works on any platform with rustc
  • #![no_std] compliant!
  • It's only error contol is to panic in production

🚫 Limitations

  • Safety guarantees are minimal, it does as told
  • Not recommended for safety-critical systems
  • Requires careful usage and understanding
  • May cause undefined behavior if misused
  • By design, may panic in production

🌸 Contributing

This is a work in progress! Contributors welcome, but please note:

  • Safety is secondary to performance
  • Design requirements always require 'what caused a panic'
  • Breaking changes are expected

πŸ’ License

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

No runtime deps