Skip to content

intel/dml-language-server

DML Language Server (DLS)

The DLS provides a server that runs in the background, providing IDEs, editors, and other tools with information about DML device and common code. It currently supports basic syntax error reporting, symbol search, 'goto-definition', 'goto-implementation', 'goto-reference', and 'goto-base'. It also has some basic configurable linting support, in the form of warning messages.

Future planned features are extended semantic and type analysis, basic refactoring patterns, improved language construct templates, renaming support, and more.

Do note that the DLS only supports DML 1.4 code, and there are no plans to extend this functionality to support DML 1.2 code. It can only perform analysis on files declared as using DML 1.4 version.

Building

Simply run "cargo build --release" in the checkout directory.

Running

The DLS is built to work with the Language Server Protocol, and as such it in theory supports many IDEs and editors. However currently the only implemented language client is the Simics Modeling Extension for Visual Studio Code, which is not yet publicly available.

See clients.md for information about how to implement your own language client compatible with the DML language server.

DML Compile Commands

The DML compile commands file is used by the language server in order to obtain per-module information used to resolve imports and obtain relevant command-line DMLC flags for specific devices.

Commonly this will be auto-generated by the CMake indexing in your Simics project (you may need to specify the environment variable "CMAKE_EXPORT_COMPILE_COMMANDS=1" before invoking cmake), but it is possible to construct such a file by hand if absolutely neccessary. It is a json file with the following format:

{
  <full path to device file>: {
    "includes": [<include folders as full paths>],
    "dmlc_flags: [<flags passed to dmlc invocation>]
  },
  ... <more device paths>
}

This will add the include folders specified when analysing files included, directly or indirectly, from the specified device file.

About

No description, website, or topics provided.

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages