Closed ashokspeelyaal closed 3 months ago
I have printpdf = "0.7.0" in my Cargo.toml
If I run my Rust binary independently, there are no issues. However, we are building all our services as wasm32-wasi targets.
When I run
cargo build --target wasm32-wasi
I get this issue: Note: I tried adding time = "0.3.34" as well.
Compiling printpdf v0.7.0 error[E0432]: unresolved import
OffsetDateTime
help: consider importing this struct instead | 3 | use time::OffsetDateTime; | ~~~~
crate::OffsetDateTime
help: consider importing this struct instead | 10 | use time::OffsetDateTime; | ~~~~
help: consider importing this struct instead | 4 | use time::OffsetDateTime; | ~~~~
For more information about this error, try rustc --explain E0432. error: could not compile printpdf (lib) due to 5 previous errors `
rustc --explain E0432
printpdf
This was fixed in https://github.com/fschutt/printpdf/commit/3fb349f82f02888ad5afaef9745e1f7c78c1187a use master
WASM is fully supported now.
I have printpdf = "0.7.0" in my Cargo.toml
If I run my Rust binary independently, there are no issues. However, we are building all our services as wasm32-wasi targets.
When I run
cargo build --target wasm32-wasi
I get this issue: Note: I tried adding time = "0.3.34" as well.
Compiling printpdf v0.7.0 error[E0432]: unresolved import
crate::OffsetDateTime` --> /OffsetDateTime
in the roothelp: consider importing this struct instead | 3 | use time::OffsetDateTime; |
~~~~crate::OffsetDateTime
--> /OffsetDateTime
in the roothelp: consider importing this struct instead | 10 | use time::OffsetDateTime; |
~~~~crate::OffsetDateTime
--> /OffsetDateTime
in the roothelp: consider importing this struct instead | 3 | use time::OffsetDateTime; |
~~~~crate::OffsetDateTime
--> /OffsetDateTime
in the roothelp: consider importing this struct instead | 3 | use time::OffsetDateTime; |
~~~~crate::OffsetDateTime
--> /OffsetDateTime
in the roothelp: consider importing this struct instead | 4 | use time::OffsetDateTime; |
~~~~For more information about this error, try
rustc --explain E0432
. error: could not compileprintpdf
(lib) due to 5 previous errors `