v_concat 0.1.2

A tiny library for blazing fast concatenation and prints
Documentation
  • Coverage
  • 0%
    0 out of 4 items documented0 out of 3 items with examples
  • Size
  • Source code size: 42.46 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.07 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 26s Average build duration of successful builds.
  • all releases: 26s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • juanchoraf/v_concat
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • juanchoraf

v_concat - a tiny library for blazing fast concatenation and prints

Build Status Crate Documentation Dependency Status Downloads License

v_concat is a Rust library for blazing fast concatenation and prints.

After doing thousands of benchmarks we decided to create this crate to provide the fastest way possible to concatenate and print at the same time since macros like format! takes 10ms 🐢 while this crate concats and prints in only 280 microseconds YES! it is blazing fast, even with multithread tasks.

Examples

First of all include the crate as macro in your main.rs

#[macro_use]
extern crate v_concat;

Concat and print at the same time:

v_concat_println!( "\n ❌ Error getting path metadata: \"{}\"\n", meta.unwrap_err() );

Concat first, store it and print:

let str_one = "is immutable";
let str_two = "proven guilty";
let result  = v_concat!( "🚀 Everything {} until {}. {}", str_one, str_two, "123 ".repeat(4) );

v_concat_println!( "\n\r{}\n\r", result );

Overwrite previous print each second:

let total = 100;
let dur   = std::time::Duration::from_millis( 1000 );

for i in 0..total {
    std::thread::sleep( dur );
    v_concat_print!( "Loaded {} of {:?} records", i, total );
}

Supported OS

Platform
Linux
Windows
macOS
Android
iOS, tvOS, watchOS

Minimum Supported Rust Version

This crate requires Rust 1.94.1 or later.

Error handling

Generally, on supported platforms, failure is highly unlikely, though not impossible. If an error does occur, it is likely that it will occur on every call to v_concat. Therefore, after the first successful call, one can be reasonably confident that no errors will occur.

Panic handling

We strive to eliminate all potential panics from our backend implementations. In other words, when compiled with optimizations enabled, the generated binary code for v_concat functions should not contain any panic branches. Even if the platform misbehaves and returns an unexpected result, our code should correctly handle it and return an error.

Credits

Powered by The Velasquez.

License

The v_concat library is distributed under either of

at your convenience.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.