Greetings!
I would like to share with you my project, Lady Deirdre.
Developing a standalone language compiler and interpreter in Rust is not as difficult as it may seem. There are many excellent tools in the Rust ecosystem for this purpose (e.g., nom or chumsky), and creating such a program manually is also an option. However, building a comprehensive code editor extension with features like code completion, jump-to-symbol definitions/usages, inlay type hints, and other functionalities that require a deep understanding of incomplete and dynamically evolving source code is a challenging problem. Programming language authors usually leave this task for a later stage, making it nearly impossible to build such a code analyzer on top of an existing compiler architecture. Lady Deirdre addresses this issue by helping you create a hybrid application with a unified architecture capable of acting as both a language compiler/interpreter and a code editor extension (LSP server) from day one.
Lady Deirdre is an infrastructure framework designed for authors of new (primarily scripting) programming languages. It provides a toolset to create a lexical scanner, syntax parser, and semantic analyzer for source code files. The framework creates in-memory representations of files, including their text, lexis, syntax, and semantics, and incrementally updates this metadata when the end-user changes the codebase in real-time. This process is error-resistant and specifically designed to infer as much semantic metadata as possible from an incomplete source code state at each point in the code's evolution.
The framework includes several other useful components that you may need to create a full-featured compiler infrastructure and a language server, such as components to develop source code formatters and to organize multi-threaded concurrent programs capable of managing simultaneous semantic analysis tasks.
In principle, a similar infrastructure can be built using existing tools from the Rust ecosystem. For example, Rowan, Tree-Sitter, Ropey, and Salsa together can provide a comparable toolset. However, Lady Deirdre aims to offer a unified framework API that guides you through the steps of programming language development.
I benchmarked individual features of Lady Deirdre against some well-known tools from the Rust ecosystem. My framework demonstrated better computational performance characteristics than Tree-Sitter in both non-incremental and incremental modes on files of average size (~2000 lines of code). In some other tests, more specialized libraries outperformed Lady Deirdre. But overall, Lady Deirdre provides fine computational performance, at least based on my benchmark tests.
I'll be glad to answer any questions.
Ilya