프로젝트
GitHub에서 보기
SergioBenitez/yansi
소개
A dead simple ANSI terminal color painting library for Rust.
개발 도구What you can do
- This library makes simple things simple: use Paint and go!
- Zero dependencies by default. It really is simple.
- Zero allocations except as needed by opt-in wrapping.
- Automatic Windows support for the vast majority (95%+) of Windows users.
측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalUsage
In your Cargo.toml:
[dependencies]
yansi = "1.0"
In your source code:
use yansi::Paint;
println!("Testing, {}, {}, {}!",
"Ready".bold(),
"Set".black().on_yellow().invert().italic(),
"STOP".white().on_red().bright().underline().bold());
See the rustdocs for complete usage details.
Features
Why yet another ANSI terminal coloring library? Here are some reasons:
- This library makes simple things simple:
usePaintand go! - Zero dependencies by default. It really is simple.
- Zero allocations except as needed by opt-in wrapping.
- Automatic Windows support for the vast majority (95%+) of Windows users.
- Featureful
no_std, no-alloc, support withdefault-features = false. Styleconstructors areconst: store styles statically, even with dynamic conditions!- Any type implementing a formatting trait can be styled, not just strings.
- Styling can be enabled and disabled globally and dynamically, on the fly.
- A
Stylecan be predicated on arbitrary conditions. - Formatting specifiers like
{:x}and{:08b}are supported and preserved! - Built-in (optional) conditions for TTY detection and common environment variables.
- Arbitrary items can be masked for selective disabling.
- Styling can wrap to preserve styling across resets.
- Styling can linger beyond a single value.
- Experimental support for hyperlinking is included.
- The name
yansiis pretty cool 😎.
License
yansi is licensed under either of the following, at your option:
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT License (LICENSE-MIT or http://opensource.org/licenses/MIT)
관련 프로젝트 살펴보기
불러오는 중…