Your reply is really informative which did help me with the implementation. Sorry for my late text reply.
Now after some investigations, I think I have realized and is encountering the FFI problems you mentioned.
Whenever a library uses the FFI, if you want to use that library with your backend, you’ll need to write code equivalent to the JavaScript FFI code in your target language; quite a lot of libraries use the FFI so this can be quite a big task. Additionally, some of those uses of the FFI do rely on JavaScript specific behaviour, in which case it can be less clear what to do. For example, Aff
is based to a large extent on JavaScript’s single-threaded event loop model. You’ll have to use your judgement.
I found so many tasks to do, even for the most essential library prelude
. I also realized this is actually a larger thing than the bare backend implementation, thus now I got stuck.
I wonder if you or other people have any idea about addressing the FFI problems.
I used to think if I can gather many people to write FFI python files (when possible for a library) for most existing purescript libraries, problems will get solved.
However this approach is quite difficult, and an implicit drawback is, this way just aggravates the design/motivations for people to make new backends in the future, because they may come up with better solutions to unify the FFI use for all backends, and in this case they will suffer from worse backward compatibility issues.
Another idea occurred to me is, just drop the libraries that require JS FFI. This will be painful, because certainly a larget number of libraries will not be supported by purescript-python, and it seems extremely difficult to test if a purescript ibrary should be rejected by specific backends, e.g., purescript-python.
I guess I’m in trouble. Thanks for any suggestions.