Skip to content

RustedBytes/asm_tl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

asm_tl

Crates.io Version

asm_tl is a blazingly fast HTML parser written in Rust and Assembly.

Supported assembly targets:

  • x86_64-unknown-linux-*
  • aarch64-unknown-linux-*
  • riscv64gc-unknown-linux-*
  • x86_64-pc-windows-msvc

Add it to your Cargo.toml:

asm_tl = "0.2"

Usage

Use asm_tl::parse with the default parser options:

let dom = asm_tl::parse("<div id=\"app\">Hello</div>", asm_tl::ParserOptions::default())?;
let parser = dom.parser();
let app = dom.get_element_by_id("app").unwrap().get(parser).unwrap();

assert_eq!(app.inner_text(parser), "Hello");

Enable ID or class tracking when you need fast lookup tables:

let options = asm_tl::ParserOptions::default()
    .track_ids()
    .track_classes();

Provenance

This crate is a fork of rustedbytes-tl, modified to add parsing in Assembly and other improvements.

License

MIT.

About

2x-3x faster than rustedbytes-tl, thanks to Assembly

Topics

Resources

License

Stars

Watchers

Forks

Contributors