diff options
Diffstat (limited to 'crates/parser')
| -rw-r--r-- | crates/parser/src/lib.rs | 4 | ||||
| -rw-r--r-- | crates/parser/src/module.rs | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/crates/parser/src/lib.rs b/crates/parser/src/lib.rs index 3cc51d6..b1729f4 100644 --- a/crates/parser/src/lib.rs +++ b/crates/parser/src/lib.rs @@ -40,10 +40,10 @@ impl Parser { #[cfg(feature = "std")] pub fn parse_module_file( &self, - path: impl AsRef<crate::std::path::Path>, + path: impl AsRef<crate::std::path::Path> + Clone, ) -> Result<TinyWasmModule> { use alloc::format; - let f = crate::std::fs::File::open("log.txt").map_err(|e| { + let f = crate::std::fs::File::open(path.clone()).map_err(|e| { ParseError::Other(format!("Error opening file {:?}: {}", path.as_ref(), e)) })?; diff --git a/crates/parser/src/module.rs b/crates/parser/src/module.rs index 268bad7..2beba9e 100644 --- a/crates/parser/src/module.rs +++ b/crates/parser/src/module.rs @@ -162,6 +162,10 @@ impl ModuleReader { validator.end(offset)?; self.end_reached = true; } + CustomSection(reader) => { + debug!("Found custom section"); + debug!("Skipping custom section: {:?}", reader.name()); + } UnknownSection { .. } => { return Err(ParseError::UnsupportedSection("Unknown section".into())) } |
