Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Sewer56/nanokit-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nanokit

Crates.io Docs.rs CI

A collection of tiny, reusable utility methods that reduce code size and improve performance.

Features

  • Fast string concatenation with minimal code size
  • Bit counting utilities
  • no_std compatible with optional std feature

Quick Start

Add to your Cargo.toml:

[dependencies]
nanokit = "0.2.1"

String Concatenation

use nanokit::string_concat::concat_2;
let result = concat_2("Hello, ", "world!");
assert_eq!(result, "Hello, world!");

Unsafe String Concatenation

Save 2 instructions when you know the result length is less than isize::MAX:

use nanokit::string_concat_unsafe::concat_2_no_overflow;
let result = unsafe { concat_2_no_overflow("Hello, ", "world!") };

Bit Counting

use nanokit::count_bits::BitsNeeded;
assert_eq!(5u64.bits_needed_to_store(), 3); // 5 = 0b101

For more details, see the nanokit crate documentation.

Crates

  • nanokit: Core library with string concatenation and bit counting utilities

Developer Manual

For step-by-step development guidance, see the Developer Manual.

Contributing

We welcome contributions! See the Contributing Guide for details.

License

Licensed under MIT.

About

A collection of tiny, reusable utility methods that reduce code size and improve performance.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages