4 releases (2 breaking)

0.3.1 May 1, 2024
0.3.0 May 1, 2024
0.2.0 May 1, 2024
0.1.0 May 1, 2024

#196 in Memory management

Download history 13/week @ 2024-09-21 1/week @ 2024-09-28 10/week @ 2024-10-12 8/week @ 2024-10-19

95 downloads per month

MIT license

53KB
1K SLoC

BBX

Crates.io MSRV Crates.io License Crates.io Version docs.rs Discord

A robust and performant (constant time, no recursion) BBCode pull parser with no_std/alloc support.

Examples

Quick parsing

// Parse a document, throwing all of its component tokens into the console.
let mut parser = BBParser::new(input);

for token in parser {
    println!("{:?}", token);
}

Quick sanitized HTML output

// Simple serializer default with all of the v1.0.0 (or earlier) tags considered "core" to the library.
let mut serializer: HtmlSerializer<SimpleHtmlWriter> = 
    HtmlSerializer::with_tags(all_core_v1_tags());
let mut parser = BBParser::new(input);
println!("Document:");
println!("{}", serializer.serialize(parser));

Dependencies

~180KB