Open thecodrr opened 7 months ago
Interesting. Thanks for posting this. Didn't know about Taffy. I see it's written in rust. Is there a wasm port published somewhere so I can test?
@nicoburns is working on a WASM build here: https://github.com/DioxusLabs/taffy/pull/394/
Will try to be on the loop and try it out once available
Currently working out how best to package/publishing as a module is the blocker for this. Does react-pdf need to run it's layout (so Yoga/Taffy) in both node and browsers? And if so, how are you abstracting away the differences? Rollup?
Thanks for reaching out @nicoburns ! Yes, we run it in both node and browser. Particularly yoga does not need any abstraction to run in both, but several packages of this repo do, and we use rollup for building different versions for each platform
Yoga is fine but it only supports Flex layout whereas Taffy has now added support for Flex, Block & Grid layouts with more on their TODO list. I think react-pdf will greatly benefit from the migration.