-
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Flexible builder extension and type signature API (#145)
- Loading branch information
Showing
168 changed files
with
12,025 additions
and
3,197 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
[package] | ||
name = "compilation-benchmarks" | ||
|
||
publish = false | ||
|
||
description = """ | ||
Crate for benchmarking of the compilation time of code generated by | ||
proc-macros in the `bon` crate and other alternatives. | ||
""" | ||
|
||
edition = "2021" | ||
version = "0.1.0" | ||
|
||
[dependencies] | ||
bon = { path = "../../bon", optional = true } | ||
cfg-if = "1.0" | ||
derive_builder = { version = "0.20", optional = true } | ||
typed-builder = { version = "0.20", optional = true } | ||
|
||
[lints] | ||
workspace = true | ||
|
||
[features] | ||
bon-overwritable = ["bon"] | ||
default = [] | ||
|
||
structs_100_fields_10 = [] | ||
structs_10_fields_50 = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Benchmarks | ||
|
||
This is a collection of compilation time benchmarks for the code generated by `bon` crate and some other alternative builder macro crates. | ||
|
||
## Dependencies | ||
|
||
If you'd like to run the benchmarks yourself, first you need to install the following: | ||
|
||
- [`hyperfine`](https://github.com/sharkdp/hyperfine) CLI | ||
|
||
If you are on Linux, just run the following commands to install the dependencies: | ||
|
||
```bash | ||
./scripts/install/hyperfine.sh | ||
``` | ||
|
||
## Running the benchmarks | ||
|
||
Once you have all the [dependencies](#dependencies) installed you can run the selected benchmark from this directory like this: | ||
|
||
```bash | ||
./run.sh {benchmark_name} | ||
``` | ||
|
||
The `{benchmark_name}` corresponds to the modules in this crate. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[package] | ||
name = "compilation-benchmarks-codegen" | ||
|
||
publish = false | ||
|
||
description = """ | ||
Generates code for the compilation benchmarks. | ||
""" | ||
|
||
edition = "2021" | ||
version = "0.1.0" | ||
|
||
[dependencies] | ||
anyhow = "1.0" | ||
proc-macro2 = "1.0" | ||
quote = "1.0" |
Oops, something went wrong.