Crates.io | cygrind-utils |
lib.rs | cygrind-utils |
version | 0.2.1 |
source | src |
created_at | 2022-11-26 14:15:15.42532 |
updated_at | 2022-11-26 16:26:03.959132 |
description | A utility crate for handling, parsing, and drawing cybergrind patterns from ULTRAKILL |
homepage | |
repository | https://github.com/cygrind/cygrind-utils |
max_upload_size | |
id | 723287 |
size | 37,642 |
This crate can go from an unparsed .cgp
file to a .png
byte buffer in around a hundredth of a second
use cygrind_utils::cgp::*;
fn main() {
// Make sure that this is a String and not an &str
// An &str is used for demonstrative purposes (i asked nicely don't worry)
let src = include_str!("example.cgp");
let data = drawing::draw(parser::parse(src.to_string()));
// woo a png buffer
let mut bytes = data.as_slice();
}
oh | wait | there | are | none |
---|
Times:
Parsing: 5.8 micros
Drawing: 100ms