Qubic QPI
Standalone language support for Qubic QPI contracts.
Features
- C++ completion, hover, signature help, and navigation through clangd
- Live compiler, QPI rule, and IDL diagnostics
- IDL hover for registered functions and procedures
- Quick fixes for supported QPI violations
- Completion and diagnostics for
contract_testing.h test files
- Automatic cross-contract completion from the configured Main contract and
contracts/**/*.h
The extension bundles the Qinit compiler frontend and ships its pinned QPI and C++ headers. Qinit,
core-lite, a node, and the WASI compiler are not required.
Install
Install it from the Marketplace, or run qinit ext install with the Qinit CLI.
The clangd extension is installed as a dependency. It may offer to download clangd once if the
language server is not already available.
Usage
Open a folder containing a QPI contract header. A contract is recognized by a struct or class
that inherits from ContractBase; unrelated C++ headers are ignored.
For test files, the extension finds the contract from:
- An optional
qinit.json contract path
INIT_CONTRACT(Type) or ContractTestingType
- The only QPI contract in the folder
It does not guess when multiple contracts remain possible.
For a Qinit project, the extension follows cross-contract calls from the Main contract configured in
qinit.json. Custom callees are discovered under contracts/, assigned deterministic editor-only
slots, and never deployed. coreDir selects the Core headers and slot layout; clangd still uses the
WASI sysroot bundled with the extension.
The extension creates .clangd when the folder does not already own one. Existing .clangd and
explicit C/C++ extension settings are preserved.
Scope
Build, verification, deployment, calls, and node operations stay in the Qinit CLI:
qinit verify
qinit build
qinit deploy
The extension does not launch Qinit or connect to a node.