Standard interface for alternative backends (compilation targets) #3352
Replies: 3 comments 10 replies
-
Making compiler public compiler APIs would be a much larger maintenance burden than the two existing backends. We have little developer time and very little money to spend here, so unless we get significantly more funding or complete all higher impact work then this is not something that we can do. |
Beta Was this translation helpful? Give feedback.
-
So, @lpil, the TL;DR seems to be: your take is that Gleam should only support backends that are part of the project itself, and unofficial backends should fork the compiler; having more official backends is desirable but a future work. Did I get it close? |
Beta Was this translation helpful? Give feedback.
-
Hi, I'd like to provide my two cents on this. Having Gleam support compiling to extra targets (invoking 3rd-party compilers or providing APIs), as well as upstreaming those in any way, has already been discussed, and it likely won't happen. However, one particular pain point right now is that extra targets very much need an extra value for This makes me wonder if we can improve this situation. One solution I thought of: what if we allowed specifying an |
Beta Was this translation helpful? Give feedback.
-
Gleam currently compiles to Erlang or JavaScript, officially, but there is an unofficial Nix backend that forks the whole compiler, and there are interests for C/C++ targets, Go Lang, and WASM target.
It would be nice if the implementation of a compilation backend can be separated from the rest of the compiler, so these efforts can be parallelized and the Gleam project does not necessarily have to maintain all of them.
Hope this helps,
Steven Hé (Sīchàng)
Beta Was this translation helpful? Give feedback.
All reactions