Skip to content

Commit

Permalink
fix: error: duplicate export "main"
Browse files Browse the repository at this point in the history
  • Loading branch information
doehyunbaek committed Jan 8, 2024
1 parent 6a5997f commit 4234bc3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions crates/replay_gen/src/codegen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,10 @@ pub fn generate_standalone(wasm_path: &Path, code: &Replay) -> std::io::Result<(
write(stream, &to_write)?;
write(stream, "\n")?;
}
// handle error: duplicate export "main"
else if line.contains("export \"main\"") {
continue;
}
// _start function
else if iter.peek().is_none() {
for (i, _f) in &code.func_imports {
Expand Down

0 comments on commit 4234bc3

Please sign in to comment.