Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 18 additions & 3 deletions .github/workflows/fuzz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,25 @@ on:
jobs:
check:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./fuzz
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
- run: cd fuzz
- run: cargo check

- run: cargo fmt --all -- --check

- name: Check fuzz code compiles
run: cargo check

- name: Build AFL target
run: make setup-afl

- name: Build libfuzzer target
run: |
rustup toolchain install nightly
cargo install cargo-fuzz
cargo +nightly fuzz build main_libfuzzer
12 changes: 12 additions & 0 deletions examples/tokenize_with_spans.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
//! Let's you easily try out the tokenizer with e.g.
//! printf '<h1>Hello world!</h1>' | cargo run --example=tokenize_with_spans
use html5gum::{DefaultEmitter, IoReader, Tokenizer};

fn main() {
let emitter = DefaultEmitter::<usize>::new_with_span();
for token in
Tokenizer::new_with_emitter(IoReader::new(std::io::stdin().lock()), emitter).flatten()
{
println!("{:?}", token);
}
}
Empty file added fuzz/.github/workflows/fuzz.yml
Empty file.
Loading
Loading