14 breaking releases

new 0.15.0 Feb 14, 2025
0.13.0 Jan 14, 2025
0.12.0 Nov 19, 2024

#896 in Hardware support

Download history 148/week @ 2024-10-26 31/week @ 2024-11-02 132/week @ 2024-11-09 337/week @ 2024-11-16 37/week @ 2024-11-23 144/week @ 2024-11-30 163/week @ 2024-12-07 134/week @ 2024-12-14 1/week @ 2024-12-21 33/week @ 2025-01-04 255/week @ 2025-01-11 206/week @ 2025-01-18 106/week @ 2025-01-25 4553/week @ 2025-02-01 428/week @ 2025-02-08

5,321 downloads per month
Used in topstitch

Apache-2.0

28KB
664 lines

slang-rs

Parse SystemVerilog with Slang using a Rust API.

Note: the API is currently under development and is subject to frequent changes.

Prerequisite

First install the Slang parser. We recommend building it from source.

curl -LO "https://github.com/MikePopoloski/slang/archive/refs/tags/v6.0.tar.gz"
tar xzvf v6.0.tar.gz
cd slang-6.0
cmake -B build
cmake --build build -j8

This will take a few minutes. Then set an environment variable to specify the location of the Slang binary:

export SLANG_PATH=`realpath build/bin/slang`

Installation

Install Rust if you don't have it already:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Then clone this repository:

git clone https://github.com/xlsynth/slang-rs.git

To run the tests:

cd slang-rs
cargo test

Dependencies

~7–18MB
~277K SLoC