Skip to content

ucb-substrate/substrate2

Repository files navigation

Substrate 2

CI codecov License

21st century design automation tools.

Installation/Usage

Substrate is a library, and cannot be run by itself. To use Substrate, install Rust, and add substrate as a dependency in your project's Cargo.toml:

[dependencies]
substrate = { git = "https://github.com/substrate-labs/substrate2", branch = "main" }

Substrate is developed and tested using the latest version of Rust.

Please note that all APIs are under development and may change without warning.

Documentation

The Substrate API documentation can be generated by running

cargo doc --open

(omit the --open flag if you don't want to automatically open the docs).

To include internal/private APIs in the generated documentation, run

cargo doc --document-private-items

Testing

Before running the tests, you must install just by running cargo install just.

To run the Substrate tests (both unit and integration tests), run

just test

from the root of the Substrate repository.

Most tests for Substrate can be found in substrate/src/tests. These include a mix of unit tests and integration tests, but may break the abstraction barrier as they a part of the substrate crate.

Substrate integration tests can be found in the tests crate. These tests double as examples of how to use Substrate. If you wish to see the artifacts generated by an integration test, look in the appropriate folder in tests/build.

Contributing

If you'd like to contribute to Substrate, please let us know. You can:

  • Ping us in the #substrate channel in the Berkeley Architecture Research Slack workspace.
  • Open an issue.
  • Email rahulkumar -AT- berkeley -DOT- edu and rohankumar -AT- berkeley -DOT- edu.

Documentation updates, tests, and bugfixes are always welcome. For larger feature additions, please discuss your ideas with us before implementing them.

Contributions can be submitted by opening a pull request against the main branch of this repository.

Please see the contributing guide and the Getting Started page for more information.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you shall be licensed under the BSD 3-Clause license, without any additional terms or conditions.

Acknowledgements

Portions of Substrate are derived from Layout21, which was written by Dan Fritchman, Arya Reais-Parsi, and others. This project is licensed under the BSD-3-Clause license.