# v_concat - a tiny library for blazing fast concatenation and prints
[![Build Status]][GitHub Actions]
[![Crate]][crates.io]
[![Documentation]][docs.rs]
[![Dependency Status]][deps.rs]
[![Downloads]][crates.io]
[![License]][LICENSE-MIT]
`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
```rust
#[macro_use]
extern crate v_concat;
```
Concat and print at the same time:
```rust
v_concat_println!( "\n ❌ Error getting path metadata: \"{}\"\n", meta.unwrap_err() );
```
Concat first, store it and print:
```rust
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:
```rust
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
| 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
* [Apache License, Version 2.0][LICENSE-APACHE]
* [MIT license][LICENSE-MIT]
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.
[//]: # (badges)
[GitHub Actions]: https://github.com/juanchoraf/v_concat/actions?query=branch:main
[Build Status]: https://github.com/juanchoraf/v_concat/actions/workflows/rust.yml/badge.svg?branch=main
[crates.io]: https://crates.io/crates/v_concat
[Crate]: https://img.shields.io/crates/v/v_concat
[docs.rs]: https://docs.rs/v_concat
[Documentation]: https://docs.rs/v_concat/badge.svg
[deps.rs]: https://deps.rs/repo/github/juanchoraf/v_concat
[Dependency Status]: https://deps.rs/repo/github/juanchoraf/v_concat/status.svg
[Downloads]: https://img.shields.io/crates/d/v_concat
[License]: https://img.shields.io/crates/l/v_concat
[//]: # (licenses)
[LICENSE-APACHE]: https://github.com/juanchoraf/v_concat/blob/main/LICENSE-APACHE
[LICENSE-MIT]: https://github.com/juanchoraf/v_concat/blob/main/LICENSE-MIT