Skip to main content

slang - SystemVerilog Language Services

codecov PyPI License: MIT

slang is a software library that provides various components for lexing, parsing, type checking, and elaborating SystemVerilog code. It comes with an executable tool that can compile and statically analyze any SystemVerilog project, but it is also intended to be usable as a front end for synthesis tools, simulators, linters, code editors, and refactoring tools.

slang is the fastest and most compliant SystemVerilog frontend (according to the open source chipsalliance test suite).

Full documentation is available on the website: https://sv-lang.com

Features

  • Fully parse, elaborate, and analyze all SystemVerilog features.
  • Be robust about compilation, no matter how broken the source text. This makes the compiler usable in editor highlighting and completion scenarios, where the code is likely to be broken because the user is still writing it.
  • The parse tree should round trip back to the original source, making it easy to write refactoring and code generation tools.
  • Provide great error messages, ala clang.
  • Be fast and robust in the face of production-scale projects.

Use Cases

Some examples of things you can use slang for:

  • Very fast syntax checking and linting tool
  • Dumping the AST of your project to JSON
  • Source code introspection via included Python bindings
  • SystemVerilog code generation and refactoring
  • As the engine for an editor language server
  • As a fast and robust preprocessor that sits in front of downstream tools
  • As a frontend for a synthesis or simulation tool, by including slang as a library

Getting Started

Pre-built binaries for Linux, macOS, and Windows are available on the releases page.

Instructions on building slang from source are here. The tl;dr is:

git clone https://github.com/MikePopoloski/slang.git
cd slang
cmake -B build
cmake --build build -j

The slang binary can be run on your code right out of the box; check out the user manual for more information about how it works.

If you're looking to use slang as a library, please read through the developer guide.

The project also includes Python bindings for the library, which can be installed via PyPI:

pip install pyslang

See the pyslang directory in this repository for tests and examples that show how to use the Python API.

Try It Out

Experiment with parsing, type checking, and error detection live on the web (inspired by Matt Godbolt's excellent Compiler Explorer).

Contact & Support

If you encounter a bug, have questions, or want to contribute, please get in touch by opening a GitHub issue or discussion thread.

Contributions are welcome, whether they be in the form of bug reports, comments, suggestions, documentation improvements, or full fledged new features via pull requests.

License

slang is licensed under the MIT license:

Copyright (c) 2015-2026 Michael Popoloski

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Metadata

Release files for pyslang 12.1.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 pyslang 12.1.0
File Size Uploaded Provenance Actions
pyslang-12.1.0.tar.gz 2.0 MB With provenance Details for pyslang-12.1.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for pyslang 12.1.0
File Actions
pyslang-12.1.0-cp311-abi3-win_amd64.whl CPython 3.11 abi3 Windows x86-64 Details for pyslang-12.1.0-cp311-abi3-win_amd64.whl
pyslang-12.1.0-cp311-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.11 abi3 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details for pyslang-12.1.0-cp311-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
pyslang-12.1.0-cp311-abi3-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl CPython 3.11 abi3 Linux glibc 2.27+ ARM64, Linux glibc 2.28+ ARM64 Details for pyslang-12.1.0-cp311-abi3-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
pyslang-12.1.0-cp311-abi3-macosx_11_0_universal2.whl CPython 3.11 abi3 macOS 11.0+ universal2 (ARM64, x86-64) Details for pyslang-12.1.0-cp311-abi3-macosx_11_0_universal2.whl
pyslang-12.1.0-cp311-abi3-macosx_11_0_arm64.whl CPython 3.11 abi3 macOS 11.0+ ARM64 Details for pyslang-12.1.0-cp311-abi3-macosx_11_0_arm64.whl

Total release size: 23.1 MB

Release files / pyslang-12.1.0.tar.gz

Download URL pyslang-12.1.0.tar.gz
Size 2.0 MB
Tags Source
SHA-256 checksum
How to use checksums
c1f22ac3e033c3ccfe01ad3158db4253ad0be377f675344397f7394e90f53962
BLAKE2b-256 checksum
How to use checksums
618f0adeaff9e2153382980488072db0f50b5d832fe863ab2833a1095c382f08
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 Oct 25, 2026.

Transparency log

Release files / pyslang-12.1.0-cp311-abi3-win_amd64.whl

Download URL pyslang-12.1.0-cp311-abi3-win_amd64.whl
Size 3.4 MB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
6fe77f9b4d793bcb2c43852a2a0663c643a36ce75187ab91c2cfb2dada87e27e
BLAKE2b-256 checksum
How to use checksums
bf45ef22a54317288a61603639dae841fff431b01a7f2c70505eeb70dcd1aada
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 Oct 25, 2026.

Transparency log

Release files / pyslang-12.1.0-cp311-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL pyslang-12.1.0-cp311-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 4.6 MB
Tags CPython 3.11 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
9d0bd72729eb85f76c0cd3259b758d1e2a692717f95ee3d41530b11c9e117f7c
BLAKE2b-256 checksum
How to use checksums
f435fc05327c97ab9842919897535353ed79d5e9e323a3b00fa208db5b743d8c
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 Oct 25, 2026.

Transparency log

Release files / pyslang-12.1.0-cp311-abi3-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl

Download URL pyslang-12.1.0-cp311-abi3-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Size 4.2 MB
Tags CPython 3.11 Linux glibc 2.27+ ARM64 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
d3f51a5b9cd553b243905cb59baf1d49cccac2ebf1d5a4063eeb5eed07f7aadd
BLAKE2b-256 checksum
How to use checksums
644c4368b40a649f0b4117162d95c03f67c014401bfaa0d47cf4d3d795fd38df
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 Oct 25, 2026.

Transparency log

Release files / pyslang-12.1.0-cp311-abi3-macosx_11_0_universal2.whl

Download URL pyslang-12.1.0-cp311-abi3-macosx_11_0_universal2.whl
Size 6.0 MB
Tags CPython 3.11 abi3 macOS 11.0+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
9ee05af53d95ac41452bdabe8f2ad30d80ae767f0b0f0d5fa806734272f3b995
BLAKE2b-256 checksum
How to use checksums
730021b6289c1d075df9c435a7cdbb04369fb3d3493715600c09aedba850c6ba
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 Oct 25, 2026.

Transparency log

Release files / pyslang-12.1.0-cp311-abi3-macosx_11_0_arm64.whl

Download URL pyslang-12.1.0-cp311-abi3-macosx_11_0_arm64.whl
Size 2.9 MB
Tags CPython 3.11 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
822175a31d341d0054a9dd6b7952f7a1c009c0df6f681d50e6736747bd86045e
BLAKE2b-256 checksum
How to use checksums
da70a2675fe73b64ff9bd0e16a3a9ded9c58ee25fe62bed1eaaf06c4567cd33c
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 Oct 25, 2026.

Transparency log

Security for pyslang 12.1.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 6 files in this release have been uploaded with provenance metadata.

Select from 6 files

Attestation for pyslang-12.1.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 Oct 25, 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