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.2.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.2.0
File Size Uploaded
rdlfmt-0.2.0.tar.gz 85.2 kB Details

Built distributions (wheels)

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

Total release size: 8.5 MB

Release files / rdlfmt-0.2.0.tar.gz

Download URL rdlfmt-0.2.0.tar.gz
Size 85.2 kB
Tags Source
SHA-256 checksum
How to use checksums
f6d14fadcffeb75f72863054f26f79678ef6fe6f90f2507cb186e5cfbb9c4c91
BLAKE2b-256 checksum
How to use checksums
fc431417eed4635b07e90c0049da4af42044d7f2dc62fc801c7d43e81cffaa9e
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 19, 2026.

Transparency log

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

Download URL rdlfmt-0.2.0-py3-none-win_amd64.whl
Size 1.0 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
ec7c8cb3077245d2051518491e0e70f62421917b2b44c844db7bd5757aa73309
BLAKE2b-256 checksum
How to use checksums
5d7a02ef60fc68fd820f68b031889ef8461dd07c63d2a0e9f3645cac43427326
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 19, 2026.

Transparency log

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

Download URL rdlfmt-0.2.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
8117959bf5bd091f2e522c9f74ea2396cbd5899573b255c4289c4a08c6edd96d
BLAKE2b-256 checksum
How to use checksums
012dc881ff08a116ecedae8a93c37f818927294610275400cfc1aa8dfb2a2ac6
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 19, 2026.

Transparency log

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

Download URL rdlfmt-0.2.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
ec15e9fb4434a0b19bdbd8149869d731ccd5ced0648361871facecc69672cc6d
BLAKE2b-256 checksum
How to use checksums
7fe60c61a5338de52fe5a9fffb42a206a6cac16eeb361da0fc777728ca546fb4
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 19, 2026.

Transparency log

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

Download URL rdlfmt-0.2.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
51836cd2a35b0d85d003c2aef327d1f56f3f14a4ac097752e63d8032107f59a9
BLAKE2b-256 checksum
How to use checksums
e35a8870df58bb9b2bb2ca6013b5477ad35de28548684a4bbd2b80ff6f4cb605
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 19, 2026.

Transparency log

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

Download URL rdlfmt-0.2.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
d95d203752d8953214b60537873080b421f48c6b4d49e155d1c59d51c3bb2889
BLAKE2b-256 checksum
How to use checksums
36818731549064fd37031468d156587df67810908fad85834f8d33594e58727f
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 19, 2026.

Transparency log

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

Download URL rdlfmt-0.2.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
f82a151a1b1809fa1fa980d989f3ebfbd25929dc57b14b5f6a95973a7f9cb1e7
BLAKE2b-256 checksum
How to use checksums
11fe82ff8a340b6ebd5c121ff0fcb0e0c826491debd9ab262b69707ce4d469b4
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 19, 2026.

Transparency log

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

Download URL rdlfmt-0.2.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
9cd378685292ff031287875715ca020d6eb31e7fdc6d5f23a486f95fdfc931bb
BLAKE2b-256 checksum
How to use checksums
57f6e0fcbed75a9e6f40f5766652a80a333ea70d5893f4a31e7239a273245a45
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 19, 2026.

Transparency log

Release history Release notifications | RSS feed

0.4.0

8 release files

0.3.0

8 release files

This release

0.2.0 This release

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