|
|
|
Show HN: Fast VHDL language server written in Rust
(github.com)
|
|
3 points
by okraigher
1230 days ago
|
|
I want to share a VHDL language server I have written in Rust. It is now in a really good state and is ready to be the daily driver for someone working on VHDL. It is completely free and open source, enjoy! The performance is great, it can load 200k lines in 200ms using all 8-cores on my desktop. When loaded it only consumes 220 MB of RAM. It supports goto/find-references as well as type checking for close to all of VHDL-2008. |
|
The declarations in each design unit are allocated in their own arena allocator. The declarations in one design unit can link to other design units and even create circular references for implicit functions which usually reference the parent type. The reference are direct without having to use the atomic reference counted type Arc. This is because the units are analyzed in dependency order and a dependent unit gets a read-only view of the arena of its dependencies to create direct references.
When the user types in the editor the language server will invalidate the modified design unit and any dependencies and just re-analyze those so it is even faster when used interactively then when starting up the first time. Since invalidating a design unit invalidates all dependencies the segmented arena structure described above cannot create dangling pointers.