Crates.io | slang-rs |
lib.rs | slang-rs |
version | 0.9.0 |
source | src |
created_at | 2024-09-17 20:41:54.234951 |
updated_at | 2024-10-30 00:09:51.58167 |
description | Rust bindings for the Slang Verilog parser |
homepage | https://github.com/xlsynth/slang-rs.git |
repository | https://github.com/xlsynth/slang-rs.git |
max_upload_size | |
id | 1378186 |
size | 59,012 |
Parse SystemVerilog with Slang using a Rust API.
Note: the API is currently under development and is subject to frequent changes.
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`
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