rimage icon indicating copy to clipboard operation
rimage copied to clipboard

wasm-pack

Open pzhasaki opened this issue 2 years ago • 9 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Description

[dependencies] rimage = { version = "0.9", features = ["webp", "avif"] } could rimage build in wasm? there failed: CC=emcc wasm-pack build --target web image

Expected behavior

No response

Library Version

0.9.0

Steps To Reproduce

No response

Anything else?

No response

pzhasaki avatar Dec 01 '23 10:12 pzhasaki

There is no official support for the wasm target at the moment. I am currently working on integrating the image crate, and I will do my best to implement support for all major targets, including wasm.

SalOne22 avatar Dec 01 '23 13:12 SalOne22

Looking forward to it !

pzhasaki avatar Dec 02 '23 06:12 pzhasaki

The latest release has introduced support for the wasm32-unknown-emscripten and wasm32-wasi targets. However, support for the wasm32-unknown-unknown target is not available due to the inability of mozjpeg to compile without the C standard library.

SalOne22 avatar Dec 18 '23 16:12 SalOne22

Looking forward to it !

MiniOcean404 avatar Aug 15 '24 16:08 MiniOcean404

I would like to ask if the webp dependency cannot be compiled by wasm-pack。

I used cargo build --lib --target wasm32-unknown-emscripten. This command also failed to compile

MiniOcean404 avatar Aug 15 '24 17:08 MiniOcean404

I would like to ask if the webp dependency cannot be compiled by wasm-pack

Any C dependency cannot be compiled to the wasm32-unknown-unknown target. webp crate uses C implementation of libwebp.

I used cargo build --lib --target wasm32-unknown-emscripten. This command also failed to compile

What's the issue?

SalOne22 avatar Aug 16 '24 13:08 SalOne22

请问一下webp依赖不能用wasm-pack编译吗

任何 C 依赖项都无法编译到wasm32-unknown-unknown目标。cratewebp使用 的 C 实现libwebp

我使用了cargo build --lib --target wasm32-unknown-emscripten。此命令也编译失败

有什么问题?

Thank you for your reply and answer. It seems that C or C++ is still needed to better complete wasm

MiniOcean404 avatar Aug 16 '24 16:08 MiniOcean404