holzschu / a-Shell-commands

shell commands, pre-compiled to webAssembly, ready to use in a-Shell
554 stars 21 forks source link

Is it possible to have Pandoc? #4

Closed magbaz closed 3 years ago

magbaz commented 3 years ago

Would be the most important issue to take my workflow from a Mac to an iPad...

holzschu commented 3 years ago

pandoc is coded with Haskell, and I haven't yet found a way to convince the Haskell compiler to compile for webAssembly. It's a highly requested command, but with a highly original programming language.

magbaz commented 3 years ago

Thank you very much for your prompt response. I understand the issue. It’s a great job you’ve done with your application so far. Thank you again.

dsanson commented 3 years ago

The asterius project can now compile pandoc to webassembly. Not sure how close that is to what would be needed for a-shell? https://github.com/tweag/asterius

somelinguist commented 2 years ago

I keep looking into this every few months

Today I played around with this repository: https://github.com/y-taka-23/wasm-pandoc

It uses Asterius to compile an old version of Pandoc to webAssembly for use in the browser.

There is wasm-pandoc.wasm file in the repository, and I can also use Docker to successfully compile it using the instructions in the repo. However, I am not sure what would need to be done to be able to run it in a-Shell, or if it would be possible.

Asterius also provides a demo of Pandoc compiled to webAssembly here:

https://asterius.netlify.app/demo/pandoc/pandoc.html

I couldn’t find the source for the demo, but I did find this issue requesting the source: https://github.com/tweag/asterius/issues/851 The issue does have links to the wasm and js files used in the demo.

As both of these are for use in the browser, again I’m not quite sure what could be done to get either running in a-Shell.