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.2.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.2.0
File Size Uploaded Provenance Actions
pyslang-12.2.0.tar.gz 2.1 MB With provenance Details for pyslang-12.2.0.tar.gz

Built distributions (wheels)

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

Total release size: 23.2 MB

Release files / pyslang-12.2.0.tar.gz

Download URL pyslang-12.2.0.tar.gz
Size 2.1 MB
Tags Source
SHA-256 checksum
How to use checksums
ac20e6cee341b294aa61c54a7a35d6d7bf345392b4d986ac8f5e3f898acbc997
BLAKE2b-256 checksum
How to use checksums
7998563433292ef85810a42a2ba4da007bb52407033089d516e08e973d49e751
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 Nov 20, 2026.

Transparency log

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

Download URL pyslang-12.2.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
54d7af4ae59cc8c1e514437239fa09c211c36e7fbd3a6e2455756c2a32ff7d21
BLAKE2b-256 checksum
How to use checksums
3d494e510946e0326ff091920ccc0dc700be729dcf05439d63a82569980ffa78
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 Nov 20, 2026.

Transparency log

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

Download URL pyslang-12.2.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
f05a9a9dd6a181f4fc0074e3f02b47b4373fc05ab88c3112d6abe321470ae7b4
BLAKE2b-256 checksum
How to use checksums
f6ed8a8cfe622d6986acba4cdc0e170c8070db7a902d636bc48b63b64b09da42
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 Nov 20, 2026.

Transparency log

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

Download URL pyslang-12.2.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
389e846c6ce56c5d38ce298243e3998e64f5789fd52d82387bca1d34a6bcc321
BLAKE2b-256 checksum
How to use checksums
6262b9db446b63a15e2c0ed358d95876e47dfc6fe37120d822b3a0b4570a5fb0
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 Nov 20, 2026.

Transparency log

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

Download URL pyslang-12.2.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
4ed17d0fb3217610e804b6f3aeac718d4f1786420e3e34083906ff81d4f186fa
BLAKE2b-256 checksum
How to use checksums
a33d634200028a77ec86ea5fe70c7c9cd7b3f734ba578e7e58fbb7c7a944cea2
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 Nov 20, 2026.

Transparency log

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

Download URL pyslang-12.2.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
ffd1b5b051a004fd309a5b6714ffc3a497e4ce6dbb8eb56b0f1f1abf36ce265f
BLAKE2b-256 checksum
How to use checksums
d2fd2f447d4121604808e3bf1414f35d23816227f8e4df580ccc1ea28e3325c1
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 Nov 20, 2026.

Transparency log

Security for pyslang 12.2.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.2.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 Nov 20, 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