printpdf
printpdf copied to clipboard
Error building as wasm32-wasi target
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--> /<userdir>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/printpdf-0.7.0/src/document_info.rs:3:5 | 3 | use crate::OffsetDateTime; | ^^^^^^^^^^^^^^^^^^^^^ no
OffsetDateTime` in the root
|
help: consider importing this struct instead
|
3 | use time::OffsetDateTime;
| ~~~~~~~~~~~~~~~~~~~~
error[E0432]: unresolved import crate::OffsetDateTime
--> /OffsetDateTime
in the root
|
help: consider importing this struct instead
|
10 | use time::OffsetDateTime;
| ~~~~~~~~~~~~~~~~~~~~
error[E0432]: unresolved import crate::OffsetDateTime
--> /OffsetDateTime
in the root
|
help: consider importing this struct instead
|
3 | use time::OffsetDateTime;
| ~~~~~~~~~~~~~~~~~~~~
error[E0432]: unresolved import crate::OffsetDateTime
--> /OffsetDateTime
in the root
|
help: consider importing this struct instead
|
3 | use time::OffsetDateTime;
| ~~~~~~~~~~~~~~~~~~~~
error[E0432]: unresolved import crate::OffsetDateTime
--> /OffsetDateTime
in the root
|
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
`