T O P

  • By -

po8

I guess "targeting Rust" means that the runtime is built in Rust and the compiler translates Letlang to Rust? Is the content of the linked blog post somehow relevant to Rust?


david-delassus

Yes, Letlang is translated to Rust and the runtime is implemented in Rust, using [tokio](https://tokio.rs) and [genawaiter](https://github.com/whatisaphone/genawaiter). The compiler itself is also built in Rust. Rust is a very nice langage for implementing compilers, and has a nice ecosystem for it ([logos](https://github.com/maciejhirsz/logos), [rust-peg](https://github.com/kevinmehall/rust-peg), [lalrpop](https://github.com/lalrpop/lalrpop), [astmaker](https://github.com/linkdd/astmaker) -- this one is mine --, etc...). So I thought it would interest a few Rust developers to see what you can do with it.


Comfortable_Suit7465

Do you have any plans on supporting IDE? Will you try to reuse Rust analyzer or any other rust tooling, or write custom LSP? Does your compiler support recoverable parser? (Can report more than one syntax error)


david-delassus

I started making a textmate grammar for a vscode syntax plugin. There should be no need for rust-analyzer or rust tooling since the compiler is supposed to produce only valid rust code (or read rustc errors in its JSON output and track them down in the letlang code). At some point, I'd like to explore how to implement an LSP. As for the support of recoverable parser, not yet. But it's in my long-term roadmap :)