Pandoc WASM #10387
Replies: 7 comments 39 replies
-
|
It's too bad Lua filters don't work yet. This makes it less useful. I experimented with it briefly using the iOS app a-Shell. I copied the URL of |
Beta Was this translation helpful? Give feedback.
-
|
@TerrorJack this is amazing! I'm wondering whether we should explore modifying the main pandoc repo with a wasm build configuration, so that a separate fork is not needed -- perhaps with CPP conditionals. Do you think this would be worthwhile? |
Beta Was this translation helpful? Give feedback.
-
|
Looking at this again. I'd love to make some changes that would make pandoc easy to compile to wasm. For reference, here are the changes @TerrorJack had to make to the pandoc code: main...haskell-wasm:pandoc:wasm @TerrorJack has the situation changed much since 2024? Would we still need a long cabal.project with special flags for these various dependencies, and in many cases forks? Or have we gotten to the point where most of the dependencies don't need special treatment? |
Beta Was this translation helpful? Give feedback.
-
|
I have put some work into this. See the @TerrorJack, currently the playground only works for text formats (you can't produce or read a docx, for example). If you try to produce a binary format, you get the output "Type error" -- I'm not sure where this is coming from exactly, and I don't know if it's a limitation in pandoc.wasm or just in the JS interface. But it would be good to have an interface capable of handling binary formats. One thought I had is that we could have the pandoc.wasm interface read and write MIME. |
Beta Was this translation helpful? Give feedback.
-
|
@TerrorJack if you have time to have a quick look We're using this flake to get access to ghc-wasm-meta: To trigger building with Lua it's sufficient to change |
Beta Was this translation helpful? Give feedback.
-
|
Is https://pandoc.org/wasm-demo broken today ? It spins forever at "Loading pandoc.wasm..." for me. |
Beta Was this translation helpful? Give feedback.
-
|
I'm forwarding three of the responses that the announcement post on Mastodon received:
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
For those interested: @TerrorJack successfully compiled pandoc to WASM via ghc-wasm-meta.
Fantastic work!
Beta Was this translation helpful? Give feedback.
All reactions