compiler
compiler copied to clipboard
Usecase: elmsl (Elm to Rust serverless apps)
Hi, I'm looking forward to use parts of your libraries (AST, type infer, optimize) to implement my elmsl compiler (elm serverless), which will be implemented in rust and create rust code.
@tamagottschi what I read from this is that in addition to the AST, type inference and optimizations being exposed it would be good to have some kind of encoder / serializer for the AST, possibly to JSON? Would your tool consume that, or rather the resulting Elm source code? (In that case we would need an Elm emitter 😅 which is a good idea anyway probably.)
After talking in person at Elm Europe 2019, I understand this as:
- parts of
elm-in-elmwould be reimplemented inelmslin Rust itself (the parts that are missing inelmsl) -elm-in-elmwould be used as a reference implementation to look into; not used directly - in future
elm-in-elmwould compile itself into Rust :question: I'm a bit fuzzy about this one. (That would needStage.Emit.Rust.emitExpretc which doesn't exist right now)
So the answer to the JSON question is: no that is not needed.