-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unable to compile to wasm32-wasi target #22
Comments
Because the structure |
I have added this code into #[cfg(all(target_arch = "wasm32", target_os = "wasi"))]
{
use std::os::wasi::ffi::OsStrExt;
CString::new(path.as_os_str().as_bytes()).unwrap_or_default()
} You can try to compile libheif-rs from the |
I don't know. Could you look at |
Have you already found a solution how to build the original |
When compiling my project that uses this library as a dependency using command
cargo wasi build --release
, the below error occurs:When looking at the source code in
src/utils.rs
, it can compile only to unix and windows target platform. I'm new to rust and my question is why can't the function just returnCString::new(path.as_os_str().as_bytes()).unwrap_or_default()
. Can you alter this function to make it work in other target platforms?The text was updated successfully, but these errors were encountered: