Skip to main content

rdlfmt

A formatter for SystemRDL 2.0, following the PeakRDL style guide.

Documentation

Before:

addrmap top{
  reg {
      field{sw=rw;
    hw=r;} data[31:0];   // payload
  }ctrl @0x0;


  reg{field{sw=r;hw=w;}status[7:0];}stat@0x4;
};

After:

addrmap top {
    reg {
        field {
            sw = rw;
            hw = r;
        } data[31:0]; // payload
    } ctrl @ 0x0;

    reg {
        field {
            sw = r; hw = w;
        } status[7:0];
    } stat @ 0x4;
};

Line breaks between statements are yours — note that the first register's properties stay split and the second's stay joined. There is nothing to configure, deliberately. See What it does.

Install

A prebuilt binary, needing no toolchain of any kind:

curl --proto '=https' --tlsv1.2 -LsSf https://github.com/fischeti/rdlfmt/releases/latest/download/rdlfmt-installer.sh | sh

Or, if you already manage peakrdl with a Python tool:

uv tool install rdlfmt

Installed alongside PeakRDL, the same wheel registers a peakrdl fmt subcommand. cargo install rdlfmt works too. See Installation for Windows, PyPI and building from source.

Usage

rdlfmt regs.rdl     # rewrite in place -- the default
rdlfmt .            # every .rdl file in the tree
rdlfmt --check .    # exit 1 if anything is unformatted; the one for CI
rdlfmt --diff .     # ...and show what would change
rdlfmt -            # filter stdin to stdout

That last one is what editors want: Editor integration has format-on-save recipes for Neovim, Vim, VS Code, Zed, Helix and Emacs. Full command line in Usage.

Library

The formatter is also a library:

let formatted = rdlfmt::format(source)?;

rdlfmt::syntax exposes the lexer and the lossless CST underneath. API docs on docs.rs.

License

Dual-licensed under either of

at your option.

Metadata

Release files for rdlfmt 0.3.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 rdlfmt 0.3.0
File Size Uploaded
rdlfmt-0.3.0.tar.gz 88.5 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for rdlfmt 0.3.0
File
rdlfmt-0.3.0-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details
rdlfmt-0.3.0-py3-none-musllinux_1_2_x86_64.whl Python 3 none Linux musl 1.2+ x86-64 Details
rdlfmt-0.3.0-py3-none-musllinux_1_2_aarch64.whl Python 3 none Linux musl 1.2+ ARM64 Details
rdlfmt-0.3.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64 Details
rdlfmt-0.3.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64 Details
rdlfmt-0.3.0-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details
rdlfmt-0.3.0-py3-none-macosx_10_12_x86_64.whl Python 3 none macOS 10.12+ x86-64 Details

Total release size: 8.4 MB

Release files / rdlfmt-0.3.0.tar.gz

Download URL rdlfmt-0.3.0.tar.gz
Size 88.5 kB
Tags Source
SHA-256 checksum
How to use checksums
df9b0302917dbb933d94af8edc228daabe4fdbf80adb73560480fc867338f312
BLAKE2b-256 checksum
How to use checksums
facfd83f41e48f568955ba76d11631185ce0f045a8edb82f25d041215cf1da4e
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 Aug 27, 2026.

Transparency log

Release files / rdlfmt-0.3.0-py3-none-win_amd64.whl

Download URL rdlfmt-0.3.0-py3-none-win_amd64.whl
Size 1.0 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
84f40e55c7acb8f82fc3166bdabb388a301427adc33f4d02734b009b0a2a77d2
BLAKE2b-256 checksum
How to use checksums
95be75650ec0011c9149f3e91edb1a065598ba2b314e9cd4934d354db13a4fdd
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 Aug 27, 2026.

Transparency log

Release files / rdlfmt-0.3.0-py3-none-musllinux_1_2_x86_64.whl

Download URL rdlfmt-0.3.0-py3-none-musllinux_1_2_x86_64.whl
Size 1.3 MB
Tags Linux musl 1.2+ x86-64 Python 3
SHA-256 checksum
How to use checksums
3ff71b5e15dbd1ab6b3fa069c8409460d19a1e8a5886dba216c67d725711a872
BLAKE2b-256 checksum
How to use checksums
024f2a2ba127b719ab8f5e28a03fecf550c3c1c395cd836468faa51526deb539
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 Aug 27, 2026.

Transparency log

Release files / rdlfmt-0.3.0-py3-none-musllinux_1_2_aarch64.whl

Download URL rdlfmt-0.3.0-py3-none-musllinux_1_2_aarch64.whl
Size 1.3 MB
Tags Linux musl 1.2+ ARM64 Python 3
SHA-256 checksum
How to use checksums
4e62724ff5c5662568496fb102d30abf40027cafef2899aae097ffc1b79debed
BLAKE2b-256 checksum
How to use checksums
f4800a3e974e99ab287c76c42c564440186aa792bac6e8b3a25897066a491ad9
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 Aug 27, 2026.

Transparency log

Release files / rdlfmt-0.3.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL rdlfmt-0.3.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.3 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
281943dc1563ce9cf3164d8173a468a7b487b8d69e861f95782903fd7c423006
BLAKE2b-256 checksum
How to use checksums
2b65d8365fe5ed2f5165207b9c6c0a4f515f1f4b3935c6892219a9191bff7144
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 Aug 27, 2026.

Transparency log

Release files / rdlfmt-0.3.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL rdlfmt-0.3.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 1.2 MB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
51ef731e24f3223b1f6e0750be311e2336d44db0448221528b5dbc790a247619
BLAKE2b-256 checksum
How to use checksums
c592909516c7ecb594c513667da8affc784691c116190424242cf00d3c0323a1
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 Aug 27, 2026.

Transparency log

Release files / rdlfmt-0.3.0-py3-none-macosx_11_0_arm64.whl

Download URL rdlfmt-0.3.0-py3-none-macosx_11_0_arm64.whl
Size 1.1 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
414bdd4571a7956c54942e5b2c12c01291f5f6672fd27d149ad9eda13019699e
BLAKE2b-256 checksum
How to use checksums
118299680c1565291e94fdb73096dd296b51e49a704ab74744e280a09baf5b1e
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 Aug 27, 2026.

Transparency log

Release files / rdlfmt-0.3.0-py3-none-macosx_10_12_x86_64.whl

Download URL rdlfmt-0.3.0-py3-none-macosx_10_12_x86_64.whl
Size 1.2 MB
Tags Python 3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
f83023349728426c5291f892f41111af37d16048c23468abd18d44c02bf1f71e
BLAKE2b-256 checksum
How to use checksums
65e720feaee6b29a98ab99524cb2916f0f1da8f3626e78ee7e5760e7954d3b4f
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 Aug 27, 2026.

Transparency log

Release history Release notifications | RSS feed

0.4.0

8 release files

This release

0.3.0 This release

8 release files

0.2.0

8 release files

0.1.1

8 release files

0.1.0

8 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