Skip to content

Instantly share code, notes, and snippets.

@mcasperson
Last active December 3, 2020 07:49
Show Gist options
  • Save mcasperson/11315910 to your computer and use it in GitHub Desktop.
Save mcasperson/11315910 to your computer and use it in GitHub Desktop.
Pandoc Emscripten
Add this to Ghc-Options in pandoc.cabal
-fllvm -keep-llvm-files -fforce-recomp
./emcc <all *.ll files> -o pandoc.js
emcc ./src/Text/Pandoc.ll ./src/Text/Pandoc/Compat/TagSoupEntity.ll ./src/Text/Pandoc/Compat/Monoid.ll ./src/Text/Pandoc/XML.ll ./src/Text/Pandoc/Writers/ICML.ll ./src/Text/Pandoc/Writers/FB2.ll ./src/Text/Pandoc/Writers/Man.ll ./src/Text/Pandoc/Writers/EPUB.ll ./src/Text/Pandoc/Writers/RST.ll ./src/Text/Pandoc/Writers/Docbook.ll ./src/Text/Pandoc/Writers/Org.ll ./src/Text/Pandoc/Writers/Markdown.ll ./src/Text/Pandoc/Writers/HTML.ll ./src/Text/Pandoc/Writers/ConTeXt.ll ./src/Text/Pandoc/Writers/Docx.ll ./src/Text/Pandoc/Writers/Texinfo.ll ./src/Text/Pandoc/Writers/MediaWiki.ll ./src/Text/Pandoc/Writers/Native.ll ./src/Text/Pandoc/Writers/Shared.ll ./src/Text/Pandoc/Writers/OpenDocument.ll ./src/Text/Pandoc/Writers/ODT.ll ./src/Text/Pandoc/Writers/Custom.ll ./src/Text/Pandoc/Writers/OPML.ll ./src/Text/Pandoc/Writers/RTF.ll ./src/Text/Pandoc/Writers/AsciiDoc.ll ./src/Text/Pandoc/Writers/LaTeX.ll ./src/Text/Pandoc/Writers/Textile.ll ./src/Text/Pandoc/ImageSize.ll ./src/Text/Pandoc/SelfContained.ll ./src/Text/Pandoc/UTF8.ll ./src/Text/Pandoc/Options.ll ./src/Text/Pandoc/MIME.ll ./src/Text/Pandoc/Shared.ll ./src/Text/Pandoc/Highlighting.ll ./src/Text/Pandoc/Process.ll ./src/Text/Pandoc/Parsing.ll ./src/Text/Pandoc/Readers/RST.ll ./src/Text/Pandoc/Readers/Org.ll ./src/Text/Pandoc/Readers/Markdown.ll ./src/Text/Pandoc/Readers/HTML.ll ./src/Text/Pandoc/Readers/MediaWiki.ll ./src/Text/Pandoc/Readers/Native.ll ./src/Text/Pandoc/Readers/TeXMath.ll ./src/Text/Pandoc/Readers/Haddock.ll ./src/Text/Pandoc/Readers/DocBook.ll ./src/Text/Pandoc/Readers/OPML.ll ./src/Text/Pandoc/Readers/LaTeX.ll ./src/Text/Pandoc/Readers/Textile.ll ./src/Text/Pandoc/Pretty.ll ./src/Text/Pandoc/Slides.ll ./src/Text/Pandoc/Asciify.ll ./src/Text/Pandoc/UUID.ll ./src/Text/Pandoc/Templates.ll ./src/Text/Pandoc/PDF.ll ./dist/build/Text/Pandoc/Readers/Haddock/Lex.ll ./dist/build/Text/Pandoc/Readers/Haddock/Parse.ll ./dist/build/autogen/Paths_pandoc.ll -o pandoc.js
@CoolOppo
Copy link

Thanks, this is useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment