Coder Social home page Coder Social logo

Comments (5)

huand avatar huand commented on July 17, 2024 1

as a side note, i guess this regression could be caught with a CI pipeline that also check for wasm32 target compilation

from printpdf.

huand avatar huand commented on July 17, 2024

i also tried without js-sys as i saw it is optional, but i got this new build error:

cargo run --example image --release --features embedded_images --target=wasm32-unknown-unknown --no-default-features

   Compiling printpdf v0.7.0 (/home/hubert/Documents/corners_ws/printpdf)
error[E0599]: no method named `offset` found for reference `&unix_epoch_stub_date::OffsetDateTime` in the current scope
   --> src/document_info.rs:104:23
    |
104 |     let offset = date.offset();
    |                       ^^^^^^ method not found in `&OffsetDateTime`

error[E0277]: the trait bound `u8: From<u32>` is not satisfied
   --> src/document_info.rs:109:9
    |
109 |         u8::from(date.month()),
    |         ^^ the trait `From<u32>` is not implemented for `u8`
    |
    = help: the following other types implement trait `From<T>`:
              <u8 as From<bool>>
              <u8 as From<deranged::ranged_u8::RangedU8<MIN, MAX>>>
              <u8 as From<time::month::Month>>
              <u8 as From<NonZeroU8>>

from printpdf.

huand avatar huand commented on July 17, 2024

So the question is: how to correctly compile for wasm32 target?

from printpdf.

huand avatar huand commented on July 17, 2024

breaking change from bb2645e

from printpdf.

nkhanks avatar nkhanks commented on July 17, 2024

i got the same error ...i just add the follow dependencies and it work ...dont ask me how... it just did

[dependencies]
chrono = "0.4"
wasm-bindgen = "0.2.91"
serde-wasm-bindgen = "0.6.3"
serde_bytes = "0.11.9"

from printpdf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.