Contributing to Veryl
June 18, 2026 ยท View on GitHub
Thank you for your interest in contributing to Veryl! We welcome contributions in the following areas:
- Language design
- Tool implementation
- Standard library implementation
Feel free to open Issues for bug reports, feature requests, or questions. You can also join our Discord for discussion.
Getting Started
You will need a stable Rust toolchain. Then:
cargo build # Build the workspace
cargo test # Run the full test suite
cargo fmt --check # Check formatting
cargo clippy -- -D warnings # Lint
Please ensure cargo test passes locally before submitting a pull request.
Tests
Alongside the ordinary #[test] unit tests in each crate, much of the suite is
file-based: a build script generates one test per .veryl file under testcases/.
Adding a file-based test is usually just adding a source file and its expected output.
Positive tests (testcases/veryl/)
Code that should compile. The expected SystemVerilog (testcases/sv/) and source map
(testcases/map/) are committed reference files compared verbatim.
-
Add
testcases/veryl/NN_name.veryl(follow the existing numbered naming). -
Regenerate the reference files from the repo root:
cargo run --bin veryl -- buildThis writes
testcases/sv/NN_name.svandtestcases/map/NN_name.sv.map. -
Review the generated output, run
cargo test -p veryl-tests, then commit the.veryl,.sv, and.sv.mapfiles together.
Error tests (testcases/error/)
Code that must fail. The snapshot is the rendered diagnostic, managed with
insta. Only the first reported error is captured, so keep the
case minimal so the target error comes first.
-
Add
testcases/error/my_error.verylwith minimal code that triggers the error (name the module after the file, matching the existing cases). -
Generate and review the snapshot:
cargo insta test -p veryl-tests --review # or: cargo test, then cargo insta review -
After accepting, commit both
testcases/error/my_error.veryland the generatedcrates/tests/src/snapshots/my_error.snap.
Submitting Changes
- For non-trivial changes, open an issue first to discuss the approach.
- Fork the repository and create a feature branch from
master. - Keep commits focused and write descriptive commit messages.
- Open a pull request. CI must pass before merge.
Coding Style
- All comments and documentation should be written in English.
- Rust formatting is enforced by
cargo fmt. - All clippy warnings are treated as errors (
-D warnings).
AI-Assisted Contributions
AI-assisted contributions are permitted, provided the contributor has reviewed, tested, and takes full responsibility for the submitted code. Do not list AI tools as co-authors in commit metadata.
License
Licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.