Skip to content

Commit 50d5e48

Browse files
authored
ssh-derive v0.4.0 (#667)
1 parent e3a0c0d commit 50d5e48

4 files changed

Lines changed: 27 additions & 3 deletions

File tree

‎Cargo.lock‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎ssh-derive/CHANGELOG.md‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,29 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## 0.4.0 (2026-12-04)
8+
### Added
9+
- Use `#[ssh(error = crate::Error)]` on a struct or enum to select its derived `Decode::Error`. The default is `ssh_encoding::Error` ([#665])
10+
11+
### Changed
12+
- Upgrade the `syn` dependency from v2 to v3 ([#576])
13+
- Derived `Decode::decode` implementations now take `&mut Decoder<impl Reader>` to match
14+
the `ssh-encoding` 0.4 API ([#618])
15+
- Both derives now reject `#[ssh(...)]` attributes on enum variants at compile time.
16+
Earlier versions silently ignored these attributes ([#644])
17+
18+
### Fixed
19+
- Use the four-byte SSH wire length for `#[repr(usize)]` enum discriminants on 64-bit
20+
targets and preserve unknown `usize` tags in `Error::InvalidDiscriminant` ([#643])
21+
- Match enum discriminants by their evaluated value when decoding. For example, a variant
22+
declared with `1 | 2` accepts only the wire tag `3` ([#643])
23+
- Allow enum variants with a field named `writer` to derive `Encode` ([#643])
24+
25+
[#576]: https://github.com/RustCrypto/SSH/pull/576
26+
[#618]: https://github.com/RustCrypto/SSH/pull/618
27+
[#643]: https://github.com/RustCrypto/SSH/pull/643
28+
[#644]: https://github.com/RustCrypto/SSH/pull/644
29+
[#665]: https://github.com/RustCrypto/SSH/pull/665
30+
731
## 0.3.0 (2026-05-10)
832
Initial release. Earlier versions skipped to match v0.3 release of `ssh-cipher`/`ssh-encoding`.

‎ssh-derive/Cargo.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ssh-derive"
3-
version = "0.4.0-rc.0"
3+
version = "0.4.0"
44
description = "Custom derive support for the `ssh-encoding` crate"
55
authors = ["RustCrypto Developers"]
66
license = "Apache-2.0 OR MIT"

‎ssh-encoding/Cargo.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ bytes = { version = "1.11", optional = true, default-features = false }
1919
ctutils = { version = "0.4.8", optional = true, default-features = false }
2020
digest = { version = "0.11", optional = true, default-features = false }
2121
pem-rfc7468 = { version = "1", optional = true }
22-
ssh-derive = { version = "0.4.0-rc.0", optional = true }
22+
ssh-derive = { version = "0.4", optional = true }
2323
zeroize = { version = "1.8", optional = true, default-features = false }
2424

2525
[dev-dependencies]

0 commit comments

Comments
 (0)