gleam-lang / suggestions

📙 A place for ideas and feedback
26 stars 2 forks source link

Split compiler into lib+bin pair #93

Open adituv opened 3 years ago

adituv commented 3 years ago

This would make it possible to pull in gleam as a library when developing language tools in Rust, without having to bundle it directly into the gleam executable. For example, a separate language server.

I have done this in a very hacky way without much thought in my lib-refactor branch but this almost certainly moves too much functionality into the library.

lpil commented 3 years ago

I expect we will want to do this in future though I wish to avoid doing this until we can offer a stable compiler API. Currently there is no guarentee of API compatibility between versions so we don't want to make changes that would imply there is.

For LSP specifically the intention is for the compiler to support it directly (#180) so we could merge that in to ensure compatibility.

I'll transfer this to the suggestions repo as it's not actionable yet.