brittle 0.1.1

Simple TOML parser in Rust
Documentation
  • Coverage
  • 0%
    0 out of 14 items documented0 out of 3 items with examples
  • Size
  • Source code size: 29.87 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.07 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 25s Average build duration of successful builds.
  • all releases: 25s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • ZippyMagician/brittle
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • ZippyMagician

Brittle

Crates.io Documentation

A simple TOML parser written in Rust

Using Brittle

Get started using this example here:

extern crate brittle;

use std::io;
use std::fs::File;

fn main() -> io::Result<()> {
    let file = File::open("path/to/file.toml")?;
    let buffer = io::BufReader::new(file);

    let mut lines = buffer
        .lines()
        .map(|x| x.unwrap_or("".to_string()))
        .collect::<Vec<String>>();

    let result: Vec<brittle::Parser::TOML> = brittle::parse(lines.join("\n"));
    // Do things with the result here
}

Practicality

This was mainly created as an experiment, there are most likely much better crates available that are more useful. Feel free to use it, however! The other issue is the fact that there is no documentation. Sorry, maybe I'll consider adding some in the future

License

Brittle is licensed under the Apache-2.0 license.