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.0.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.0.0
File Size Uploaded
pyslang-12.0.0.tar.gz 2.0 MB Details

Built distributions (wheels)

Table of built distributions (wheels) for pyslang 12.0.0
File
pyslang-12.0.0-cp311-abi3-win_amd64.whl CPython 3.11 abi3 Windows x86-64 Details
pyslang-12.0.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
pyslang-12.0.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
pyslang-12.0.0-cp311-abi3-macosx_11_0_universal2.whl CPython 3.11 abi3 macOS 11.0+ universal2 (ARM64, x86-64) Details
pyslang-12.0.0-cp311-abi3-macosx_11_0_arm64.whl CPython 3.11 abi3 macOS 11.0+ ARM64 Details

Total release size: 23.0 MB

Release files / pyslang-12.0.0.tar.gz

Download URL pyslang-12.0.0.tar.gz
Size 2.0 MB
Tags Source
SHA-256 checksum
How to use checksums
db3a71e1cc013020f53b913dd26a1ecc00af2fd623d13d60642c92786a4f7929
BLAKE2b-256 checksum
How to use checksums
d7cad150f106c2899e6e7924949b559e6ece26ef091ddbd72c4d5951d6539ed0
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 29, 2026.

Transparency log

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

Download URL pyslang-12.0.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
90848d0a3853f7f4ed7f021df4af83c8e2130d7a498449c26f27a4509934596e
BLAKE2b-256 checksum
How to use checksums
5b1c09975b8776b0552ec36263d5a18ca014574a80a3c84a9ff8bff909c0f2cc
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 29, 2026.

Transparency log

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

Download URL pyslang-12.0.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
3c24dfadf0f318928433eedd7558e128f7a05f8a4d514f81aab08f2cba3db47d
BLAKE2b-256 checksum
How to use checksums
c6201b6aec1fcb6d9c6efc491d651fa8e4064efba4ad43bd8ee1fa16096eca3d
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 29, 2026.

Transparency log

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

Download URL pyslang-12.0.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
3f8e2428545053dbae14466141d5823f47a9740832e62b1f758a227df7bf608e
BLAKE2b-256 checksum
How to use checksums
1f9782c247efa75977e11fdcde5376c824def987e92c32f9ee227faa988b55f2
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 29, 2026.

Transparency log

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

Download URL pyslang-12.0.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
e69f87128ae642303d397272326648f0778919ebda955128508997d12c096e91
BLAKE2b-256 checksum
How to use checksums
238d0c35e0de063ec9c8a1c7b6d84680bda8c977fcc463a35453e02093997cf0
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 29, 2026.

Transparency log

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

Download URL pyslang-12.0.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
2e91089f4405e2865a1de44fbd62cd772d7c35e9732c42f9baa81e07beeb289b
BLAKE2b-256 checksum
How to use checksums
cf556cbcd50cb4787689fc7c327f28436c9d7347304f1fe48514d0a26ee397f7
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 29, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

12.0.0 This release

6 release files

9.1.0

26 release files

9.0.0

26 release files

8.1.0

34 release files

7.0

23 release files

6.0

24 release files

5.0.0

24 release files

4.0.0

20 release files

3.0.0

20 release files

2.0.0

20 release files

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