https://github.com/rustsmith/rustsmith
A randomized program fuzzer for the Rust programming language
https://github.com/rustsmith/rustsmith
differential-testing fuzzing rust
Last synced: 9 months ago
JSON representation
A randomized program fuzzer for the Rust programming language
- Host: GitHub
- URL: https://github.com/rustsmith/rustsmith
- Owner: rustsmith
- License: other
- Created: 2021-12-23T22:22:37.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-07-21T10:25:49.000Z (almost 3 years ago)
- Last Synced: 2024-07-30T18:35:11.482Z (almost 2 years ago)
- Topics: differential-testing, fuzzing, rust
- Language: Kotlin
- Homepage:
- Size: 343 KB
- Stars: 53
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.txt
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
[](https://opensource.org/licenses/BSD-3-Clause)
[](https://github.com/rustsmith/rustsmith/actions/workflows/release.yml)

[](https://app.fossa.com/projects/git%2Bgithub.com%2Frustsmith%2Frustsmith?ref=badge_shield)
## RustSmith: A randomized program generator for Rust
RustSmith is a fuzzer built for the [Rust](https://www.rust-lang.org) programming language with
the purpose of fuzzing the Rust compiler (rustc) and find compiler crashes and mis-compilations
within the compiler. This repo contains the source code of the generator along with information on
how to install and use it.
## Table of Contents:
- [Getting Started](#getting-started)
- [Building From Source](#building-from-source)
- [Usage](#usage)
- [Documentation](#documentation)
- [Contributing](#contributing)
## Getting Started
To get started with RustSmith, there are a couple of options as shown below:
### Recommended Method
To download and install RustSmith, the recommended method is to simply download the "RustSmith
Executable" from the latest release from the "Releases" panel on the right.
RustSmith can then be invoked as below:
```shell
./rustsmith --help
```
### Docker
Docker can also be used in the following way using the latest docker image:
```shell
docker run --rm ghcr.io/rustsmith/rustsmith --help
```
### Running RustSmith using the JAR File
Alternatively, the JAR file in the releases can be downloaded and used instead. RustSmith would then
be invoked as:
```shell
java -jar RustSmith-1.0-SNAPSHOT-all.jar
```
## Building from Source
To build RustSmith from source, an installation of Java 15 is required. More information for
installing OpenJDK 15 can be found on the [OpenJDK Website](https://openjdk.java.net).
Building and executing RustSmith can then be done as follows:
```shell
git clone git@github.com:rustsmith/rustsmith.git
cd rustsmith
./gradlew build
```
This will create both the standalone executable under `./run/rustsmith` and the packaged JAR file
under `./build/libs/RustSmith-1.0-SNAPSHOT-all.jar` which can then be executed as described above.
## Usage
```shell
Usage: rustsmith [OPTIONS]
Options:
-n, -count INT No. of files to generate
-p, -print Print out program only
-f, -fail-fast Use fail fast approach
-s, -seed INT Optional Seed
--directory TEXT Directory to save files
-h, --help Show this message and exit
```
## Documentation
Documentation is available at: https://rustsmith.github.io/docs !
## Contributing
Contributions are all welcome! If you would like to contribute, please see the
corresponding [guidelines][contributing]. By contributing, you are agreeing to
our [code of conduct][code-of-conduct].
[contributing]: https://github.com/rustsmith/rustsmith/blob/master/CONTRIBUTING.md
[code-of-conduct]: https://github.com/rustsmith/rustsmith/blob/master/CODE_OF_CONDUCT.md
## License
[](https://app.fossa.com/projects/git%2Bgithub.com%2Frustsmith%2Frustsmith?ref=badge_large)