mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-19 14:01:08 +01:00
16 lines
424 B
Rust
16 lines
424 B
Rust
#![cfg_attr(all(fuzzable_platform, fuzzing), no_main)]
|
|
|
|
#[cfg(all(fuzzable_platform, fuzzing))]
|
|
mod fuzz {
|
|
use libfuzzer_sys::fuzz_target;
|
|
use naga::front::wgsl::Frontend;
|
|
|
|
fuzz_target!(|data: String| {
|
|
// Ensure the parser can handle potentially malformed strings without crashing.
|
|
let _result = Frontend::new().parse(&data);
|
|
});
|
|
}
|
|
|
|
#[cfg(not(all(fuzzable_platform, fuzzing)))]
|
|
fn main() {}
|