wabt-rs icon indicating copy to clipboard operation
wabt-rs copied to clipboard

Can't run script with path containing directores

Open sunfishcode opened this issue 5 years ago • 1 comments

This test program:

use wabt::script::ScriptParser;

fn main() {
    let filename = "dir/test.wast";
    let buffer = b"(module)";

    let mut parser = ScriptParser::<f32, f64>::from_source_and_name(buffer, filename).unwrap();

    while parser.next().expect("parser").is_some() {}
}

prints this:

thread 'main' panicked at 'Module referenced in JSON does not exist.', src/libcore/option.rs:1166:5

If I change the filename to just "test.wast", I get no error.

sunfishcode avatar Oct 07 '19 03:10 sunfishcode

Thank you for this issue report, it helped to at least google the workaround :)

RReverser avatar May 31 '20 23:05 RReverser