FrozenCore
Custom implementations and core utilities for frozen codebases.
Index
Usage
Add following to your Cargo.toml,
[]
= { = "0.0.8", = true }
[!TIP] All the features available by default. To disable this, set
default-features = false
FrozenFile
FrozenFile is a custom implementation of std::fs::File.
To use the ffile module, add it as a dependency in your Cargo.toml:
[]
= { = "0.0.8", = false, = ["ffile"] }
FrozenFile is currently available on the following platforms,
| Platform | Support |
|---|---|
aarch64-unknown-linux-gnu |
✅ |
x86_64-unknown-linux-gnu |
✅ |
aarch64-pc-windows-msvc |
❌ |
x86_64-pc-windows-msvc |
❌ |
aarch64-apple-darwin |
✅ |
x86_64-apple-darwin |
✅ |
See following example for more details.
FrozenMMap
FrozenMMap is a custom implementation of mmap.
To use the fmmap module, add it as a dependency in your Cargo.toml:
[]
= { = "0.0.8", = false, = ["fmmap"] }
FrozenMMap is currently available on the following platforms,
| Platform | Support |
|---|---|
aarch64-unknown-linux-gnu |
✅ |
x86_64-unknown-linux-gnu |
✅ |
aarch64-pc-windows-msvc |
❌ |
x86_64-pc-windows-msvc |
❌ |
aarch64-apple-darwin |
✅ |
x86_64-apple-darwin |
✅ |
Read the example below for usage details,
use ;
const MID: u8 = 0;
;
unsafe
unsafe
FrozenErr
FRes & FErr are custom implementation's for result and error propogation.
To use the error module, add it as a dependency in your Cargo.toml:
[]
= { = "0.0.8", = false, = ["error"] }
Hints
The hints module provides stable friendly implementations of likely and unlikely branch hints functions.
To use the hints module, add it as a dependency in your Cargo.toml:
[]
= { = "0.0.8", = false, = ["hints"] }
Crc
Implementation of CRC32C (Castagnoli polynomial) to compute a 32-bit cyclic redundancy check (CRC) using Castagnoli polynomial, intended for data integrity verification for torn writes and curruption detection
[!WARNING] We assume little-endian target architecture, as big-endian architectures are not supported
[!IMPORTANT] The generated 32-bit CRC is not cryptographically secure, it's intended use only is for data integrity in IO ops
To use the crc module, add it as a dependency in your Cargo.toml:
[]
= { = "0.0.8", = false, = ["crc"] }
Crc32C is available on following architectires,
| Architecture | Support |
|---|---|
aarch64 |
✅ |
x86_64 |
✅ |
Read the example below for usage details,
use Crc32C;
Notes
[!IMPORTANT]
frozen-coreis primarily created for frozen-lab projects. External use is discouraged, but not prohibited, given you asume all the risks.
This project is licensed under the Apache-2.0 and MIT License. See the LICENSE-APACHE and LICENSE-MIT file for more details.
Contributions are welcome! Please feel free to submit a PR or open an issue if you have any feedback or suggestions.