Crates.io | Boot-Banner |
lib.rs | Boot-Banner |
version | 0.1.1 |
source | src |
created_at | 2024-10-01 09:34:44.474312 |
updated_at | 2024-10-01 09:40:14.376888 |
description | An elegant banner library that enhances project launches with eye-catching terminal displays and helpful assistance. |
homepage | |
repository | https://github.com/m1n67un/Boot-Banner |
max_upload_size | |
id | 1392670 |
size | 7,955 |
Boot-Banner is a Rust library that provides a simple way to display a banner when your application starts. It uses a procedural macro to inject banner-displaying code into your main function.
Add this to your Cargo.toml
:
[dependencies]
Boot-Banner = "0.1.0"
Create a banner.txt file in your project's root directory with your desired banner content. In your main.rs file, use the #[init] attribute on your main function:
use Boot_Banner::init;
#[init]
fn main() {
// Your code here
println!("Hello, world!");
}
The init attribute macro does the following:
If the banner file cannot be read or doesn't exist, the library will print an error message but allow your application to continue running.
This project is licensed under the MIT License - see the LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.
m1n67un
Thanks to the Rust community for providing excellent documentation and resources.