Basically all the things I'd want to have in a perfect compiler, that I am really not going to work on any time soon.
Using tree-sitter for the grammar would be nice because then it would be easy to integrate with Helix or LSP servers.
Have a concrete syntax tree first which then can feed into other tools would probably be better than parsing straight to AST. Apparently tree-sitter gives you one already, so that's nice!
There was a good article I saw recently on Zig's parser and AST (data driven approach) but I can't heckin find it. Ugh.
Incremental parsing/query based architecture as described in the rustc compiler docs is probably a good idea.
Have a strict performance budget and test for regressions.
Good CST libraries in Rust:
rowan
andcstree
. Learn from them.The Austral compiler apparently has an in-memory database for various type and symbol stuffs, which is kinda how incremental compilers seem to be built anyway. Any good reason not to just use sqlite for this? Maybe.
Zig's Grand Bootstrapping Plan: https://github.com/ziglang/zig/issues/853 plenty to learn from there.