-
Notifications
You must be signed in to change notification settings - Fork 173
tls-codec #56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tls-codec #56
Conversation
Moving code from https://github.com/openmls/tls-codec/ here
We've generally checked in Cargo.lock to keep the build reproducible and make it easier to spot regressions in dependencies since we always have a known good CI. That goes against the Rust convention of "check Cargo.lock in for binaries, don't for libs" but with Dependabot it's generally kept up to date and the PRs it opens make it quite easy to figure out exactly what's breaking the build (often MSRV-breaking changes in dependencies)
You'll need to remove those then. FWIW all of our other crates support |
Yeah I tried to merge all CI targets you had in for the other crates and what I had in before. I think adding |
|
Seems hung trying to get a builder for |
Strange. It says
I haven't seen this before. Sounds like an org-wide issue. |
|
Weird. We do have macOS/Windows CI elsewhere, for example here: https://github.com/RustCrypto/asm-hashes/blob/master/.github/workflows/sha2.yml#L51-L91 Looking at your config though, I'm not sure why it would be trying to use a self-hosted runner. Maybe remove it for now and we can circle back on it? |
They fail for some reason on the RustCrypto repository right now
|
Cool, CI passing now at least 👍 |
| impl_array!( | ||
| 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, | ||
| 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, | ||
| 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, | ||
| 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, | ||
| 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, | ||
| 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128 | ||
| ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like something which would nicely be replaced with const generics, whenever you're ready to bump MSRV to 1.51.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, we should replace this with const generics. I always forget that they are actually a thing now.
tarcieri
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One minor nit but I think this is fine for an initial import.
I now see this is a bit more std-dependent than I realized due to the extensive use of std::io::{Read, Write}.
|
I also noticed the directory name is |
Co-authored-by: Tony Arcieri <bascule@gmail.com>
Indeed. I think it's only used with byte slices right now. But the idea is that the crate should allow serializing straight to whatever |
|
I think the remaining issues in this PR:
On the latter, the
I'm not particularly attached to this layout, but I think we should be consistent with how we structure custom derive. So I would either suggest:
Or: we could switch to a flat layout that looks like this:
I think there are good arguments for a flat layout regarding discoverability of the custom derive crates and not having indirection between the crate name and it's location, but I could go either way. |
Sorry for being a little slow on this. Too many other things need attention 😬 |
|
Not sure what you want to do with the badges, but I'm fine to merge as-is and we can figure that out separately |
I'm sure there are a couple things in here we want to touch. Some things I noticed
Cargo.lock?I'm sure there's more. Let me know what you think @tarcieri