Gunyah DSL
Language support for the domain-specific languages used by the
Gunyah hypervisor. The extension
works in Visual Studio Code and compatible desktop editors such as Cursor.
Features
| File |
Language support |
.tc |
Typed DSL: types, objects, structures, unions, bitfields, and enumerations |
.hvc |
Hypercall DSL: hypercall declarations and ABI types |
.ev |
Events DSL: modules, interfaces, event publishers, subscribers, and handlers |
The extension provides:
- TextMate syntax highlighting and language-aware bracket/comment behavior.
- Go to Definition with Ctrl+Click or F12.
- Hover summaries for indexed definitions.
- Find All References with event and local-parameter scoping.
- Document symbols with Ctrl+Shift+O / Cmd+Shift+O.
- Navigation from
handler and unwinder entries to matching C functions.
- Navigation from
include <header.h> entries to workspace headers.
- Live index refresh when DSL, C, or header files change.
Installation
Visual Studio Code Marketplace
Open Extensions in VS Code, search for Gunyah DSL, and select Install. The
listing will become available with the first public release.
Cursor and Open VSX
Open Extensions in Cursor and search for Gunyah DSL. Cursor obtains standard
VS Code extensions from Open VSX; the listing will become available after the
same release VSIX is published there.
Install a VSIX
Download gunyah-dsl-<version>.vsix from
GitHub Releases, then run
Extensions: Install from VSIX... from the Command Palette.
The equivalent command-line forms are:
code --install-extension gunyah-dsl-0.3.0.vsix
cursor --install-extension gunyah-dsl-0.3.0.vsix
Navigation
In .tc, .hvc, and .ev files, use Ctrl+Click (Cmd+Click on macOS) or F12:
object thread, type cap_id_t, and enumeration error resolve to matching
define / extend declarations.
subscribe event_name resolves to the matching event publisher.
- Explicit
handler / unwinder names resolve to matching C functions.
include <header.h> resolves to workspace headers.
Shift+F12 finds references. Event names are limited to publisher/subscriber
headers, while event parameters are limited to the corresponding event context.
Comments and quoted strings are excluded.
Remote and web support
Gunyah DSL is a workspace extension. It runs alongside workspace files in local
VS Code/Cursor windows, Remote SSH sessions, Dev Containers, WSL, and
Codespaces.
The extension currently has a Node.js entry point and does not support a purely
browser-hosted vscode.dev or github.dev workspace without a remote extension
host.
Privacy and security
The extension does not collect telemetry, contact network services, execute
workspace commands, or send source code outside the editor. It reads supported
workspace files only to provide highlighting and navigation.
Development
The release toolchain requires Node.js 20 or newer.
npm install
npm run check
npm test
npm run package:vsix
Useful local installation commands:
./install.sh --code
./install.sh --cursor
./install.sh --pack-only
Packaging uses the official @vscode/vsce tool. Generated .vsix files and
node_modules are intentionally excluded from Git.
Known limitations
- Definitions are indexed with lightweight, Gunyah-specific parsing rather than
a full compiler front end.
- Workspace discovery is capped at 4,000 DSL files and 2,000 C/header files to
protect the extension host in unusually large monorepos.
- C function discovery follows the formatting used by the Gunyah source tree;
unusual generated declarations or macro-only definitions might not resolve.
Contributing
Bug reports and focused pull requests are welcome. See
CONTRIBUTING.md for the development and validation workflow.
中文说明
本扩展为 Gunyah hypervisor 的 .tc、.hvc 和 .ev DSL 提供语法高亮、
定义跳转、悬停信息、引用查找及当前文件符号。它支持 VS Code、Cursor、
Remote SSH 和 Dev Container,不收集遥测,也不会将工作区源码发送到网络。
安装公开版本后,可分别在 VS Code Marketplace 和 Cursor 的 Open VSX
扩展列表中搜索 Gunyah DSL;也可以从 GitHub Release 下载同一份 VSIX
离线安装。
License
BSD 3-Clause License. See LICENSE.