Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ homepage = "https://github.com/bevyengine/variadics_please"
repository = "https://github.com/bevyengine/variadics_please"
license = "MIT OR Apache-2.0"
keywords = ["bevy", "variadics", "docs"]
rust-version = "1.81.0"
rust-version = "1.83.0"
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looked it up, this is the minimal version that supports rust-lang/rust#128183, which unsynn uses

categories = ["rust-patterns"]
exclude = ["tools/", ".github/"]
documentation = "https://docs.rs/variadics_please"
Expand All @@ -20,9 +20,8 @@ alloc = []
proc-macro = true

[dependencies]
syn = "2.0"
quote = "1.0"
proc-macro2 = "1.0"
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

proc-macro2 is re-exported by unsynn

unsynn = "0.3"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The primary complaint here is that we're increasing supply-chain risk by doing this: single maintainer, relatively small name, new-ish crate.

That said, given the counterfactual and meaningfully improved compile time benchmarks I'm happy to take this trade!

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I'm primarily basing my own trust on Amos (fasterthanlime), since he is a big name and is heavily pushing this crate.


[dev-dependencies]
static_assertions = "1.1"
Expand Down
11 changes: 11 additions & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# `variadics_please` Release Notes

## Unreleased

- Switch from `syn` to `unsynn`
- [`syn` is known to be a major compile time bottleneck](https://fasterthanli.me/articles/the-virtue-of-unsynn). To improve the situation for users of `variadics_please`, we switched to `unsynn`, which is the alternative used by [`facet`](https://fasterthanli.me/articles/introducing-facet-reflection-for-rust).
- The compile time speedup depends on your local setup and the complexity of the macro invocation,
but on one test setup, the cold compilation time went from about 2.16 seconds to 0.56 seconds.
- The code generated by `variadics_please` should be identical to before.
Our Error messages may look a bit different now, but they should be just as readable.
If you encounter any weird behavior or diagnostics, let us know.
- Using `unsynn` bumps the MSRV from 1.81.0 to 1.83.0

## Version 1.1

- added `all_tuples_enumerated`, which provides the index of each item in the tuple
Expand Down
3 changes: 3 additions & 0 deletions deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ allow = [
"MIT-0",
"Unlicense",
"Zlib",
"Unicode-3.0",
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This just allows unicode symbols to be redistributed freely. Seems alright :)

]

exceptions = [
Expand Down Expand Up @@ -73,6 +74,8 @@ deny = [
{ name = "android-activity", deny-multiple-versions = true },
{ name = "glam", deny-multiple-versions = true },
{ name = "raw-window-handle", deny-multiple-versions = true },
# keep syn entirely out of tree, since we use unsynn instead
{ name = "syn" },
]

[sources]
Expand Down
Loading
Loading