Skip to content

Commit

Permalink
fix: allow compiling to wasm32-wasi
Browse files Browse the repository at this point in the history
Signed-off-by: Brian H <[email protected]>
  • Loading branch information
fibonacci1729 committed Mar 20, 2024
1 parent 4e9d718 commit 20d2c39
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/wasm-opt/src/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -391,8 +391,8 @@ fn convert_path_to_u8(path: &Path) -> Result<&[u8], cxx::Exception> {
#[cfg(unix)]
let path = path.as_os_str().as_bytes();

#[cfg(windows)]
let path = path.as_os_str().to_str().expect("utf8").as_bytes();
#[cfg(not(unix))]
let path = path.to_str().expect("utf8").as_bytes();

Ok(path)
}

0 comments on commit 20d2c39

Please sign in to comment.