Skip to main content
Archived

This project has been archived by its maintainers, and is no longer receiving any updates.

vsg-rs

CI Documentation PyPI License

Catch it earlier. Earlier than simulation.

A VHDL formatter and linter in Rust. Every bug has a price that goes up the longer it takes to find: a moment in your editor, a coffee in CI, an afternoon in a waveform viewer, a respin on silicon. vsg-rs moves what it can to the cheap end of that scale: the moment you save the file.

Some of what it reports a simulator would have told you eventually: an index outside its array, a value outside its subtype, a process that can never suspend. Eventually means after you have written the testbench, elaborated the design and waited for the run, and only if the run reaches that line. Some of it no simulator will ever tell you, because the design elaborates perfectly well and simply does not mean what it says.

It runs the rule set, command line and configuration of the VHDL Style Guide (VSG), adds a formatter that fixes what it reports, and adds a lint layer that VSG has no equivalent of.

A default lint run reports definite errors only: things that cannot work, rather than things worth a look. Everything that depends on what you meant is one line of configuration away.

Status: beta. The style layer implements VSG 3.35's rule set and is tested against more than 11,000 real-world files; expect layout changes before 1.0. The lint layer (vsg-rs lint) is newer and its rule set is still growing.

Install

pip install vsg-rs            # Linux, Windows and macOS wheels, Python 3.10+
uv tool install vsg-rs        # or
cargo install --path .        # from source (Rust 1.95 or newer)

Standalone binaries for Linux (static, x86_64 and aarch64), Windows (x64 and arm64) and macOS (arm64 and x86_64) are attached to each release, with a SHA256SUMS file.

Everything VSG accepts, unchanged

vsg-rs -f src/*.vhd -c vsg.yaml --fix

The arguments, the configuration file, the reports and the exit codes are VSG's, and VSG documents them. Existing scripts and CI jobs keep working, so this README covers only what vsg-rs adds on top. Differences are listed in compatibility.

What vsg-rs adds

A real formatter. Source is parsed once into a lossless syntax tree and printed in one canonical layout, like rustfmt or Black. Every layout rule is fixed rather than reported, long lines are folded at structural boundaries, and running --fix twice changes nothing. All violations are reported at once and fixed in a single pass: no repeated runs, no rule-order dependencies.

Safety. Formatted output is re-parsed and must contain exactly the same tokens and comments; files with syntax errors are never changed. Fixes VSG does not apply by default need --unsafe_fixes.

Speed. Real-world VHDL is checked at about 3.4 MB/s on one core, in parallel worker processes.

Beyond style: vsg-rs lint

Rules that need names resolved, which a per-file style checker cannot do:

vsg-rs lint --recursive src                  # the lint layer
vsg-rs --recursive src --check style,lint    # both in one run
lint_600 -- Signal 'flag' is not assigned on every path of this combinational process,
            which infers a latch
lint_601 -- Signal 'result' is assigned by 2 concurrent statements (lines 34, 38)
lint_001 -- The signal 'b' is not read in the sensitivity list (first read at line 10)

Sensitivity lists, unused declarations, latch inference, multiple drivers, combinational loops, state machines, vector widths, clock-domain crossings, and the type and name diagnostics of a real front end. Every rule states the evidence behind it and reports nothing when that evidence is missing.

Most of these resolve names across files, which needs a library map. Without one they are skipped, and the run says so. See static analysis and project setup.

Adopting a rule set on existing code

vsg-rs --recursive src --generate_waivers waivers.yaml   # accept what exists today
vsg-rs --recursive src --waivers waivers.yaml            # from now on, only new violations

Waivers record a rule, a file glob, lines and a reason, and never affect the exit code.

Options vsg-rs adds

Option Meaning
lint, --check style,lint run the lint layer, or both layers
--lint_configuration FILE (-lc) configuration for the lint layer only
--waivers, --generate_waivers, --show_waived accept known violations
--unsafe_fixes also apply fixes VSG does not apply by default; review the result
--diff with --fix, print a unified diff instead of changing files
--range START:END with --fix, change only these lines
--stdin_filename PATH name of the --stdin input, for configuration lookup and reports
--sarif FILE SARIF 2.1.0, for GitHub code scanning
--sonarqube FILE SonarQube generic issue JSON
--recursive check the VHDL files in directories and their subdirectories
--list_rules, --statistics what each rule is, and how often each fired

Configuration keys vsg-rs adds live under a vsg_rs: block: reflow_comments, testbench_files, testbench_libraries, synchronizers, and a rule: block per kind of file.

Editors and coding agents

Two servers over stdio, both the same engine as the command line, so everything is told the same thing about the same file under the same configuration.

vsg-rs lsp                        # a language server: diagnostics, formatting, quick fixes
vsg-rs mcp                        # an MCP server, for a coding agent

The language server is meant to run beside vhdl_ls rather than instead of it, and advertises only what vsg-rs is: it answers no completion, hover or definition request. A VS Code extension ships it.

The MCP server gives a coding agent three tools, lint, format and explain_rule:

claude mcp add vsg-rs -- vsg-rs mcp
{ "mcpServers": { "vsg-rs": { "command": "vsg-rs", "args": ["mcp"] } } }

lint and format take a file path or a buffer. A buffer is how an agent checks what it is about to write before writing it, which is one step earlier still; format with write fixes a file in place without moving it through the conversation.

For Claude Code there is a plugin, which installs a vsg skill and registers the MCP server:

/plugin marketplace add ru551n/vsg-rs
/plugin install vsg-rs@vsg-rs

The skill tells an agent to format and check VHDL before committing it, how to read a finding's class, and not to treat a run that skipped the library map as a clean file. vsg-rs itself still has to be on PATH.

CI

A GitHub Action posts annotations and suggested changes; GitLab CI gets the code-quality report, and SonarQube the generic issue JSON. Jenkins reads the SARIF file through Warnings-NG. Every report format works anywhere.

- uses: ru551n/vsg-rs@v0.11.0
  with:
    args: --recursive src

Documentation

vsg-rs.readthedocs.io: what vsg-rs adds on top of VSG. The rules, their options and the configuration file are VSG's own and are linked to rather than repeated.

Relationship to VSG

vsg-rs is an independent Rust implementation of a VHDL formatter and style checker that aims for compatibility with the rules and configuration of the VHDL Style Guide (VSG). It is not affiliated with, endorsed by, or maintained by the VHDL Style Guide project or its maintainers.

vsg-rs was inspired by the VHDL Style Guide (VSG) project by Jeremiah Leary and contributors. vsg-rs contains no VSG code; VSG is used only as a behavioural reference.

Every release states the VSG version it targets, and vsg-rs --version prints it.

Contributing

See CONTRIBUTING.md for the build, test and corpus commands, how compatibility is measured, and what CI runs.

Licence

Either Apache License, Version 2.0 or MIT, at your option. Third-party dependencies are listed in THIRD_PARTY_LICENSES.md and in NOTICE; the VHDL parser, vhdl_syntax from the rust_hdl project, is MPL-2.0 and is used as an unmodified dependency.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in vsg-rs, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Metadata

Release files for vsg-rs 0.11.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vsg-rs 0.11.0
File Size Uploaded Provenance Actions
vsg_rs-0.11.0.tar.gz 713.1 kB With provenance Details for vsg_rs-0.11.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for vsg-rs 0.11.0
File Actions
vsg_rs-0.11.0-py3-none-win_arm64.whl Python 3 none Windows ARM64 Details for vsg_rs-0.11.0-py3-none-win_arm64.whl
vsg_rs-0.11.0-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for vsg_rs-0.11.0-py3-none-win_amd64.whl
vsg_rs-0.11.0-py3-none-musllinux_1_2_x86_64.whl Python 3 none Linux musl 1.2+ x86-64 Details for vsg_rs-0.11.0-py3-none-musllinux_1_2_x86_64.whl
vsg_rs-0.11.0-py3-none-musllinux_1_2_aarch64.whl Python 3 none Linux musl 1.2+ ARM64 Details for vsg_rs-0.11.0-py3-none-musllinux_1_2_aarch64.whl
vsg_rs-0.11.0-py3-none-manylinux_2_28_x86_64.whl Python 3 none Linux glibc 2.28+ x86-64 Details for vsg_rs-0.11.0-py3-none-manylinux_2_28_x86_64.whl
vsg_rs-0.11.0-py3-none-manylinux_2_28_aarch64.whl Python 3 none Linux glibc 2.28+ ARM64 Details for vsg_rs-0.11.0-py3-none-manylinux_2_28_aarch64.whl
vsg_rs-0.11.0-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for vsg_rs-0.11.0-py3-none-macosx_11_0_arm64.whl
vsg_rs-0.11.0-py3-none-macosx_10_12_x86_64.whl Python 3 none macOS 10.12+ x86-64 Details for vsg_rs-0.11.0-py3-none-macosx_10_12_x86_64.whl

Total release size: 34.8 MB

Release files / vsg_rs-0.11.0.tar.gz

Download URL vsg_rs-0.11.0.tar.gz
Size 713.1 kB
Tags Source
SHA-256 checksum
How to use checksums
b335791950999918509c1e016cdbc22db60328753b71394bbcb3c13895b8c188
BLAKE2b-256 checksum
How to use checksums
13ab7587a11d9c316b7a17e8d21678b69e8993097f35cc4f88115ac4708c77bc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 21, 2026.

Transparency log

Release files / vsg_rs-0.11.0-py3-none-win_arm64.whl

Download URL vsg_rs-0.11.0-py3-none-win_arm64.whl
Size 4.2 MB
Tags Python 3 Windows ARM64
SHA-256 checksum
How to use checksums
345f231573011457a75e07abe64ac05e0031c3b7f02b29898173e4e5b932fb6d
BLAKE2b-256 checksum
How to use checksums
01fd80205111c9485560c3913de15a2b021e0f2b499d2e6975af65c0f950d8c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 21, 2026.

Transparency log

Release files / vsg_rs-0.11.0-py3-none-win_amd64.whl

Download URL vsg_rs-0.11.0-py3-none-win_amd64.whl
Size 4.6 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
121cc9629bf5885c4aac3278614f472acbb4a33fd482093371922f93bdcee012
BLAKE2b-256 checksum
How to use checksums
507521badb77756ebbe3dce5311d49e8a84a7ab378fe114c4045350b4275317c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 21, 2026.

Transparency log

Release files / vsg_rs-0.11.0-py3-none-musllinux_1_2_x86_64.whl

Download URL vsg_rs-0.11.0-py3-none-musllinux_1_2_x86_64.whl
Size 4.5 MB
Tags Linux musl 1.2+ x86-64 Python 3
SHA-256 checksum
How to use checksums
94c3bc6c9f3abfb579394cb4b0659635865c1870e64d7b7d833122637787522c
BLAKE2b-256 checksum
How to use checksums
e4083277a63ac93be5622d89a36592df75137f46c2ef5915d2948a64beab1536
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 21, 2026.

Transparency log

Release files / vsg_rs-0.11.0-py3-none-musllinux_1_2_aarch64.whl

Download URL vsg_rs-0.11.0-py3-none-musllinux_1_2_aarch64.whl
Size 4.1 MB
Tags Linux musl 1.2+ ARM64 Python 3
SHA-256 checksum
How to use checksums
c89d92e6a57f82f620f038d77b7cb294649933323aa79769c67f0b49364060ec
BLAKE2b-256 checksum
How to use checksums
6600314c375d5c81bb6f410820313d55083915bc1d150e5fb85b57c95927565d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 21, 2026.

Transparency log

Release files / vsg_rs-0.11.0-py3-none-manylinux_2_28_x86_64.whl

Download URL vsg_rs-0.11.0-py3-none-manylinux_2_28_x86_64.whl
Size 4.4 MB
Tags Linux glibc 2.28+ x86-64 Python 3
SHA-256 checksum
How to use checksums
d2e5ba3aff4520053bb67333ff50272548472a62a5dcdfe2d89b35f3e3e6d0f7
BLAKE2b-256 checksum
How to use checksums
84f4dae157e90e61ca86ced09a0b42338f41fbae63017b0ed5913b758c3feb74
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 21, 2026.

Transparency log

Release files / vsg_rs-0.11.0-py3-none-manylinux_2_28_aarch64.whl

Download URL vsg_rs-0.11.0-py3-none-manylinux_2_28_aarch64.whl
Size 4.1 MB
Tags Linux glibc 2.28+ ARM64 Python 3
SHA-256 checksum
How to use checksums
c52a825fed6172994a6fc29066cb8590296088d9677574957d725ac1d46b1aea
BLAKE2b-256 checksum
How to use checksums
36ef685c2c64e9b8c3877b7d864f50526fa897111a5b7cd4b3f36b2d720f3e90
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 21, 2026.

Transparency log

Release files / vsg_rs-0.11.0-py3-none-macosx_11_0_arm64.whl

Download URL vsg_rs-0.11.0-py3-none-macosx_11_0_arm64.whl
Size 4.0 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
b9d554def632e3b14c56de07e10b6c859abb5b882c98e504fa3c465820e85994
BLAKE2b-256 checksum
How to use checksums
9856124a9bf9cc5c300fa5823d13af6bd1a02fbe83fd5fd286fe459024c874eb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 21, 2026.

Transparency log

Release files / vsg_rs-0.11.0-py3-none-macosx_10_12_x86_64.whl

Download URL vsg_rs-0.11.0-py3-none-macosx_10_12_x86_64.whl
Size 4.3 MB
Tags Python 3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
3f63a5bd84d6ca8c68836a1662a2f8a3a6b765340487b5ea7f778e657642c11a
BLAKE2b-256 checksum
How to use checksums
95e5ebdcc7272ee60cd18eab5272ed0b2b4161547f90293cbd0b3e7b6915f1d0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 21, 2026.

Transparency log

Security for vsg-rs 0.11.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 9 files in this release have been uploaded with provenance metadata.

Select from 9 files

Attestation for vsg_rs-0.11.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 21, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page