Bluespec Language Server: Adapting Rust Analyzer for Bluespec SystemVerilog
Name
chan-martinch-meng-eecs-2025-thesis.pdf
Description
Thesis PDF
Size
1.9 MB
Format
Adobe PDF
Checksum (MD5)
93cc026036021a44aa9e8bc614f3c5a3
Author(s)
Chan, Martin
Advisor(s)
Wachman, Silvina Hanono
Date Issued
May 2025
Publisher
Massachusetts Institute of Technology
Abstract
The Language Server Protocol (LSP) and popularity of VS Code have facilitated the current ubiquity of smart code editing features like hover or goto-definition. These features are powered by language servers, which are programs that perform compiler-like functions at keystroke latency on potentially incomplete code. Mainstream languages like Rust or Python have the large userbases to motivate the creation of bespoke language servers like Rust Analyzer or Pylance. However, smaller languages like Bluespec SystemVerilog, used in computer architecture classes at MIT, often need to make do without a language server. As students come to expect smart code editing features, they may miss the convenience when working with languages like Bluespec. In this thesis, we present a Bluespec Language Server forked from Rust Analyzer. This involved adapting the Rust Analyzer parser, HIR, and other internals to work for Bluespec SystemVerilog. The resulting artifact supports the full suite of typical smart editing features for classroom-grade Bluespec projects and continues to mostly work for industrial-grade projects. We discuss the many changes and challenges required to adapt this language server to work for a different language than it was designed for. Further, to address the current gap in the literature covering language server implementation, we include thorough discussion of the overall system architecture and several important subsystems with significant overlap with Rust Analyzer's internals. Finally, we conclude with a discussion of current limitations of our language server and directions for future work.
MIT Department
Massachusetts Institute of Technology. Department of Electrical Engineering and Computer Science
Terms of Use
In Copyright - Educational Use Permitted
Copyright retained by author(s)
Persistent DSpace Link