Considering a rewrite, possibly in another language.
In order to handle future distribution in the form of an addon, I will simply build binaries for all relevant architectures, and include all of them in the addon package. Barring this, people will have to build themselves with stack, but I will endeavor to ensure that is never necessary. There will be a microwrapper python program that only exists to detect the platform architecture and call the relevant Haskell executable.
It is very possible to build portable binaries for macOS, Linux, and Windows via stack in CI, and indeed there have been lengthy discussions on the topic.
The work on sql-parser will not have gone to waste, because we have proven that we don't need the anki python package for nearly as much as I thought. In particular, the clone and pull commands can absolutely be written using only sqlite-simple and a custom parser analogous to the one we wrote in Lark to parse the output of sqldiff. I think it may even be possible to do the entirety of the push operation without relying on calling functions from anki. We'll be reimplementing a tiny portion of the rust backend, but I believe it will be fairly simple.
To be continued...
Considering a rewrite, possibly in another language.
In order to handle future distribution in the form of an addon, I will simply build binaries for all relevant architectures, and include all of them in the addon package. Barring this, people will have to build themselves with
stack, but I will endeavor to ensure that is never necessary. There will be a microwrapper python program that only exists to detect the platform architecture and call the relevant Haskell executable.It is very possible to build portable binaries for macOS, Linux, and Windows via
stackin CI, and indeed there have been lengthy discussions on the topic.The work on
sql-parserwill not have gone to waste, because we have proven that we don't need theankipython package for nearly as much as I thought. In particular, thecloneandpullcommands can absolutely be written using onlysqlite-simpleand a custom parser analogous to the one we wrote inLarkto parse the output ofsqldiff. I think it may even be possible to do the entirety of thepushoperation without relying on calling functions fromanki. We'll be reimplementing a tiny portion of the rust backend, but I believe it will be fairly simple.To be continued...