3 releases

0.1.2 Oct 4, 2023
0.1.1 Oct 4, 2023
0.1.0 Oct 4, 2023

#685 in Graphics APIs

MIT license

12KB
198 lines

drawille-nostd

This repository contains a no_std version of the drawille crate. Contains all its functionality, but is slower due to BTreeMap usage for character array instead of FnvHashMap. Additionally, all colored functionality was removed because of the enormous amount of std-dependent stuff that was used in there.

Usage

[dependencies]
drawille-nostd = "0.1.1"

License

Licensed under MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)

Contribution

See LICENSE-MIT for contribution rules.


lib.rs:

drawille-nostd – a no_std version of the drawille crate. This crate provides an interface for utilising Braille characters to draw a picture to a terminal, allowing no colour support.

Example

extern crate drawille_nostd;

use drawille_nostd::Canvas;

fn main() {
    let mut canvas = Canvas::new(10, 10);
    canvas.set(5, 4);
    canvas.line(2, 2, 8, 8);
    assert_eq!(canvas.frame(), [
"",
"  ⠙⢄  ",
""].join("\n"));
}

Dependencies

~560KB
~11K SLoC