Skip to main content

astli

A modern SystemVerilog toolchain in a single binary, written in pure Rust. Much like cargo does for Rust, astli formats, lints, and checks your designs while managing dependencies—discovering your project structure automatically without requiring manual filelists.

astli fmt          # Format every file in the package (lowRISC style)
astli lint         # Catch common bugs and style issues (using Verible-compatible rule names)
astli check        # Verify undeclared names, port mismatches, and multi-driver conflicts
astli elab         # Inspect the elaborated instance hierarchy for a top-level module
astli files        # Generate a trimmed, topologically ordered filelist for a top module
astli pickle       # Flatten an entire design into a single self-contained source file
astli add URL      # Add a git dependency at its latest release
astli update       # Resolve dependencies and pin them in astli.lock
astli fetch        # Download dependencies into a shared local cache

An astli package is simply a directory containing an astli.toml manifest. Instead of forcing you to maintain exhaustive lists of source files, astli automatically discovers your sources by convention and uses astli.toml to manage package settings, features, and dependencies.

Comprehensive CLI documentation is available on the documentation site, and library APIs are documented on docs.rs.


Why astli?

SystemVerilog workflows have traditionally relied on an assortment of disjoint utilities. A formatter, a linter, a synthesis tool, and a dependency manager often each bundle their own distinct parser, their own dialect quirks, and their own configuration files. As a result, developers are forced to repeatedly describe the same design across filelists, macro defines, and include search paths—and the tools often disagree on how that design should be interpreted.

Rust solved this fragmentation for its ecosystem with cargo: one tool, one package model, and one shared compiler frontend. astli brings that same experience to SystemVerilog:

  • A single shared frontend: One preprocessor and one lossless concrete syntax tree (CST) power every stage—formatting, linting, semantic checking, and dependency resolution all share the exact same view of your code.
  • Pure Rust data structures: While slang is a phenomenal C++ reference frontend, integrating with it from Rust requires complex FFI bindings, opaque pointers, and hefty C++ toolchain dependencies. astli is 100% Rust: syntax nodes are native Rust types that can be walked, transformed, and emitted back to text with comments and formatting perfectly preserved.
  • Zero-configuration discovery: Run astli inside a repository and it discovers your packages and source files on its own.

Feature Comparison

Each of these tools excels in specific areas, and several remain mature industry standards. astli unifies their core workflows under a single parser and package manifest.

Feature astli slang verible bender sv-parser
Written in Rust ✅ ❌ ❌ ✅ ✅
Lossless syntax tree ✅ ✅ ✅ ❌ ✅
Preprocessor ✅ ✅ ◐ ❌ ✅
Full language coverage ◐ ✅ ◐ ❌ ✅
Code formatter ✅ ❌ ✅ ❌ ❌
Linter ✅ ◐ ✅ ❌ ❌
Name resolution & elaboration ✅ ✅ ❌ ❌ ❌
Filelist-free design discovery ✅ ❌ ❌ ❌ ❌
Fetches & locks dependencies ✅ ❌ ❌ ✅ ❌
Language server (LSP) ❌ ◐ ✅ ❌ ❌

(Legend: ✅ Full support, ◐ Partial support, ❌ Not supported)


Scope & Roadmap

astli handles the end-to-end path from raw source code to a verified, elaborated design:

  • Preprocessing with macro expansion and conditional compilation
  • Lossless parsing into a Rowan-based syntax tree
  • Cross-file name resolution, constant evaluation, and type checking
  • Module elaboration and multi-driver checking
  • Dependency resolution, caching, and lockfiles

astli is strictly an analysis, verification, and tooling platform; it is not a simulator or synthesis tool, nor does it aim to be one. A Language Server Protocol (LSP) implementation based on the existing semantic model is planned for upcoming releases.


Installation

Precompiled binaries are available for Linux (x86_64, aarch64), macOS (Apple Silicon, Intel), and Windows.

Shell Installer (Linux & macOS)

curl -LsSf https://astli.dev/install.sh | sh

Python Package (uv or pip)

# Install with uv (recommended)
uv tool install astli

# Or with pip / pipx
pip install astli
pipx install astli

Cargo (binstall or build from source)

# Prebuilt binary via cargo-binstall
cargo binstall astli-cli

# Or compile from source
cargo install astli-cli

For more options, check the Getting Started Guide.


Using astli as a Library

All underlying crates are published on crates.io under the umbrella astli crate:

[dependencies]
astli = "0.2"
use astli::parse::SyntaxTree;
use astli::syntax::ast::{AstNode, ModuleDecl};

fn main() -> Result<(), Box<dyn std::error::Error>> {
    // Read and parse a SystemVerilog source file
    let tree = SyntaxTree::read("top.sv")?;

    // Traverse the syntax tree and inspect module declarations
    for module in tree.root().descendants().filter_map(ModuleDecl::cast) {
        if let Some(name) = module.name() {
            println!("Found module: {}", name.text());
        }
    }

    // Format the tree according to lowRISC style conventions
    let formatted = astli::fmt::format(&tree, &Default::default())?;
    print!("{formatted}");

    Ok(())
}

astli re-exports its constituent crates (astli-syntax, astli-parse, astli-fmt, etc.) as modules. You can also depend on individual crates directly if you only need specific functionality. See docs/api.md for architectural details.


Development & Contributing

Because astli-cli is the workspace's default root member, you can run the CLI directly without passing -p:

cargo run -- check --top soc_top
Inspecting intermediate compiler stages

The CLI exposes hidden subcommands for developers to inspect the output of individual compilation stages:

# Inspect lexer token stream
cargo run -- lex top.sv

# Inspect preprocessor output
cargo run -- preprocess top.sv -I include --emit text

# Inspect parser syntax tree
cargo run -- parse top.sv --quiet
Workspace Crate Structure
Path Description
crates/astli-text Source file storage, line indexing, and source span abstractions
crates/astli-diag Diagnostic formatting with macro expansion and include traceback
crates/astli-syntax Lexer definitions, SyntaxKind, and Rowan concrete syntax trees
crates/astli-preproc Preprocessor directives, macro expansions, and include resolution
crates/astli-parse Parser implementation and typed AST generation
crates/astli-fmt Code formatter conforming to the lowRISC style guide
crates/astli-index Fast indexing of symbols declared and referenced across files
crates/astli-sema High-level Intermediate Representation (HIR), typing, and elaboration
crates/astli-lint Syntactic and semantic lint rules
crates/astli-package Package discovery and astli.toml manifest parser
crates/astli-resolve Dependency resolution, version solver, and lockfile generation
crates/astli Top-level library re-exporting all core components
crates/astli-cli The main command-line executable (astli)
docs/ Internal architecture and planning documents
site/ Documentation website, generated via scripts/site.sh

For more in-depth architectural notes, see docs/plan.md.


Acknowledgements

  • slang by Mike Popoloski: The gold standard for SystemVerilog language compliance. astli's preprocessor and parser behavior is validated directly against slang test suites.
  • rust-analyzer: Pioneered modern IDE-grade compiler design with Rowan lossless trees, event-based parsing, and ungrammar.
  • rowan, logos, and ungrammar: The foundational libraries powering astli's parsing engine.
  • Cargo and uv: The models for astli's package manager, from the manifest and lockfile to the shared cache and version resolution.
  • lowRISC Style Guides: The basis for astli's automated code formatter and style rules.
  • The open-source silicon community, whose diverse real-world designs form our integration test suite.

License

Licensed under either the MIT License or the Apache License, Version 2.0 at your option. Unless explicitly stated otherwise, any contribution intentionally submitted for inclusion shall be dual-licensed as above without additional terms or conditions.

Metadata

Release files for astli 0.5.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for astli 0.5.1
File Size Uploaded Provenance Actions
astli-0.5.1.tar.gz 565.3 kB Without provenance Details for astli-0.5.1.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for astli 0.5.1
File Actions
astli-0.5.1-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for astli-0.5.1-py3-none-win_amd64.whl
astli-0.5.1-py3-none-musllinux_1_2_x86_64.whl Python 3 none Linux musl 1.2+ x86-64 Details for astli-0.5.1-py3-none-musllinux_1_2_x86_64.whl
astli-0.5.1-py3-none-musllinux_1_2_aarch64.whl Python 3 none Linux musl 1.2+ ARM64 Details for astli-0.5.1-py3-none-musllinux_1_2_aarch64.whl
astli-0.5.1-py3-none-manylinux_2_28_x86_64.whl Python 3 none Linux glibc 2.28+ x86-64 Details for astli-0.5.1-py3-none-manylinux_2_28_x86_64.whl
astli-0.5.1-py3-none-manylinux_2_28_aarch64.whl Python 3 none Linux glibc 2.28+ ARM64 Details for astli-0.5.1-py3-none-manylinux_2_28_aarch64.whl
astli-0.5.1-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for astli-0.5.1-py3-none-macosx_11_0_arm64.whl
astli-0.5.1-py3-none-macosx_10_12_x86_64.whl Python 3 none macOS 10.12+ x86-64 Details for astli-0.5.1-py3-none-macosx_10_12_x86_64.whl

Total release size: 67.7 MB

Release files / astli-0.5.1.tar.gz

Download URL astli-0.5.1.tar.gz
Size 565.3 kB
Tags Source
SHA-256 checksum
How to use checksums
9082ec362559e4d8328dd6bc2d5d385b37c48e16dfe0f267dde78e09cbd5ce72
BLAKE2b-256 checksum
How to use checksums
cf60e083051b2ca7ee414e92e17619fb8fe81a3040a9cc498fa2910ce10e9aef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / astli-0.5.1-py3-none-win_amd64.whl

Download URL astli-0.5.1-py3-none-win_amd64.whl
Size 8.7 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
523168627ccbc2f570dcccb1256fd03a0cd06d9546ddae21d6d5a668db1c6554
BLAKE2b-256 checksum
How to use checksums
d9d71cf7c74b8ac3d01ca227dbfcdf32ba3bc06708ce407705c795f59d5bcf7c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / astli-0.5.1-py3-none-musllinux_1_2_x86_64.whl

Download URL astli-0.5.1-py3-none-musllinux_1_2_x86_64.whl
Size 10.3 MB
Tags Linux musl 1.2+ x86-64 Python 3
SHA-256 checksum
How to use checksums
601b8494efcfe53dcf3a1b360383c3e5d18dae0b395548768d970c989429eebe
BLAKE2b-256 checksum
How to use checksums
da87dc0e52d07517b2fa12cc3891e1a52b2bcd8c3da325bb2057d2993d7f3e74
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / astli-0.5.1-py3-none-musllinux_1_2_aarch64.whl

Download URL astli-0.5.1-py3-none-musllinux_1_2_aarch64.whl
Size 10.0 MB
Tags Linux musl 1.2+ ARM64 Python 3
SHA-256 checksum
How to use checksums
b7d00991b4b9593027a94c6cf76059855a0c817923a98bc67391dd47b14575bf
BLAKE2b-256 checksum
How to use checksums
c7d0e6f7301be46c27dec785b4aa6fadcc988d275d4072f18e0788b4f7bfaae2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / astli-0.5.1-py3-none-manylinux_2_28_x86_64.whl

Download URL astli-0.5.1-py3-none-manylinux_2_28_x86_64.whl
Size 9.8 MB
Tags Linux glibc 2.28+ x86-64 Python 3
SHA-256 checksum
How to use checksums
2d4c9dbc0be7ad393d323d4832e50a36bb3df23df85737a5674fea2ca100c77f
BLAKE2b-256 checksum
How to use checksums
34df517fe40879a44f9c1b7196bac211dbbcb8c11809f5728c4cb3d66f099b30
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / astli-0.5.1-py3-none-manylinux_2_28_aarch64.whl

Download URL astli-0.5.1-py3-none-manylinux_2_28_aarch64.whl
Size 10.0 MB
Tags Linux glibc 2.28+ ARM64 Python 3
SHA-256 checksum
How to use checksums
ef35b7f5b60d1eb14ec885c14d205d8b086a9fa65ed79f35888c34a304a4246f
BLAKE2b-256 checksum
How to use checksums
12c6fa0945f0603ced3db039a5e9b7889968ba4bc8787ea05d82f7a223d91136
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / astli-0.5.1-py3-none-macosx_11_0_arm64.whl

Download URL astli-0.5.1-py3-none-macosx_11_0_arm64.whl
Size 9.0 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
ea22ef30ebc0df56da5c8f7310e6d920e7507bc2f37b284cf13d8d68aba7038b
BLAKE2b-256 checksum
How to use checksums
eda88d18c7942f639591c63f1aaf4d4c855a92e34f8d4e5c91b5bd5d161b3c61
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / astli-0.5.1-py3-none-macosx_10_12_x86_64.whl

Download URL astli-0.5.1-py3-none-macosx_10_12_x86_64.whl
Size 9.3 MB
Tags Python 3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
f58e41de2e3249b2a765f5bfe3117f69cac75b123641b3ee7734f7eb80611c62
BLAKE2b-256 checksum
How to use checksums
baae022dbbbde538263522482e3042837000a963612d91cc6fae15a4b55b0bbc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for astli 0.5.1

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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