Changelog for rust-source-1.96.1: 1.96.1 -> 1.97.1 Source: library/vendor/addr2line-0.25.1/CHANGELOG.md, library/vendor/adler2-2.0.1/CHANGELOG.md, library/vendor/adler2-2.0.1/RELEASE_PROCESS.md, library/vendor/cc-1.2.0/CHANGELOG.md, library/vendor/cfg-if-1.0.4/CHANGELOG.md, library/vendor/getopts-0.2.24/CHANGELOG.md, library/vendor/gimli-0.32.3/CHANGELOG.md, library/vendor/hashbrown-0.17.1/CHANGELOG.md, library/vendor/libc-0.2.185/.release-plz.toml, library/vendor/libc-0.2.185/CHANGELOG.md, library/vendor/object-0.37.3/CHANGELOG.md, library/vendor/r-efi-5.3.0/NEWS.md, library/vendor/r-efi-alloc-2.1.0/NEWS.md, library/vendor/rand-0.9.2/CHANGELOG.md, library/vendor/rand_core-0.9.3/CHANGELOG.md, library/vendor/rand_xorshift-0.4.0/CHANGELOG.md, library/vendor/rustc-demangle-0.1.27/.github/workflows/release.yml, library/vendor/rustc-demangle-0.1.27/CHANGELOG.md, library/vendor/rustc-literal-escaper-0.0.7/CHANGELOG.md, library/vendor/shlex-1.3.0/CHANGELOG.md, vendor/aes-0.8.4/CHANGELOG.md, vendor/aes-0.9.0/CHANGELOG.md, vendor/arc-swap-1.9.0/CHANGELOG.md, vendor/arc-swap-1.9.1/CHANGELOG.md, vendor/backtrace-0.3.76/CHANGELOG.md, vendor/bitflags-2.11.0/CHANGELOG.md, vendor/bitflags-2.11.1/CHANGELOG.md, vendor/blake3-1.8.5/.github/workflows/upload_github_release_asset.py, vendor/blake3-1.8.5/tools/release.md, vendor/cc-1.2.58/CHANGELOG.md, vendor/cc-1.2.61/CHANGELOG.md, vendor/cipher-0.4.4/CHANGELOG.md, vendor/cipher-0.5.1/CHANGELOG.md, vendor/cmov-0.5.2/CHANGELOG.md, vendor/cmov-0.5.3/CHANGELOG.md, vendor/colored-2.2.0/CHANGELOG.md, vendor/colored-3.0.0/CHANGELOG.md, vendor/colored-3.1.1/CHANGELOG.md, vendor/console-0.16.3/CHANGELOG.md, vendor/cpubits-0.1.1/CHANGELOG.md, vendor/ctutils-0.4.0/CHANGELOG.md, vendor/ctutils-0.4.2/CHANGELOG.md, vendor/curl-sys-0.4.84+curl-8.17.0/curl/RELEASE-NOTES, vendor/curl-sys-0.4.88+curl-8.20.0/curl/CHANGES.md, vendor/curl-sys-0.4.88+curl-8.20.0/curl/RELEASE-NOTES, vendor/curl-sys-0.4.88+curl-8.20.0/curl/projects/vms/build_gnv_curl_release_notes.com, vendor/curl-sys-0.4.88+curl-8.20.0/curl/projects/vms/curl_release_note_start.txt, vendor/curl-sys-0.4.88+curl-8.20.0/curl/scripts/release-notes.pl, vendor/curl-sys-0.4.88+curl-8.20.0/curl/scripts/release-tools.sh, vendor/curl-sys-0.4.88+curl-8.20.0/curl/scripts/verify-release, vendor/dbus-0.9.9/changes-in-0.7.md, vendor/fastrand-2.4.1/CHANGELOG.md, vendor/gix-0.83.0/src/object/tree/diff/change.rs, vendor/gix-blame-0.11.0/CHANGELOG.md, vendor/gix-diff-0.63.0/src/index/change.rs, vendor/gix-diff-0.63.0/src/tree_with_rewrites/change.rs, vendor/gix-dir-0.23.0/CHANGELOG.md, vendor/gix-merge-0.14.0/CHANGELOG.md, vendor/hashbrown-0.17.0/CHANGELOG.md, vendor/hashbrown-0.17.1/CHANGELOG.md, vendor/hybrid-array-0.4.10/CHANGELOG.md, vendor/hybrid-array-0.4.11/CHANGELOG.md, vendor/hybrid-array-0.4.12/CHANGELOG.md, vendor/hyper-rustls-0.27.7/RELEASING.md, vendor/icu_properties_data-2.1.1/data/property_binary_changes_when_casefolded_v1.rs.data, vendor/icu_properties_data-2.1.1/data/property_binary_changes_when_casemapped_v1.rs.data, vendor/icu_properties_data-2.1.1/data/property_binary_changes_when_lowercased_v1.rs.data, vendor/icu_properties_data-2.1.1/data/property_binary_changes_when_nfkc_casefolded_v1.rs.data, vendor/icu_properties_data-2.1.1/data/property_binary_changes_when_titlecased_v1.rs.data, vendor/icu_properties_data-2.1.1/data/property_binary_changes_when_uppercased_v1.rs.data, vendor/imara-diff-0.1.8/CHANGELOG.md, vendor/imara-diff-0.2.0/CHANGELOG.md, vendor/indexmap-2.13.0/RELEASES.md, vendor/indexmap-2.14.0/RELEASES.md, vendor/inout-0.1.4/CHANGELOG.md, vendor/inout-0.2.2/CHANGELOG.md, vendor/jiff-0.2.23/CHANGELOG.md, vendor/jiff-0.2.24/CHANGELOG.md, vendor/junction-1.3.0/CHANGELOG.md, vendor/junction-1.4.2/CHANGELOG.md, vendor/libc-0.2.174/CHANGELOG.md, vendor/libc-0.2.184/CHANGELOG.md, vendor/libc-0.2.185/.release-plz.toml, vendor/libc-0.2.185/CHANGELOG.md, vendor/libc-0.2.186/.release-plz.toml, vendor/libc-0.2.186/CHANGELOG.md, vendor/libdbus-sys-0.2.6/vendor/dbus/NEWS, vendor/libdbus-sys-0.2.6/vendor/dbus/NEWS.pre-1-0, vendor/libdbus-sys-0.2.6/vendor/dbus/NEWS.pre-1-2, vendor/libssh2-sys-0.3.2/libssh2/NEWS, vendor/libssh2-sys-0.3.2/libssh2/RELEASE-NOTES, vendor/libssh2-sys-0.3.2/libssh2/git2news.pl, vendor/mio-1.0.4/CHANGELOG.md, vendor/object-0.38.1/CHANGELOG.md, vendor/object-0.39.1/CHANGELOG.md, vendor/opener-0.8.2/release.toml, vendor/openssl-0.10.76/CHANGELOG.md, vendor/openssl-0.10.78/CHANGELOG.md, vendor/openssl-src-300.5.4+3.5.4/openssl/providers/implementations/exchange/dh_exch.c, vendor/openssl-src-300.5.4+3.5.4/openssl/providers/implementations/exchange/ecdh_exch.c, vendor/openssl-src-300.5.4+3.5.4/openssl/providers/implementations/exchange/ecx_exch.c, vendor/openssl-src-300.6.0+3.6.2/openssl/crypto/evp/exchange.c, vendor/openssl-src-300.6.0+3.6.2/openssl/providers/implementations/exchange/build.info, vendor/openssl-src-300.6.0+3.6.2/openssl/providers/implementations/exchange/dh_exch.c.in, vendor/openssl-src-300.6.0+3.6.2/openssl/providers/implementations/exchange/ecdh_exch.c.in, vendor/openssl-src-300.6.0+3.6.2/openssl/providers/implementations/exchange/ecx_exch.c.in, vendor/openssl-src-300.6.0+3.6.2/openssl/providers/implementations/exchange/kdf_exch.c, vendor/openssl-src-300.6.0+3.6.2/openssl/providers/implementations/include/prov/kdfexchange.h, vendor/openssl-sys-0.9.111/CHANGELOG.md, vendor/openssl-sys-0.9.112/CHANGELOG.md, vendor/openssl-sys-0.9.114/CHANGELOG.md, vendor/orion-0.17.13/CHANGELOG.md, vendor/orion-0.17.14/CHANGELOG.md, vendor/pkg-config-0.3.33/CHANGELOG.md, vendor/portable-atomic-util-0.2.6/CHANGELOG.md, vendor/portable-atomic-util-0.2.7/CHANGELOG.md, vendor/rand-0.10.0/CHANGELOG.md, vendor/rand-0.10.1/CHANGELOG.md, vendor/rand-0.9.3/CHANGELOG.md, vendor/rand-0.9.4/CHANGELOG.md, vendor/rand_core-0.10.0/CHANGELOG.md, vendor/rand_core-0.10.1/CHANGELOG.md, vendor/rayon-1.12.0/RELEASES.md, vendor/salsa-0.25.2/CHANGELOG.md, vendor/salsa-0.25.2/book/src/derived-query-maybe-changed-after.drawio.svg, vendor/salsa-0.25.2/book/src/plumbing/maybe_changed_after.md, vendor/salsa-0.25.2/book/src/plumbing/terminology/changed_at.md, vendor/salsa-0.25.2/src/function/maybe_changed_after.rs, vendor/salsa-0.26.2/.github/workflows/release.yml, vendor/salsa-0.26.2/CHANGELOG.md, vendor/salsa-0.26.2/RELEASES.md, vendor/salsa-0.26.2/release-plz.toml, vendor/salsa-0.26.2/src/function/maybe_changed_after.rs, vendor/salsa-0.26.2/tests/cycle_maybe_changed_after.rs, vendor/salsa-0.26.2/tests/expect_reuse_field_x_of_a_tracked_struct_changes_but_fn_depends_on_field_y.rs, vendor/salsa-0.26.2/tests/expect_reuse_field_x_of_an_input_changes_but_fn_depends_on_field_y.rs, vendor/salsa-0.26.2/tests/parallel/cycle_nested_deep_conditional_changed.rs, vendor/salsa-0.26.2/tests/parallel/cycle_nested_three_threads_changed.rs, vendor/salsa-0.26.2/tests/tracked-struct-unchanged-in-new-rev.rs, vendor/salsa-macro-rules-0.25.2/CHANGELOG.md, vendor/salsa-macro-rules-0.26.2/CHANGELOG.md, vendor/salsa-macros-0.25.2/CHANGELOG.md, vendor/salsa-macros-0.26.2/CHANGELOG.md, vendor/spdx-expression-0.5.2/.github/workflows/release.yml, vendor/spdx-expression-0.5.2/CHANGELOG.md, vendor/spdx-rs-0.5.5/CHANGELOG.md, vendor/sysinfo-0.38.4/CHANGELOG.md, vendor/sysinfo-0.39.2/CHANGELOG.md, vendor/sysinfo-0.39.2/migration_guide.md, vendor/tempfile-3.21.0/CHANGELOG.md, vendor/thin-vec-0.2.14/RELEASES.md, vendor/thin-vec-0.2.15/RELEASES.md, vendor/thin-vec-0.2.16/RELEASES.md, vendor/tokio-1.50.0/CHANGELOG.md, vendor/tokio-1.52.1/CHANGELOG.md, vendor/tokio-1.52.1/tests/process_change_of_runtime.rs, vendor/typenum-1.20.0/CHANGELOG.md, vendor/ui_test-0.30.3/CHANGELOG.md, vendor/ui_test-0.30.5/.github/workflows/release.yml, vendor/ui_test-0.30.5/CHANGELOG.md, vendor/web-sys-0.3.97/src/features/gen_CaretChangedReason.rs, vendor/web-sys-0.3.97/src/features/gen_CaretStateChangedEventInit.rs, vendor/web-sys-0.3.97/src/features/gen_CookieChangeEvent.rs, vendor/web-sys-0.3.97/src/features/gen_CookieChangeEventInit.rs, vendor/web-sys-0.3.97/src/features/gen_ExtendableCookieChangeEvent.rs, vendor/web-sys-0.3.97/src/features/gen_ExtendableCookieChangeEventInit.rs, vendor/web-sys-0.3.97/src/features/gen_HashChangeEvent.rs, vendor/web-sys-0.3.97/src/features/gen_HashChangeEventInit.rs, vendor/web-sys-0.3.97/src/features/gen_IdbVersionChangeEvent.rs, vendor/web-sys-0.3.97/src/features/gen_IdbVersionChangeEventInit.rs, vendor/web-sys-0.3.97/src/features/gen_PaymentMethodChangeEvent.rs, vendor/web-sys-0.3.97/src/features/gen_PaymentMethodChangeEventInit.rs, vendor/web-sys-0.3.97/src/features/gen_RtcdtmfToneChangeEvent.rs, vendor/web-sys-0.3.97/src/features/gen_RtcdtmfToneChangeEventInit.rs, vendor/web-sys-0.3.97/src/features/gen_ScrollViewChangeEventInit.rs, vendor/web-sys-0.3.97/src/features/gen_StyleRuleChangeEventInit.rs, vendor/web-sys-0.3.97/src/features/gen_StyleSheetApplicableStateChangeEventInit.rs, vendor/web-sys-0.3.97/src/features/gen_StyleSheetChangeEventInit.rs, vendor/web-sys-0.3.97/src/features/gen_TaskPriorityChangeEvent.rs, vendor/web-sys-0.3.97/src/features/gen_TaskPriorityChangeEventInit.rs, vendor/web-sys-0.3.97/src/features/gen_XrInputSourcesChangeEvent.rs, vendor/web-sys-0.3.97/src/features/gen_XrInputSourcesChangeEventInit.rs # `addr2line` Change Log -------------------------------------------------------------------------------- ## 0.25.1 (2025/09/13) ### Changed * Fixed line parsing for split DWARF. [#353](https://github.com/gimli-rs/addr2line/pull/353) * Changed `.debug_aranges` parsing to skip invalid entries instead of failing. [#355](https://github.com/gimli-rs/addr2line/pull/355) -------------------------------------------------------------------------------- ## 0.25.0 (2025/06/11) ### Breaking changes * Updated `gimli` dependency. ### Added * Added `Loader::find_symbol`. [#341](https://github.com/gimli-rs/addr2line/pull/341) [#349](https://github.com/gimli-rs/addr2line/pull/349) * Added `Loader::get_section_range`. Added `--section` option to `addr2line` binary. [#343](https://github.com/gimli-rs/addr2line/pull/343) * Added `wasm` feature. [#348](https://github.com/gimli-rs/addr2line/pull/348) ### Changed * Fixed handling of Windows paths that use forward slashes. [#342](https://github.com/gimli-rs/addr2line/pull/342) * Removed `compiler-builtins` from `rustc-dep-of-std` dependencies. [#345](https://github.com/gimli-rs/addr2line/pull/345) -------------------------------------------------------------------------------- ## 0.24.2 (2024/10/04) ### Changed * Enabled caching of DWARF abbreviations. [#318](https://github.com/gimli-rs/addr2line/pull/318) * Changed the `addr2line` binary to prefer symbol names over DWARF names. [#332](https://github.com/gimli-rs/addr2line/pull/332) * Updated `gimli` dependency. ### Added * Added `Context::from_arc_dwarf`. [#327](https://github.com/gimli-rs/addr2line/pull/327) * Added benchmark comparison. [#315](https://github.com/gimli-rs/addr2line/pull/315) [#321](https://github.com/gimli-rs/addr2line/pull/321) [#322](https://github.com/gimli-rs/addr2line/pull/322) [#325](https://github.com/gimli-rs/addr2line/pull/325) * Added more tests. [#328](https://github.com/gimli-rs/addr2line/pull/328) [#330](https://github.com/gimli-rs/addr2line/pull/330) [#331](https://github.com/gimli-rs/addr2line/pull/331) [#333](https://github.com/gimli-rs/addr2line/pull/333) -------------------------------------------------------------------------------- ## 0.24.1 (2024/07/26) ### Changed * Fixed parsing of partial units, which are found in supplementary object files. [#313](https://github.com/gimli-rs/addr2line/pull/313) -------------------------------------------------------------------------------- ## 0.24.0 (2024/07/16) ### Breaking changes * Updated `gimli` dependency. ### Changed * Changed the order of ranges returned by `Context::find_location_range`, and fixed handling in rare situations. [#303](https://github.com/gimli-rs/addr2line/pull/303) [#304](https://github.com/gimli-rs/addr2line/pull/304) [#306](https://github.com/gimli-rs/addr2line/pull/306) * Improved the performance of `Context::find_location`. [#305](https://github.com/gimli-rs/addr2line/pull/305) ### Added * Added `LoaderReader`. [#307](https://github.com/gimli-rs/addr2line/pull/307) * Added `--all` option to `addr2line`. [#307](https://github.com/gimli-rs/addr2line/pull/307) -------------------------------------------------------------------------------- ## 0.23.0 (2024/05/26) ### Breaking changes * Updated `gimli` dependency. * Deleted `Context::new`, `Context::new_with_sup`, and `builtin_split_dwarf_loader`. Use `Context::from_dwarf` or `Loader::new` instead. This removes `object` from the public API. [#296](https://github.com/gimli-rs/addr2line/pull/296) ### Changed * Fixed handling of column 0 in the line table. [#290](https://github.com/gimli-rs/addr2line/pull/290) * Moved `addr2line` from `examples` to `bin`. Requires the `bin` feature. [#291](https://github.com/gimli-rs/addr2line/pull/291) * Split up `lib.rs` into smaller modules. [#292](https://github.com/gimli-rs/addr2line/pull/292) ### Added * Added `Loader`. Requires the `loader` feature. [#296](https://github.com/gimli-rs/addr2line/pull/296) [#297](https://github.com/gimli-rs/addr2line/pull/297) * Added unpacked Mach-O support to `Loader`. [#298](https://github.com/gimli-rs/addr2line/pull/298) -------------------------------------------------------------------------------- ## 0.22.0 (2024/04/11) ### Breaking changes * Updated `gimli` and `object` dependencies. -------------------------------------------------------------------------------- ## 0.21.0 (2023/08/12) ### Breaking changes * Updated `gimli`, `object`, and `fallible-iterator` dependencies. ### Changed * The minimum supported rust version is 1.65.0. * Store boxed slices instead of `Vec` objects in `Context`. [#278](https://github.com/gimli-rs/addr2line/pull/278) -------------------------------------------------------------------------------- ## 0.20.0 (2023/04/15) ### Breaking changes * The minimum supported rust version is 1.58.0. * Changed `Context::find_frames` to return `LookupResult`. Use `LookupResult::skip_all_loads` to obtain the result without loading split DWARF. [#260](https://github.com/gimli-rs/addr2line/pull/260) * Replaced `Context::find_dwarf_unit` with `Context::find_dwarf_and_unit`. [#260](https://github.com/gimli-rs/addr2line/pull/260) * Updated `object` dependency. ### Changed * Fix handling of file index 0 for DWARF 5. [#264](https://github.com/gimli-rs/addr2line/pull/264) ### Added * Added types and methods to support loading split DWARF: `LookupResult`, `SplitDwarfLoad`, `SplitDwarfLoader`, `Context::preload_units`. [#260](https://github.com/gimli-rs/addr2line/pull/260) [#262](https://github.com/gimli-rs/addr2line/pull/262) [#263](https://github.com/gimli-rs/addr2line/pull/263) -------------------------------------------------------------------------------- ## 0.19.0 (2022/11/24) ### Breaking changes * Updated `gimli` and `object` dependencies. -------------------------------------------------------------------------------- ## 0.18.0 (2022/07/16) ### Breaking changes * Updated `object` dependency. ### Changed * Fixed handling of relative path for `DW_AT_comp_dir`. [#239](https://github.com/gimli-rs/addr2line/pull/239) * Fixed handling of `DW_FORM_addrx` for DWARF 5 support. [#243](https://github.com/gimli-rs/addr2line/pull/243) * Fixed handling of units that are missing range information. [#249](https://github.com/gimli-rs/addr2line/pull/249) -------------------------------------------------------------------------------- ## 0.17.0 (2021/10/24) ### Breaking changes * Updated `gimli` and `object` dependencies. ### Changed * Use `skip_attributes` to improve performance. [#236](https://github.com/gimli-rs/addr2line/pull/236) -------------------------------------------------------------------------------- ## 0.16.0 (2021/07/26) ### Breaking changes * Updated `gimli` and `object` dependencies. -------------------------------------------------------------------------------- ## 0.15.2 (2021/06/04) ### Fixed * Allow `Context` to be `Send`. [#219](https://github.com/gimli-rs/addr2line/pull/219) -------------------------------------------------------------------------------- ## 0.15.1 (2021/05/02) ### Fixed * Don't ignore aranges with address 0. [#217](https://github.com/gimli-rs/addr2line/pull/217) -------------------------------------------------------------------------------- ## 0.15.0 (2021/05/02) ### Breaking changes * Updated `gimli` and `object` dependencies. [#215](https://github.com/gimli-rs/addr2line/pull/215) * Added `debug_aranges` parameter to `Context::from_sections`. [#200](https://github.com/gimli-rs/addr2line/pull/200) ### Added * Added `.debug_aranges` support. [#200](https://github.com/gimli-rs/addr2line/pull/200) * Added supplementary object file support. [#208](https://github.com/gimli-rs/addr2line/pull/208) ### Fixed * Fixed handling of Windows paths in locations. [#209](https://github.com/gimli-rs/addr2line/pull/209) * examples/addr2line: Flush stdout after each response. [#210](https://github.com/gimli-rs/addr2line/pull/210) * examples/addr2line: Avoid copying every section. [#213](https://github.com/gimli-rs/addr2line/pull/213) -------------------------------------------------------------------------------- ## 0.14.1 (2020/12/31) ### Fixed * Fix location lookup for skeleton units. [#201](https://github.com/gimli-rs/addr2line/pull/201) ### Added * Added `Context::find_location_range`. [#196](https://github.com/gimli-rs/addr2line/pull/196) [#199](https://github.com/gimli-rs/addr2line/pull/199) -------------------------------------------------------------------------------- ## 0.14.0 (2020/10/27) ### Breaking changes * Updated `gimli` and `object` dependencies. ### Fixed * Handle units that only have line information. [#188](https://github.com/gimli-rs/addr2line/pull/188) * Handle DWARF units with version <= 4 and no `DW_AT_name`. [#191](https://github.com/gimli-rs/addr2line/pull/191) * Fix handling of `DW_FORM_ref_addr`. [#193](https://github.com/gimli-rs/addr2line/pull/193) -------------------------------------------------------------------------------- ## 0.13.0 (2020/07/07) ### Breaking changes * Updated `gimli` and `object` dependencies. * Added `rustc-dep-of-std` feature. [#166](https://github.com/gimli-rs/addr2line/pull/166) ### Changed * Improve performance by parsing function contents lazily. [#178](https://github.com/gimli-rs/addr2line/pull/178) * Don't skip `.debug_info` and `.debug_line` entries with a zero address. [#182](https://github.com/gimli-rs/addr2line/pull/182) -------------------------------------------------------------------------------- ## 0.12.2 (2020/06/21) ### Fixed * Avoid linear search for `DW_FORM_ref_addr`. [#175](https://github.com/gimli-rs/addr2line/pull/175) -------------------------------------------------------------------------------- ## 0.12.1 (2020/05/19) ### Fixed * Handle units with overlapping address ranges. [#163](https://github.com/gimli-rs/addr2line/pull/163) * Don't assert for functions with overlapping address ranges. [#168](https://github.com/gimli-rs/addr2line/pull/168) -------------------------------------------------------------------------------- ## 0.12.0 (2020/05/12) ### Breaking changes * Updated `gimli` and `object` dependencies. * Added more optional features: `smallvec` and `fallible-iterator`. [#160](https://github.com/gimli-rs/addr2line/pull/160) ### Added * Added `Context::dwarf` and `Context::find_dwarf_unit`. [#159](https://github.com/gimli-rs/addr2line/pull/159) ### Changed * Removed `lazycell` dependency. [#160](https://github.com/gimli-rs/addr2line/pull/160) -------------------------------------------------------------------------------- ## 0.11.0 (2020/01/11) ### Breaking changes * Updated `gimli` and `object` dependencies. * [#130](https://github.com/gimli-rs/addr2line/pull/130) Changed `Location::file` from `Option` to `Option<&str>`. This required adding lifetime parameters to `Location` and other structs that contain it. * [#152](https://github.com/gimli-rs/addr2line/pull/152) Changed `Location::line` and `Location::column` from `Option`to `Option`. * [#156](https://github.com/gimli-rs/addr2line/pull/156) Deleted `alloc` feature, and fixed `no-std` builds with stable rust. Removed default `Reader` parameter for `Context`, and added `ObjectContext` instead. ### Added * [#134](https://github.com/gimli-rs/addr2line/pull/134) Added `Context::from_dwarf`. ### Changed * [#133](https://github.com/gimli-rs/addr2line/pull/133) Fixed handling of units that can't be parsed. * [#155](https://github.com/gimli-rs/addr2line/pull/155) Fixed `addr2line` output to match binutils. * [#130](https://github.com/gimli-rs/addr2line/pull/130) Improved `.debug_line` parsing performance. * [#148](https://github.com/gimli-rs/addr2line/pull/148) [#150](https://github.com/gimli-rs/addr2line/pull/150) [#151](https://github.com/gimli-rs/addr2line/pull/151) [#152](https://github.com/gimli-rs/addr2line/pull/152) Improved `.debug_info` parsing performance. * [#137](https://github.com/gimli-rs/addr2line/pull/137) [#138](https://github.com/gimli-rs/addr2line/pull/138) [#139](https://github.com/gimli-rs/addr2line/pull/139) [#140](https://github.com/gimli-rs/addr2line/pull/140) [#146](https://github.com/gimli-rs/addr2line/pull/146) Improved benchmarks. -------------------------------------------------------------------------------- ## 0.10.0 (2019/07/07) ### Breaking changes * [#127](https://github.com/gimli-rs/addr2line/pull/127) Update `gimli`. -------------------------------------------------------------------------------- ## 0.9.0 (2019/05/02) ### Breaking changes * [#121](https://github.com/gimli-rs/addr2line/pull/121) Update `gimli`, `object`, and `fallible-iterator` dependencies. ### Added * [#121](https://github.com/gimli-rs/addr2line/pull/121) Reexport `gimli`, `object`, and `fallible-iterator`. -------------------------------------------------------------------------------- ## 0.8.0 (2019/02/06) ### Breaking changes * [#107](https://github.com/gimli-rs/addr2line/pull/107) Update `object` dependency to 0.11. This is part of the public API. ### Added * [#101](https://github.com/gimli-rs/addr2line/pull/101) Add `object` feature (enabled by default). Disable this feature to remove the `object` dependency and `Context::new` API. * [#102](https://github.com/gimli-rs/addr2line/pull/102) Add `std` (enabled by default) and `alloc` features. ### Changed * [#108](https://github.com/gimli-rs/addr2line/issues/108) `demangle` no longer outputs the hash for rust symbols. * [#109](https://github.com/gimli-rs/addr2line/issues/109) Set default `R` for `Context`. # Changelog All notable changes to this project will be documented in this file. --- ## [2.0.1](https://github.com/Frommi/miniz_oxide/compare/2.0.0..2.0.1) - 2025-06-09 ### Other - Remove `compiler-builtins` from `rustc-dep-of-std` dependencies - ([7cdbd39](https://github.com/Frommi/miniz_oxide/commit/7cdbd3925a7f61cc075f44367b5d383861571b0a)) - Trevor Gross --- ## [2.0.0](https://github.com/Frommi/miniz_oxide/compare/1.0.2..2.0.0) - 2024-08-04 First release of adler2 - fork of adler crate as the original is unmaintained and archived ##### Changes since last version of Adler: ### Bug Fixes - **(core)** change to rust 2021 edition, update repository info and links, update author info - ([867b115](https://github.com/Frommi/miniz_oxide/commit/867b115bad79bf62098f2acccc81bf53ec5a125d)) - oyvindln - **(core)** simplify some code and fix benches - ([128fb9c](https://github.com/Frommi/miniz_oxide/commit/128fb9cb6cad5c3a54fb0b6c68549d80b79a1fe0)) - oyvindln ### Changelog of original adler crate --- ## [1.0.2 - 2021-02-26](https://github.com/jonas-schievink/adler/releases/tag/v1.0.2) - Fix doctest on big-endian systems ([#9]). [#9]: https://github.com/jonas-schievink/adler/pull/9 ## [1.0.1 - 2020-11-08](https://github.com/jonas-schievink/adler/releases/tag/v1.0.1) ### Fixes - Fix documentation on docs.rs. ## [1.0.0 - 2020-11-08](https://github.com/jonas-schievink/adler/releases/tag/v1.0.0) ### Fixes - Fix `cargo test --no-default-features` ([#5]). ### Improvements - Extended and clarified documentation. - Added more rustdoc examples. - Extended CI to test the crate with `--no-default-features`. ### Breaking Changes - `adler32_reader` now takes its generic argument by value instead of as a `&mut`. - Renamed `adler32_reader` to `adler32`. ## [0.2.3 - 2020-07-11](https://github.com/jonas-schievink/adler/releases/tag/v0.2.3) - Process 4 Bytes at a time, improving performance by up to 50% ([#2]). ## [0.2.2 - 2020-06-27](https://github.com/jonas-schievink/adler/releases/tag/v0.2.2) - Bump MSRV to 1.31.0. ## [0.2.1 - 2020-06-27](https://github.com/jonas-schievink/adler/releases/tag/v0.2.1) - Add a few `#[inline]` annotations to small functions. - Fix CI badge. - Allow integration into libstd. ## [0.2.0 - 2020-06-27](https://github.com/jonas-schievink/adler/releases/tag/v0.2.0) - Support `#![no_std]` when using `default-features = false`. - Improve performance by around 7x. - Support Rust 1.8.0. - Improve API naming. ## [0.1.0 - 2020-06-26](https://github.com/jonas-schievink/adler/releases/tag/v0.1.0) Initial release. [#2]: https://github.com/jonas-schievink/adler/pull/2 [#5]: https://github.com/jonas-schievink/adler/pull/5 # What to do to publish a new release 1. Ensure all notable changes are in the changelog under "Unreleased". 2. Execute `cargo release ` to bump version(s), tag and publish everything. External subcommand, must be installed with `cargo install cargo-release`. `` can be one of `major|minor|patch`. If this is the first release (`0.1.0`), use `minor`, since the version starts out as `0.0.0`. 3. Go to the GitHub releases, edit the just-pushed tag. Copy the release notes from the changelog. # Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] ## [1.2.0](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.37...cc-v1.2.0) - 2024-11-11 ### Added - add i686-pc-windows-gnullvm prefix detection ([#1283](https://github.com/rust-lang/cc-rs/pull/1283)) ### Other - Allow only specifying the architecture ([#1285](https://github.com/rust-lang/cc-rs/pull/1285)) - Fix WASM vs. WASI options ([#1284](https://github.com/rust-lang/cc-rs/pull/1284)) ## [1.1.37](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.36...cc-v1.1.37) - 2024-11-08 ### Other - Use relative directory for obj files hash ([#1270](https://github.com/rust-lang/cc-rs/pull/1270)) - Regenerate target info ([#1280](https://github.com/rust-lang/cc-rs/pull/1280)) ## [1.1.36](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.35...cc-v1.1.36) - 2024-11-05 ### Other - Fix CUDA build with clang++. ([#1273](https://github.com/rust-lang/cc-rs/pull/1273)) ## [1.1.35](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.34...cc-v1.1.35) - 2024-11-04 ### Other - Remove support for FRC ([#1268](https://github.com/rust-lang/cc-rs/pull/1268)) - Do not add -fPIC by default on UEFI targets ([#1263](https://github.com/rust-lang/cc-rs/pull/1263)) - Use -windows-gnu for all UEFI targets ([#1264](https://github.com/rust-lang/cc-rs/pull/1264)) ## [1.1.34](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.33...cc-v1.1.34) - 2024-11-02 ### Other - Remove redundant flags ([#1256](https://github.com/rust-lang/cc-rs/pull/1256)) ## [1.1.33](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.32...cc-v1.1.33) - 2024-11-02 ### Other - Reduce size of `cc::Build` and size of generated targets ([#1257](https://github.com/rust-lang/cc-rs/pull/1257)) ## [1.1.32](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.31...cc-v1.1.32) - 2024-11-02 ### Other - Use `rustc`'s knowledge of LLVM/Clang target triples ([#1252](https://github.com/rust-lang/cc-rs/pull/1252)) - Use Cargo's target information when possible ([#1225](https://github.com/rust-lang/cc-rs/pull/1225)) ## [1.1.31](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.30...cc-v1.1.31) - 2024-10-19 ### Other - Add comment explaining why cc does not rebuild on env PATH change ([#1247](https://github.com/rust-lang/cc-rs/pull/1247)) ## [1.1.30](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.29...cc-v1.1.30) - 2024-10-11 ### Other - Don't pass -fPIC by default on wasm ([#1245](https://github.com/rust-lang/cc-rs/pull/1245)) ## [1.1.29](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.28...cc-v1.1.29) - 2024-10-11 ### Other - Regenerate target info ([#1243](https://github.com/rust-lang/cc-rs/pull/1243)) ## [1.1.28](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.27...cc-v1.1.28) - 2024-10-06 ### Other - Environment variables: For one accepting boolean, treat "0", "false" and empty env as false ([#1238](https://github.com/rust-lang/cc-rs/pull/1238)) ## [1.1.27](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.26...cc-v1.1.27) - 2024-10-06 ### Other - Revert "Use debug version of MSVC runtime library on debug ([#1231](https://github.com/rust-lang/cc-rs/pull/1231))" ([#1237](https://github.com/rust-lang/cc-rs/pull/1237)) - Disable `CC_ENABLE_DEBUG_OUTPUT` if it is set to "0" ([#1234](https://github.com/rust-lang/cc-rs/pull/1234)) ## [1.1.26](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.25...cc-v1.1.26) - 2024-10-06 ### Other - Use debug version of MSVC runtime library on debug ([#1231](https://github.com/rust-lang/cc-rs/pull/1231)) ## [1.1.25](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.24...cc-v1.1.25) - 2024-10-05 ### Other - Remove incorrect "lib" prefixes in CXXSTDLIB doc comments ([#1228](https://github.com/rust-lang/cc-rs/pull/1228)) ## [1.1.24](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.23...cc-v1.1.24) - 2024-10-01 ### Other - Fix wasm32-wasip1-threads: shared-memory disallowed due to not compiled with 'atomics' or 'bulk-memory' features ([#1221](https://github.com/rust-lang/cc-rs/pull/1221)) - Reduce the need for the host target triple ([#1224](https://github.com/rust-lang/cc-rs/pull/1224)) - Add auto cancellation for CI jobs ([#1222](https://github.com/rust-lang/cc-rs/pull/1222)) ## [1.1.23](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.22...cc-v1.1.23) - 2024-09-30 ### Other - Update doc for detecting changes/upgrades of compilers ([#1218](https://github.com/rust-lang/cc-rs/pull/1218)) ## [1.1.22](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.21...cc-v1.1.22) - 2024-09-27 ### Other - Don't rerun if PATH changes ([#1215](https://github.com/rust-lang/cc-rs/pull/1215)) ## [1.1.21](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.20...cc-v1.1.21) - 2024-09-18 ### Other - disable pic for targets that end in `-none` ([#1212](https://github.com/rust-lang/cc-rs/pull/1212)) ## [1.1.20](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.19...cc-v1.1.20) - 2024-09-17 ### Other - Add buildcache as known Rust and C/C++ compiler wrapper ([#1209](https://github.com/rust-lang/cc-rs/pull/1209)) ## [1.1.19](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.18...cc-v1.1.19) - 2024-09-15 ### Other - Add support arm64e-apple-darwin ([#1207](https://github.com/rust-lang/cc-rs/pull/1207)) ## [1.1.18](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.17...cc-v1.1.18) - 2024-09-07 ### Other - Fixed unsoundness in `StderrForwarder::forward_available` ([#1203](https://github.com/rust-lang/cc-rs/pull/1203)) ## [1.1.17](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.16...cc-v1.1.17) - 2024-09-06 ### Fixed - fix finding toolchains when invoked by msbuild ([#1201](https://github.com/rust-lang/cc-rs/pull/1201)) ## [1.1.16](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.15...cc-v1.1.16) - 2024-09-04 ### Other - Treat VxWorks wr-cc as a Gnu compiler ([#1198](https://github.com/rust-lang/cc-rs/pull/1198)) ## [1.1.15](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.14...cc-v1.1.15) - 2024-08-26 ### Other - Add -mfloat-abi=hard as a default argument when using any arm/thumb-none-eabihf target ([#1194](https://github.com/rust-lang/cc-rs/pull/1194)) ## [1.1.14](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.13...cc-v1.1.14) - 2024-08-23 ### Other - allow finding tools from path if VisualStudioDir is set ## [1.1.13](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.12...cc-v1.1.13) - 2024-08-16 ### Other - Fix detect family: should detect emscripten as clang, closes [#1185](https://github.com/rust-lang/cc-rs/pull/1185) ([#1186](https://github.com/rust-lang/cc-rs/pull/1186)) ## [1.1.12](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.11...cc-v1.1.12) - 2024-08-15 ### Other - improve docs ([#1183](https://github.com/rust-lang/cc-rs/pull/1183)) ## [1.1.11](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.10...cc-v1.1.11) - 2024-08-14 ### Other - Add support for parsing shell encoded `*FLAGS` ([#1181](https://github.com/rust-lang/cc-rs/pull/1181)) - Replace vector of tuples with BTreeMap which already is sorted and free of duplicates ([#1177](https://github.com/rust-lang/cc-rs/pull/1177)) ## [1.1.10](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.9...cc-v1.1.10) - 2024-08-11 ### Other - Remap Windows targets triples to their LLVM counterparts ([#1176](https://github.com/rust-lang/cc-rs/pull/1176)) ## [1.1.9](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.8...cc-v1.1.9) - 2024-08-11 ### Other - Add custom CC wrapper to the wrapper whitelist ([#1175](https://github.com/rust-lang/cc-rs/pull/1175)) ## [1.1.8](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.7...cc-v1.1.8) - 2024-08-06 ### Other - Fix broken link in docs.rs ([#1173](https://github.com/rust-lang/cc-rs/pull/1173)) ## [1.1.7](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.6...cc-v1.1.7) - 2024-07-29 ### Other - add `.objects` ([#1166](https://github.com/rust-lang/cc-rs/pull/1166)) ## [1.1.6](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.5...cc-v1.1.6) - 2024-07-19 ### Other - Clippy fixes ([#1163](https://github.com/rust-lang/cc-rs/pull/1163)) ## [1.1.5](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.4...cc-v1.1.5) - 2024-07-15 ### Other - Fix cyclic compilation: Use vendored once_cell ([#1154](https://github.com/rust-lang/cc-rs/pull/1154)) ## [1.1.4](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.3...cc-v1.1.4) - 2024-07-14 ### Other - Support compiling on wasm targets (Supersede [#1068](https://github.com/rust-lang/cc-rs/pull/1068)) ([#1160](https://github.com/rust-lang/cc-rs/pull/1160)) ## [1.1.3](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.2...cc-v1.1.3) - 2024-07-14 ### Other - Reduce msrv to 1.63 ([#1158](https://github.com/rust-lang/cc-rs/pull/1158)) - Revert "Use raw-dylib for windows-sys ([#1137](https://github.com/rust-lang/cc-rs/pull/1137))" ([#1157](https://github.com/rust-lang/cc-rs/pull/1157)) - Fix typos ([#1152](https://github.com/rust-lang/cc-rs/pull/1152)) - Fix `doc_lazy_continuation` lints ([#1153](https://github.com/rust-lang/cc-rs/pull/1153)) ## [1.1.2](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.1...cc-v1.1.2) - 2024-07-12 ### Other - Add empty `jobserver` feature. ([#1150](https://github.com/rust-lang/cc-rs/pull/1150)) ## [1.1.1](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.0...cc-v1.1.1) - 2024-07-12 ### Other - Fix is_flag_supported not respecting emit_rerun_if_env_changed ([#1147](https://github.com/rust-lang/cc-rs/pull/1147)) ([#1148](https://github.com/rust-lang/cc-rs/pull/1148)) ## [1.1.0](https://github.com/rust-lang/cc-rs/compare/cc-v1.0.106...cc-v1.1.0) - 2024-07-08 ### Added - add cargo_output to eliminate last vestiges of stdout pollution ([#1141](https://github.com/rust-lang/cc-rs/pull/1141)) ## [1.0.106](https://github.com/rust-lang/cc-rs/compare/cc-v1.0.105...cc-v1.0.106) - 2024-07-08 ### Other - Drop support for Visual Studio 12 (2013) ([#1046](https://github.com/rust-lang/cc-rs/pull/1046)) - Use raw-dylib for windows-sys ([#1137](https://github.com/rust-lang/cc-rs/pull/1137)) - Bump msrv to 1.67 ([#1143](https://github.com/rust-lang/cc-rs/pull/1143)) - Bump msrv to 1.65 ([#1140](https://github.com/rust-lang/cc-rs/pull/1140)) - Fix clippy warnings ([#1138](https://github.com/rust-lang/cc-rs/pull/1138)) ## [1.0.105](https://github.com/rust-lang/cc-rs/compare/cc-v1.0.104...cc-v1.0.105) - 2024-07-07 ### Other - Regenerate windows sys bindings ([#1132](https://github.com/rust-lang/cc-rs/pull/1132)) - Fix generate-windows-sys-bindings ([#1133](https://github.com/rust-lang/cc-rs/pull/1133)) - Fix gen-windows-sys-binding ([#1130](https://github.com/rust-lang/cc-rs/pull/1130)) - Fix gen-windows-sys-binding ([#1127](https://github.com/rust-lang/cc-rs/pull/1127)) - Update windows-bindgen requirement from 0.57 to 0.58 ([#1123](https://github.com/rust-lang/cc-rs/pull/1123)) ## [1.0.104](https://github.com/rust-lang/cc-rs/compare/cc-v1.0.103...cc-v1.0.104) - 2024-07-01 ### Other - Fixed link break about compile-time-requirements ([#1118](https://github.com/rust-lang/cc-rs/pull/1118)) ## [1.0.103](https://github.com/rust-lang/cc-rs/compare/cc-v1.0.102...cc-v1.0.103) - 2024-06-30 ### Other - Fix compilation for wasm: env WASI_SYSROOT should be optional ([#1114](https://github.com/rust-lang/cc-rs/pull/1114)) ## [1.0.102](https://github.com/rust-lang/cc-rs/compare/cc-v1.0.101...cc-v1.0.102) - 2024-06-29 ### Other - Fix invalid wasi targets compatibility ([#1105](https://github.com/rust-lang/cc-rs/pull/1105)) - Speedup regenerate-target-info and regenerate-windows-sys ([#1110](https://github.com/rust-lang/cc-rs/pull/1110)) ## [1.0.101](https://github.com/rust-lang/cc-rs/compare/cc-v1.0.100...cc-v1.0.101) - 2024-06-25 ### Other - Use `Build::getenv` instead of `env::var*` in anywhere that makes sense ([#1103](https://github.com/rust-lang/cc-rs/pull/1103)) ## [1.0.100](https://github.com/rust-lang/cc-rs/compare/cc-v1.0.99...cc-v1.0.100) - 2024-06-23 ### Other - Update publish.yml to use release-plz ([#1101](https://github.com/rust-lang/cc-rs/pull/1101)) - Accept `OsStr` instead of `str` for flags ([#1100](https://github.com/rust-lang/cc-rs/pull/1100)) - Use `dep:` syntax to avoid implicit features. ([#1099](https://github.com/rust-lang/cc-rs/pull/1099)) - Minor clippy fixes. ([#1098](https://github.com/rust-lang/cc-rs/pull/1098)) - Fix WASI compilation for C++ ([#1083](https://github.com/rust-lang/cc-rs/pull/1083)) - Regenerate windows sys bindings ([#1096](https://github.com/rust-lang/cc-rs/pull/1096)) - Rename regenerate-windows-sys to regenerate-windows-sys.yml ([#1095](https://github.com/rust-lang/cc-rs/pull/1095)) - Create regenerate-windows-sys.yml ([#1094](https://github.com/rust-lang/cc-rs/pull/1094)) - Update windows-bindgen requirement from 0.56 to 0.57 ([#1091](https://github.com/rust-lang/cc-rs/pull/1091)) - Eagerly close tempfile to fix [#1082](https://github.com/rust-lang/cc-rs/pull/1082) ([#1087](https://github.com/rust-lang/cc-rs/pull/1087)) - Output msvc.exe in the output directory ([#1090](https://github.com/rust-lang/cc-rs/pull/1090)) - Fix clippy warnings on Windows ([#1088](https://github.com/rust-lang/cc-rs/pull/1088)) - Don't try to free DLL on drop ([#1089](https://github.com/rust-lang/cc-rs/pull/1089)) - Fix panic safety issue in StderrForwarder ([#1079](https://github.com/rust-lang/cc-rs/pull/1079)) # Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] ## [1.0.4](https://github.com/rust-lang/cfg-if/compare/v1.0.3...v1.0.4) - 2025-10-15 - Support `cfg(true)` and `cfg(false)` ([#99](https://github.com/rust-lang/cfg-if/pull/99)) - Set and test a MSRV of 1.32 - Have a single top-level rule ## [1.0.3](https://github.com/rust-lang/cfg-if/compare/v1.0.2...v1.0.3) - 2025-08-19 - Revert "Remove `@__identity` rule." ## [1.0.2](https://github.com/rust-lang/cfg-if/compare/v1.0.1...v1.0.2) - 2025-08-19 - Remove `@__identity` rule. ## [1.0.1](https://github.com/rust-lang/cfg-if/compare/v1.0.0...v1.0.1) - 2025-06-09 - Remove `compiler-builtins` from `rustc-dep-of-std` dependencies - Remove redundant configuration from Cargo.toml - More readable formatting and identifier names. ([#39](https://github.com/rust-lang/cfg-if/pull/39)) - Add expanded example to readme ([#38](https://github.com/rust-lang/cfg-if/pull/38)) # Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] ## [0.2.24](https://github.com/rust-lang/getopts/compare/v0.2.23...v0.2.24) - 2025-08-29 ### Other - Make unicode-width an optional default dependency ([#133](https://github.com/rust-lang/getopts/pull/133)) ## [0.2.23](https://github.com/rust-lang/getopts/compare/v0.2.22...v0.2.23) - 2025-06-09 ### Other - Add caching - Remove redundant configuration from Cargo.toml - Bump unicode-width to 0.2.0 - Update the MSRV to 1.66 and edition to 2021 ## [0.2.22](https://github.com/rust-lang/getopts/compare/v0.2.21...v0.2.22) - 2025-06-05 ### Other - Add a check for formatting, apply `cargo fmt` - Add a release job - Document and start testing the MSRV - Test on more platforms, deny warnings - Eliminate `html_root_url` - Update version number in html_root_url - Use SPDX license format - Fix compiler warning in documentation example - Merge pull request #100 from zdenek-crha/parse_args_end_position - Merge pull request #103 from zdenek-crha/better_usage_examples - Add usage examples for methods that add option config - Update outdated top level documentation - Add triagebot configuration - remove deprecated Error::description - Update documentation of opt_present() and other functions that might panic - Updated tests for opts_str() and opts_str_first() to check order of processing - Add opts_present_any() and opts_str_first() interface functions - Parse options without names vector # `gimli` Change Log -------------------------------------------------------------------------------- ## 0.32.3 Released 2025/09/13. ### Changed * Changed parsing to accept -2 for tombstone values in `.debug_line`, `.debug_aranges`, `.debug_loclists`, and `.debug_rnglists`. [#791](https://github.com/gimli-rs/gimli/pull/791) ### Added * Added more x86-64 register definitions. [#794](https://github.com/gimli-rs/gimli/pull/794) -------------------------------------------------------------------------------- ## 0.32.2 Released 2025/08/26. ### Changed * Removed `PartialEq` implementations for `UnitSectionOffset`. These were an unintended breaking change. [#789](https://github.com/gimli-rs/gimli/pull/789) -------------------------------------------------------------------------------- ## 0.32.1 Released 2025/08/22. ### Changed * Improved handling of invalid DIE references during writing. [#777](https://github.com/gimli-rs/gimli/pull/777) [#779](https://github.com/gimli-rs/gimli/pull/779) * Changed abbreviation parsing to allow a missing null terminator. [#781](https://github.com/gimli-rs/gimli/pull/781) * Changed `write::LineProgram` to support any form for file source code. [#784](https://github.com/gimli-rs/gimli/pull/784) [#786](https://github.com/gimli-rs/gimli/pull/786) ### Added * Added DWARF version 1.1 constant definitions. [#775](https://github.com/gimli-rs/gimli/pull/775) -------------------------------------------------------------------------------- ## 0.32.0 Released 2025/06/11. ### Breaking changes * Added `read::Dwarf::debug_macinfo`, `read::Dwarf::debug_macro`, and associated support. [#759](https://github.com/gimli-rs/gimli/pull/759) [#763](https://github.com/gimli-rs/gimli/pull/763) [#772](https://github.com/gimli-rs/gimli/pull/772) * Removed `#[non_exhaustive]` from `read::CallFrameInstruction`. [#764](https://github.com/gimli-rs/gimli/pull/764) * Added `source_dir` parameter to `write::LineProgram::new`. [#768](https://github.com/gimli-rs/gimli/pull/768) ### Changed * Fixed spelling in `Error::UnknownCallFrameInstruction` description. [#758](https://github.com/gimli-rs/gimli/pull/758) * Removed `compiler-builtins` from `rustc-dep-of-std` dependencies. [#769](https://github.com/gimli-rs/gimli/pull/769) * Changed `write::UnitTable::from` to ignore `DW_AT_GNU_locviews` attributes. [#771](https://github.com/gimli-rs/gimli/pull/771) ### Added * Added `DebugAddr::headers`. [#760](https://github.com/gimli-rs/gimli/pull/760) -------------------------------------------------------------------------------- ## 0.31.1 Released 2024/10/04. ### Changed * Changed `read::Evaluation::evaluate` to validate `DW_OP_deref_size`. [#739](https://github.com/gimli-rs/gimli/pull/739) * Changed `write::LineProgram` to allow use of file index 0 for DWARF version 5. [#740](https://github.com/gimli-rs/gimli/pull/740) * Improved the workaround for reading zero length entries in `.debug_frame`. [#741](https://github.com/gimli-rs/gimli/pull/741) * Implemented `Default` for `read::DwarfSections` and `read::DwarfPackageSections`. [#742](https://github.com/gimli-rs/gimli/pull/742) * Changed `read::ArangeEntryIter` to handle tombstones in `.debug_aranges`. [#743](https://github.com/gimli-rs/gimli/pull/743) * Improved handling handling of 0 for tombstones in `DW_LNE_set_address` and address pairs in ranges and locations. [#750](https://github.com/gimli-rs/gimli/pull/750) * Changed the `read::ArrayLike` trait implementation to use const generics. [#752](https://github.com/gimli-rs/gimli/pull/752) ### Added * Added `MIPS::HI` and `MIPS::LO`. [#749](https://github.com/gimli-rs/gimli/pull/749) -------------------------------------------------------------------------------- ## 0.31.0 Released 2024/07/16. ### Breaking changes * Deleted support for segment selectors. [#720](https://github.com/gimli-rs/gimli/pull/720) * Added `read::FileEntry::source` and deleted `Copy` implementation. [#728](https://github.com/gimli-rs/gimli/pull/728) * Changed `read::LineRow::execute` to return a `Result`. [#731](https://github.com/gimli-rs/gimli/pull/731) * Deleted `Display` implementation for `read::LineInstruction`. [#734](https://github.com/gimli-rs/gimli/pull/734) * Changed `read::Error` to be non-exhaustive. ### Changed * Fixed `Hash` implementation for `read::EndianReader`. [#723](https://github.com/gimli-rs/gimli/pull/723) * Changed `read::EhFrameHdr::parse` to validate the FDE count encoding. [#725](https://github.com/gimli-rs/gimli/pull/725) * Changed address overflow to be an error for `read::UnwindTableRow`, `read::LineRow`, and `read::ArangeEntry`. [#730](https://github.com/gimli-rs/gimli/pull/730) [#731](https://github.com/gimli-rs/gimli/pull/731) [#732](https://github.com/gimli-rs/gimli/pull/732) * Changed wrapping addition for 32-bit addresses to wrap at 32 bits instead of at 64 bits. [#733](https://github.com/gimli-rs/gimli/pull/733) * Added earlier validation of address sizes. [#733](https://github.com/gimli-rs/gimli/pull/733) ### Added * Added `read::IndexSectionId::section_id`. [#719](https://github.com/gimli-rs/gimli/pull/719) * Added `read::FrameDescriptionEntry::end_address`. [#727](https://github.com/gimli-rs/gimli/pull/727) * Added support for `DW_LNCT_LLVM_source`. [#728](https://github.com/gimli-rs/gimli/pull/728) -------------------------------------------------------------------------------- ## 0.30.0 Released 2024/05/26. ### Breaking changes * Added context to some `read::Error` variants. [#703](https://github.com/gimli-rs/gimli/pull/703) * Changed type of `read::UnitIndexSection::section` to `IndexSectionId`. [#716](https://github.com/gimli-rs/gimli/pull/716) ### Changed * Fixed `write::Operation::ImplicitPointer::size`. [#712](https://github.com/gimli-rs/gimli/pull/712) * Changed `read::RngListIter` and `read::LocListIter` to skip ranges where the end is before the beginning, instead of returning an error. [#715](https://github.com/gimli-rs/gimli/pull/715) * Fixed clippy warnings. [#713](https://github.com/gimli-rs/gimli/pull/713) ### Added * Added `read::UnitRef`. [#711](https://github.com/gimli-rs/gimli/pull/711) -------------------------------------------------------------------------------- ## 0.29.0 Released 2024/04/11. ### Breaking changes * Changed `Reader` type parameter to `ReaderOffset` for `read::UnwindContext` and related types. Replaced `Expression` with `UnwindExpression` in unwind information types. [#703](https://github.com/gimli-rs/gimli/pull/703) ### Changed * Changed `write::Sections::for_each` and `for_each_mut` to specify section lifetime. [#699](https://github.com/gimli-rs/gimli/pull/699) * Fixed writing unwind information with an LSDA encoding that is not `DW_EH_PE_absptr`. [#704](https://github.com/gimli-rs/gimli/pull/704) * Fixed parsing for an empty DWP index. [#706](https://github.com/gimli-rs/gimli/pull/706) * Improved error handling in `read::Unit::dwo_name`. [#693](https://github.com/gimli-rs/gimli/pull/693) * Fixed warnings. [#692](https://github.com/gimli-rs/gimli/pull/692) [#694](https://github.com/gimli-rs/gimli/pull/694) [#695](https://github.com/gimli-rs/gimli/pull/695) [#696](https://github.com/gimli-rs/gimli/pull/696) ### Added * Added MIPS register definitions. [#690](https://github.com/gimli-rs/gimli/pull/690) * Added PowerPC register definitions. [#691](https://github.com/gimli-rs/gimli/pull/691) * Added `read::DwarfSections` and `read::DwarfPackageSections`. [#698](https://github.com/gimli-rs/gimli/pull/698) * Implemented `BitOr` for `DwEhPe`. [#709](https://github.com/gimli-rs/gimli/pull/709) * Added `read::Relocate`, `read::RelocateReader`, and `write::RelocateWriter`. [#709](https://github.com/gimli-rs/gimli/pull/709) -------------------------------------------------------------------------------- ## 0.28.1 Released 2023/11/24. ### Changed * Changed `read::AbbreviationsCache` to require manual population using `Dwarf::populate_abbreviations_cache`. [#679](https://github.com/gimli-rs/gimli/pull/679) * Changed the default `read::UnwindContextStorage` to use `Box` instead of `Vec` so that its memory usage is limited. [#687](https://github.com/gimli-rs/gimli/pull/687) * Changed `read::UnwindTable::new` to always reset the context, because previous errors may have left the context in an invalid state. [#684](https://github.com/gimli-rs/gimli/pull/684) * Changed the `Debug` implementation for `read::EndianSlice` to limit the number of bytes it displays. [#686](https://github.com/gimli-rs/gimli/pull/686) ### Added * Added more AArch64 register definitions. [#680](https://github.com/gimli-rs/gimli/pull/680) * Added `read::Unit::new_with_abbreviations`. [#677](https://github.com/gimli-rs/gimli/pull/677) * Added `read::Evaluation::value_result`. [#676](https://github.com/gimli-rs/gimli/pull/676) -------------------------------------------------------------------------------- ## 0.28.0 Released 2023/08/12. ### Breaking changes * Deleted `impl From for &[u8]`. Use `EndianSlice::slice` instead. [#669](https://github.com/gimli-rs/gimli/pull/669) * Deleted `impl Index for EndianSlice` and `impl Index> for EndianSlice`. [#669](https://github.com/gimli-rs/gimli/pull/669) * Replaced `impl From for u64` with `Pointer::pointer`. [#670](https://github.com/gimli-rs/gimli/pull/670) * Updated `fallible-iterator` to 0.3.0. [#672](https://github.com/gimli-rs/gimli/pull/672) * Changed some optional dependencies to use the `dep:` feature syntax. [#672](https://github.com/gimli-rs/gimli/pull/672) * Added `non_exhaustive` attribute to `read::RegisterRule`, `read::CallFrameInstruction`, and `write::CallFrameInstruction`. [#673](https://github.com/gimli-rs/gimli/pull/673) ### Changed * The minimum supported rust version for the `read` feature and its dependencies increased to 1.60.0. * The minimum supported rust version for other features increased to 1.65.0. ### Added * Added `Vendor`, `read::DebugFrame::set_vendor`, and `read::EhFrame::set_vendor`. [#673](https://github.com/gimli-rs/gimli/pull/673) * Added more ARM and AArch64 register definitions, and `DW_CFA_AARCH64_negate_ra_state` support. [#673](https://github.com/gimli-rs/gimli/pull/673) -------------------------------------------------------------------------------- ## 0.27.3 Released 2023/06/14. ### Changed * Excluded test fixtures from published package. [#661](https://github.com/gimli-rs/gimli/pull/661) ### Added * Added `FallibleIterator` implementation for `read::OperationIter`. [#649](https://github.com/gimli-rs/gimli/pull/649) * Added `DW_AT_GNU_deleted` constant. [#658](https://github.com/gimli-rs/gimli/pull/658) -------------------------------------------------------------------------------- ## 0.27.2 Released 2023/02/15. ### Added * Added support for tombstones in `read::LineRows`. [#642](https://github.com/gimli-rs/gimli/pull/642) -------------------------------------------------------------------------------- ## 0.27.1 Released 2023/01/23. ### Added * Added `SectionId::xcoff_name` and `read::Section::xcoff_section_name`. [#635](https://github.com/gimli-rs/gimli/pull/635) * Added `read::Dwarf::make_dwo` and `read::Unit::dwo_name`. [#637](https://github.com/gimli-rs/gimli/pull/637) ### Changed * Changed `read::DwarfPackage::sections` to handle supplementary files. [#638](https://github.com/gimli-rs/gimli/pull/638) -------------------------------------------------------------------------------- ## 0.27.0 Released 2022/11/23. ### Breaking changes * Added `read::Dwarf::abbreviations_cache` to cache abbreviations at offset 0. Changed `read::Dwarf::abbreviations` to return `Result>`, and changed `read::Unit::abbreviations` to `Arc`. [#628](https://github.com/gimli-rs/gimli/pull/628) ### Added * Added LoongArch register definitions. [#624](https://github.com/gimli-rs/gimli/pull/624) * Added support for tombstones in `read::LocListIter` and `read::RngListIter`. [#631](https://github.com/gimli-rs/gimli/pull/631) -------------------------------------------------------------------------------- ## 0.26.2 Released 2022/07/16. ### Changed * Fixed CFI personality encoding when writing. [#609](https://github.com/gimli-rs/gimli/pull/609) * Fixed use of raw pointer for mutation, detected by Miri. [#614](https://github.com/gimli-rs/gimli/pull/614) * Fixed `DW_OP_GNU_implicit_pointer` handling for DWARF version 2. [#618](https://github.com/gimli-rs/gimli/pull/618) ### Added * Added `read::EhHdrTable::iter`. [#619](https://github.com/gimli-rs/gimli/pull/619) -------------------------------------------------------------------------------- ## 0.26.1 Released 2021/11/02. ### Changed * Fixed segmentation fault in `ArrayVec>::into_vec`, which may be used by `read::Evaluation::result`. This regression was introduced in 0.26.0. [#601](https://github.com/gimli-rs/gimli/pull/601) -------------------------------------------------------------------------------- ## 0.26.0 Released 2021/10/24. ### Breaking changes * Removed `read::UninitializedUnwindContext`. Use `Box` instead. [#593](https://github.com/gimli-rs/gimli/pull/593) * Renamed `read::Error::CfiStackFull` to `StackFull`. [#595](https://github.com/gimli-rs/gimli/pull/595) * Added `UnwindContextStorage` type parameter to `read::UnwindContext`, `read::UnwindTable`, `read::UnwindTableRow`, and `read::RegisterRuleMap`. [#595](https://github.com/gimli-rs/gimli/pull/595) * Added `EvaluationStorage` type parameter to `read::Evaluation`. [#595](https://github.com/gimli-rs/gimli/pull/595) * Added `read::SectionId::DebugCuIndex` and `read::SectionId::DebugTuIndex`. [#588](https://github.com/gimli-rs/gimli/pull/588) ### Changed * Fixed `DW_EH_PE_pcrel` handling in default `write::Writer::write_eh_pointer` implementation. [#576](https://github.com/gimli-rs/gimli/pull/576) * Fixed `read::AttributeSpecification::size` for some forms. [#597](https://github.com/gimli-rs/gimli/pull/597) * Display more unit details in dwarfdump. [#584](https://github.com/gimli-rs/gimli/pull/584) ### Added * Added `write::DebuggingInformationEntry::delete_child`. [#570](https://github.com/gimli-rs/gimli/pull/570) * Added ARM and AArch64 register definitions. [#574](https://github.com/gimli-rs/gimli/pull/574) [#577](https://github.com/gimli-rs/gimli/pull/577) * Added RISC-V register definitions. [#579](https://github.com/gimli-rs/gimli/pull/579) * Added `read::DwarfPackage`, `read::DebugCuIndex`, and `read::DebugTuIndex`. [#588](https://github.com/gimli-rs/gimli/pull/588) * Added `read-core` feature to allow building without `liballoc`. [#596](https://github.com/gimli-rs/gimli/pull/596) * Added `read::EntriesRaw::skip_attributes`. [#597](https://github.com/gimli-rs/gimli/pull/597) -------------------------------------------------------------------------------- ## 0.25.0 Released 2021/07/26. ### Breaking changes * `read::FrameDescriptionEntry::unwind_info_for_address` now returns a reference instead of cloning. [#557](https://github.com/gimli-rs/gimli/pull/557) * `read::AttributeValue::RangeListsRef` now contains a `RawRangeListsOffset` to allow handling of GNU split DWARF extensions. Use `read::Dwarf::ranges_offset_from_raw` to handle it. [#568](https://github.com/gimli-rs/gimli/pull/568) [#569](https://github.com/gimli-rs/gimli/pull/569) * Added `read::Unit::dwo_id`. [#569](https://github.com/gimli-rs/gimli/pull/569) ### Changed * `.debug_aranges` parsing now accepts version 3. [#560](https://github.com/gimli-rs/gimli/pull/560) * `read::Dwarf::attr_ranges_offset` and its callers now handle GNU split DWARF extensions. [#568](https://github.com/gimli-rs/gimli/pull/568) [#569](https://github.com/gimli-rs/gimli/pull/569) ### Added * Added `read::DebugLineStr::new`. [#556](https://github.com/gimli-rs/gimli/pull/556) * Added `read::UnwindTable::into_current_row`. [#557](https://github.com/gimli-rs/gimli/pull/557) * Added more `DW_LANG` constants. [#565](https://github.com/gimli-rs/gimli/pull/565) * dwarfdump: added DWO parent support. [#568](https://github.com/gimli-rs/gimli/pull/568) * Added `read::Dwarf` methods: `ranges_offset_from_raw`, `raw_ranges`, and `raw_locations`. [#568](https://github.com/gimli-rs/gimli/pull/568) [#569](https://github.com/gimli-rs/gimli/pull/569) -------------------------------------------------------------------------------- ## 0.24.0 Released 2021/05/01. ### Breaking changes * Minimum Rust version increased to 1.42.0. * Added `read::Dwarf::debug_aranges`. [#539](https://github.com/gimli-rs/gimli/pull/539) * Replaced `read::DebugAranges::items` with `read::DebugAranges::headers`. [#539](https://github.com/gimli-rs/gimli/pull/539) * Added `read::Operation::Wasm*`. [#546](https://github.com/gimli-rs/gimli/pull/546) * `read::LineRow::line` now returns `Option`. The `read::ColumnType::Column` variant now contains a `NonZeroU64`. [#551](https://github.com/gimli-rs/gimli/pull/551) * Replaced `read::Dwarf::debug_str_sup` with `read::Dwarf::sup`. Deleted `sup` parameter of `read::Dwarf::load`. Added `read::Dwarf::load_sup`. [#554](https://github.com/gimli-rs/gimli/pull/554) ### Added * dwarfdump: Supplementary object file support. [#552](https://github.com/gimli-rs/gimli/pull/552) ### Changed * Support `DW_FORM_addrx*` for `DW_AT_low_pc`/`DW_AT_high_pc` in `read::Dwarf`. [#541](https://github.com/gimli-rs/gimli/pull/541) * Performance improvement in `EndianReader`. [#549](https://github.com/gimli-rs/gimli/pull/549) -------------------------------------------------------------------------------- ## 0.23.0 Released 2020/10/27. ### Breaking changes * Added more variants to `read::UnitType`. Added `read::AttributeValue::DwoId` [#521](https://github.com/gimli-rs/gimli/pull/521) * Replaced `CompilationUnitHeader` and `TypeUnitHeader` with `UnitHeader`. Replaced `CompilationUnitHeadersIter` with `DebugInfoUnitHeadersIter`. Replaced `TypeUnitHeadersIter` with `DebugTypesUnitHeadersIter`. [#523](https://github.com/gimli-rs/gimli/pull/523) ### Added * Added read support for split DWARF. [#527](https://github.com/gimli-rs/gimli/pull/527) [#529](https://github.com/gimli-rs/gimli/pull/529) * Added `read::Dwarf::attr_address`. [#524](https://github.com/gimli-rs/gimli/pull/524) * Added read support for `DW_AT_GNU_addr_base` and `DW_AT_GNU_ranges_base`. [#525](https://github.com/gimli-rs/gimli/pull/525) * dwarfdump: Display index values for attributes. [#526](https://github.com/gimli-rs/gimli/pull/526) * Added `name_to_register`. [#532](https://github.com/gimli-rs/gimli/pull/532) -------------------------------------------------------------------------------- ## 0.22.0 Released 2020/07/03. ### Breaking changes * Fixed `UnitHeader::size_of_header` for DWARF 5 units. [#518](https://github.com/gimli-rs/gimli/pull/518) ### Added * Added fuzz targets in CI. [#512](https://github.com/gimli-rs/gimli/pull/512) * Added read support for `DW_OP_GNU_addr_index` and `DW_OP_GNU_const_index`. [#516](https://github.com/gimli-rs/gimli/pull/516) * Added `.dwo` support to dwarfdump. [#516](https://github.com/gimli-rs/gimli/pull/516) * Added `SectionId::dwo_name` and `Section::dwo_section_name`. [#517](https://github.com/gimli-rs/gimli/pull/517) ### Fixed * Fixed panic when reading `DW_FORM_indirect` combined with `DW_FORM_implicit_const`. [#502](https://github.com/gimli-rs/gimli/pull/502) * Fixed panic for `read::Abbreviations::get(0)`. [#505](https://github.com/gimli-rs/gimli/pull/505) * Fixed arithmetic overflow when reading `.debug_line`. [#508](https://github.com/gimli-rs/gimli/pull/508) * Fixed arithmetic overflow when reading CFI. [#509](https://github.com/gimli-rs/gimli/pull/509) * Fixed arithmetic overflow and division by zero when reading `.debug_aranges`. [#510](https://github.com/gimli-rs/gimli/pull/510) * Don't return error from `read::Unit::new` when `DW_AT_name` or `DW_AT_comp_dir` is missing. [#515](https://github.com/gimli-rs/gimli/pull/515) -------------------------------------------------------------------------------- ## 0.21.0 Released 2020/05/12. ### Breaking changes * Minimum Rust version increased to 1.38.0. * Replaced `read::Operation::Literal` with `Operation::UnsignedConstant` and `Operation::SignedConstant`. Changed `read::Operation::Bra` and `read::Operation::Skip` to contain the target offset instead of the bytecode. [#479](https://github.com/gimli-rs/gimli/pull/479) * Changed `write::Expression` to support references. Existing users can convert to use `Expression::raw`. [#479](https://github.com/gimli-rs/gimli/pull/479) * Replaced `write::AttributeValue::AnyUnitEntryRef` with `DebugInfoRef`. Renamed `write::AttributeValue::ThisUnitEntryRef` to `UnitRef`. [#479](https://github.com/gimli-rs/gimli/pull/479) * Added more optional features: `endian-reader` and `fallible-iterator`. [#495](https://github.com/gimli-rs/gimli/pull/495) [#498](https://github.com/gimli-rs/gimli/pull/498) ### Added * Added `read::Expression::operations` [#479](https://github.com/gimli-rs/gimli/pull/479) ### Fixed * Fixed newlines in `dwarfdump` example. [#470](https://github.com/gimli-rs/gimli/pull/470) * Ignore zero terminators when reading `.debug_frame` sections. [#486](https://github.com/gimli-rs/gimli/pull/486) * Increase the number of CFI register rules supported by `read::UnwindContext`. [#487](https://github.com/gimli-rs/gimli/pull/487) * Fixed version handling and return register encoding when reading `.eh_frame` sections. [#493](https://github.com/gimli-rs/gimli/pull/493) ### Changed * Added `EhFrame` and `DebugFrame` to `write::Sections`. [#492](https://github.com/gimli-rs/gimli/pull/492) * Improved performance of `write::LineProgram::generate_row`. [#476](https://github.com/gimli-rs/gimli/pull/476) * Removed use of the `byteorder`, `arrayvec` and `smallvec` crates. [#494](https://github.com/gimli-rs/gimli/pull/494) [#496](https://github.com/gimli-rs/gimli/pull/496) [#497](https://github.com/gimli-rs/gimli/pull/497) -------------------------------------------------------------------------------- ## 0.20.0 Released 2020/01/11. ### Breaking changes * Changed type of `DwTag`, `DwAt`, and `DwForm` constants. [#451](https://github.com/gimli-rs/gimli/pull/451) * Added `read/write::AttributeValue::DebugMacroRef`, and returned where required in `read::Attribute::value`. Added `SectionId::DebugMacro`. [#454](https://github.com/gimli-rs/gimli/pull/454) * Deleted `alloc` feature, and fixed `no-std` builds with stable rust. [#459](https://github.com/gimli-rs/gimli/pull/459) * Deleted `read::Error::description`, and changed `` to display what was previously the description. [#462](https://github.com/gimli-rs/gimli/pull/462) ### Added * Added GNU view constants. [#434](https://github.com/gimli-rs/gimli/pull/434) * Added `read::EntriesRaw` for low level DIE parsing. [#455](https://github.com/gimli-rs/gimli/pull/455) * Added `examples/simple-line.rs`. [#460](https://github.com/gimli-rs/gimli/pull/460) ### Fixed * Fixed handling of CFI augmentations without data. [#438](https://github.com/gimli-rs/gimli/pull/438) * dwarfdump: fix panic for malformed expressions. [#447](https://github.com/gimli-rs/gimli/pull/447) * dwarfdump: fix handling of Mach-O relocations. [#449](https://github.com/gimli-rs/gimli/pull/449) ### Changed * Improved abbreviation parsing performance. [#451](https://github.com/gimli-rs/gimli/pull/451) -------------------------------------------------------------------------------- ## 0.19.0 Released 2019/07/08. ### Breaking changes * Small API changes related to `.debug_loc` and `.debug_loclists`: added `read::RawLocListEntry::AddressOrOffsetPair` enum variant, added `write::Sections::debug_loc/debug_loclists` public members, and replaced `write::AttributeValue::LocationListsRef` with `LocationListRef`. [#425](https://github.com/gimli-rs/gimli/pull/425) ### Added * Added `read::Attribute::exprloc_value` and `read::AttributeValue::exprloc_value`. [#422](https://github.com/gimli-rs/gimli/pull/422) * Added support for writing `.debug_loc` and `.debug_loclists` sections. [#425](https://github.com/gimli-rs/gimli/pull/425) * Added `-G` flag to `dwarfdump` example to display global offsets. [#427](https://github.com/gimli-rs/gimli/pull/427) * Added `examples/simple.rs`. [#429](https://github.com/gimli-rs/gimli/pull/429) ### Fixed * `write::LineProgram::from` no longer requires `DW_AT_name` or `DW_AT_comp_dir` attributes to be present in the unit DIE. [#430](https://github.com/gimli-rs/gimli/pull/430) -------------------------------------------------------------------------------- ## 0.18.0 Released 2019/04/25. The focus of this release has been on improving support for reading CFI, and adding support for writing CFI. ### Breaking changes * For types which have an `Offset` type parameter, the default `Offset` has changed from `usize` to `R::Offset`. [#392](https://github.com/gimli-rs/gimli/pull/392) * Added an `Offset` type parameter to the `read::Unit` type to allow variance. [#393](https://github.com/gimli-rs/gimli/pull/393) * Changed the `UninitializedUnwindContext::initialize` method to borrow `self`, and return `&mut UnwindContext`. Deleted the `InitializedUnwindContext` type. [#395](https://github.com/gimli-rs/gimli/pull/395) * Deleted the `UnwindSection` type parameters from the `CommonInformationEntry`, `FrameDescriptionEntry`, `UninitializedUnwindContext`, `UnwindContext`, and `UnwindTable` types. [#399](https://github.com/gimli-rs/gimli/pull/399) * Changed the signature of the `get_cie` callback parameter for various functions. The signature now matches the `UnwindSection::cie_from_offset` method, so that method can be used as the parameter. [#400](https://github.com/gimli-rs/gimli/pull/400) * Reduced the number of lifetime parameters for the `UnwindTable` type. [#400](https://github.com/gimli-rs/gimli/pull/400) * Updated `fallible-iterator` to version 0.2.0. [#407](https://github.com/gimli-rs/gimli/pull/407) * Added a parameter to the `Error::UnexpectedEof` enum variant. [#408](https://github.com/gimli-rs/gimli/pull/408) ### Added * Update to 2018 edition. [#391](https://github.com/gimli-rs/gimli/pull/391) * Added the `FrameDescriptionEntry::unwind_info_for_address` method. [#396](https://github.com/gimli-rs/gimli/pull/396) * Added the `FrameDescriptionEntry::rows` method. [#396](https://github.com/gimli-rs/gimli/pull/396) * Added the `EhHdrTable::unwind_info_for_address` method. [#400](https://github.com/gimli-rs/gimli/pull/400) * Added the `EhHdrTable::fde_for_address` method and deprecated the `EhHdrTable::lookup_and_parse` method. [#400](https://github.com/gimli-rs/gimli/pull/400) * Added the `EhHdrTable::pointer_to_offset` method. [#400](https://github.com/gimli-rs/gimli/pull/400) * Added the `UnwindSection::fde_for_address` method. [#396](https://github.com/gimli-rs/gimli/pull/396) * Added the `UnwindSection::fde_from_offset` method. [#400](https://github.com/gimli-rs/gimli/pull/400) * Added the `UnwindSection::partial_fde_from_offset` method. [#400](https://github.com/gimli-rs/gimli/pull/400) * Added the `Section::id` method. [#406](https://github.com/gimli-rs/gimli/pull/406) * Added the `Dwarf::load` method, and corresponding methods for individual sections. [#406](https://github.com/gimli-rs/gimli/pull/406) * Added the `Dwarf::borrow` method, and corresponding methods for individual sections. [#406](https://github.com/gimli-rs/gimli/pull/406) * Added the `Dwarf::format_error` method. [#408](https://github.com/gimli-rs/gimli/pull/408) * Added the `Dwarf::die_ranges` method. [#417](https://github.com/gimli-rs/gimli/pull/417) * Added the `Dwarf::unit_ranges` method. [#417](https://github.com/gimli-rs/gimli/pull/417) * Added support for writing `.debug_frame` and `.eh_frame` sections. [#412](https://github.com/gimli-rs/gimli/pull/412) [#419](https://github.com/gimli-rs/gimli/pull/419) ### Fixed * The `code_alignment_factor` is now used when evaluating CFI instructions that advance the location. [#401](https://github.com/gimli-rs/gimli/pull/401) * Fixed parsing of pointers encoded with `DW_EH_PE_funcrel`. [#402](https://github.com/gimli-rs/gimli/pull/402) * Use the FDE address encoding from the augmentation when parsing `DW_CFA_set_loc`. [#403](https://github.com/gimli-rs/gimli/pull/403) * Fixed setting of `.eh_frame` base addresses in dwarfdump. [#410](https://github.com/gimli-rs/gimli/pull/410) ## 0.17.0 Released 2019/02/21. The focus of this release has been on improving DWARF 5 support, and adding support for writing DWARF. ### Breaking changes * Changed register values to a `Register` type instead of `u8`/`u64`. [#328](https://github.com/gimli-rs/gimli/pull/328) * Replaced `BaseAddresses::set_cfi` with `set_eh_frame_hdr` and `set_eh_frame`. Replaced `BaseAddresses::set_data` with `set_got`. You should now use the same `BaseAddresses` value for parsing both `.eh_frame` and `.eh_frame_hdr`. [#351](https://github.com/gimli-rs/gimli/pull/351) * Renamed many types and functions related to `.debug_line`. Renamed `LineNumberProgram` to `LineProgram`. Renamed `IncompleteLineNumberProgram` to `IncompleteLineProgram`. Renamed `CompleteLineNumberProgram` to `CompleteLineProgram`. Renamed `LineNumberProgramHeader` to `LineProgramHeader`. Renamed `LineNumberRow` to `LineRow`. Renamed `StateMachine` to `LineRows`. Renamed `Opcode` to `LineInstruction`. Renamed `OpcodesIter` to `LineInstructions`. Renamed `LineNumberSequence` to `LineSequence`. [#359](https://github.com/gimli-rs/gimli/pull/359) * Added `Offset` type parameter to `AttributeValue`, `LineProgram`, `IncompleteLineProgram`, `CompleteLineProgram`, `LineRows`, `LineInstruction`, and `FileEntry`. [#324](https://github.com/gimli-rs/gimli/pull/324) * Changed `FileEntry::path_name`, `FileEntry::directory`, and `LineProgramHeader::directory` to return an `AttributeValue` instead of a `Reader`. [#366](https://github.com/gimli-rs/gimli/pull/366) * Renamed `FileEntry::last_modification` to `FileEntry::timestamp` and renamed `FileEntry::length` to `FileEntry::size`. [#366](https://github.com/gimli-rs/gimli/pull/366) * Added an `Encoding` type. Changed many functions that previously accepted `Format`, version or address size parameters to accept an `Encoding` parameter instead. Notable changes are `LocationLists::locations`, `RangeLists::ranges`, and `Expression::evaluation`. [#364](https://github.com/gimli-rs/gimli/pull/364) * Changed return type of `LocationLists::new` and `RangeLists::new`. [#370](https://github.com/gimli-rs/gimli/pull/370) * Added parameters to `LocationsLists::locations` and `RangeLists::ranges` to support `.debug_addr`. [#358](https://github.com/gimli-rs/gimli/pull/358) * Added more `AttributeValue` variants: `DebugAddrBase`, `DebugAddrIndex`, `DebugLocListsBase`, `DebugLocListsIndex`, `DebugRngListsBase`, `DebugRngListsIndex`, `DebugStrOffsetsBase`, `DebugStrOffsetsIndex`, `DebugLineStrRef`. [#358](https://github.com/gimli-rs/gimli/pull/358) * Changed `AttributeValue::Data*` attributes to native endian integers instead of byte arrays. [#365](https://github.com/gimli-rs/gimli/pull/365) * Replaced `EvaluationResult::TextBase` with `EvaluationResult::RequiresRelocatedAddress`. The handling of `TextBase` was incorrect. [#335](https://github.com/gimli-rs/gimli/pull/335) * Added `EvaluationResult::IndexedAddress` for operations that require an address from `.debug_addr`. [#358](https://github.com/gimli-rs/gimli/pull/358) * Added `Reader::read_slice`. Added a default implementation of `Reader::read_u8_array` which uses this. [#358](https://github.com/gimli-rs/gimli/pull/358) ### Added * Added initial support for writing DWARF. This is targeted at supporting line number information only. [#340](https://github.com/gimli-rs/gimli/pull/340) [#344](https://github.com/gimli-rs/gimli/pull/344) [#346](https://github.com/gimli-rs/gimli/pull/346) [#361](https://github.com/gimli-rs/gimli/pull/361) [#362](https://github.com/gimli-rs/gimli/pull/362) [#365](https://github.com/gimli-rs/gimli/pull/365) [#368](https://github.com/gimli-rs/gimli/pull/368) [#382](https://github.com/gimli-rs/gimli/pull/382) * Added `read` and `write` Cargo features. Both are enabled by default. [#343](https://github.com/gimli-rs/gimli/pull/343) * Added support for reading DWARF 5 `.debug_line` and `.debug_line_str` sections. [#366](https://github.com/gimli-rs/gimli/pull/366) * Added support for reading DWARF 5 `.debug_str_offsets` sections, including parsing `DW_FORM_strx*` attributes. [#358](https://github.com/gimli-rs/gimli/pull/358) * Added support for reading DWARF 5 `.debug_addr` sections, including parsing `DW_FORM_addrx*` attributes and evaluating `DW_OP_addrx` and `DW_OP_constx` operations. [#358](https://github.com/gimli-rs/gimli/pull/358) * Added support for reading DWARF 5 indexed addresses and offsets in `.debug_loclists` and `.debug_rnglists`, including parsing `DW_FORM_rnglistx` and `DW_FORM_loclistx` attributes. [#358](https://github.com/gimli-rs/gimli/pull/358) * Added high level `Dwarf` and `Unit` types. Existing code does not need to switch to using these types, but doing so will make DWARF 5 support simpler. [#352](https://github.com/gimli-rs/gimli/pull/352) [#380](https://github.com/gimli-rs/gimli/pull/380) [#381](https://github.com/gimli-rs/gimli/pull/381) * Added `EhFrame::set_address_size` and `DebugFrame::set_address_size` methods to allow parsing non-native CFI sections. The default address size is still the native size. [#325](https://github.com/gimli-rs/gimli/pull/325) * Added architecture specific definitions for `Register` values and names. Changed dwarfdump to print them. [#328](https://github.com/gimli-rs/gimli/pull/328) * Added support for reading relocatable DWARF sections. [#337](https://github.com/gimli-rs/gimli/pull/337) * Added parsing of `DW_FORM_data16`. [#366](https://github.com/gimli-rs/gimli/pull/366) ### Fixed * Fixed parsing DWARF 5 ranges with `start == end == 0`. [#323](https://github.com/gimli-rs/gimli/pull/323) * Changed `LineRows` to be covariant in its `Reader` type parameter. [#324](https://github.com/gimli-rs/gimli/pull/324) * Fixed handling of empty units in dwarfdump. [#330](https://github.com/gimli-rs/gimli/pull/330) * Fixed `UnitHeader::length_including_self` for `Dwarf64`. [#342](https://github.com/gimli-rs/gimli/pull/342) * Fixed parsing of `DW_CFA_set_loc`. [#355](https://github.com/gimli-rs/gimli/pull/355) * Fixed handling of multiple headers in `.debug_loclists` and `.debug_rnglists`. [#370](https://github.com/gimli-rs/gimli/pull/370) -------------------------------------------------------------------------------- ## 0.16.1 Released 2018/08/28. ### Added * Added `EhFrameHdr::lookup_and_parse`. [#316][] * Added support for `DW_CFA_GNU_args_size`. [#319][] ### Fixed * Implement `Send`/`Sync` for `SubRange`. [#305][] * Fixed `alloc` support on nightly. [#306][] [#310][] [#305]: https://github.com/gimli-rs/gimli/pull/305 [#306]: https://github.com/gimli-rs/gimli/pull/306 [#310]: https://github.com/gimli-rs/gimli/pull/310 [#316]: https://github.com/gimli-rs/gimli/pull/316 [#319]: https://github.com/gimli-rs/gimli/pull/319 -------------------------------------------------------------------------------- ## 0.16.0 Released 2018/06/01. ### Added * Added support for building in `#![no_std]` environments, when the `alloc` crate is available. Disable the "std" feature and enable the "alloc" feature. [#138][] [#271][] * Added support for DWARF 5 `.debug_rnglists` and `.debug_loclists` sections. [#272][] * Added support for DWARF 5 `DW_FORM_ref_sup` and `DW_FORM_strp_sup` attribute forms. [#288][] * Added support for DWARF 5 operations on typed values. [#293][] * A `dwarf-validate` example program that checks the integrity of the given DWARF and its references between sections. [#290][] * Added the `EndianReader` type, an easy way to define a custom `Reader` implementation with a reference to a generic buffer of bytes and an associated endianity. [#298][] [#302][] ### Changed * Various speed improvements for evaluating `.debug_line` line number programs. [#276][] * The example `dwarfdump` clone is a [whole lot faster now][dwarfdump-faster]. [#282][] [#284][] [#285][] ### Deprecated * `EndianBuf` has been renamed to `EndianSlice`, use that name instead. [#295][] ### Fixed * Evaluating the `DW_CFA_restore_state` opcode properly maintains the current location. Previously it would incorrectly restore the old location when popping from evaluation stack. [#274][] [#271]: https://github.com/gimli-rs/gimli/issues/271 [#138]: https://github.com/gimli-rs/gimli/issues/138 [#274]: https://github.com/gimli-rs/gimli/issues/274 [#272]: https://github.com/gimli-rs/gimli/issues/272 [#276]: https://github.com/gimli-rs/gimli/issues/276 [#282]: https://github.com/gimli-rs/gimli/issues/282 [#285]: https://github.com/gimli-rs/gimli/issues/285 [#284]: https://github.com/gimli-rs/gimli/issues/284 [#288]: https://github.com/gimli-rs/gimli/issues/288 [#290]: https://github.com/gimli-rs/gimli/issues/290 [#293]: https://github.com/gimli-rs/gimli/issues/293 [#295]: https://github.com/gimli-rs/gimli/issues/295 [#298]: https://github.com/gimli-rs/gimli/issues/298 [#302]: https://github.com/gimli-rs/gimli/issues/302 [dwarfdump-faster]: https://robert.ocallahan.org/2018/03/speeding-up-dwarfdump-with-rust.html -------------------------------------------------------------------------------- ## 0.15.0 Released 2017/12/01. ### Added * Added the `EndianBuf::to_string()` method. [#233][] * Added more robust error handling in our example `dwarfdump` clone. [#234][] * Added `FrameDescriptionEntry::initial_address` method. [#237][] * Added `FrameDescriptionEntry::len` method. [#237][] * Added the `FrameDescriptionEntry::entry_len` method. [#241][] * Added the `CommonInformationEntry::offset` method. [#241][] * Added the `CommonInformationEntry::entry_len` method. [#241][] * Added the `CommonInformationEntry::version` method. [#241][] * Added the `CommonInformationEntry::augmentation` method. [#241][] * Added the `CommonInformationEntry::code_alignment_factor` method. [#241][] * Added the `CommonInformationEntry::data_alignment_factor` method. [#241][] * Added the `CommonInformationEntry::return_address_register` method. [#241][] * Added support for printing `.eh_frame` sections to our example `dwarfdump` clone. [#241][] * Added support for parsing the `.eh_frame_hdr` section. On Linux, the `.eh_frame_hdr` section provides a pointer to the already-mapped-in-memory `.eh_frame` data, so that it doesn't need to be duplicated, and a binary search table of its entries for faster unwinding information lookups. [#250][] * Added support for parsing DWARF 5 compilation unit headers. [#257][] * Added support for DWARF 5's `DW_FORM_implicit_const`. [#257][] ### Changed * Unwinding methods now give ownership of the unwinding context back to the caller if errors are encountered, not just on the success path. This allows recovering from errors in signal-safe code, where constructing a new unwinding context is not an option because it requires allocation. This is a **breaking change** affecting `UnwindSection::unwind_info_for_address` and `UninitializedUnwindContext::initialize`. [#241][] * `CfaRule` and `RegisterRule` now expose their `DW_OP` expressions as `Expression`. This is a minor **breaking change**. [#241][] * The `Error::UnknownVersion` variant now contains the unknown version number. This is a minor **breaking change**. [#245][] * `EvaluationResult::RequiresEntryValue` requires an `Expression` instead of a `Reader` now. This is a minor **breaking change**. [#256][] [#233]: https://github.com/gimli-rs/gimli/pull/233 [#234]: https://github.com/gimli-rs/gimli/pull/234 [#237]: https://github.com/gimli-rs/gimli/pull/237 [#241]: https://github.com/gimli-rs/gimli/pull/241 [#245]: https://github.com/gimli-rs/gimli/pull/245 [#250]: https://github.com/gimli-rs/gimli/pull/250 [#256]: https://github.com/gimli-rs/gimli/pull/256 [#257]: https://github.com/gimli-rs/gimli/pull/257 -------------------------------------------------------------------------------- ## 0.14.0 Released 2017/08/08. ### Added * All `pub` types now `derive(Hash)`. [#192][] * All the constants from DWARF 5 are now defined. [#193][] * Added support for the `DW_OP_GNU_parameter_ref` GNU extension to parsing and evaluation DWARF opcodes. [#208][] * Improved LEB128 parsing performance. [#216][] * Improved `.debug_{aranges,pubnames,pubtypes}` parsing performance. [#218][] * Added the ability to choose endianity dynamically at run time, rather than only statically at compile time. [#219][] ### Changed * The biggest change of this release is that `gimli` no longer requires the object file's section be fully loaded into memory. This enables using `gimli` on 32 bit platforms where there often isn't enough contiguous virtual memory address space to load debugging information into. The default behavior is still geared for 64 bit platforms, where address space overfloweth, and you can still load the whole sections of the object file (or the entire object file) into memory. This is abstracted over with the `gimli::Reader` trait. This manifests as small (but many) breaking changes to much of the public API. [#182][] ### Fixed * The `DW_END_*` constants for defining endianity of a compilation unit were previously incorrect. [#193][] * The `DW_OP_addr` opcode is relative to the base address of the `.text` section of the binary, but we were incorrectly treating it as an absolute value. [#210][] [GitHub]: https://github.com/gimli-rs/gimli [crates.io]: https://crates.io/crates/gimli [contributing]: https://github.com/gimli-rs/gimli/blob/master/CONTRIBUTING.md [easy]: https://github.com/gimli-rs/gimli/issues?q=is%3Aopen+is%3Aissue+label%3Aeasy [#192]: https://github.com/gimli-rs/gimli/pull/192 [#193]: https://github.com/gimli-rs/gimli/pull/193 [#182]: https://github.com/gimli-rs/gimli/issues/182 [#208]: https://github.com/gimli-rs/gimli/pull/208 [#210]: https://github.com/gimli-rs/gimli/pull/210 [#216]: https://github.com/gimli-rs/gimli/pull/216 [#218]: https://github.com/gimli-rs/gimli/pull/218 [#219]: https://github.com/gimli-rs/gimli/pull/219 # Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] ## [0.17.1](https://github.com/rust-lang/hashbrown/compare/v0.17.0...v0.17.1) - 2026-04-20 ### Added - Added `HashMap::rustc_try_insert` (#722) ## [0.17.0](https://github.com/rust-lang/hashbrown/compare/v0.16.1...v0.17.0) - 2026-04-06 ### Added - Added `hash_table::OccupiedEntry::replace_entry_with` (#669) - Added `hash_map::{OccupiedEntry::into_entry, VacantEntryRef::insert_entry_with_key}` (#670) - Added `hash_table::UnsafeIter` (#667) - Added `iter` methods to various `HashTable` iterators (#667) - Added `HashMap::{replace_key,replace_key_unchecked,insert_with_key_unchecked}` (#681) - Added `into_map` methods to all `HashMap` entry types (#686) - Added `into_table` methods to all `HashTable` entry types (#686) - Added `#[must_use]` to constructors (#697) - `TryReserveError` now implements `Error` (#698) ### Changed - Changed `EntryRef` to use `ToOwned` (#670) - Bumped MSRV to 1.85 (2024 edition) (#676) ### Fixed - `HashTable:clone_from` now forwards to `RawTable::clone_from` instead of using the default implementation (#668) - Fixed potential UB in `RawTableInner::fallible_with_capacity` (#692) - Fixed incorrect length if a hasher panics during rehash (#710) ## [0.16.1](https://github.com/rust-lang/hashbrown/compare/v0.16.0...v0.16.1) - 2025-11-20 ### Added - Added `HashTable` methods related to the raw bucket index (#657) - Added `VacantEntryRef::insert_with_key` (#579) ### Changed - Removed specialization for `Copy` types (#662) - The `get_many_mut` family of methods have been renamed to `get_disjoint_mut` to match the standard library. The old names are still present for now, but deprecated. (#648) - Recognize and use over-sized allocations when using custom allocators. (#523) - Depend on `serde_core` instead of `serde`. (#649) - Optimized `collect` on rayon parallel iterators. (#652) ## [0.16.0](https://github.com/rust-lang/hashbrown/compare/v0.15.5...v0.16.0) - 2025-08-28 ### Changed - Bump foldhash, the default hasher, to 0.2.0. - Replaced `DefaultHashBuilder` with a newtype wrapper around `foldhash` instead of re-exporting it directly. ## [0.15.5](https://github.com/rust-lang/hashbrown/compare/v0.15.4...v0.15.5) - 2025-08-07 ### Added - Added `Entry::or_default_entry` and `Entry::or_insert_entry`. ### Changed - Re-implemented likely/unlikely with `#[cold]` ## [0.15.4](https://github.com/rust-lang/hashbrown/compare/v0.15.3...v0.15.4) - 2025-06-05 ### Changed - Removed optional dependency on compiler-builtins. This only affects building as part of `std`. ## [0.15.3](https://github.com/rust-lang/hashbrown/compare/v0.15.2...v0.15.3) - 2025-04-29 ### Added - SIMD implementation for LoongArch (#592, requires nightly) ### Changed - Optimized insertion path by avoiding an unnecessary `match_empty` (#607) - Increased minimum table size for small types (#615) - Dropped FnMut trait bounds from `ExtractIf` data structures (#616) - Relaxed constraint in `hash_map::EntryRef` insertion methods `K: From<&Q>` to &Q: `Into` (#611) - Added allocator template argument for `rustc_iter` (#605) - The `allocator-api2/nightly` feature is no longer enabled by `hashbrown/nightly` (#606) ## [v0.15.2] - 2024-11-14 ### Added - Marked `const fn` constructors as `rustc_const_stable_indirect` when built as part of the standard library. (#586) ## [v0.15.1] - 2024-11-03 This release removes the `borsh` feature introduced in 0.15.0 because it was found to be incorrectly implemented. Users should use the `hashbrown` feature of the `borsh` crate instead which provides the same trait implementations. ## ~~[v0.15.0] - 2024-10-01~~ This release was _yanked_ due to a broken implementation of the `borsh` feature. This update contains breaking changes that remove the `raw` API with the hope of centralising on the `HashTable` API in the future. You can follow the discussion and progress in #545 to discuss features you think should be added to this API that were previously only possible on the `raw` API. ### Added - Added `borsh` feature with `BorshSerialize` and `BorshDeserialize` impls. (#525) - Added `Assign` impls for `HashSet` operators. (#529) - Added `Default` impls for iterator types. (#542) - Added `HashTable::iter_hash{,_mut}` methods. (#549) - Added `Hash{Table,Map,Set}::allocation_size` methods. (#553) - Implemented `Debug` and `FusedIterator` for all `HashTable` iterators. (#561) - Specialized `Iterator::fold` for all `HashTable` iterators. (#561) ### Changed - Changed `hash_set::VacantEntry::insert` to return `OccupiedEntry`. (#495) - Improved`hash_set::Difference::size_hint` lower-bound. (#530) - Improved `HashSet::is_disjoint` performance. (#531) - `equivalent` feature is now enabled by default. (#532) - `HashSet` operators now return a set with the same allocator. (#529) - Changed the default hasher to foldhash. (#563) - `ahash` feature has been renamed to `default-hasher`. (#533) - Entry API has been reworked and several methods have been renamed. (#535) - `Hash{Map,Set}::insert_unique_unchecked` is now unsafe. (#556) - The signature of `get_many_mut` and related methods was changed. (#562) ### Fixed * Fixed typos, stray backticks in docs. (#558, #560) ### Removed - Raw entry API is now under `raw-entry` feature, to be eventually removed. (#534, #555) - Raw table API has been made private and the `raw` feature is removed; in the future, all code should be using the `HashTable` API instead. (#531, #546) - `rykv` feature was removed; this is now provided by the `rykv` crate instead. (#554) - `HashSet::get_or_insert_owned` was removed in favor of `get_or_insert_with`. (#555) ## [v0.14.5] - 2024-04-28 ### Fixed - Fixed index calculation in panic guard of `clone_from_impl`. (#511) ## ~~[v0.14.4] - 2024-03-19~~ This release was _yanked_ due to a breaking change. ## [v0.14.3] - 2023-11-26 ### Added - Specialized `fold` implementation of iterators. (#480) ### Fixed - Avoid using unstable `ptr::invalid_mut` on nightly. (#481) ## [v0.14.2] - 2023-10-19 ### Added - `HashTable` type which provides a low-level but safe API with explicit hashing. (#466) ### Fixed - Disabled the use of NEON instructions on big-endian ARM. (#475) - Disabled the use of NEON instructions on Miri. (#476) ## [v0.14.1] - 2023-09-28 ### Added - Allow serializing `HashMap`s that use a custom allocator. (#449) ### Changed - Use the `Equivalent` trait from the `equivalent` crate. (#442) - Slightly improved performance of table resizing. (#451) - Relaxed MSRV to 1.63.0. (#457) - Removed `Clone` requirement from custom allocators. (#468) ### Fixed - Fixed custom allocators being leaked in some situations. (#439, #465) ## [v0.14.0] - 2023-06-01 ### Added - Support for `allocator-api2` crate for interfacing with custom allocators on stable. (#417) - Optimized implementation for ARM using NEON instructions. (#430) - Support for rkyv serialization. (#432) - `Equivalent` trait to look up values without `Borrow`. (#345) - `Hash{Map,Set}::raw_table_mut` is added which returns a mutable reference. (#404) - Fast path for `clear` on empty tables. (#428) ### Changed - Optimized insertion to only perform a single lookup. (#277) - `DrainFilter` (`drain_filter`) has been renamed to `ExtractIf` and no longer drops remaining elements when the iterator is dropped. #(374) - Bumped MSRV to 1.64.0. (#431) - `{Map,Set}::raw_table` now returns an immutable reference. (#404) - `VacantEntry` and `OccupiedEntry` now use the default hasher if none is specified in generics. (#389) - `RawTable::data_start` now returns a `NonNull` to match `RawTable::data_end`. (#387) - `RawIter::{reflect_insert, reflect_remove}` are now unsafe. (#429) - `RawTable::find_potential` is renamed to `find_or_find_insert_slot` and returns an `InsertSlot`. (#429) - `RawTable::remove` now also returns an `InsertSlot`. (#429) - `InsertSlot` can be used to insert an element with `RawTable::insert_in_slot`. (#429) - `RawIterHash` no longer has a lifetime tied to that of the `RawTable`. (#427) - The trait bounds of `HashSet::raw_table` have been relaxed to not require `Eq + Hash`. (#423) - `EntryRef::and_replace_entry_with` and `OccupiedEntryRef::replace_entry_with` were changed to give a `&K` instead of a `&Q` to the closure. ### Removed - Support for `bumpalo` as an allocator with custom wrapper. Use `allocator-api2` feature in `bumpalo` to use it as an allocator for `hashbrown` collections. (#417) ## [v0.13.2] - 2023-01-12 ### Fixed - Added `#[inline(always)]` to `find_inner`. (#375) - Fixed `RawTable::allocation_info` for empty tables. (#376) ## [v0.13.1] - 2022-11-10 ### Added - Added `Equivalent` trait to customize key lookups. (#350) - Added support for 16-bit targets. (#368) - Added `RawTable::allocation_info` which provides information about the memory usage of a table. (#371) ### Changed - Bumped MSRV to 1.61.0. - Upgraded to `ahash` 0.8. (#357) - Make `with_hasher_in` const. (#355) - The following methods have been removed from the `RawTable` API in favor of safer alternatives: - `RawTable::erase_no_drop` => Use `RawTable::erase` or `RawTable::remove` instead. - `Bucket::read` => Use `RawTable::remove` instead. - `Bucket::drop` => Use `RawTable::erase` instead. - `Bucket::write` => Use `Bucket::as_mut` instead. ### Fixed - Ensure that `HashMap` allocations don't exceed `isize::MAX`. (#362) - Fixed issue with field retagging in scopeguard. (#359) ## [v0.12.3] - 2022-07-17 ### Fixed - Fixed double-drop in `RawTable::clone_from`. (#348) ## [v0.12.2] - 2022-07-09 ### Added - Added `Entry` API for `HashSet`. (#342) - Added `Extend<&'a (K, V)> for HashMap`. (#340) - Added length-based short-circuiting for hash table iteration. (#338) - Added a function to access the `RawTable` of a `HashMap`. (#335) ### Changed - Edited `do_alloc` to reduce LLVM IR generated. (#341) ## [v0.12.1] - 2022-05-02 ### Fixed - Fixed underflow in `RawIterRange::size_hint`. (#325) - Fixed the implementation of `Debug` for `ValuesMut` and `IntoValues`. (#325) ## [v0.12.0] - 2022-01-17 ### Added - Added `From<[T; N]>` and `From<[(K, V); N]>` for `HashSet` and `HashMap` respectively. (#297) - Added an `allocator()` getter to HashMap and HashSet. (#257) - Added `insert_unique_unchecked` to `HashMap` and `HashSet`. (#293) - Added `into_keys` and `into_values` to HashMap. (#295) - Implement `From` on `HashSet` and `HashMap`. (#298) - Added `entry_ref` API to `HashMap`. (#201) ### Changed - Bumped minimum Rust version to 1.56.1 and edition to 2021. - Use u64 for the GroupWord on WebAssembly. (#271) - Optimized `find`. (#279) - Made rehashing and resizing less generic to reduce compilation time. (#282) - Inlined small functions. (#283) - Use `BuildHasher::hash_one` when `feature = "nightly"` is enabled. (#292) - Relaxed the bounds on `Debug` for `HashSet`. (#296) - Rename `get_each_mut` to `get_many_mut` and align API with the stdlib. (#291) - Don't hash the key when searching in an empty table. (#305) ### Fixed - Guard against allocations exceeding isize::MAX. (#268) - Made `RawTable::insert_no_grow` unsafe. (#254) - Inline `static_empty`. (#280) - Fixed trait bounds on Send/Sync impls. (#303) ## [v0.11.2] - 2021-03-25 ### Fixed - Added missing allocator type parameter to `HashMap`'s and `HashSet`'s `Clone` impls. (#252) ## [v0.11.1] - 2021-03-20 ### Fixed - Added missing `pub` modifier to `BumpWrapper`. (#251) ## [v0.11.0] - 2021-03-14 ### Added - Added safe `try_insert_no_grow` method to `RawTable`. (#229) - Added support for `bumpalo` as an allocator without the `nightly` feature. (#231) - Implemented `Default` for `RawTable`. (#237) - Added new safe methods `RawTable::get_each_mut`, `HashMap::get_each_mut`, and `HashMap::get_each_key_value_mut`. (#239) - Added `From>` for `HashSet`. (#235) - Added `try_insert` method to `HashMap`. (#247) ### Changed - The minimum Rust version has been bumped to 1.49.0. (#230) - Significantly improved compilation times by reducing the amount of generated IR. (#205) ### Removed - We no longer re-export the unstable allocator items from the standard library, nor the stable shims approximating the same. (#227) - Removed hasher specialization support from `aHash`, which was resulting in inconsistent hashes being generated for a key. (#248) ### Fixed - Fixed union length comparison. (#228) ## ~~[v0.10.0] - 2021-01-16~~ This release was _yanked_ due to inconsistent hashes being generated with the `nightly` feature. (#248) ### Changed - Parametrized `RawTable`, `HashSet` and `HashMap` over an allocator. (#133) - Improved branch prediction hints on stable. (#209) - Optimized hashing of primitive types with AHash using specialization. (#207) - Only instantiate `RawTable`'s reserve functions once per key-value. (#204) ## [v0.9.1] - 2020-09-28 ### Added - Added safe methods to `RawTable` (#202): - `get`: `find` and `as_ref` - `get_mut`: `find` and `as_mut` - `insert_entry`: `insert` and `as_mut` - `remove_entry`: `find` and `remove` - `erase_entry`: `find` and `erase` ### Changed - Removed `from_key_hashed_nocheck`'s `Q: Hash`. (#200) - Made `RawTable::drain` safe. (#201) ## [v0.9.0] - 2020-09-03 ### Fixed - `drain_filter` now removes and yields items that do match the predicate, rather than items that don't. This is a **breaking change** to match the behavior of the `drain_filter` methods in `std`. (#187) ### Added - Added `replace_entry_with` to `OccupiedEntry`, and `and_replace_entry_with` to `Entry`. (#190) - Implemented `FusedIterator` and `size_hint` for `DrainFilter`. (#188) ### Changed - The minimum Rust version has been bumped to 1.36 (due to `crossbeam` dependency). (#193) - Updated `ahash` dependency to 0.4. (#198) - `HashMap::with_hasher` and `HashSet::with_hasher` are now `const fn`. (#195) - Removed `T: Hash + Eq` and `S: BuildHasher` bounds on `HashSet::new`, `with_capacity`, `with_hasher`, and `with_capacity_and_hasher`. (#185) ## [v0.8.2] - 2020-08-08 ### Changed - Avoid closures to improve compile times. (#183) - Do not iterate to drop if empty. (#182) ## [v0.8.1] - 2020-07-16 ### Added - Added `erase` and `remove` to `RawTable`. (#171) - Added `try_with_capacity` to `RawTable`. (#174) - Added methods that allow re-using a `RawIter` for `RawDrain`, `RawIntoIter`, and `RawParIter`. (#175) - Added `reflect_remove` and `reflect_insert` to `RawIter`. (#175) - Added a `drain_filter` function to `HashSet`. (#179) ### Changed - Deprecated `RawTable::erase_no_drop` in favor of `erase` and `remove`. (#176) - `insert_no_grow` is now exposed under the `"raw"` feature. (#180) ## [v0.8.0] - 2020-06-18 ### Fixed - Marked `RawTable::par_iter` as `unsafe`. (#157) ### Changed - Reduced the size of `HashMap`. (#159) - No longer create tables with a capacity of 1 element. (#162) - Removed `K: Eq + Hash` bounds on `retain`. (#163) - Pulled in `HashMap` changes from rust-lang/rust (#164): - `extend_one` support on nightly. - `CollectionAllocErr` renamed to `TryReserveError`. - Added `HashSet::get_or_insert_owned`. - `Default` for `HashSet` no longer requires `T: Eq + Hash` and `S: BuildHasher`. ## [v0.7.2] - 2020-04-27 ### Added - Added `or_insert_with_key` to `Entry`. (#152) ### Fixed - Partially reverted `Clone` optimization which was unsound. (#154) ### Changed - Disabled use of `const-random` by default, which prevented reproducible builds. (#155) - Optimized `repeat` function. (#150) - Use `NonNull` for buckets, which improves codegen for iterators. (#148) ## [v0.7.1] - 2020-03-16 ### Added - Added `HashMap::get_key_value_mut`. (#145) ### Changed - Optimized `Clone` implementation. (#146) ## [v0.7.0] - 2020-01-31 ### Added - Added a `drain_filter` function to `HashMap`. (#135) ### Changed - Updated `ahash` dependency to 0.3. (#141) - Optimized set union and intersection. (#130) - `raw_entry` can now be used without requiring `S: BuildHasher`. (#123) - `RawTable::bucket_index` can now be used under the `raw` feature. (#128) ## [v0.6.3] - 2019-10-31 ### Added - Added an `ahash-compile-time-rng` feature (enabled by default) which allows disabling the `compile-time-rng` feature in `ahash` to work around a Cargo bug. (#125) ## [v0.6.2] - 2019-10-23 ### Added - Added an `inline-more` feature (enabled by default) which allows choosing a tradeoff between runtime performance and compilation time. (#119) ## [v0.6.1] - 2019-10-04 ### Added - Added `Entry::insert` and `RawEntryMut::insert`. (#118) ### Changed - `Group::static_empty` was changed from a `const` to a `static` (#116). ## [v0.6.0] - 2019-08-13 ### Fixed - Fixed AHash accidentally depending on `std`. (#110) ### Changed - The minimum Rust version has been bumped to 1.32 (due to `rand` dependency). ## ~~[v0.5.1] - 2019-08-04~~ This release was _yanked_ due to a breaking change for users of `no-default-features`. ### Added - The experimental and unsafe `RawTable` API is available under the "raw" feature. (#108) - Added entry-like methods for `HashSet`. (#98) ### Changed - Changed the default hasher from FxHash to AHash. (#97) - `hashbrown` is now fully `no_std` on recent Rust versions (1.36+). (#96) ### Fixed - We now avoid growing the table during insertions when it wasn't necessary. (#106) - `RawOccupiedEntryMut` now properly implements `Send` and `Sync`. (#100) - Relaxed `lazy_static` version. (#92) ## [v0.5.0] - 2019-06-12 ### Fixed - Resize with a more conservative amount of space after deletions. (#86) ### Changed - Exposed the Layout of the failed allocation in CollectionAllocErr::AllocErr. (#89) ## [v0.4.0] - 2019-05-30 ### Fixed - Fixed `Send` trait bounds on `IterMut` not matching the libstd one. (#82) ## [v0.3.1] - 2019-05-30 ### Fixed - Fixed incorrect use of slice in unsafe code. (#80) ## [v0.3.0] - 2019-04-23 ### Changed - Changed shrink_to to not panic if min_capacity < capacity. (#67) ### Fixed - Worked around emscripten bug emscripten-core/emscripten-fastcomp#258. (#66) ## [v0.2.2] - 2019-04-16 ### Fixed - Inlined non-nightly lowest_set_bit_nonzero. (#64) - Fixed build on latest nightly. (#65) ## [v0.2.1] - 2019-04-14 ### Changed - Use for_each in map Extend and FromIterator. (#58) - Improved worst-case performance of HashSet.is_subset. (#61) ### Fixed - Removed incorrect debug_assert. (#60) ## [v0.2.0] - 2019-03-31 ### Changed - The code has been updated to Rust 2018 edition. This means that the minimum Rust version has been bumped to 1.31 (2018 edition). ### Added - Added `insert_with_hasher` to the raw_entry API to allow `K: !(Hash + Eq)`. (#54) - Added support for using hashbrown as the hash table implementation in libstd. (#46) ### Fixed - Fixed cargo build with minimal-versions. (#45) - Fixed `#[may_dangle]` attributes to match the libstd `HashMap`. (#46) - ZST keys and values are now handled properly. (#46) ## [v0.1.8] - 2019-01-14 ### Added - Rayon parallel iterator support (#37) - `raw_entry` support (#31) - `#[may_dangle]` on nightly (#31) - `try_reserve` support (#31) ### Fixed - Fixed variance on `IterMut`. (#31) ## [v0.1.7] - 2018-12-05 ### Fixed - Fixed non-SSE version of convert_special_to_empty_and_full_to_deleted. (#32) - Fixed overflow in rehash_in_place. (#33) ## [v0.1.6] - 2018-11-17 ### Fixed - Fixed compile error on nightly. (#29) ## [v0.1.5] - 2018-11-08 ### Fixed - Fixed subtraction overflow in generic::Group::match_byte. (#28) ## [v0.1.4] - 2018-11-04 ### Fixed - Fixed a bug in the `erase_no_drop` implementation. (#26) ## [v0.1.3] - 2018-11-01 ### Added - Serde support. (#14) ### Fixed - Make the compiler inline functions more aggressively. (#20) ## [v0.1.2] - 2018-10-31 ### Fixed - `clear` segfaults when called on an empty table. (#13) ## [v0.1.1] - 2018-10-30 ### Fixed - `erase_no_drop` optimization not triggering in the SSE2 implementation. (#3) - Missing `Send` and `Sync` for hash map and iterator types. (#7) - Bug when inserting into a table smaller than the group width. (#5) ## v0.1.0 - 2018-10-29 - Initial release [Unreleased]: https://github.com/rust-lang/hashbrown/compare/v0.15.2...HEAD [v0.15.2]: https://github.com/rust-lang/hashbrown/compare/v0.15.1...v0.15.2 [v0.15.1]: https://github.com/rust-lang/hashbrown/compare/v0.15.0...v0.15.1 [v0.15.0]: https://github.com/rust-lang/hashbrown/compare/v0.14.5...v0.15.0 [v0.14.5]: https://github.com/rust-lang/hashbrown/compare/v0.14.4...v0.14.5 [v0.14.4]: https://github.com/rust-lang/hashbrown/compare/v0.14.3...v0.14.4 [v0.14.3]: https://github.com/rust-lang/hashbrown/compare/v0.14.2...v0.14.3 [v0.14.2]: https://github.com/rust-lang/hashbrown/compare/v0.14.1...v0.14.2 [v0.14.1]: https://github.com/rust-lang/hashbrown/compare/v0.14.0...v0.14.1 [v0.14.0]: https://github.com/rust-lang/hashbrown/compare/v0.13.2...v0.14.0 [v0.13.2]: https://github.com/rust-lang/hashbrown/compare/v0.13.1...v0.13.2 [v0.13.1]: https://github.com/rust-lang/hashbrown/compare/v0.12.3...v0.13.1 [v0.12.3]: https://github.com/rust-lang/hashbrown/compare/v0.12.2...v0.12.3 [v0.12.2]: https://github.com/rust-lang/hashbrown/compare/v0.12.1...v0.12.2 [v0.12.1]: https://github.com/rust-lang/hashbrown/compare/v0.12.0...v0.12.1 [v0.12.0]: https://github.com/rust-lang/hashbrown/compare/v0.11.2...v0.12.0 [v0.11.2]: https://github.com/rust-lang/hashbrown/compare/v0.11.1...v0.11.2 [v0.11.1]: https://github.com/rust-lang/hashbrown/compare/v0.11.0...v0.11.1 [v0.11.0]: https://github.com/rust-lang/hashbrown/compare/v0.10.0...v0.11.0 [v0.10.0]: https://github.com/rust-lang/hashbrown/compare/v0.9.1...v0.10.0 [v0.9.1]: https://github.com/rust-lang/hashbrown/compare/v0.9.0...v0.9.1 [v0.9.0]: https://github.com/rust-lang/hashbrown/compare/v0.8.2...v0.9.0 [v0.8.2]: https://github.com/rust-lang/hashbrown/compare/v0.8.1...v0.8.2 [v0.8.1]: https://github.com/rust-lang/hashbrown/compare/v0.8.0...v0.8.1 [v0.8.0]: https://github.com/rust-lang/hashbrown/compare/v0.7.2...v0.8.0 [v0.7.2]: https://github.com/rust-lang/hashbrown/compare/v0.7.1...v0.7.2 [v0.7.1]: https://github.com/rust-lang/hashbrown/compare/v0.7.0...v0.7.1 [v0.7.0]: https://github.com/rust-lang/hashbrown/compare/v0.6.3...v0.7.0 [v0.6.3]: https://github.com/rust-lang/hashbrown/compare/v0.6.2...v0.6.3 [v0.6.2]: https://github.com/rust-lang/hashbrown/compare/v0.6.1...v0.6.2 [v0.6.1]: https://github.com/rust-lang/hashbrown/compare/v0.6.0...v0.6.1 [v0.6.0]: https://github.com/rust-lang/hashbrown/compare/v0.5.1...v0.6.0 [v0.5.1]: https://github.com/rust-lang/hashbrown/compare/v0.5.0...v0.5.1 [v0.5.0]: https://github.com/rust-lang/hashbrown/compare/v0.4.0...v0.5.0 [v0.4.0]: https://github.com/rust-lang/hashbrown/compare/v0.3.1...v0.4.0 [v0.3.1]: https://github.com/rust-lang/hashbrown/compare/v0.3.0...v0.3.1 [v0.3.0]: https://github.com/rust-lang/hashbrown/compare/v0.2.2...v0.3.0 [v0.2.2]: https://github.com/rust-lang/hashbrown/compare/v0.2.1...v0.2.2 [v0.2.1]: https://github.com/rust-lang/hashbrown/compare/v0.2.0...v0.2.1 [v0.2.0]: https://github.com/rust-lang/hashbrown/compare/v0.1.8...v0.2.0 [v0.1.8]: https://github.com/rust-lang/hashbrown/compare/v0.1.7...v0.1.8 [v0.1.7]: https://github.com/rust-lang/hashbrown/compare/v0.1.6...v0.1.7 [v0.1.6]: https://github.com/rust-lang/hashbrown/compare/v0.1.5...v0.1.6 [v0.1.5]: https://github.com/rust-lang/hashbrown/compare/v0.1.4...v0.1.5 [v0.1.4]: https://github.com/rust-lang/hashbrown/compare/v0.1.3...v0.1.4 [v0.1.3]: https://github.com/rust-lang/hashbrown/compare/v0.1.2...v0.1.3 [v0.1.2]: https://github.com/rust-lang/hashbrown/compare/v0.1.1...v0.1.2 [v0.1.1]: https://github.com/rust-lang/hashbrown/compare/v0.1.0...v0.1.1 [workspace] git_release_name = "{{ version }}" git_tag_name = "{{ version }}" [changelog] body = """ ## [{{ version | trim_start_matches(pat="v") }}]\ {%- if release_link -%}\ ({{ release_link }})\ {% endif %} \ - {{ timestamp | date(format="%Y-%m-%d") }} {% for group, commits in commits | group_by(attribute="group") %} ### {{ group | upper_first }} {% for commit in commits %} - {% if commit.scope -%}{{ commit.scope | upper_first }}: {% endif %} {%- if commit.breaking %}[**breaking**] {% endif %} {{- commit.message }} {%- if commit.links %} ([{{ commit.links.1.text }}]({{ commit.links.1.href }})){% endif -%} {% endfor %} {% endfor %} {%- if github -%} {% if github.contributors | filter(attribute="is_first_time", value=true) | length != 0 %} ## New Contributors ❤️ {% endif %}\ {% for contributor in github.contributors | filter(attribute="is_first_time", value=true) %} * @{{ contributor.username }} made their first contribution {%- if contributor.pr_number %} in \ [#{{ contributor.pr_number }}]({{ self::remote_url() }}/pull/{{ contributor.pr_number }}) \ {%- endif %} {%- endfor -%} {%- endif %} """ commit_parsers = [ { message = '(?i)^(\w+: )?feat', group = "added" }, { message = '(?i)^(\w+: )?add', group = "added" }, { message = '(?i)^(\w+: )?change', group = "changed" }, { message = '(?i)^(\w+: )?cleanup', group = "cleanup" }, { message = '(?i)^(\w+: )?deprecate', group = "deprecated" }, { message = '(?i)^(\w+: )?remove', group = "removed" }, { message = '(?i)^(\w+: )?fix', group = "fixed" }, { message = '(?i)^(\w+: )?fix', group = "fixed" }, { message = '^.*', group = "other" }, ] link_parsers = [ # Extract backport patterns { pattern = '\(backport <.*/(\d+)>\)', text = "#$1", href = "https://github.com/rust-lang/libc/pull/$1"} ] # Changelog ## [0.2.185](https://github.com/rust-lang/libc/compare/0.2.184...0.2.185) - 2026-04-13 ### Added - EspIDF: Add `espidf_picolibc` cfg for picolibc `O_*` flag values ([#5035](https://github.com/rust-lang/libc/pull/5035)) - Hexagon: add missing constants and fix types for linux-musl ([#5042](https://github.com/rust-lang/libc/pull/5042)) - Redox: Add semaphore functions ([#5051](https://github.com/rust-lang/libc/pull/5051)) - Windows: Add `sprintf`, `snprintf`, and the `scanf` family ([#5024](https://github.com/rust-lang/libc/pull/5024)) ### Fixed - Hexagon: Decouple `time64` types from musl symbol redirects ([#5040](https://github.com/rust-lang/libc/pull/5040)) - Horizon: Change `POLL` constants from `c_short` to `c_int` ([#5045](https://github.com/rust-lang/libc/pull/5045)) ## [0.2.184](https://github.com/rust-lang/libc/compare/0.2.183...0.2.184) - 2026-04-01 ### MSRV This release increases the MSRV of `libc` to 1.65. With this update, you can now always use the `core::ffi::c_*` types with `libc` definitions, since `libc` has been changed to reexport from `core` rather than redefining them. (This _usually_ worked before but had edge cases.) ([#4972](https://github.com/rust-lang/libc/pull/4972)) ### Added - BSD: Add `IP_MINTTL` to bsd ([#5026](https://github.com/rust-lang/libc/pull/5026)) - Cygwin: Add `TIOCM_DSR` ([#5031](https://github.com/rust-lang/libc/pull/5031)) - FreeBSD: Added `xfile` structe and file descriptor types ([#5002](https://github.com/rust-lang/libc/pull/5002)) - Linux: Add CAN netlink bindings ([#5011](https://github.com/rust-lang/libc/pull/5011)) - Linux: Add `struct ethhdr` ([#4239](https://github.com/rust-lang/libc/pull/4239)) - Linux: Add `struct ifinfomsg` ([#5012](https://github.com/rust-lang/libc/pull/5012)) - Linux: Define `max_align_t` for riscv64 ([#5029](https://github.com/rust-lang/libc/pull/5029)) - NetBSD: Add missing `CLOCK_` constants ([#5020](https://github.com/rust-lang/libc/pull/5020)) - NuttX: Add `_SC_HOST_NAME_MAX` ([#5004](https://github.com/rust-lang/libc/pull/5004)) - VxWorks: Add `flock` and `F_*LCK` constants ([#4043](https://github.com/rust-lang/libc/pull/4043)) - WASI: Add all `_SC_*` sysconf constants ([#5023](https://github.com/rust-lang/libc/pull/5023)) ### Deprecated The remaining fixed-width integer aliases, `__uint128_t`, `__uint128`, `__int128_t`, and `__int128`, have been deprecated. Use `i128` and `u128` instead. ([#4343](https://github.com/rust-lang/libc/pull/4343)) ### Fixed - **breaking** Redox: Fix signal action constant types ([#5009](https://github.com/rust-lang/libc/pull/5009)) - EspIDF: Correct the value of `DT_*` constants ([#5034](https://github.com/rust-lang/libc/pull/5034)) - Redox: Fix locale values and add `RTLD_NOLOAD`, some TCP constants ([#5025](https://github.com/rust-lang/libc/pull/5025)) - Various: Use `Padding::new()` rather than `Padding::uninit()` ([#5036](https://github.com/rust-lang/libc/pull/5036)) ### Changed - **potentially breaking** Linux: Add new fields to `struct ptrace_syscall_info` ([#4966](https://github.com/rust-lang/libc/pull/4966)) - Re-export `core::ffi` integer types rather than redefining ([#5015](https://github.com/rust-lang/libc/pull/5015)) - Redox: Update `F_DUPFD`, `IP`, and `TCP` constants to match relibc ([#4990](https://github.com/rust-lang/libc/pull/4990)) ## [0.2.183](https://github.com/rust-lang/libc/compare/0.2.182...0.2.183) - 2026-03-08 ### Added - ESP-IDF: Add `SOMAXCONN` ([#4993](https://github.com/rust-lang/libc/pull/4993)) - Linux: Add `name_to_handle_at` and `open_by_handle_at` ([#4988](https://github.com/rust-lang/libc/pull/4988)) - NetBSD: Add `kinfo_file`, `kinfo_pcb`, and related constants ([#4985](https://github.com/rust-lang/libc/pull/4985)) - OpenBSD: Add `kinfo_file` and related constants ([#4991](https://github.com/rust-lang/libc/pull/4991)) - VxWorks: Add additional structs and defines ([#5003](https://github.com/rust-lang/libc/pull/5003)) - Various: Implement `Default` for `timeval` and `timespec` ([#4976](https://github.com/rust-lang/libc/pull/4976)) ### Fixed - Hexagon musl: Enable unstable 64-bit `time_t` support and `musl_v1_2_3` ([#4992](https://github.com/rust-lang/libc/pull/4992)) - Nintendo Switch: Fix target support ([#4982](https://github.com/rust-lang/libc/pull/4982)) - OpenBSD: Wrap an unused field in `Padding` ([#4997](https://github.com/rust-lang/libc/pull/4997)) - Redox: Change `sigaction.sa_flags` to `c_int` ([#4986](https://github.com/rust-lang/libc/pull/4986)) - Redox: Fix `blkcnt_t` type ([#4994](https://github.com/rust-lang/libc/pull/4994)) ## [0.2.182](https://github.com/rust-lang/libc/compare/0.2.181...0.2.182) - 2026-02-13 ### Added - Android, Linux: Add `tgkill` ([#4970](https://github.com/rust-lang/libc/pull/4970)) - Redox: Add `RENAME_NOREPLACE` ([#4968](https://github.com/rust-lang/libc/pull/4968)) - Redox: Add `renameat2` ([#4968](https://github.com/rust-lang/libc/pull/4968)) ## [0.2.181](https://github.com/rust-lang/libc/compare/0.2.180...0.2.181) - 2026-02-09 ### Added - Apple: Add `MADV_ZERO` ([#4924](https://github.com/rust-lang/libc/pull/4924)) - Redox: Add `makedev`, `major`, and `minor` ([#4928](https://github.com/rust-lang/libc/pull/4928)) - GLibc: Add `PTRACE_SET_SYSCALL_INFO` ([#4933](https://github.com/rust-lang/libc/pull/4933)) - OpenBSD: Add more kqueue related constants for ([#4945](https://github.com/rust-lang/libc/pull/4945)) - Linux: add CAN error types ([#4944](https://github.com/rust-lang/libc/pull/4944)) - OpenBSD: Add siginfo_t::si_status ([#4946](https://github.com/rust-lang/libc/pull/4946)) - QNX NTO: Add `max_align_t` ([#4927](https://github.com/rust-lang/libc/pull/4927)) - Illumos: Add `_CS_PATH` ([#4956](https://github.com/rust-lang/libc/pull/4956)) - OpenBSD: add `ppoll` ([#4957](https://github.com/rust-lang/libc/pull/4957)) ### Fixed - **breaking**: Redox: Fix the type of dev_t ([#4928](https://github.com/rust-lang/libc/pull/4928)) - AIX: Change 'tv_nsec' of 'struct timespec' to type 'c_long' ([#4931](https://github.com/rust-lang/libc/pull/4931)) - AIX: Use 'struct st_timespec' in 'struct stat{,64}' ([#4931](https://github.com/rust-lang/libc/pull/4931)) - Glibc: Link old version of `tc{g,s}etattr` ([#4938](https://github.com/rust-lang/libc/pull/4938)) - Glibc: Link the correct version of `cf{g,s}et{i,o}speed` on mips{32,64}r6 ([#4938](https://github.com/rust-lang/libc/pull/4938)) - OpenBSD: Fix constness of tm.tm_zone ([#4948](https://github.com/rust-lang/libc/pull/4948)) - OpenBSD: Fix the definition of `ptrace_thread_state` ([#4947](https://github.com/rust-lang/libc/pull/4947)) - QuRT: Fix type visibility and defs ([#4932](https://github.com/rust-lang/libc/pull/4932)) - Redox: Fix values for `PTHREAD_MUTEX_{NORMAL, RECURSIVE}` ([#4943](https://github.com/rust-lang/libc/pull/4943)) - Various: Mark additional fields as private padding ([#4922](https://github.com/rust-lang/libc/pull/4922)) ### Changed - Fuchsia: Update `SO_*` constants ([#4937](https://github.com/rust-lang/libc/pull/4937)) - Revert "musl: convert inline timespecs to timespec" (resolves build issues on targets only supported by Musl 1.2.3+ ) ([#4958](https://github.com/rust-lang/libc/pull/4958)) ## [0.2.180](https://github.com/rust-lang/libc/compare/0.2.179...0.2.180) - 2026-01-08 ### Added - QNX: Add missing BPF and ifreq structures ([#4769](https://github.com/rust-lang/libc/pull/4769)) ### Fixed - Linux, L4Re: address soundness issues of `CMSG_NXTHDR` ([#4903](https://github.com/rust-lang/libc/pull/4903)) - Linux-like: Handle zero-sized payload differences in `CMSG_NXTHDR` ([#4903](https://github.com/rust-lang/libc/pull/4903)) - Musl: Fix incorrect definitions of struct stat on some 32-bit architectures ([#4914](https://github.com/rust-lang/libc/pull/4914)) - NetBSD: RISC-V 64: Correct `mcontext` type definitions ([#4886](https://github.com/rust-lang/libc/pull/4886)) - uClibc: Re-enable `__SIZEOF_PTHREAD_COND_T` on non-L4Re uclibc ([#4915](https://github.com/rust-lang/libc/pull/4915)) - uClibc: Restructure Linux `netlink` module to resolve build errors ([#4915](https://github.com/rust-lang/libc/pull/4915)) ## [0.2.179](https://github.com/rust-lang/libc/compare/0.2.178...0.2.179) - 2025-01-03 With this release, we now have _unstable_ support for 64-bit `time_t` on 32-bit platforms with both Musl and Glibc. Testing is appreciated! For now, these can be enabled by setting environment variables during build: ```text RUST_LIBC_UNSTABLE_MUSL_V1_2_3=1 RUST_LIBC_UNSTABLE_GNU_TIME_BITS=64 ``` Note that the exact configuration will change in the future. Setting the `MUSL_V1_2_3` variable also enables some newer API unrelated to `time_t`. ### Added - L4Re: Add uclibc aarch64 support ([#4479](https://github.com/rust-lang/libc/pull/4479)) - Linux, Android: Add a generic definition for `XCASE` ([#4847](https://github.com/rust-lang/libc/pull/4847)) - Linux-like: Add `NAME_MAX` ([#4888](https://github.com/rust-lang/libc/pull/4888)) - Linux: Add `AT_EXECVE_CHECK` ([#4422](https://github.com/rust-lang/libc/pull/4422)) - Linux: Add the `SUN_LEN` macro ([#4269](https://github.com/rust-lang/libc/pull/4269)) - Linux: add `getitimer` and `setitimer` ([#4890](https://github.com/rust-lang/libc/pull/4890)) - Linux: add `pthread_tryjoin_n` and `pthread_timedjoin_np` ([#4887](https://github.com/rust-lang/libc/pull/4887)) - Musl: Add unstable support for 64-bit `time_t` on 32-bit platforms ([#4463](https://github.com/rust-lang/libc/pull/4463)) - NetBSD, OpenBSD: Add interface `LINK_STATE_*` definitions from `sys/net/if.h` ([#4751](https://github.com/rust-lang/libc/pull/4751)) - QuRT: Add support for Qualcomm QuRT ([#4845](https://github.com/rust-lang/libc/pull/4845)) - Types: Add Padding::uninit() ([#4862](https://github.com/rust-lang/libc/pull/4862)) ### Fixed - Glibc: Link old version of `cf{g,s}et{i,o}speed` ([#4882](https://github.com/rust-lang/libc/pull/4882)) - L4Re: Fixes for `pthread` ([#4479](https://github.com/rust-lang/libc/pull/4479)) - L4re: Fix a wide variety of incorrect definitions ([#4479](https://github.com/rust-lang/libc/pull/4479)) - Musl: Fix the value of `CPU_SETSIZE` on musl 1.2+ ([#4865](https://github.com/rust-lang/libc/pull/4865)) - Musl: RISC-V: fix public padding fields in `stat/stat64` ([#4463](https://github.com/rust-lang/libc/pull/4463)) - Musl: s390x: Fix definition of `SIGSTKSZ`/`MINSIGSTKSZ` ([#4884](https://github.com/rust-lang/libc/pull/4884)) - NetBSD: Arm: Fix `PT_{GET,SET}FPREGS`, `_REG_TIPDR`, and `_REG_{LR,SP}` ([#4899](https://github.com/rust-lang/libc/pull/4899)) - NetBSD: Fix `if_msghdr` alignment ([#4902](https://github.com/rust-lang/libc/pull/4902)) - NetBSD: Fix `siginfo_t` layout on 32-bit platforms ([#4904](https://github.com/rust-lang/libc/pull/4904)) - NetBSD: change definition of `pthread_spin_t` to allow arch redefinition. ([#4899](https://github.com/rust-lang/libc/pull/4899)) - Newlib: Fix ambiguous glob exports and other warnings for Vita and 3DS ([#4875](https://github.com/rust-lang/libc/pull/4875)) - QNX: Fix build error ([#4879](https://github.com/rust-lang/libc/pull/4879)) ### Changed - CI: Update CI images to FreeBSD 15.0-release ([#4857](https://github.com/rust-lang/libc/pull/4857)) - L4Re: Make `pthread` struct fields private ([#4876](https://github.com/rust-lang/libc/pull/4876)) - Linux, Fuchsia: Mark mq_attr padding area as such ([#4858](https://github.com/rust-lang/libc/pull/4858)) - Types: Wrap a number of private fields in the `Padding` type ([#4862](https://github.com/rust-lang/libc/pull/4862)) ### Removed - Build: Remove `RUST_LIBC_UNSTABLE_LINUX_TIME_BITS64` ([#4865](https://github.com/rust-lang/libc/pull/4865)) - WASI: Remove nonexistent clocks ([#4880](https://github.com/rust-lang/libc/pull/4880)) ## [0.2.178](https://github.com/rust-lang/libc/compare/0.2.177...0.2.178) - 2025-12-01 ### Added - BSD: Add `issetugid` ([#4744](https://github.com/rust-lang/libc/pull/4744)) - Cygwin: Add missing utmp/x.h, grp.h, and stdio.h interfaces ([#4827](https://github.com/rust-lang/libc/pull/4827)) - Linux s390x musl: Add `__psw_t`/`fprefset_t`/`*context_t` ([#4726](https://github.com/rust-lang/libc/pull/4726)) - Linux, Android: Add definition for IUCLC ([#4846](https://github.com/rust-lang/libc/pull/4846)) - Linux, FreeBSD: Add `AT_HWCAP{3,4}` ([#4734](https://github.com/rust-lang/libc/pull/4734)) - Linux: Add definitions from linux/can/bcm.h ([#4683](https://github.com/rust-lang/libc/pull/4683)) - Linux: Add syscalls 451-469 for m68k ([#4850](https://github.com/rust-lang/libc/pull/4850)) - Linux: PowerPC: Add 'ucontext.h' definitions ([#4696](https://github.com/rust-lang/libc/pull/4696)) - NetBSD: Define `eventfd` ([#4830](https://github.com/rust-lang/libc/pull/4830)) - Newlib: Add missing constants from `unistd.h` ([#4811](https://github.com/rust-lang/libc/pull/4811)) - QNX NTO: Add `cfmakeraw` ([#4704](https://github.com/rust-lang/libc/pull/4704)) - QNX NTO: Add `cfsetspeed` ([#4704](https://github.com/rust-lang/libc/pull/4704)) - Redox: Add `getresgid` and `getresuid` ([#4752](https://github.com/rust-lang/libc/pull/4752)) - Redox: Add `setresgid` and `setresuid` ([#4752](https://github.com/rust-lang/libc/pull/4752)) - VxWorks: Add definitions from `select.h`, `stat.h`, `poll.h`, `ttycom.h`, `utsname.h`, `resource.h`, `mman.h`, `udp.h`, `in.h`, `in6.h`, `if.h`, `fnmatch.h`, and `sioLibCommon.h` ([#4781](https://github.com/rust-lang/libc/pull/4781)) - VxWorks: Add missing defines/functions needed by rust stdlib ([#4779](https://github.com/rust-lang/libc/pull/4779)) - WASI: Add more definitions for libstd ([#4747](https://github.com/rust-lang/libc/pull/4747)) ### Deprecated - Apple: Deprecate `TIOCREMOTE` ([#4764](https://github.com/rust-lang/libc/pull/4764)) ### Fixed Note that there were a large number of fixes on NetBSD for this `libc` release, some of which include minor breakage. - AIX: Change errno `EWOULDBLOCK` to make it an alias of `EAGAIN` ([#4790](https://github.com/rust-lang/libc/pull/4790)) - AIX: Resolve function comparison and `unnecessary_transmutes` warnings ([#4780](https://github.com/rust-lang/libc/pull/4780)) - Apple: Correct the value of `SF_SETTABLE` ([#4764](https://github.com/rust-lang/libc/pull/4764)) - DragonflyBSD: Fix the type of `mcontext_t.mc_fpregs` ([#]()) - EspIDF: Fix the duplicate definition of `gethostname` ([#4773](https://github.com/rust-lang/libc/pull/4773)) - L4Re: Update available pthread API ([#4836](https://github.com/rust-lang/libc/pull/4836)) - Linux: Correct the value of `NFT_MSG_MAX` ([#4761](https://github.com/rust-lang/libc/pull/4761)) - Linux: Remove incorrect `repr(align(8))` for `canxl_frame` ([#4760](https://github.com/rust-lang/libc/pull/4760)) - Make `eventfd` argument names match OS docs/headers ([#4830](https://github.com/rust-lang/libc/pull/4830)) - NetBSD: Account for upstream changes to ptrace with LWP ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Correct `ipc_perm`, split from OpenBSD as `ipc.rs` ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Correct a number of symbol link names ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Correct the type of `kinfo_vmentry.kve_path` ([#]()) - NetBSD: Fix `uucred.cr_ngroups` from `int` to `short` ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Fix the type of `kevent.udata` ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Fix the type of `mcontext_t.__fpregs` ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Fix the value of `PT_SUSPEND` ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Fix the values of FNM_* constants ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Increase the size of `sockaddr_dl.sdl_data` from 12 to 24 ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Introduce `if_.rs`, fix the definition of `ifreq` ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Introduce `time.rs`, fix the values of `CLOCK_*_CPUTIME_ID` ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Introduce `timex.rs` ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Introduce `types.rs`, correct the definition of `lwpid_t` ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Introduce `utmp_.rs`, correct the definition of `lastlog` ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Introduce `utmpx_.rs`, correct utmpx definitions ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Make `_cpuset` an extern type ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: RISC-V 64: Fix the `mcontext` types ([#4782](https://github.com/rust-lang/libc/pull/4782)) - Nuttx: Resolve warnings ([#4773](https://github.com/rust-lang/libc/pull/4773)) - OHOS: Don't emit duplicate lfs64 definitions ([#4804](https://github.com/rust-lang/libc/pull/4804)) - Redox: Fix the type of `pid_t` ([#4825](https://github.com/rust-lang/libc/pull/4825)) - WASI: Gate `__wasilibc_register_preopened_fd` ([#4837](https://github.com/rust-lang/libc/pull/4837)) - Wali: Fix unknown config ([#4773](https://github.com/rust-lang/libc/pull/4773)) ### Changed - AIX: Declare field 'tv_nsec' of structure 'timespec' as 'i32' in both 32-bit and 64-bit modes ([#4750](https://github.com/rust-lang/libc/pull/4750)) - DragonFly: Avoid usage of `thread_local` ([#3653](https://github.com/rust-lang/libc/pull/3653)) - Linux: Update the definition for `ucontext_t` and unskip its tests ([#4760](https://github.com/rust-lang/libc/pull/4760)) - MinGW: Set `L_tmpnam` and `TMP_MAX` to the UCRT value ([#4566](https://github.com/rust-lang/libc/pull/4566)) - WASI: More closely align pthread type reprs ([#4747](https://github.com/rust-lang/libc/pull/4747)) - Simplify rustc-check-cfg emission in build.rs ([#4724](https://github.com/rust-lang/libc/pull/4724)) - Transition a number of definitions to the new source structure (internal change) ### Removed - MIPS Musl: Remove rogue definition of `SIGSTKFLT` ([#4749](https://github.com/rust-lang/libc/pull/4749)) - NetBSD: Make `statvfs.f_spare` non-public ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Remove BPF constants ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Remove `*_MAXID` constants and `AT_SUN_LDPGSIZE` ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Remove `IFF_NOTRAILERS` ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Remove `vm_size_t` ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Replace REG_ENOSYS with REG_ILLSEQ ([#4782](https://github.com/rust-lang/libc/pull/4782)) ## [0.2.177](https://github.com/rust-lang/libc/compare/0.2.176...0.2.177) - 2025-10-09 ### Added - Apple: Add `TIOCGETA`, `TIOCSETA`, `TIOCSETAW`, `TIOCSETAF` constants ([#4736](https://github.com/rust-lang/libc/pull/4736)) - Apple: Add `pthread_cond_timedwait_relative_np` ([#4719](https://github.com/rust-lang/libc/pull/4719)) - BSDs: Add `_CS_PATH` constant ([#4738](https://github.com/rust-lang/libc/pull/4738)) - Linux-like: Add `SIGEMT` for mips* and sparc* architectures ([#4730](https://github.com/rust-lang/libc/pull/4730)) - OpenBSD: Add `elf_aux_info` ([#4729](https://github.com/rust-lang/libc/pull/4729)) - Redox: Add more sysconf constants ([#4728](https://github.com/rust-lang/libc/pull/4728)) - Windows: Add `wcsnlen` ([#4721](https://github.com/rust-lang/libc/pull/4721)) ### Changed - WASIP2: Invert conditional to include p2 APIs ([#4733](https://github.com/rust-lang/libc/pull/4733)) ## [0.2.176](https://github.com/rust-lang/libc/compare/0.2.175...0.2.176) - 2025-09-23 ### Support - The default FreeBSD version has been raised from 11 to 12. This matches `rustc` since 1.78. ([#2406](https://github.com/rust-lang/libc/pull/2406)) - `Debug` is now always implemented, rather than being gated behind the `extra_traits` feature. ([#4624](https://github.com/rust-lang/libc/pull/4624)) ### Added - AIX: Restore some non-POSIX functions guarded by the `_KERNEL` macro. ([#4607](https://github.com/rust-lang/libc/pull/4607)) - FreeBSD 14: Add `st_fileref` to `struct stat` ([#4642](https://github.com/rust-lang/libc/pull/4642)) - Haiku: Add the `accept4` POSIX call ([#4586](https://github.com/rust-lang/libc/pull/4586)) - Introduce a wrapper for representing padding ([#4632](https://github.com/rust-lang/libc/pull/4632)) - Linux: Add `EM_RISCV` ([#4659](https://github.com/rust-lang/libc/pull/4659)) - Linux: Add `MS_NOSYMFOLLOW` ([#4389](https://github.com/rust-lang/libc/pull/4389)) - Linux: Add `backtrace_symbols(_fd)` ([#4668](https://github.com/rust-lang/libc/pull/4668)) - Linux: Add missing `SOL_PACKET` optnames ([#4669](https://github.com/rust-lang/libc/pull/4669)) - Musl s390x: Add `SYS_mseal` ([#4549](https://github.com/rust-lang/libc/pull/4549)) - NuttX: Add `__errno` ([#4687](https://github.com/rust-lang/libc/pull/4687)) - Redox: Add `dirfd`, `VDISABLE`, and resource consts ([#4660](https://github.com/rust-lang/libc/pull/4660)) - Redox: Add more `resource.h`, `fcntl.h` constants ([#4666](https://github.com/rust-lang/libc/pull/4666)) - Redox: Enable `strftime` and `mkostemp[s]` ([#4629](https://github.com/rust-lang/libc/pull/4629)) - Unix, Windows: Add `qsort_r` (Unix), and `qsort(_s)` (Windows) ([#4677](https://github.com/rust-lang/libc/pull/4677)) - Unix: Add `dlvsym` for Linux-gnu, FreeBSD, and NetBSD ([#4671](https://github.com/rust-lang/libc/pull/4671)) - Unix: Add `sigqueue` ([#4620](https://github.com/rust-lang/libc/pull/4620)) ### Changed - FreeBSD 15: Mark `kinfo_proc` as non-exhaustive ([#4553](https://github.com/rust-lang/libc/pull/4553)) - FreeBSD: Set the ELF symbol version for `readdir_r` ([#4694](https://github.com/rust-lang/libc/pull/4694)) - Linux: Correct the config for whether or not `epoll_event` is packed ([#4639](https://github.com/rust-lang/libc/pull/4639)) - Tests: Replace the old `ctest` with the much more reliable new implementation ([#4655](https://github.com/rust-lang/libc/pull/4655) and many related PRs) ### Fixed - AIX: Fix the type of the 4th arguement of `getgrnam_r` ([#4656](https://github.com/rust-lang/libc/pull/4656 - FreeBSD: Limit `P_IDLEPROC` to FreeBSD 15 ([#4640](https://github.com/rust-lang/libc/pull/4640)) - FreeBSD: Limit `mcontext_t::mc_tlsbase` to FreeBSD 15 ([#4640](https://github.com/rust-lang/libc/pull/464)) - FreeBSD: Update gating of `mcontext_t.mc_tlsbase` ([#4703](https://github.com/rust-lang/libc/pull/4703)) - Musl s390x: Correct the definition of `statfs[64]` ([#4549](https://github.com/rust-lang/libc/pull/4549)) - Musl s390x: Make `fpreg_t` a union ([#4549](https://github.com/rust-lang/libc/pull/4549)) - Redox: Fix the types of `gid_t` and `uid_t` ([#4689](https://github.com/rust-lang/libc/pull/4689)) - Redox: Fix the value of `MAP_FIXED` ([#4684](https://github.com/rust-lang/libc/pull/4684)) ### Deprecated - Apple: Correct the `deprecated` attribute for `iconv` ([`a97a0b53`](https://github.com/rust-lang/libc/commit/a97a0b53fb7faf5f99cd720ab12b1b8a5bf9f950)) - FreeBSD: Deprecate `TIOCMGDTRWAIT` and `TIOCMSDTRWAIT` ([#4685](https://github.com/rust-lang/libc/pull/4685)) ### Removed - FreeBSD: Remove `JAIL_{GET,SET}_MASK`, `_MC_FLAG_MASK` ([#4691](https://github.com/rust-lang/libc/pull/4691)) ## [0.2.175](https://github.com/rust-lang/libc/compare/0.2.174...0.2.175) - 2025-08-10 ### Added - AIX: Add `getpeereid` ([#4524](https://github.com/rust-lang/libc/pull/4524)) - AIX: Add `struct ld_info` and friends ([#4578](https://github.com/rust-lang/libc/pull/4578)) - AIX: Retore `struct winsize` ([#4577](https://github.com/rust-lang/libc/pull/4577)) - Android: Add UDP socket option constants ([#4619](https://github.com/rust-lang/libc/pull/4619)) - Android: Add `CLONE_CLEAR_SIGHAND` and `CLONE_INTO_CGROUP` ([#4502](https://github.com/rust-lang/libc/pull/4502)) - Android: Add more `prctl` constants ([#4531](https://github.com/rust-lang/libc/pull/4531)) - FreeBSD Add further TCP stack-related constants ([#4196](https://github.com/rust-lang/libc/pull/4196)) - FreeBSD x86-64: Add `mcontext_t.mc_tlsbase ` ([#4503](https://github.com/rust-lang/libc/pull/4503)) - FreeBSD15: Add `kinfo_proc.ki_uerrmsg` ([#4552](https://github.com/rust-lang/libc/pull/4552)) - FreeBSD: Add `in_conninfo` ([#4482](https://github.com/rust-lang/libc/pull/4482)) - FreeBSD: Add `xinpgen` and related types ([#4482](https://github.com/rust-lang/libc/pull/4482)) - FreeBSD: Add `xktls_session` ([#4482](https://github.com/rust-lang/libc/pull/4482)) - Haiku: Add functionality from `libbsd` ([#4221](https://github.com/rust-lang/libc/pull/4221)) - Linux: Add `SECBIT_*` ([#4480](https://github.com/rust-lang/libc/pull/4480)) - NetBSD, OpenBSD: Export `ioctl` request generator macros ([#4460](https://github.com/rust-lang/libc/pull/4460)) - NetBSD: Add `ptsname_r` ([#4608](https://github.com/rust-lang/libc/pull/4608)) - RISCV32: Add time-related syscalls ([#4612](https://github.com/rust-lang/libc/pull/4612)) - Solarish: Add `strftime*` ([#4453](https://github.com/rust-lang/libc/pull/4453)) - linux: Add `EXEC_RESTRICT_*` and `EXEC_DENY_*` ([#4545](https://github.com/rust-lang/libc/pull/4545)) ### Changed - AIX: Add `const` to signatures to be consistent with other platforms ([#4563](https://github.com/rust-lang/libc/pull/4563)) ### Fixed - AIX: Fix the type of `struct statvfs.f_fsid` ([#4576](https://github.com/rust-lang/libc/pull/4576)) - AIX: Fix the type of constants for the `ioctl` `request` argument ([#4582](https://github.com/rust-lang/libc/pull/4582)) - AIX: Fix the types of `stat{,64}.st_*tim` ([#4597](https://github.com/rust-lang/libc/pull/4597)) - AIX: Use unique `errno` values ([#4507](https://github.com/rust-lang/libc/pull/4507)) - Build: Fix an incorrect `target_os` -> `target_arch` check ([#4550](https://github.com/rust-lang/libc/pull/4550)) - FreeBSD: Fix the type of `xktls_session_onedir.ifnet` ([#4552](https://github.com/rust-lang/libc/pull/4552)) - Mips64 musl: Fix the type of `nlink_t` ([#4509](https://github.com/rust-lang/libc/pull/4509)) - Mips64 musl: Use a special MIPS definition of `stack_t` ([#4528](https://github.com/rust-lang/libc/pull/4528)) - Mips64: Fix `SI_TIMER`, `SI_MESGQ` and `SI_ASYNCIO` definitions ([#4529](https://github.com/rust-lang/libc/pull/4529)) - Musl Mips64: Swap the order of `si_errno` and `si_code` in `siginfo_t` ([#4530](https://github.com/rust-lang/libc/pull/4530)) - Musl Mips64: Use a special MIPS definition of `statfs` ([#4527](https://github.com/rust-lang/libc/pull/4527)) - Musl: Fix the definition of `fanotify_event_metadata` ([#4510](https://github.com/rust-lang/libc/pull/4510)) - NetBSD: Correct `enum fae_action` to be `#[repr(C)]` ([#60a8cfd5](https://github.com/rust-lang/libc/commit/60a8cfd564f83164d45b9533ff7a0d7371878f2a)) - PSP: Correct `char` -> `c_char` ([eaab4fc3](https://github.com/rust-lang/libc/commit/eaab4fc3f05dc646a953d4fd5ba46dfa1f8bd6f6)) - PowerPC musl: Fix `termios` definitions ([#4518](https://github.com/rust-lang/libc/pull/4518)) - PowerPC musl: Fix the definition of `EDEADLK` ([#4517](https://github.com/rust-lang/libc/pull/4517)) - PowerPC musl: Fix the definition of `NCCS` ([#4513](https://github.com/rust-lang/libc/pull/4513)) - PowerPC musl: Fix the definitions of `MAP_LOCKED` and `MAP_NORESERVE` ([#4516](https://github.com/rust-lang/libc/pull/4516)) - PowerPC64 musl: Fix the definition of `shmid_ds` ([#4519](https://github.com/rust-lang/libc/pull/4519)) ### Deprecated - Linux: `MAP_32BIT` is only defined on x86 on non-x86 architectures ([#4511](https://github.com/rust-lang/libc/pull/4511)) ### Removed - AIX: Remove duplicate constant definitions `FIND` and `ENTER` ([#4588](https://github.com/rust-lang/libc/pull/4588)) - s390x musl: Remove `O_FSYNC` ([#4515](https://github.com/rust-lang/libc/pull/4515)) - s390x musl: Remove `RTLD_DEEPBIND` ([#4515](https://github.com/rust-lang/libc/pull/4515)) ## [0.2.174](https://github.com/rust-lang/libc/compare/0.2.173...0.2.174) - 2025-06-17 ### Added - Linux: Make `pidfd_info` fields pub ([#4487](https://github.com/rust-lang/libc/pull/4487)) ### Fixed - Gnu x32: Add missing `timespec.tv_nsec` ([#4497](https://github.com/rust-lang/libc/pull/4497)) - NuttX: Use `nlink_t` type for `st_nlink` in `struct stat` definition ([#4483](https://github.com/rust-lang/libc/pull/4483)) ### Other - Allow new `unpredictable_function_pointer_comparisons` lints ([#4489](https://github.com/rust-lang/libc/pull/4489)) - OpenBSD: Fix some clippy warnings to use `pointer::cast`. ([#4490](https://github.com/rust-lang/libc/pull/4490)) - Remove unessecary semicolons from definitions of `CMSG_NXTHDR`. ([#4492](https://github.com/rust-lang/libc/pull/4492)) ## [0.2.173](https://github.com/rust-lang/libc/compare/0.2.172...0.2.173) - 2025-06-09 ### Added - AIX: Add an AIX triple to Cargo.toml for doc ([#4475](https://github.com/rust-lang/libc/pull/4475)) - FreeBSD: Add the `SO_SPLICE` socket option support for FreeBSD >= 14.2 ([#4451](https://github.com/rust-lang/libc/pull/4451)) - Linux GNU: Prepare for supporting `_TIME_BITS=64` ([#4433](https://github.com/rust-lang/libc/pull/4433)) - Linux: Add constant PACKET_IGNORE_OUTGOING ([#4319](https://github.com/rust-lang/libc/pull/4319)) - Linux: Add constants and types for `nsfs` ioctls ([#4436](https://github.com/rust-lang/libc/pull/4436)) - Linux: Add constants for Memory-Deny-Write-Execute `prctls` ([#4400](https://github.com/rust-lang/libc/pull/4400)) - Linux: Add constants from `linux/cn_proc.h` and `linux/connector.h` ([#4434](https://github.com/rust-lang/libc/pull/4434)) - Linux: Add new flags for `pwritev2` and `preadv2` ([#4452](https://github.com/rust-lang/libc/pull/4452)) - Linux: Add pid_type enum values ([#4403](https://github.com/rust-lang/libc/pull/4403)) - Linux: Update pidfd constants and types (Linux 6.9-6.15) ([#4402](https://github.com/rust-lang/libc/pull/4402)) - Loongarch64 musl: Define the `MADV_SOFT_OFFLINE` constant ([#4448](https://github.com/rust-lang/libc/pull/4448)) - Musl: Add new fields since 1.2.0/1.2.2 to `struct tcp_info` ([#4443](https://github.com/rust-lang/libc/pull/4443)) - Musl: Prepare for supporting v1.2.3 ([#4443](https://github.com/rust-lang/libc/pull/4443)) - NuttX: Add `arc4random` and `arc4random_buf` ([#4464](https://github.com/rust-lang/libc/pull/4464)) - RISC-V Musl: Add `MADV_SOFT_OFFLINE` definition ([#4447](https://github.com/rust-lang/libc/pull/4447)) - Redox: Define SCM_RIGHTS ([#4440](https://github.com/rust-lang/libc/pull/4440)) - VxWorks: Add missing UTIME defines and TASK_RENAME_LENGTH ([#4407](https://github.com/rust-lang/libc/pull/4407)) - Windows: Add more `time.h` functions ([#4427](https://github.com/rust-lang/libc/pull/4427)) ### Changed - Redox: Update `SA_` constants. ([#4426](https://github.com/rust-lang/libc/pull/4426)) - Redox: make `CMSG_ALIGN`, `CMSG_LEN`, and `CMSG_SPACE` const functions ([#4441](https://github.com/rust-lang/libc/pull/4441)) ### Fixed - AIX: Enable libc-test and fix definitions/declarations. ([#4450](https://github.com/rust-lang/libc/pull/4450)) - Emscripten: Fix querying emcc on windows (use emcc.bat) ([#4248](https://github.com/rust-lang/libc/pull/4248)) - Hurd: Fix build from missing `fpos_t` ([#4472](https://github.com/rust-lang/libc/pull/4472)) - Loongarch64 Musl: Fix the `struct ipc_perm` bindings ([#4384](https://github.com/rust-lang/libc/pull/4384)) - Musl: Fix the `O_LARGEFILE` constant value. ([#4443](https://github.com/rust-lang/libc/pull/4443)) ## [0.2.172](https://github.com/rust-lang/libc/compare/0.2.171...0.2.172) - 2025-04-14 ### Added - Android: Add `getauxval` for 32-bit targets ([#4338](https://github.com/rust-lang/libc/pull/4338)) - Android: Add `if_tun.h` ioctls ([#4379](https://github.com/rust-lang/libc/pull/4379)) - Android: Define `SO_BINDTOIFINDEX` ([#4391](https://github.com/rust-lang/libc/pull/4391)) - Cygwin: Add `posix_spawn_file_actions_add[f]chdir[_np]` ([#4387](https://github.com/rust-lang/libc/pull/4387)) - Cygwin: Add new socket options ([#4350](https://github.com/rust-lang/libc/pull/4350)) - Cygwin: Add statfs & fcntl ([#4321](https://github.com/rust-lang/libc/pull/4321)) - FreeBSD: Add `filedesc` and `fdescenttbl` ([#4327](https://github.com/rust-lang/libc/pull/4327)) - Glibc: Add unstable support for _FILE_OFFSET_BITS=64 ([#4345](https://github.com/rust-lang/libc/pull/4345)) - Hermit: Add `AF_UNSPEC` ([#4344](https://github.com/rust-lang/libc/pull/4344)) - Hermit: Add `AF_VSOCK` ([#4344](https://github.com/rust-lang/libc/pull/4344)) - Illumos, NetBSD: Add `timerfd` APIs ([#4333](https://github.com/rust-lang/libc/pull/4333)) - Linux: Add `_IO`, `_IOW`, `_IOR`, `_IOWR` to the exported API ([#4325](https://github.com/rust-lang/libc/pull/4325)) - Linux: Add `tcp_info` to uClibc bindings ([#4347](https://github.com/rust-lang/libc/pull/4347)) - Linux: Add further BPF program flags ([#4356](https://github.com/rust-lang/libc/pull/4356)) - Linux: Add missing INPUT_PROP_XXX flags from `input-event-codes.h` ([#4326](https://github.com/rust-lang/libc/pull/4326)) - Linux: Add missing TLS bindings ([#4296](https://github.com/rust-lang/libc/pull/4296)) - Linux: Add more constants from `seccomp.h` ([#4330](https://github.com/rust-lang/libc/pull/4330)) - Linux: Add more glibc `ptrace_sud_config` and related `PTRACE_*ET_SYSCALL_USER_DISPATCH_CONFIG`. ([#4386](https://github.com/rust-lang/libc/pull/4386)) - Linux: Add new netlink flags ([#4288](https://github.com/rust-lang/libc/pull/4288)) - Linux: Define ioctl codes on more architectures ([#4382](https://github.com/rust-lang/libc/pull/4382)) - Linux: Add missing `pthread_attr_setstack` ([#4349](https://github.com/rust-lang/libc/pull/4349)) - Musl: Add missing `utmpx` API ([#4332](https://github.com/rust-lang/libc/pull/4332)) - Musl: Enable `getrandom` on all platforms ([#4346](https://github.com/rust-lang/libc/pull/4346)) - NuttX: Add more signal constants ([#4353](https://github.com/rust-lang/libc/pull/4353)) - QNX: Add QNX 7.1-iosock and 8.0 to list of additional cfgs ([#4169](https://github.com/rust-lang/libc/pull/4169)) - QNX: Add support for alternative Neutrino network stack `io-sock` ([#4169](https://github.com/rust-lang/libc/pull/4169)) - Redox: Add more `sys/socket.h` and `sys/uio.h` definitions ([#4388](https://github.com/rust-lang/libc/pull/4388)) - Solaris: Temporarily define `O_DIRECT` and `SIGINFO` ([#4348](https://github.com/rust-lang/libc/pull/4348)) - Solarish: Add `secure_getenv` ([#4342](https://github.com/rust-lang/libc/pull/4342)) - VxWorks: Add missing `d_type` member to `dirent` ([#4352](https://github.com/rust-lang/libc/pull/4352)) - VxWorks: Add missing signal-related constsants ([#4352](https://github.com/rust-lang/libc/pull/4352)) - VxWorks: Add more error codes ([#4337](https://github.com/rust-lang/libc/pull/4337)) ### Deprecated - FreeBSD: Deprecate `TCP_PCAP_OUT` and `TCP_PCAP_IN` ([#4381](https://github.com/rust-lang/libc/pull/4381)) ### Fixed - Cygwin: Fix member types of `statfs` ([#4324](https://github.com/rust-lang/libc/pull/4324)) - Cygwin: Fix tests ([#4357](https://github.com/rust-lang/libc/pull/4357)) - Hermit: Make `AF_INET = 3` ([#4344](https://github.com/rust-lang/libc/pull/4344)) - Musl: Fix the syscall table on RISC-V-32 ([#4335](https://github.com/rust-lang/libc/pull/4335)) - Musl: Fix the value of `SA_ONSTACK` on RISC-V-32 ([#4335](https://github.com/rust-lang/libc/pull/4335)) - VxWorks: Fix a typo in the `waitpid` parameter name ([#4334](https://github.com/rust-lang/libc/pull/4334)) ### Removed - Musl: Remove `O_FSYNC` on RISC-V-32 (use `O_SYNC` instead) ([#4335](https://github.com/rust-lang/libc/pull/4335)) - Musl: Remove `RTLD_DEEPBIND` on RISC-V-32 ([#4335](https://github.com/rust-lang/libc/pull/4335)) ### Other - CI: Add matrix env variables to the environment ([#4345](https://github.com/rust-lang/libc/pull/4345)) - CI: Always deny warnings ([#4363](https://github.com/rust-lang/libc/pull/4363)) - CI: Always upload successfully created artifacts ([#4345](https://github.com/rust-lang/libc/pull/4345)) - CI: Install musl from source for loongarch64 ([#4320](https://github.com/rust-lang/libc/pull/4320)) - CI: Revert "Also skip `MFD_EXEC` and `MFD_NOEXEC_SEAL` on sparc64" ([#]()) - CI: Use `$PWD` instead of `$(pwd)` in run-docker ([#4345](https://github.com/rust-lang/libc/pull/4345)) - Solarish: Restrict `openpty` and `forkpty` polyfills to Illumos, replace Solaris implementation with bindings ([#4329](https://github.com/rust-lang/libc/pull/4329)) - Testing: Ensure the makedev test does not emit unused errors ([#4363](https://github.com/rust-lang/libc/pull/4363)) ## [0.2.171](https://github.com/rust-lang/libc/compare/0.2.170...0.2.171) - 2025-03-11 ### Added - Android: Add `if_nameindex`/`if_freenameindex` support ([#4247](https://github.com/rust-lang/libc/pull/4247)) - Apple: Add missing proc types and constants ([#4310](https://github.com/rust-lang/libc/pull/4310)) - BSD: Add `devname` ([#4285](https://github.com/rust-lang/libc/pull/4285)) - Cygwin: Add PTY and group API ([#4309](https://github.com/rust-lang/libc/pull/4309)) - Cygwin: Add support ([#4279](https://github.com/rust-lang/libc/pull/4279)) - FreeBSD: Make `spawn.h` interfaces available on all FreeBSD-like systems ([#4294](https://github.com/rust-lang/libc/pull/4294)) - Linux: Add `AF_XDP` structs for all Linux environments ([#4163](https://github.com/rust-lang/libc/pull/4163)) - Linux: Add SysV semaphore constants ([#4286](https://github.com/rust-lang/libc/pull/4286)) - Linux: Add `F_SEAL_EXEC` ([#4316](https://github.com/rust-lang/libc/pull/4316)) - Linux: Add `SO_PREFER_BUSY_POLL` and `SO_BUSY_POLL_BUDGET` ([#3917](https://github.com/rust-lang/libc/pull/3917)) - Linux: Add `devmem` structs ([#4299](https://github.com/rust-lang/libc/pull/4299)) - Linux: Add socket constants up to `SO_DEVMEM_DONTNEED` ([#4299](https://github.com/rust-lang/libc/pull/4299)) - NetBSD, OpenBSD, DragonflyBSD: Add `closefrom` ([#4290](https://github.com/rust-lang/libc/pull/4290)) - NuttX: Add `pw_passwd` field to `passwd` ([#4222](https://github.com/rust-lang/libc/pull/4222)) - Solarish: define `IP_BOUND_IF` and `IPV6_BOUND_IF` ([#4287](https://github.com/rust-lang/libc/pull/4287)) - Wali: Add bindings for `wasm32-wali-linux-musl` target ([#4244](https://github.com/rust-lang/libc/pull/4244)) ### Changed - AIX: Use `sa_sigaction` instead of a union ([#4250](https://github.com/rust-lang/libc/pull/4250)) - Make `msqid_ds.__msg_cbytes` public ([#4301](https://github.com/rust-lang/libc/pull/4301)) - Unix: Make all `major`, `minor`, `makedev` into `const fn` ([#4208](https://github.com/rust-lang/libc/pull/4208)) ### Deprecated - Linux: Deprecate obsolete packet filter interfaces ([#4267](https://github.com/rust-lang/libc/pull/4267)) ### Fixed - Cygwin: Fix strerror_r ([#4308](https://github.com/rust-lang/libc/pull/4308)) - Cygwin: Fix usage of f! ([#4308](https://github.com/rust-lang/libc/pull/4308)) - Hermit: Make `stat::st_size` signed ([#4298](https://github.com/rust-lang/libc/pull/4298)) - Linux: Correct values for `SI_TIMER`, `SI_MESGQ`, `SI_ASYNCIO` ([#4292](https://github.com/rust-lang/libc/pull/4292)) - NuttX: Update `tm_zone` and `d_name` fields to use `c_char` type ([#4222](https://github.com/rust-lang/libc/pull/4222)) - Xous: Include the prelude to define `c_int` ([#4304](https://github.com/rust-lang/libc/pull/4304)) ### Other - Add labels to FIXMEs ([#4231](https://github.com/rust-lang/libc/pull/4231), [#4232](https://github.com/rust-lang/libc/pull/4232), [#4234](https://github.com/rust-lang/libc/pull/4234), [#4235](https://github.com/rust-lang/libc/pull/4235), [#4236](https://github.com/rust-lang/libc/pull/4236)) - CI: Fix "cannot find libc" error on Sparc64 ([#4317](https://github.com/rust-lang/libc/pull/4317)) - CI: Fix "cannot find libc" error on s390x ([#4317](https://github.com/rust-lang/libc/pull/4317)) - CI: Pass `--no-self-update` to `rustup update` ([#4306](https://github.com/rust-lang/libc/pull/4306)) - CI: Remove tests for the `i586-pc-windows-msvc` target ([#4311](https://github.com/rust-lang/libc/pull/4311)) - CI: Remove the `check_cfg` job ([#4322](https://github.com/rust-lang/libc/pull/4312)) - Change the range syntax that is giving `ctest` problems ([#4311](https://github.com/rust-lang/libc/pull/4311)) - Linux: Split out the stat struct for gnu/b32/mips ([#4276](https://github.com/rust-lang/libc/pull/4276)) ### Removed - NuttX: Remove `pthread_set_name_np` ([#4251](https://github.com/rust-lang/libc/pull/4251)) ## [0.2.170](https://github.com/rust-lang/libc/compare/0.2.169...0.2.170) - 2025-02-23 ### Added - Android: Declare `setdomainname` and `getdomainname` - FreeBSD: Add `evdev` structures - FreeBSD: Add the new `st_filerev` field to `stat32` ([#4254](https://github.com/rust-lang/libc/pull/4254)) - Linux: Add `SI_*`` and `TRAP_*`` signal codes - Linux: Add experimental configuration to enable 64-bit time in kernel APIs, set by `RUST_LIBC_UNSTABLE_LINUX_TIME_BITS64`. - Linux: Add recent socket timestamping flags - Linux: Added new CANFD_FDF flag for the flags field of canfd_frame - Musl: add CLONE_NEWTIME - Solarish: add the posix_spawn family of functions ### Deprecated - Linux: deprecate kernel modules syscalls ### Changed - Emscripten: Assume version is at least 3.1.42 ### Fixed - BSD: Correct the definition of `WEXITSTATUS` - Hurd: Fix CMSG_DATA on 64bit systems ([#4240](https://github.com/rust-lang/libc/pull/424)) - NetBSD: fix `getmntinfo` ([#4265](https://github.com/rust-lang/libc/pull/4265) - VxWorks: Fix the size of `time_t` ### Other - Add labels to FIXMEs , , - CI: Bump FreeBSD CI to 13.4 and 14.2 - Copy definitions from core::ffi and centralize them - Define c_char at top-level and remove per-target c_char definitions - Port style.rs to syn and add tests for the style checker ## [0.2.169](https://github.com/rust-lang/libc/compare/0.2.168...0.2.169) - 2024-12-18 ### Added - FreeBSD: add more socket TCP stack constants - Fuchsia: add a `sockaddr_vm` definition ### Fixed **Breaking**: [rust-lang/rust#132975](https://github.com/rust-lang/rust/pull/132975) corrected the signedness of `core::ffi::c_char` on various Tier 2 and Tier 3 platforms (mostly Arm and RISC-V) to match Clang. This release contains the corresponding changes to `libc`, including the following specific pull requests: - ESP-IDF: Replace arch-conditional `c_char` with a reexport - Fix `c_char` on various targets - Mirror `c_char` configuration from `rust-lang/rust` ### Cleanup - Do not re-export `c_void` in target-specific code ## [0.2.168](https://github.com/rust-lang/libc/compare/0.2.167...0.2.168) - 2024-12-09 ### Added - Linux: Add new process flags ([#4174](https://github.com/rust-lang/libc/pull/4174)) - Linux: Make `IFA_*` constants available on all Linux targets - Linux: add `MAP_DROPPABLE` - Solaris, Illumos: add `SIGRTMIN` and `SIGRTMAX` - Unix, Linux: adding POSIX `memccpy` and `mempcpy` GNU extension - CI: Upload artifacts created by libc-test - CI: Use workflow commands to group output by target - CI: add caching ## [0.2.167](https://github.com/rust-lang/libc/compare/0.2.166...0.2.167) - 2024-11-28 ### Added - Solarish: add `st_fstype` to `stat` - Trusty: Add `intptr_t` and `uintptr_t` ([#4161](https://github.com/rust-lang/libc/pull/4161)) ### Fixed - Fix the build with `rustc-dep-of-std` - Wasi: Add back unsafe block for `clockid_t` static variables ([#4157](https://github.com/rust-lang/libc/pull/4157)) ### Cleanup - Create an internal prelude - Fix `unused_qualifications` ### Other - CI: Check various FreeBSD versions ([#4159](https://github.com/rust-lang/libc/pull/4159)) - CI: add a timeout for all jobs - CI: verify MSRV for `wasm32-wasi` - Migrate to the 2021 edition ### Removed - Remove one unused import after the edition 2021 bump ## [0.2.166](https://github.com/rust-lang/libc/compare/0.2.165...0.2.166) - 2024-11-26 ### Fixed This release resolves two cases of unintentional breakage from the previous release: - Revert removal of array size hacks [#4150](https://github.com/rust-lang/libc/pull/4150) - Ensure `const extern` functions are always enabled [#4151](https://github.com/rust-lang/libc/pull/4151) ## [0.2.165](https://github.com/rust-lang/libc/compare/0.2.164...0.2.165) - 2024-11-25 ### Added - Android: add `mkostemp`, `mkostemps` - Android: add a few API 30 calls - Android: add missing syscall constants - Apple: add `in6_ifreq` - Apple: add missing `sysctl` net types (before release: remove `if_family_id` ([#4137](https://github.com/rust-lang/libc/pulls/4137))) - Freebsd: add `kcmp` call support - Hurd: add `MAP_32BIT` and `MAP_EXCL` - Hurd: add `domainname` field to `utsname` ([#4089](https://github.com/rust-lang/libc/pulls/4089)) - Linux GNU: add `f_flags` to struct `statfs` for arm, mips, powerpc and x86 - Linux GNU: add `malloc_stats` - Linux: add ELF relocation-related structs - Linux: add `ptp_*` structs - Linux: add `ptp_clock_caps` - Linux: add `ptp_pin_function` and most `PTP_` constants - Linux: add missing AF_XDP structs & constants - Linux: add missing netfilter consts ([#3734](https://github.com/rust-lang/libc/pulls/3734)) - Linux: add struct and constants for the `mount_setattr` syscall - Linux: add wireless API - Linux: expose the `len8_dlc` field of `can_frame` - Musl: add `utmpx` API - Musl: add missing syscall constants - NetBSD: add `mcontext`-related data for RISCV64 - Redox: add new `netinet` constants ) - Solarish: add `_POSIX_VDISABLE` ([#4103](https://github.com/rust-lang/libc/pulls/4103)) - Tests: Add a test that the `const extern fn` macro works - Tests: Add test of primitive types against `std` - Unix: Add `htonl`, `htons`, `ntohl`, `ntohs` - Unix: add `aligned_alloc` - Windows: add `aligned_realloc` ### Fixed - **breaking** Hurd: fix `MAP_HASSEMAPHORE` name ([#4127](https://github.com/rust-lang/libc/pulls/4127)) - **breaking** ulibc Mips: fix `SA_*` mismatched types ([#3211](https://github.com/rust-lang/libc/pulls/3211)) - Aix: fix an enum FFI safety warning - Haiku: fix some typos ([#3664](https://github.com/rust-lang/libc/pulls/3664)) - Tests: fix `Elf{32,64}_Relr`-related tests - Tests: fix libc-tests for `loongarch64-linux-musl` - Tests: fix some clippy warnings - Tests: fix tests on `riscv64gc-unknown-freebsd` ### Deprecated - Apple: deprecate `iconv_open` - Apple: deprecate `mach_task_self` - Apple: update `mach` deprecation notices for things that were removed in `main` ### Cleanup - Adjust the `f!` macro to be more flexible - Aix: remove duplicate constants - CI: make scripts more uniform - Drop the `libc_align` conditional - Drop the `libc_cfg_target_vendor` conditional - Drop the `libc_const_size_of` conditional - Drop the `libc_core_cvoid` conditional - Drop the `libc_int128` conditional - Drop the `libc_non_exhaustive` conditional - Drop the `libc_packedN` conditional - Drop the `libc_priv_mod_use` conditional - Drop the `libc_union` conditional - Drop the `long_array` conditional - Drop the `ptr_addr_of` conditional - Drop warnings about deprecated cargo features - Eliminate uses of `struct_formatter` - Fix a few other array size hacks - Glibc: remove redundant definitions ([#3261](https://github.com/rust-lang/libc/pulls/3261)) - Musl: remove redundant definitions ([#3261](https://github.com/rust-lang/libc/pulls/3261)) - Musl: unify definitions of `siginfo_t` ([#3261](https://github.com/rust-lang/libc/pulls/3261)) - Musl: unify definitions of statfs and statfs64 ([#3261](https://github.com/rust-lang/libc/pulls/3261)) - Musl: unify definitions of statvfs and statvfs64 ([#3261](https://github.com/rust-lang/libc/pulls/3261)) - Musl: unify statx definitions ([#3978](https://github.com/rust-lang/libc/pulls/3978)) - Remove array size hacks for Rust < 1.47 - Remove repetitive words - Use #[derive] for Copy/Clone in s! and friends - Use some tricks to format macro bodies ### Other - Apply formatting to macro bodies - Bump libc-test to Rust 2021 Edition - CI: Add a check that semver files don't contain duplicate entries - CI: Add `fanotify_event_info_fid` to FAM-exempt types - CI: Allow rustfmt to organize imports ([#4136](https://github.com/rust-lang/libc/pulls/4136)) - CI: Always run rustfmt - CI: Change 32-bit Docker images to use EOL repos - CI: Change 64-bit Docker images to ubuntu:24.10 - CI: Disable the check for >1 s! invocation - CI: Ensure build channels get run even if FILTER is unset - CI: Ensure there is a fallback for no_std - CI: Fix cases where unset variables cause errors - CI: Naming adjustments and cleanup - CI: Only invoke rustup if running in CI - CI: Remove the logic to handle old rust versions - CI: Set -u (error on unset) in all script files - CI: add support for `loongarch64-unknown-linux-musl` - CI: make `aarch64-apple-darwin` not a nightly-only target - CI: run shellcheck on all scripts - CI: update musl headers to Linux 6.6 - CI: use qemu-sparc64 to run sparc64 tests - Drop the `libc_const_extern_fn` conditional - Drop the `libc_underscore_const_names` conditional - Explicitly set the edition to 2015 - Introduce a `git-blame-ignore-revs` file - Tests: Ignore fields as required on Ubuntu 24.10 - Tests: skip `ATF_*` constants for OpenBSD - Triagebot: Add an autolabel for CI ## [0.2.164](https://github.com/rust-lang/libc/compare/0.2.163...0.2.164) - 2024-11-16 ### MSRV This release increases the MSRV of `libc` to 1.63. ### Other - CI: remove tests with rust < 1.63 - MSRV: document the MSRV of the stable channel to be 1.63 - MacOS: move ifconf to s_no_extra_traits ## [0.2.163](https://github.com/rust-lang/libc/compare/0.2.162...0.2.163) - 2024-11-16 ### Added - Aix: add more `dlopen` flags - Android: add group calls - FreeBSD: add `TCP_FUNCTION_BLK` and `TCP_FUNCTION_ALIAS` - Linux: add `confstr` - Solarish: add `aio` - Solarish: add `arc4random*` ### Changed - Emscripten: upgrade emsdk to 3.1.68 - Hurd: use more standard types - Hurd: use the standard `ssize_t = isize` - Solaris: fix `confstr` and `ucontext_t` ### Other - CI: add Solaris - CI: add `i686-unknown-freebsd` - CI: ensure that calls to `sort` do not depend on locale - Specify `rust-version` in `Cargo.toml` ## [0.2.162](https://github.com/rust-lang/libc/compare/0.2.161...0.2.162) - 2024-11-07 ### Added - Android: fix the alignment of `uc_mcontext` on arm64 - Apple: add `host_cpu_load_info` - ESP-IDF: add a time flag - FreeBSD: add the `CLOSE_RANGE_CLOEXEC` flag - FreeBSD: fix test errors regarding `__gregset_t` - FreeBSD: fix tests on x86 FreeBSD 15 - FreeBSD: make `ucontext_t` and `mcontext_t` available on all architectures - Haiku: add `getentropy` - Illumos: add `syncfs` - Illumos: add some recently-added constants - Linux: add `ioctl` flags - Linux: add epoll busy polling parameters - NuttX: add `pthread_[get/set]name_np` - RTEMS: add `arc4random_buf` - Trusty OS: add initial support - WASIp2: expand socket support ### Fixed - Emscripten: don't pass `-lc` - Hurd: change `st_fsid` field to `st_dev` - Hurd: fix the definition of `utsname` - Illumos/Solaris: fix `FNM_CASEFOLD` definition - Solaris: fix all tests ### Other - CI: Add loongarch64 - CI: Check that semver files are sorted - CI: Re-enable the FreeBSD 15 job - Clean up imports and `extern crate` usage - Convert `mode_t` constants to octal - Remove the `wasm32-wasi` target that has been deleted upstream ## [0.2.161](https://github.com/rust-lang/libc/compare/0.2.160...0.2.161) - 2024-10-17 ### Fixed - OpenBSD: fix `FNM_PATHNAME` and `FNM_NOESCAPE` values ## [0.2.160](https://github.com/rust-lang/libc/compare/0.2.159...0.2.160) - 2024-10-17 ### Added - Android: add `PR_GET_NAME` and `PR_SET_NAME` - Apple: add `F_TRANSFEREXTENTS` - Apple: add `mach_error_string` - Apple: add additional `pthread` APIs - Apple: add the `LOCAL_PEERTOKEN` socket option - BSD: add `RTF_*`, `RTA_*`, `RTAX_*`, and `RTM_*` definitions - Emscripten: add `AT_EACCESS` - Emscripten: add `getgrgid`, `getgrnam`, `getgrnam_r` and `getgrgid_r` - Emscripten: add `getpwnam_r` and `getpwuid_r` - FreeBSD: add `POLLRDHUP` - Haiku: add `arc4random` - Illumos: add `ptsname_r` - Linux: add `fanotify` interfaces - Linux: add `tcp_info` - Linux: add additional AF_PACKET options - Linux: make Elf constants always available - Musl x86: add `iopl` and `ioperm` - Musl: add `posix_spawn` chdir functions - Musl: add `utmpx.h` constants - NetBSD: add `sysctlnametomib`, `CLOCK_THREAD_CPUTIME_ID` and `CLOCK_PROCESS_CPUTIME_ID` - Nuttx: initial support - RTEMS: add `getentropy` - RTEMS: initial support - Solarish: add `POLLRDHUP`, `POSIX_FADV_*`, `O_RSYNC`, and `posix_fallocate` - Unix: add `fnmatch.h` - VxWorks: add riscv64 support - VxWorks: update constants related to the scheduler ### Changed - Redox: change `ino_t` to be `c_ulonglong` ### Fixed - ESP-IDF: fix mismatched constants and structs - FreeBSD: fix `struct stat` on FreeBSD 12+ ### Other - CI: Fix CI for FreeBSD 15 - Docs: link to `windows-sys` ## [0.2.159](https://github.com/rust-lang/libc/compare/0.2.158...0.2.159) - 2024-09-24 ### Added - Android: add more `AT_*` constants in - Apple: add missing `NOTE_*` constants in - Hermit: add missing error numbers in - Hurd: add `__timeval` for 64-bit support in - Linux: add `epoll_pwait2` in - Linux: add `mq_notify` in - Linux: add missing `NFT_CT_*` constants in - Linux: add the `fchmodat2` syscall in - Linux: add the `mseal` syscall in - OpenBSD: add `sendmmsg` and `recvmmsg` in - Unix: add `IN6ADDR_ANY_INIT` and `IN6ADDR_LOOPBACK_INIT` in - VxWorks: add `S_ISVTX` in - VxWorks: add `vxCpuLib` and `taskLib` functions - WASIp2: add definitions for `std::net` support in ### Fixed - Correctly handle version checks when `clippy-driver` is used ### Changed - EspIdf: change signal constants to c_int in - HorizonOS: update network definitions in - Linux: combine `ioctl` APIs in - WASI: enable CI testing in - WASIp2: enable CI testing in ## [0.2.158](https://github.com/rust-lang/libc/compare/0.2.157...0.2.158) - 2024-08-19 ### Other - WASI: fix missing `Iterator` with `rustc-dep-of-std` in ## [0.2.157](https://github.com/rust-lang/libc/compare/0.2.156...0.2.157) - 2024-08-17 ### Added - Apple: add `_NSGetArgv`, `_NSGetArgc` and `_NSGetProgname` in - Build: add `RUSTC_WRAPPER` support in - FreeBSD: add `execvpe` support from 14.1 release in - Fuchsia: add `SO_BINDTOIFINDEX` - Linux: add `klogctl` in - MacOS: add `fcntl` OFD commands in - NetBSD: add `_lwp_park` in - Solaris: add missing networking support in - Unix: add `pthread_equal` in - WASI: add `select`, `FD_SET`, `FD_ZERO`, `FD_ISSET ` in ### Fixed - TEEOS: fix octal notation for `O_*` constants in ### Changed - FreeBSD: always use freebsd12 when `rustc_dep_of_std` is set in ## [0.2.156](https://github.com/rust-lang/libc/compare/v0.2.155...v0.2.156) - 2024-08-15 ### Added - Apple: add `F_ALLOCATEPERSIST` in - Apple: add `os_sync_wait_on_address` and related definitions in - BSD: generalise `IPV6_DONTFRAG` to all BSD targets in - FreeBSD/DragonFly: add `IP_RECVTTL`/`IPV6_RECVHOPLIMIT` in - Hurd: add `XATTR_CREATE`, `XATTR_REPLACE` in - Linux GNU: `confstr` API and `_CS_*` in - Linux musl: add `preadv2` and `pwritev2` (1.2.5 min.) in - VxWorks: add the constant `SOMAXCONN` in - VxWorks: add a few errnoLib related constants in ### Fixed - Solaris/illumos: Change `ifa_flags` type to u64 in - QNX 7.0: Disable `libregex` in ### Changed - QNX NTO: update platform support in - `addr_of!(EXTERN_STATIC)` is now considered safe in ### Removed - Apple: remove `rmx_state` in ### Other - Update or remove CI tests that have been failing # `object` Change Log -------------------------------------------------------------------------------- ## 0.37.3 Released 2025/08/13. ### Changed * Fixed MSVC weak extern symbol support in `write::Object` by using `IMAGE_WEAK_EXTERN_SEARCH_ALIAS`. [#803](https://github.com/gimli-rs/object/pull/803) ### Added * Added `elf::SHT_GNU_SFRAME` and `elf::PT_GNU_SFRAME`. [#799](https://github.com/gimli-rs/object/pull/799) * Added `section_flags_mut` and `symbol_flags_mut` to `write::Object`. [#801](https://github.com/gimli-rs/object/pull/801) -------------------------------------------------------------------------------- ## 0.37.2 Released 2025/08/01. ### Added * Added `elf::EF_RISCV_RV64ILP32`. [#779](https://github.com/gimli-rs/object/pull/779) * Added `pe::IMAGE_FILE_MACHINE_POWERPCBE` and associated read support. [#783](https://github.com/gimli-rs/object/pull/783) * Added PowerPC support to `write::coff`. [#795](https://github.com/gimli-rs/object/pull/795) * Added support for COFF auxiliary weak external symbols to `write::Object` and `write::coff::Writer`. [#791](https://github.com/gimli-rs/object/pull/791) * Added methods to `write::Object` to obtain default section and symbol flags. [#789](https://github.com/gimli-rs/object/pull/789) * Added compact relocation support to `read::elf`. [#782](https://github.com/gimli-rs/object/pull/782) [#784](https://github.com/gimli-rs/object/pull/784) [#785](https://github.com/gimli-rs/object/pull/785) [#788](https://github.com/gimli-rs/object/pull/788) * Added `Architecture::Alpha`. [#790](https://github.com/gimli-rs/object/pull/790) * Added `Architecture::Hppa`. [#793](https://github.com/gimli-rs/object/pull/793) ### Changed * Updated `wasmparser` dependency. * Changed `write::Object` to accept undefined symbols of unknown kind for COFF. [#795](https://github.com/gimli-rs/object/pull/795) -------------------------------------------------------------------------------- ## 0.37.1 Released 2025/06/11. ### Changed * Removed `compiler-builtins` from `rustc-dep-of-std` dependencies. [#777](https://github.com/gimli-rs/object/pull/777) * Updated `wasmparser` dependency. -------------------------------------------------------------------------------- ## 0.37.0 Released 2025/06/02. ### Breaking changes * Changed dyld cache definitions and API to support iterating mapping and slide information. [#738](https://github.com/gimli-rs/object/pull/738) [#753](https://github.com/gimli-rs/object/pull/753) [#754](https://github.com/gimli-rs/object/pull/754) [#775](https://github.com/gimli-rs/object/pull/775) * Removed `elf::R_RISCV_GNU_VTINHERIT` and `elf::R_RISCV_GNU_VTENTRY`. [#767](https://github.com/gimli-rs/object/pull/767) * Changed the type of `pe::IMAGE_WEAK_EXTERN_*` constants. [#770](https://github.com/gimli-rs/object/pull/770) ### Added * Added support for generating `ARM_RELOC_VANILLA` in `write::Object`. [#757](https://github.com/gimli-rs/object/pull/757) * Added `size_hint` for `read::archive::ArchiveSymbolIterator`. [#759](https://github.com/gimli-rs/object/pull/759) * Added `Architecture::SuperH`. [#762](https://github.com/gimli-rs/object/pull/762) * Added `Architecture::LoongArch32`. [#765](https://github.com/gimli-rs/object/pull/765) * Added support for Wasm object files to `read::WasmFile`. [#766](https://github.com/gimli-rs/object/pull/766) * Added `elf::R_RISCV_TLSDESC` and `elf::R_RISCV_GOT32_PCREL`. [#767](https://github.com/gimli-rs/object/pull/767) [#768](https://github.com/gimli-rs/object/pull/768) * Added `read::pe::SymbolTable::aux_weak_external` and `read::pe::SymbolTable::has_aux_weak_external`. [#770](https://github.com/gimli-rs/object/pull/770) * Added ELF relocations for LoongArch ABI v2.30. [#773](https://github.com/gimli-rs/object/pull/773) ### Changed * Changed `ReadRef::read_bytes_at` to allow zero size reads at any offset. This allows reading of empty sections in stripped ELF files. [#758](https://github.com/gimli-rs/object/pull/758) * Changed `read::MachOFile::object_map` to include static symbols. [#764](https://github.com/gimli-rs/object/pull/764) * Fixed `read::pe::SymbolTable::has_aux_function` to exclude weak externals. [#772](https://github.com/gimli-rs/object/pull/772) * Updated `wasmparser` and `ruzstd` dependencies. -------------------------------------------------------------------------------- ## 0.36.7 Released 2024/12/21. ### Changed * Included `build.rs` in package. -------------------------------------------------------------------------------- ## 0.36.6 Released 2024/12/21. ### Added * Added `Architecuture::M68k`. [#742](https://github.com/gimli-rs/object/pull/742) [#749](https://github.com/gimli-rs/object/pull/749) * Added `Architecuture::Mips64_N32`. [#743](https://github.com/gimli-rs/object/pull/743) * Added `elf::SHT_RELR`, `read::elf::SectionHeader::relr`, and `write::elf::Writer::write_relative_relocation_section_header`. [#746](https://github.com/gimli-rs/object/pull/746) * Added `core::error::Error` implementation for Rust 1.81 onwards. [#747](https://github.com/gimli-rs/object/pull/747) ### Changed * Changed `build::elf::Builder` to support `.annobin.notes`, `SHT_LLVM_DEPENDENT_LIBRARIES`, and `SHT_RELR` sections. [#735](https://github.com/gimli-rs/object/pull/735) [#737](https://github.com/gimli-rs/object/pull/737) [#746](https://github.com/gimli-rs/object/pull/746) * Changed `write::Object::add_subsection` to omit the subsection name suffix if the subsection name is empty. [#748](https://github.com/gimli-rs/object/pull/748) -------------------------------------------------------------------------------- ## 0.36.5 Released 2024/10/04. ### Added * Added `Architecture::E2K32` and `Architecture::E2K64`. [#727](https://github.com/gimli-rs/object/pull/727) * Added read and write support for `pe::IMAGE_REL_ARM64_BRANCH26`. [#731](https://github.com/gimli-rs/object/pull/731) ### Changed * Fixed decompression of multi-frame Zstandard data in `read::CompressedData::decompress`. [#730](https://github.com/gimli-rs/object/pull/730) -------------------------------------------------------------------------------- ## 0.36.4 Released 2024/08/30. ### Added * Added `pe::IMAGE_FILE_MACHINE_ARM64X` and `pe::IMAGE_FILE_MACHINE_CHPE_X86`. [#717](https://github.com/gimli-rs/object/pull/717) * Added `elf::SHF_GNU_RETAIN` and `elf::SHF_GNU_MBIND`. [#720](https://github.com/gimli-rs/object/pull/720) ### Changed * Fixed the checksum for COFF BSS section symbols in `write::Object`. [#718](https://github.com/gimli-rs/object/pull/718) * Changed `read::CompressedData::decompress` to validate the decompressed size. [#723](https://github.com/gimli-rs/object/pull/723) * Updated `wasmparser` dependency. -------------------------------------------------------------------------------- ## 0.36.3 Released 2024/08/07. ### Added * Added `Iterator` implementations for various types in the low level read API. [#713](https://github.com/gimli-rs/object/pull/713) [#714](https://github.com/gimli-rs/object/pull/714) ### Changed * Changed `from_bytes` constructors for integer endian types to `const`. [#712](https://github.com/gimli-rs/object/pull/712) * Changed `next` methods in the low level read API to fuse after returning an error. [#714](https://github.com/gimli-rs/object/pull/714) * Updated `wasmparser` dependency. [#715](https://github.com/gimli-rs/object/pull/715) -------------------------------------------------------------------------------- ## 0.36.2 Released 2024/07/24. ### Changed * Improved writing of GNU symbol versioning in `build::elf::Builder`. [#705](https://github.com/gimli-rs/object/pull/705) * Fixed alignment of `SHT_HASH`/`SHT_GNU_verdef`/`SHT_GNU_verneed` sections in `write::elf::Writer`. [#706](https://github.com/gimli-rs/object/pull/706) * Fixed writing of GNU hash for absolute symbols in `build::elf::Builder`. [#707](https://github.com/gimli-rs/object/pull/707) * Fixed writing of empty ELF string table in `write::Object`. [#710](https://github.com/gimli-rs/object/pull/710) -------------------------------------------------------------------------------- ## 0.36.1 Released 2024/06/29. ### Added * Added `SectionKind::DebugString`. [#694](https://github.com/gimli-rs/object/pull/694) * Added `Architecture::Sparc` and `Architecture::Sparc32Plus`. [#699](https://github.com/gimli-rs/object/pull/699) [#700](https://github.com/gimli-rs/object/pull/700) * Added more RISC-V ELF relocation constants. [#701](https://github.com/gimli-rs/object/pull/701) ### Changed * Changed `read::ElfFile::imports` to return the library for versioned symbols. [#693](https://github.com/gimli-rs/object/pull/693) * Changed `read::MachOFile` to support Go's debug section compression. [#697](https://github.com/gimli-rs/object/pull/697) * Reversed the order of Mach-O relocations emitted by `write::Object`. [#702](https://github.com/gimli-rs/object/pull/702) -------------------------------------------------------------------------------- ## 0.36.0 Released 2024/05/26. ### Breaking changes * Deleted `data` and `align` parameters for `write::Object::add_subsection`. Use `add_symbol_data` or `add_symbol_bss` instead. [#676](https://github.com/gimli-rs/object/pull/676) * Changed methods in the lower level read API to accept or return `SectionIndex` or `SymbolIndex` instead of `usize`. [#677](https://github.com/gimli-rs/object/pull/677) [#684](https://github.com/gimli-rs/object/pull/684) [#685](https://github.com/gimli-rs/object/pull/685) * Deleted `SymbolKind::Null`. Changed `read::Object::sections` and `read::Object::symbols` to no longer return null entries. This affects ELF and XCOFF. [#679](https://github.com/gimli-rs/object/pull/679) * Changed `read::ObjectMap::object` to return `ObjectMapFile`. This handles splitting the object file name into path and member. [#686](https://github.com/gimli-rs/object/pull/686) * Changed `read::coff::ImageSymbol::address` to only return an address for symbols that have an address. [#689](https://github.com/gimli-rs/object/pull/689) ### Added * Added `pod::slice_from_all_bytes` and `pod::slice_from_all_bytes_mut`. [#672](https://github.com/gimli-rs/object/pull/672) * Added `write::Object::set_subsections_via_symbols`. Changed `write::Object::add_symbol_data` and `write::Object::add_symbol_bss` to correctly handle zero size symbols when subsections are enabled. [#676](https://github.com/gimli-rs/object/pull/676) * Added methods in the unified read API to return the lower level API structures. Some existing methods were deprecated so that naming of these methods is more consistent. [#678](https://github.com/gimli-rs/object/pull/678) * Added methods in the lower level read API to return a `SectionIndex` or `SymbolIndex`. [#684](https://github.com/gimli-rs/object/pull/684) [#689](https://github.com/gimli-rs/object/pull/689) * Implemented `Display` for `read::SymbolIndex` and `read::SectionIndex`. [#684](https://github.com/gimli-rs/object/pull/684) * Added `is_common`, `is_absolute`, `is_local`, and `is_weak` to `read::elf::Sym`. [#685](https://github.com/gimli-rs/object/pull/685) ### Changed * Changed `read::ArchiveFile` to skip the `` member. [#669](https://github.com/gimli-rs/object/pull/669) * Fixed handling of segment data in the dyld shared cache. [#673](https://github.com/gimli-rs/object/pull/673) * Changed `read::RelocationMap` to handle Mach-O section relocations. [#675](https://github.com/gimli-rs/object/pull/675) * Changed `read::elf::RelocationSections` to ignore relocations that apply to relocations. [#680](https://github.com/gimli-rs/object/pull/680) * Removed a lifetime bound from an argument in `read::elf::SectionTable::section_name`, `read::elf::SymbolTable::symbol_name`, and `read::elf::SymbolTable::symbol_section`. [#681](https://github.com/gimli-rs/object/pull/681) -------------------------------------------------------------------------------- ## 0.35.0 Released 2024/04/10. ### Breaking changes * Moved the `'file` lifetime parameter from `read::Object` to its associated types. [#655](https://github.com/gimli-rs/object/pull/655) ### Added * Added support more section kinds in `build::elf`. [#650](https://github.com/gimli-rs/object/pull/650) * Added thin archive support to `read::ArchiveFile`. [#651](https://github.com/gimli-rs/object/pull/651) * Added `read::ReadCacheOps` and changed `read::ReadCache` bound from `Read + Seek` to `ReadCacheOps`. [#652](https://github.com/gimli-rs/object/pull/652) * Added `read::ObjectSection::relocation_map` [#654](https://github.com/gimli-rs/object/pull/654) * Added `read::ArchiveFile::symbols`. [#658](https://github.com/gimli-rs/object/pull/658) * Added `BinaryFormat::native_object`. [#661](https://github.com/gimli-rs/object/pull/661) ### Changed * The minimum supported rust version for the `read` feature and its dependencies has changed to 1.65.0. [#655](https://github.com/gimli-rs/object/pull/655) * Fixed `sh_offset` handling for `SHT_NOBITS` sections in `build::elf`. [#645](https://github.com/gimli-rs/object/pull/645) * Fixed handling of ELF files with dynamic symbols but no dynamic strings. [#646](https://github.com/gimli-rs/object/pull/646) * Fixed potential panics in `read::WasmFile` due to invalid function indices. [#649](https://github.com/gimli-rs/object/pull/649) * Fixed handling of Wasm components in `read::WasmFile`. [#649](https://github.com/gimli-rs/object/pull/649) * Fixed `sh_entsize` for 32-bit hash sections in `write::elf`. [#650](https://github.com/gimli-rs/object/pull/650) * Fixed `sh_size` for attribute sections in `build::elf`. [#650](https://github.com/gimli-rs/object/pull/650) * Fixed `sh_info` for `SHT_DYNSYM` sections in `build::elf`. [#650](https://github.com/gimli-rs/object/pull/650) * Fixed handling of dynamic relocations with invalid `sh_link` in `build::elf`. [#650](https://github.com/gimli-rs/object/pull/650) * Fixed parsing of member names containing '/' in `read::ArchiveFile`. [#657](https://github.com/gimli-rs/object/pull/657) * Fixed handling of load segment alignments in `build::elf::Builder::read`. [#659](https://github.com/gimli-rs/object/pull/659) -------------------------------------------------------------------------------- ## 0.34.0 Released 2024/03/11. ### Breaking changes * Replaced `macho::DyldSubCacheInfo` with `macho::DyldSubCacheEntryV1`. Changed the return type of `macho::DyldCacheHeader::subcaches`. [#642](https://github.com/gimli-rs/object/pull/642) ### Changed * Added `macho::DyldSubCacheEntryV2` and changed `read::macho::DyldCache` to handle both versions. This is needed for macOS 13 and above. [#642](https://github.com/gimli-rs/object/pull/642) -------------------------------------------------------------------------------- ## 0.33.0 Released 2024/03/05. ### Breaking changes * Deleted file format variants in `RelocationKind`. Replaced their usage with `read::Relocation::flags` and `write::Relocation::flags`. [#585](https://github.com/gimli-rs/object/pull/585) * Replaced `kind`, `encoding` and `size` fields in `write::Relocation` with `RelocationFlags::Generic` in the `flags` field. [#585](https://github.com/gimli-rs/object/pull/585) * Replaced `macho::FatHeader::parse`, `macho::FatHeader::parse_arch32`, and `macho::FatHeader::parse_arch64` with `read::macho::MachOFatFile`, `read::macho::MachOFatFile32` and `read::macho::MachOFatFile64`. [#623](https://github.com/gimli-rs/object/pull/623) ### Added * Added `macho::PLATFORM_XROS` and `macho::PLATFORM_XROSSIMULATOR`. [#626](https://github.com/gimli-rs/object/pull/626) * Added `build::elf::Builder` and associated types. Extended `write::elf::Writer` to support this. [#618](https://github.com/gimli-rs/object/pull/618) ### Changed * Changed the lifetime to `'data` for the return value of `ObjectSection::name`, `ObjectSection::name_bytes`, `ObjectComdat::name`, `ObjectComdat::name_bytes`. [#620](https://github.com/gimli-rs/object/pull/620) [#622](https://github.com/gimli-rs/object/pull/622) * Checked that sizes are smaller than the file length in `read::ReadCache`. [#630](https://github.com/gimli-rs/object/pull/630) * Used `Vec::try_reserve_exact` for large allocations. [#632](https://github.com/gimli-rs/object/pull/632) -------------------------------------------------------------------------------- ## 0.32.2 Released 2023/12/24. ### Added * Added ELF relocations for LoongArch ABI v2.20. [#578](https://github.com/gimli-rs/object/pull/578) [#589](https://github.com/gimli-rs/object/pull/589) * Added ELF support for SHARC. [#593](https://github.com/gimli-rs/object/pull/593) * Added `write::coff::Writer`. [#595](https://github.com/gimli-rs/object/pull/595) * Added `SubArchitecture::Arm64EC` support for PE/COFF. [#607](https://github.com/gimli-rs/object/pull/607) * Added `SubArchitecture::Arm64E` support for Mach-O. [#614](https://github.com/gimli-rs/object/pull/614) * Added `read::Object::symbol_by_name` and `read::Object::symbol_by_name_bytes`. [#602](https://github.com/gimli-rs/object/pull/602) * Added more functions to the low level API in `read::xcoff`. [#608](https://github.com/gimli-rs/object/pull/608) * Added more functions to the low level API in `read::macho`. [#584](https://github.com/gimli-rs/object/pull/584) ### Changed * Fixes for AArch64 relocation addends for Mach-O. [#581](https://github.com/gimli-rs/object/pull/581) * Changes to `write::Object` output for Mach-O, including the addition of a `LC_DYSYMTAB` load command. [#584](https://github.com/gimli-rs/object/pull/584) * Changed `write::Object` to always use `R_X86_64_PLT32` for x86-64 branches for ELF. [#590](https://github.com/gimli-rs/object/pull/590) * Fixed `read::ObjectSymbol::kind` for undefined section symbols for COFF. [#592](https://github.com/gimli-rs/object/pull/592) * Fixed `write::Object` to accept undefined section symbols for COFF. [#594](https://github.com/gimli-rs/object/pull/594) * Improved parsing of auxiliary section symbols for COFF. [#603](https://github.com/gimli-rs/object/pull/603) * Improved the selection of symbols for `read::Object::symbol_map`. This includes changes to `read::Symbol::is_definition`. [#601](https://github.com/gimli-rs/object/pull/601) [#606](https://github.com/gimli-rs/object/pull/606) * Changed `read::ObjectSymbol::kind` for ELF `STT_NOTYPE` symbols to `SymbolKind::Unknown`. [#604](https://github.com/gimli-rs/object/pull/604) * Changed `read::ObjectSymbol::scope` for XCOFF `C_HIDEXT` symbols to `SymbolScope::Compilation`. [#605](https://github.com/gimli-rs/object/pull/605) -------------------------------------------------------------------------------- ## 0.32.1 Released 2023/09/03. ### Added * Added `write::Object::set_macho_cpu_subtype`. [#574](https://github.com/gimli-rs/object/pull/574) -------------------------------------------------------------------------------- ## 0.32.0 Released 2023/08/12. ### Breaking changes * Changed `read::elf::Note::name` to exclude all trailing null bytes. [#549](https://github.com/gimli-rs/object/pull/549) * Updated dependencies, and changed some optional dependencies to use the `dep:` feature syntax. [#558](https://github.com/gimli-rs/object/pull/558) [#569](https://github.com/gimli-rs/object/pull/569) ### Changed * The minimum supported rust version for the `read` feature and its dependencies has changed to 1.60.0. * The minimum supported rust version for other features has changed to 1.65.0. * Changed many definitions from `static` to `const`. [#549](https://github.com/gimli-rs/object/pull/549) * Fixed Mach-O section alignment padding in `write::Object`. [#553](https://github.com/gimli-rs/object/pull/553) * Changed `read::File` to an enum. [#564](https://github.com/gimli-rs/object/pull/564) ### Added * Added `elf::ELF_NOTE_GO`, `elf::NT_GO_BUILD_ID`, and `read::elf::Note::name_bytes`. [#549](https://github.com/gimli-rs/object/pull/549) * Added `read::FileKind::CoffImport` and `read::coff::ImportFile`. [#555](https://github.com/gimli-rs/object/pull/555) [#556](https://github.com/gimli-rs/object/pull/556) * Added `Architecture::Csky` and basic ELF support for C-SKY. [#561](https://github.com/gimli-rs/object/pull/561) * Added `read::elf::ElfSymbol::raw_symbol`. [#562](https://github.com/gimli-rs/object/pull/562) -------------------------------------------------------------------------------- ## 0.30.4 Released 2023/06/05. ### Changed * Fixed Mach-O section alignment padding in `write::Object`. [#553](https://github.com/gimli-rs/object/pull/553) -------------------------------------------------------------------------------- ## 0.31.1 Released 2023/05/09. ### Changed * Fixed address for global symbols in `read::wasm`. [#539](https://github.com/gimli-rs/object/pull/539) * Fixed writing of alignment for empty ELF sections. [#540](https://github.com/gimli-rs/object/pull/540) ### Added * Added more `elf::GNU_PROPERTY_*` definitions. Added `read::elf::note::gnu_properties`, `write::StandardSection::GnuProperty`, and `write::Object::add_elf_gnu_property_u32`. [#537](https://github.com/gimli-rs/object/pull/537) [#541](https://github.com/gimli-rs/object/pull/541) * Added Mach-O support for `Architecture::Aarch64_Ilp32`. [#542](https://github.com/gimli-rs/object/pull/542) [#545](https://github.com/gimli-rs/object/pull/545) * Added `Architecture::Wasm64`. [#543](https://github.com/gimli-rs/object/pull/543) -------------------------------------------------------------------------------- ## 0.31.0 Released 2023/04/14. ### Breaking changes * Added a type parameter on existing COFF types to support reading COFF `/bigobj` files. [#502](https://github.com/gimli-rs/object/pull/502) * Changed PE symbols to support COFF `/bigobj`. Changed `pe::IMAGE_SYM_*` to `i32`. Changed `pe::ImageSymbolEx::section_number` to `I32Bytes`. Deleted a number of methods from `pe::ImageSymbol`. Use the `read::pe::ImageSymbol` trait instead. [#502](https://github.com/gimli-rs/object/pull/502) * Changed `pe::Guid` to a single array, and added methods to read the individual fields. [#502](https://github.com/gimli-rs/object/pull/502) * Added `Symbol` type parameter to `SymbolFlags` to support `SymbolFlags::Xcoff`. [#527](https://github.com/gimli-rs/object/pull/527) ### Changed * Fix alignment when reserving zero length sections in `write::elf::Write::reserve`. [#514](https://github.com/gimli-rs/object/pull/514) * Validate command size in `read::macho::LoadCommandIterator`. [#516](https://github.com/gimli-rs/object/pull/516) * Handle invalid alignment in `read::macho::MachoSection::align`. [#516](https://github.com/gimli-rs/object/pull/516) * Accept `SymbolKind::Unknown` in `write::Object::macho_write`. [#519](https://github.com/gimli-rs/object/pull/519) * Updated `wasmparser` dependency. [#528](https://github.com/gimli-rs/object/pull/528) ### Added * Added more `elf::EF_RISCV_*` definitions. [#507](https://github.com/gimli-rs/object/pull/507) * Added `read::elf::SectionHeader::gnu_attributes` and associated types. Added `.gnu.attributes` support to `write::elf::Writer`. [#509](https://github.com/gimli-rs/object/pull/509) [#525](https://github.com/gimli-rs/object/pull/525) * Added `write::Object::set_macho_build_version`. [#524](https://github.com/gimli-rs/object/pull/524) * Added `read::FileKind::Xcoff32`, `read::FileKind::Xcoff64`, `read::XcoffFile`, and associated types. Added XCOFF support to `write::Object`. [#469](https://github.com/gimli-rs/object/pull/469) [#476](https://github.com/gimli-rs/object/pull/476) [#477](https://github.com/gimli-rs/object/pull/477) [#482](https://github.com/gimli-rs/object/pull/482) [#484](https://github.com/gimli-rs/object/pull/484) [#486](https://github.com/gimli-rs/object/pull/486) [#527](https://github.com/gimli-rs/object/pull/527) * Added `read::FileKind::CoffBig`, `read::pe::CoffHeader` and `read::pe::ImageSymbol`. [#502](https://github.com/gimli-rs/object/pull/502) * Added `elf::PT_GNU_PROPERTY`. [#530](https://github.com/gimli-rs/object/pull/530) * Added `elf::ELFCOMPRESS_ZSTD`, `read::CompressionFormat::Zstandard`, and Zstandard decompression in `read::CompressedData::decompress` using the `ruzstd` crate. [#532](https://github.com/gimli-rs/object/pull/532) * Added `read::elf::NoteIterator::new`. [#533](https://github.com/gimli-rs/object/pull/533) -------------------------------------------------------------------------------- ## 0.30.3 Released 2023/01/23. ### Added * Added `SectionKind::ReadOnlyDataWithRel` for writing. [#504](https://github.com/gimli-rs/object/pull/504) -------------------------------------------------------------------------------- ## 0.30.2 Released 2023/01/11. ### Added * Added more ELF constants for AVR flags and relocations. [#500](https://github.com/gimli-rs/object/pull/500) -------------------------------------------------------------------------------- ## 0.30.1 Released 2023/01/04. ### Changed * Changed `read::ElfSymbol::kind` to handle `STT_NOTYPE` and `STT_GNU_IFUNC`. [#498](https://github.com/gimli-rs/object/pull/498) ### Added * Added `read::CoffSymbol::raw_symbol`. [#494](https://github.com/gimli-rs/object/pull/494) * Added ELF support for Solana Binary Format. [#491](https://github.com/gimli-rs/object/pull/491) * Added ELF support for AArch64 ILP32. [#497](https://github.com/gimli-rs/object/pull/497) -------------------------------------------------------------------------------- ## 0.30.0 Released 2022/11/22. ### Breaking changes * The minimum supported rust version for the `read` feature has changed to 1.52.0. [#458](https://github.com/gimli-rs/object/pull/458) * The minimum supported rust version for the `write` feature has changed to 1.61.0. * Fixed endian handling in `read::elf::SymbolTable::shndx`. [#458](https://github.com/gimli-rs/object/pull/458) * Fixed endian handling in `read::pe::ResourceName`. [#458](https://github.com/gimli-rs/object/pull/458) * Changed definitions for LoongArch ELF header flags. [#483](https://github.com/gimli-rs/object/pull/483) ### Changed * Fixed parsing of multiple debug directory entries in `read::pe::PeFile::pdb_info`. [#451](https://github.com/gimli-rs/object/pull/451) * Changed the section name used when writing COFF stub symbols. [#475](https://github.com/gimli-rs/object/pull/475) ### Added * Added `read::pe::DataDirectories::delay_load_import_table`. [#448](https://github.com/gimli-rs/object/pull/448) * Added `read::macho::LoadCommandData::raw_data`. [#449](https://github.com/gimli-rs/object/pull/449) * Added ELF relocations for LoongArch ps ABI v2. [#450](https://github.com/gimli-rs/object/pull/450) * Added PowerPC support for Mach-O. [#460](https://github.com/gimli-rs/object/pull/460) * Added support for reading the AIX big archive format. [#462](https://github.com/gimli-rs/object/pull/462) [#467](https://github.com/gimli-rs/object/pull/467) [#473](https://github.com/gimli-rs/object/pull/473) * Added support for `RelocationEncoding::AArch64Call` when writing Mach-O files. [#465](https://github.com/gimli-rs/object/pull/465) * Added support for `RelocationKind::Relative` when writing RISC-V ELF files. [#470](https://github.com/gimli-rs/object/pull/470) * Added Xtensa architecture support for ELF. [#481](https://github.com/gimli-rs/object/pull/481) * Added `read::pe::ResourceName::raw_data`. [#487](https://github.com/gimli-rs/object/pull/487) -------------------------------------------------------------------------------- ## 0.29.0 Released 2022/06/22. ### Breaking changes * The `write` feature now has a minimum supported rust version of 1.56.1. [#444](https://github.com/gimli-rs/object/pull/444) * Added `os_abi` and `abi_version` fields to `FileFlags::Elf`. [#438](https://github.com/gimli-rs/object/pull/438) [#441](https://github.com/gimli-rs/object/pull/441) ### Changed * Fixed handling of empty symbol tables in `read::elf::ElfFile::symbol_table` and `read::elf::ElfFile::dynamic_symbol_table`. [#443](https://github.com/gimli-rs/object/pull/443) ### Added * Added more `ELF_OSABI_*` constants. [#439](https://github.com/gimli-rs/object/pull/439) -------------------------------------------------------------------------------- ## 0.28.4 Released 2022/05/09. ### Added * Added `read::pe::DataDirectories::resource_directory`. [#425](https://github.com/gimli-rs/object/pull/425) [#427](https://github.com/gimli-rs/object/pull/427) * Added PE support for more ARM relocations. [#428](https://github.com/gimli-rs/object/pull/428) * Added support for `Architecture::LoongArch64`. [#430](https://github.com/gimli-rs/object/pull/430) [#432](https://github.com/gimli-rs/object/pull/432) * Added `elf::EF_MIPS_ABI` and associated constants. [#433](https://github.com/gimli-rs/object/pull/433) -------------------------------------------------------------------------------- ## 0.28.3 Released 2022/01/19. ### Changed * For the Mach-O support in `write::Object`, accept `RelocationKind::MachO` for all architectures, and accept `RelocationKind::Absolute` for ARM64. [#422](https://github.com/gimli-rs/object/pull/422) ### Added * Added `pe::ImageDataDirectory::file_range`, `read::pe::SectionTable::pe_file_range_at` and `pe::ImageSectionHeader::pe_file_range_at`. [#421](https://github.com/gimli-rs/object/pull/421) * Added `write::Object::add_coff_exports`. [#423](https://github.com/gimli-rs/object/pull/423) -------------------------------------------------------------------------------- ## 0.28.2 Released 2022/01/09. ### Changed * Ignored errors for the Wasm extended name section in `read::WasmFile::parse`. [#408](https://github.com/gimli-rs/object/pull/408) * Ignored errors for the COFF symbol table in `read::PeFile::parse`. [#410](https://github.com/gimli-rs/object/pull/410) * Fixed handling of `SectionFlags::Coff` in `write::Object::coff_write`. [#412](https://github.com/gimli-rs/object/pull/412) ### Added * Added `read::ObjectSegment::flags`. [#416](https://github.com/gimli-rs/object/pull/416) [#418](https://github.com/gimli-rs/object/pull/418) -------------------------------------------------------------------------------- ## 0.28.1 Released 2021/12/12. ### Changed * Fixed `read::elf::SymbolTable::shndx_section`. [#405](https://github.com/gimli-rs/object/pull/405) * Fixed build warnings. [#405](https://github.com/gimli-rs/object/pull/405) [#406](https://github.com/gimli-rs/object/pull/406) -------------------------------------------------------------------------------- ## 0.28.0 Released 2021/12/12. ### Breaking changes * `write_core` feature no longer enables `std` support. Use `write_std` instead. [#400](https://github.com/gimli-rs/object/pull/400) * Multiple changes related to Mach-O split dyld cache support. [#398](https://github.com/gimli-rs/object/pull/398) ### Added * Added `write::pe::Writer::write_file_align`. [#397](https://github.com/gimli-rs/object/pull/397) * Added support for Mach-O split dyld cache. [#398](https://github.com/gimli-rs/object/pull/398) * Added support for `IMAGE_SCN_LNK_NRELOC_OVFL` when reading and writing COFF. [#399](https://github.com/gimli-rs/object/pull/399) * Added `write::elf::Writer::reserve_null_symbol_index`. [#402](https://github.com/gimli-rs/object/pull/402) -------------------------------------------------------------------------------- ## 0.27.1 Released 2021/10/22. ### Changed * Fixed build error with older Rust versions due to cargo resolver version. -------------------------------------------------------------------------------- ## 0.27.0 Released 2021/10/17. ### Breaking changes * Changed `read::elf` to use `SectionIndex` instead of `usize` in more places. [#341](https://github.com/gimli-rs/object/pull/341) * Changed some `read::elf` section methods to additionally return the linked section index. [#341](https://github.com/gimli-rs/object/pull/341) * Changed `read::pe::ImageNtHeaders::parse` to return `DataDirectories` instead of a slice. [#357](https://github.com/gimli-rs/object/pull/357) * Deleted `value` parameter for `write:WritableBuffer::resize`. [#369](https://github.com/gimli-rs/object/pull/369) * Changed `write::Object` and `write::Section` to use `Cow` for section data. This added a lifetime parameter, which existing users can set to `'static`. [#370](https://github.com/gimli-rs/object/pull/370) ### Changed * Fixed parsing when PE import directory has zero size. [#341](https://github.com/gimli-rs/object/pull/341) * Fixed parsing when PE import directory has zero for original first thunk. [#385](https://github.com/gimli-rs/object/pull/385) [#387](https://github.com/gimli-rs/object/pull/387) * Fixed parsing when PE export directory has zero number of names. [#353](https://github.com/gimli-rs/object/pull/353) * Fixed parsing when PE export directory has zero number of names and addresses. [#362](https://github.com/gimli-rs/object/pull/362) * Fixed parsing when PE sections are contiguous. [#354](https://github.com/gimli-rs/object/pull/354) * Fixed `std` feature for `indexmap` dependency. [#374](https://github.com/gimli-rs/object/pull/374) * Fixed overflow in COFF section name offset parsing. [#390](https://github.com/gimli-rs/object/pull/390) ### Added * Added `name_bytes` methods to unified `read` traits. [#351](https://github.com/gimli-rs/object/pull/351) * Added `read::Object::kind`. [#352](https://github.com/gimli-rs/object/pull/352) * Added `read::elf::VersionTable` and related helpers. [#341](https://github.com/gimli-rs/object/pull/341) * Added `read::elf::SectionTable::dynamic` and related helpers. [#345](https://github.com/gimli-rs/object/pull/345) * Added `read::coff::SectionTable::max_section_file_offset`. [#344](https://github.com/gimli-rs/object/pull/344) * Added `read::pe::ExportTable` and related helpers. [#349](https://github.com/gimli-rs/object/pull/349) [#353](https://github.com/gimli-rs/object/pull/353) * Added `read::pe::ImportTable` and related helpers. [#357](https://github.com/gimli-rs/object/pull/357) * Added `read::pe::DataDirectories` and related helpers. [#357](https://github.com/gimli-rs/object/pull/357) [#384](https://github.com/gimli-rs/object/pull/384) * Added `read::pe::RichHeaderInfo` and related helpers. [#375](https://github.com/gimli-rs/object/pull/375) [#379](https://github.com/gimli-rs/object/pull/379) * Added `read::pe::RelocationBlocks` and related helpers. [#378](https://github.com/gimli-rs/object/pull/378) * Added `write::elf::Writer`. [#350](https://github.com/gimli-rs/object/pull/350) * Added `write::pe::Writer`. [#382](https://github.com/gimli-rs/object/pull/382) [#388](https://github.com/gimli-rs/object/pull/388) * Added `write::Section::data/data_mut`. [#367](https://github.com/gimli-rs/object/pull/367) * Added `write::Object::write_stream`. [#369](https://github.com/gimli-rs/object/pull/369) * Added MIPSr6 ELF header flag definitions. [#372](https://github.com/gimli-rs/object/pull/372) -------------------------------------------------------------------------------- ## 0.26.2 Released 2021/08/28. ### Added * Added support for 64-bit symbol table names to `read::archive`. [#366](https://github.com/gimli-rs/object/pull/366) -------------------------------------------------------------------------------- ## 0.26.1 Released 2021/08/19. ### Changed * Activate `memchr`'s `rustc-dep-of-std` feature [#356](https://github.com/gimli-rs/object/pull/356) -------------------------------------------------------------------------------- ## 0.26.0 Released 2021/07/26. ### Breaking changes * Changed `ReadRef::read_bytes_at_until` to accept a range parameter. [#326](https://github.com/gimli-rs/object/pull/326) * Added `ReadRef` type parameter to `read::StringTable` and types that contain it. String table entries are now only read as required. [#326](https://github.com/gimli-rs/object/pull/326) * Changed result type of `read::elf::SectionHeader::data` and `data_as_array`. [#332](https://github.com/gimli-rs/object/pull/332) * Moved `pod::WritableBuffer` to `write::WritableBuffer`. Renamed `WritableBuffer::extend` to `write_bytes`. Added more provided methods to `WritableBuffer`. [#335](https://github.com/gimli-rs/object/pull/335) * Moved `pod::Bytes` to `read::Bytes`. [#336](https://github.com/gimli-rs/object/pull/336) * Added `is_mips64el` parameter to `elf::Rela64::r_info/set_r_info`. [#337](https://github.com/gimli-rs/object/pull/337) ### Changed * Removed `alloc` dependency when no features are enabled. [#336](https://github.com/gimli-rs/object/pull/336) ### Added * Added `read::pe::PeFile` methods: `section_table`, `data_directory`, and `data`. [#324](https://github.com/gimli-rs/object/pull/324) * Added more ELF definitions. [#332](https://github.com/gimli-rs/object/pull/332) * Added `read::elf::SectionTable` methods for hash tables and symbol version information. [#332](https://github.com/gimli-rs/object/pull/332) * Added PE RISC-V definitions. [#333](https://github.com/gimli-rs/object/pull/333) * Added `WritableBuffer` implementation for `Vec`. [#335](https://github.com/gimli-rs/object/pull/335) -------------------------------------------------------------------------------- ## 0.25.3 Released 2021/06/12. ### Added * Added `RelocationEncoding::AArch64Call`. [#322](https://github.com/gimli-rs/object/pull/322) -------------------------------------------------------------------------------- ## 0.25.2 Released 2021/06/04. ### Added * Added `Architecture::X86_64_X32`. [#320](https://github.com/gimli-rs/object/pull/320) -------------------------------------------------------------------------------- ## 0.25.1 Released 2021/06/03. ### Changed * write: Fix choice of `SHT_REL` or `SHT_RELA` for most architectures. [#318](https://github.com/gimli-rs/object/pull/318) * write: Fix relocation encoding for MIPS64EL. [#318](https://github.com/gimli-rs/object/pull/318) -------------------------------------------------------------------------------- ## 0.25.0 Released 2021/06/02. ### Breaking changes * Added `non_exhaustive` to most public enums. [#306](https://github.com/gimli-rs/object/pull/306) * `MachHeader::parse` and `MachHeader::load_commands` now require a header offset. [#304](https://github.com/gimli-rs/object/pull/304) * Added `ReadRef::read_bytes_at_until`. [#308](https://github.com/gimli-rs/object/pull/308) * `PeFile::entry`, `PeSection::address` and `PeSegment::address` now return a virtual address instead of a RVA. [#315](https://github.com/gimli-rs/object/pull/315) ### Added * Added `pod::from_bytes_mut`, `pod::slice_from_bytes_mut`, `pod::bytes_of_mut`, and `pod::bytes_of_slice_mut`. [#296](https://github.com/gimli-rs/object/pull/296) [#297](https://github.com/gimli-rs/object/pull/297) * Added `Object::pdb_info`. [#298](https://github.com/gimli-rs/object/pull/298) * Added `read::macho::DyldCache`, other associated definitions, and support for these in the examples. [#308](https://github.com/gimli-rs/object/pull/308) * Added more architecture support. [#303](https://github.com/gimli-rs/object/pull/303) [#309](https://github.com/gimli-rs/object/pull/309) * Derive more traits for enums. [#311](https://github.com/gimli-rs/object/pull/311) * Added `Object::relative_address_base`. [#315](https://github.com/gimli-rs/object/pull/315) ### Changed * Improved performance for string parsing. [#302](https://github.com/gimli-rs/object/pull/302) * `objdump` example allows selecting container members. [#308](https://github.com/gimli-rs/object/pull/308) # r-efi - UEFI Reference Specification Protocol Constants and Definitions ## CHANGES WITH 5.3.0: * Remove the optional dependency on `compiler-builtins`, which was needed to build r-efi as part of rustc. This is no longer necessary. Contributions from: David Rheinsberg, Trevor Gross - Dußlingen, 2025-06-17 ## CHANGES WITH 5.2.0: * Add the memory attribute protocol. Contributions from: David Rheinsberg, Oliver Smith-Denny - Dußlingen, 2024-12-22 ## CHANGES WITH 5.1.0: * Mark `Guid::as_bytes` and `Guid::from_bytes` as `const fn`, aligning them with the other methods on `Guid`. This helps creating constant GUIDs via macros or other external helpers. Contributions from: Christopher Zurcher, David Rheinsberg - Dußlingen, 2024-09-01 ## CHANGES WITH 5.0.0: * Change the type of the `unload` function-pointer of the Loaded Image Protocol to `Option`, given that it can be `NULL` to indicate that the image cannot be unloaded. This is a major API break, but any users very likely need to adjust anyway to avoid NULL-derefs. Contributions from: David Rheinsberg, John Schock - Dußlingen, 2024-07-30 ## CHANGES WITH 4.5.0: * Implement or derive more standard traits for UEFI base types. In particular, implement `[Partial]Eq`, `Hash`, `[Partial]Ord` for `Boolean`, `Status`, `Guid`, and network address types. * Fix the signature of `BootUninstallMultipleProtocolInterfaces` to match the UEFI specification. Note that it uses var-args and is thus not fully usable from stable Rust. Contributions from: Ayush Singh, David Rheinsberg, John Schock - Dußlingen, 2024-05-23 ## CHANGES WITH 4.4.0: * Add definitions for `UNACCEPTED_MEMORY_TYPE`, media device subtypes for device paths, before-EBS and after-RTB event groups, missing memory attributes. * Add memory masks for common memory attribute classes. The symbol names are takend from EDK2, yet their purpose is defined in the specification. * New protocols: platform_driver_override, bus_specific_driver_override, driver_family_override, load_file, load_file2, pci-io Contributions from: David Rheinsberg, Dmitry Mostovenko, John Schock, Michael Kubacki - Dußlingen, 2024-03-27 ## CHANGES WITH 4.3.0: * Change alignment of `Guid` to 4 (was 8 before). This deviates from the specification, but aligns with EDK2. This should fix alignment mismatches when combining r-efi with EDK2, or other UEFI implementations. * `Guid` gained a new constructor `from_bytes()` to allow creating GUID-abstractions from foreign types based on the standardized memory representation. * Add all configuration-table GUIDs mentioned in the spec. These are often rooted in external specifications, but are strongly related to UEFI. * Add configuration-table definitions for RT_PROPERTIES and CONFORMANCE_PROFILES. * New protocols: hii_package_list, absolute_pointer Contributions from: David Rheinsberg, John Schock, Michael Kubacki, Nicholas Bishop - Dußlingen, 2023-10-18 ## CHANGES WITH 4.2.0: * Bump required compiler version to: rust-1.68 * New Protocols: debugport, debug-support, driver-diagnostics2, mp-services, shell, shell-dynamic-command, shell-parameters, udp-4, udp-6 * Use const-generics instead of ZSTs to represent dynamic trailing members in C structs. * The `examples` feature has been renamed to `native` (a backwards compatible feature is left in place). * Add support for riscv64. * Use the official rust `efiapi` calling convention. This was stabilized with rust-1.68. Contributions from: Ayush Singh, David Rheinsberg, Rob Bradford - Dußlingen, 2023-03-20 ## CHANGES WITH 4.1.0: * New Protocols: device-path-{from,to}-text, ip4, ip6, managed-network, rng, service-binding, tcp4, tcp6, timestamp * `ImageEntryPoint` is now correctly annotated as `eficall`. * `Time` now derives `Default`. * Fix nullable function pointers to use `Option`. * Function prototypes now have an explicit type definition and can be used independent of their protocol definition. * The new `rust-dep-of-std` feature option allows pulling in r-efi into the rust standard library. It prepares the crate workspace to be suitable for the standard library. It has no use outside of this. * Adopt the MIT license as 3rd licensing option to allow for integration into the rust compiler and ecosystem. Contributions from: Ayush Singh, David Rheinsberg, Joe Richey - Tübingen, 2022-08-23 ## CHANGES WITH 4.0.0: * Convert all enums to constants with type-aliases. This is an API break, but it is needed for spec-compliance. With the old enums, one couldn't encode all the possible values defined by the spec. Especially, the vendor-reserved ranges were unable to be encoded in a safe manner. Also see commit 401a91901e860 for a detailed discussion. API users likely need to convert their CamelCase enum usage to the new UPPER_CASE constants. * Convert all incomplete types to empty arrays. This affects all structures that use trailing unbound arrays. These are actually ABI incompatible with UEFI, since rust represents raw-pointers to such types as fat-pointers. Such arrays have now been converted to empty arrays, which should still allow accessing the memory location and retaining structure properties, but avoids fat-pointers. This is an API break, so you might have to adjust your accessors of those trailing structure members. * Implement `Clone` and `Copy` for most basic structures. Since these are used as plain carriers, no higher clone/copy logic is needed. It should be clear from the project-description, that only basic UEFI compatibility is provided. * Add the console-control vendor protocol. This protocol allows controlling console properties. It is not part of the UEFI specification, but rather defined by the TianoCore project. * Add a new example showing how to use the GOP functions to query the active graphics device. Contributions from: David Rheinsberg, GGRei, Hiroki Tokunaga, Richard Wiedenhöft - Tübingen, 2021-06-23 ## CHANGES WITH 3.2.0: * Add new protocols: DiskIo, DiskIo2, BlockIo, DriverBinding * Extend the Device-Path payload structure and add the HardDriveMedia payload. * Add HII definitions: A new top-level module `hii` with all the basic HII constants, as well as a handful of HII protocols (hii_database, hii_font, hii_string) * Document new `-Zbuild-std` based cross-compilation, serving as official rust alternative to cargo-xbuild. Contributions from: Alex James, Bret Barkelew, David Rheinsberg, Michael Kubacki - Tübingen, 2020-10-23 ## CHANGES WITH 3.1.0: * Add the basic networking types to `r_efi::base`. This includes MAC and IP address types. * Add the EFI_SIMPLE_NETWORK_PROTOCOL definitions and all required constants to make basic networking available. * Add a new uefi-cross example, which is copied from upstream rustc sources, so we can test local modifications to it. Contributions from: Alex James, David Rheinsberg - Tübingen, 2020-09-10 ## CHANGES WITH 3.0.0: * Fix a missing parameter in `BootServices::locate_device_path()`. The prototype incorrectly had 2 arguments, while the official version takes 3. The final `handle` argument was missing. This is an API break in `r-efi`. It should have a limited impact, since the function was mostly useless without a handle. Thanks to Michael Kubacki for catching this! * Adjust the `device_path` parameter in a bunch of `BootServices` calls. This used to take a `*mut c_void` parameter, since the device path protocol was not implemented. Since we have to bump the major version anyway, we use this to also fix these argument-types to the correct device-path protocol type, which has been implemented some time ago. Contributions from: David Rheinsberg, Michael Kubacki - Tübingen, 2020-04-24 ## CHANGES WITH 2.2.0: * Provide `as_usize()` accessor for `efi::Status` types. This allows accessing the raw underlying value of a status object. * The project moved to its new home at: github.com/r-efi/r-efi Contributions from: David Rheinsberg, Joe Richey - Tübingen, 2020-04-16 ## CHANGES WITH 2.1.0: * Add the graphics-output-protocol. * Expose reserved fields in open structures, otherwise they cannot be instantiated from outside the crate itself. Contributions from: David Herrmann, Richard Wiedenhöft, Rob Bradford - Tübingen, 2019-03-20 ## CHANGES WITH 2.0.0: * Add a set of UEFI protocols, including simple-text-input, file-protocol, simple-file-system, device-path, and more. * Fix signature of `BootServices::allocate_pages`. Contributions from: David Rheinsberg, Richard Wiedenhöft, Tom Gundersen - Tübingen, 2019-03-01 ## CHANGES WITH 1.0.0: * Enhance the basic UEFI type integration with the rust ecosystem. Add `Debug`, `Eq`, `Ord`, ... derivations, provide converters to/from the core library, and document the internal workings. * Fix `Boolean` to use `newtype(u8)` to make it ABI compatible to UEFI. This now accepts any byte value that UEFI accetps without any conversion required. Contributions from: Boris-Chengbiao Zhou, David Rheinsberg, Tom Gundersen - Tübingen, 2019-02-14 ## CHANGES WITH 0.1.1: * Feature gate examples to make `cargo test` work on non-UEFI systems like CI. Contributions from: David Herrmann - Tübingen, 2018-12-10 ## CHANGES WITH 0.1.0: * Initial release of r-efi. Contributions from: David Herrmann - Tübingen, 2018-12-10 # r-efi-alloc - UEFI Memory Allocator Integration ## CHANGES WITH 2.1.0: * Remove the optional dependency on `compiler-builtins`, which was needed to build r-efi-alloc as part of rustc. This is no longer necessary. Contributions from: David Rheinsberg, Trevor Gross - Dußlingen, 2025-06-17 ## CHANGES WITH 2.0.0: * Update to r-efi-5.2.0. Since `r_efi::efi::SystemTable` is re-exposed through `r-efi-alloc`, this requires a major version bump. * Set MSRV to 1.68 to synchronize with r-efi. Contributions from: Ayush Singh, David Rheinsberg - Dußlingen, 2025-04-25 ## CHANGES WITH 1.0.0: * Initial release of r-efi-alloc. Contributions from: Ayush Singh, David Rheinsberg, Mizuho MORI, Tom Gundersen - Dußlingen, 2022-12-02 # Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). A [separate changelog is kept for rand_core](rand_core/CHANGELOG.md). You may also find the [Upgrade Guide](https://rust-random.github.io/book/update.html) useful. ## [0.9.2 — 2025-07-20] ### Deprecated - Deprecate `rand::rngs::mock` module and `StepRng` generator (#1634) ### Additions - Enable `WeightedIndex` (de)serialization (#1646) ## [0.9.1] - 2025-04-17 ### Security and unsafe - Revise "not a crypto library" policy again (#1565) - Remove `zerocopy` dependency from `rand` (#1579) ### Fixes - Fix feature `simd_support` for recent nightly rust (#1586) ### Changes - Allow `fn rand::seq::index::sample_weighted` and `fn IndexedRandom::choose_multiple_weighted` to return fewer than `amount` results (#1623), reverting an undocumented change (#1382) to the previous release. ### Additions - Add `rand::distr::Alphabetic` distribution. (#1587) - Re-export `rand_core` (#1604) ## [0.9.0] - 2025-01-27 ### Security and unsafe - Policy: "rand is not a crypto library" (#1514) - Remove fork-protection from `ReseedingRng` and `ThreadRng`. Instead, it is recommended to call `ThreadRng::reseed` on fork. (#1379) - Use `zerocopy` to replace some `unsafe` code (#1349, #1393, #1446, #1502) ### Dependencies - Bump the MSRV to 1.63.0 (#1207, #1246, #1269, #1341, #1416, #1536); note that 1.60.0 may work for dependents when using `--ignore-rust-version` - Update to `rand_core` v0.9.0 (#1558) ### Features - Support `std` feature without `getrandom` or `rand_chacha` (#1354) - Enable feature `small_rng` by default (#1455) - Remove implicit feature `rand_chacha`; use `std_rng` instead. (#1473) - Rename feature `serde1` to `serde` (#1477) - Rename feature `getrandom` to `os_rng` (#1537) - Add feature `thread_rng` (#1547) ### API changes: rand_core traits - Add fn `RngCore::read_adapter` implementing `std::io::Read` (#1267) - Add trait `CryptoBlockRng: BlockRngCore`; make `trait CryptoRng: RngCore` (#1273) - Add traits `TryRngCore`, `TryCryptoRng` (#1424, #1499) - Rename `fn SeedableRng::from_rng` -> `try_from_rng` and add infallible variant `fn from_rng` (#1424) - Rename `fn SeedableRng::from_entropy` -> `from_os_rng` and add fallible variant `fn try_from_os_rng` (#1424) - Add bounds `Clone` and `AsRef` to associated type `SeedableRng::Seed` (#1491) ### API changes: Rng trait and top-level fns - Rename fn `rand::thread_rng()` to `rand::rng()` and remove from the prelude (#1506) - Remove fn `rand::random()` from the prelude (#1506) - Add top-level fns `random_iter`, `random_range`, `random_bool`, `random_ratio`, `fill` (#1488) - Re-introduce fn `Rng::gen_iter` as `random_iter` (#1305, #1500) - Rename fn `Rng::gen` to `random` to avoid conflict with the new `gen` keyword in Rust 2024 (#1438) - Rename fns `Rng::gen_range` to `random_range`, `gen_bool` to `random_bool`, `gen_ratio` to `random_ratio` (#1505) - Annotate panicking methods with `#[track_caller]` (#1442, #1447) ### API changes: RNGs - Fix `::Seed` size to 256 bits (#1455) - Remove first parameter (`rng`) of `ReseedingRng::new` (#1533) ### API changes: Sequences - Split trait `SliceRandom` into `IndexedRandom`, `IndexedMutRandom`, `SliceRandom` (#1382) - Add `IndexedRandom::choose_multiple_array`, `index::sample_array` (#1453, #1469) ### API changes: Distributions: renames - Rename module `rand::distributions` to `rand::distr` (#1470) - Rename distribution `Standard` to `StandardUniform` (#1526) - Move `distr::Slice` -> `distr::slice::Choose`, `distr::EmptySlice` -> `distr::slice::Empty` (#1548) - Rename trait `distr::DistString` -> `distr::SampleString` (#1548) - Rename `distr::DistIter` -> `distr::Iter`, `distr::DistMap` -> `distr::Map` (#1548) ### API changes: Distributions - Relax `Sized` bound on `Distribution for &D` (#1278) - Remove impl of `Distribution>` for `StandardUniform` (#1526) - Let distribution `StandardUniform` support all `NonZero*` types (#1332) - Fns `{Uniform, UniformSampler}::{new, new_inclusive}` return a `Result` (instead of potentially panicking) (#1229) - Distribution `Uniform` implements `TryFrom` instead of `From` for ranges (#1229) - Add `UniformUsize` (#1487) - Remove support for generating `isize` and `usize` values with `StandardUniform`, `Uniform` (except via `UniformUsize`) and `Fill` and usage as a `WeightedAliasIndex` weight (#1487) - Add impl `DistString` for distributions `Slice` and `Uniform` (#1315) - Add fn `Slice::num_choices` (#1402) - Add fn `p()` for distribution `Bernoulli` to access probability (#1481) ### API changes: Weighted distributions - Add `pub` module `rand::distr::weighted`, moving `WeightedIndex` there (#1548) - Add trait `weighted::Weight`, allowing `WeightedIndex` to trap overflow (#1353) - Add fns `weight, weights, total_weight` to distribution `WeightedIndex` (#1420) - Rename enum `WeightedError` to `weighted::Error`, revising variants (#1382) and mark as `#[non_exhaustive]` (#1480) ### API changes: SIMD - Switch to `std::simd`, expand SIMD & docs (#1239) ### Reproducibility-breaking changes - Make `ReseedingRng::reseed` discard remaining data from the last block generated (#1379) - Change fn `SmallRng::seed_from_u64` implementation (#1203) - Allow `UniformFloat::new` samples and `UniformFloat::sample_single` to yield `high` (#1462) - Fix portability of distribution `Slice` (#1469) - Make `Uniform` for `usize` portable via `UniformUsize` (#1487) - Fix `IndexdRandom::choose_multiple_weighted` for very small seeds and optimize for large input length / low memory (#1530) ### Reproducibility-breaking optimisations - Optimize fn `sample_floyd`, affecting output of `rand::seq::index::sample` and `rand::seq::SliceRandom::choose_multiple` (#1277) - New, faster algorithms for `IteratorRandom::choose` and `choose_stable` (#1268) - New, faster algorithms for `SliceRandom::shuffle` and `partial_shuffle` (#1272) - Optimize distribution `Uniform`: use Canon's method (single sampling) / Lemire's method (distribution sampling) for faster sampling (breaks value stability; #1287) - Optimize fn `sample_single_inclusive` for floats (+~20% perf) (#1289) ### Other optimisations - Improve `SmallRng` initialization performance (#1482) - Optimise SIMD widening multiply (#1247) ### Other - Add `Cargo.lock.msrv` file (#1275) - Reformat with `rustfmt` and enforce (#1448) - Apply Clippy suggestions and enforce (#1448, #1474) - Move all benchmarks to new `benches` crate (#1329, #1439) and migrate to Criterion (#1490) ### Documentation - Improve `ThreadRng` related docs (#1257) - Docs: enable experimental `--generate-link-to-definition` feature (#1327) - Better doc of crate features, use `doc_auto_cfg` (#1411, #1450) ## [0.8.5] - 2021-08-20 ### Fixes - Fix build on non-32/64-bit architectures (#1144) - Fix "min_const_gen" feature for `no_std` (#1173) - Check `libc::pthread_atfork` return value with panic on error (#1178) - More robust reseeding in case `ReseedingRng` is used from a fork handler (#1178) - Fix nightly: remove unused `slice_partition_at_index` feature (#1215) - Fix nightly + `simd_support`: update `packed_simd` (#1216) ### Rngs - `StdRng`: Switch from HC128 to ChaCha12 on emscripten (#1142). We now use ChaCha12 on all platforms. ### Documentation - Added docs about rand's use of const generics (#1150) - Better random chars example (#1157) ## [0.8.4] - 2021-06-15 ### Additions - Use const-generics to support arrays of all sizes (#1104) - Implement `Clone` and `Copy` for `Alphanumeric` (#1126) - Add `Distribution::map` to derive a distribution using a closure (#1129) - Add `Slice` distribution (#1107) - Add `DistString` trait with impls for `Standard` and `Alphanumeric` (#1133) ### Other - Reorder asserts in `Uniform` float distributions for easier debugging of non-finite arguments (#1094, #1108) - Add range overflow check in `Uniform` float distributions (#1108) - Deprecate `rngs::adapter::ReadRng` (#1130) ## [0.8.3] - 2021-01-25 ### Fixes - Fix `no-std` + `alloc` build by gating `choose_multiple_weighted` on `std` (#1088) ## [0.8.2] - 2021-01-12 ### Fixes - Fix panic in `UniformInt::sample_single_inclusive` and `Rng::gen_range` when providing a full integer range (eg `0..=MAX`) (#1087) ## [0.8.1] - 2020-12-31 ### Other - Enable all stable features in the playground (#1081) ## [0.8.0] - 2020-12-18 ### Platform support - The minimum supported Rust version is now 1.36 (#1011) - `getrandom` updated to v0.2 (#1041) - Remove `wasm-bindgen` and `stdweb` feature flags. For details of WASM support, see the [getrandom documentation](https://docs.rs/getrandom/latest). (#948) - `ReadRng::next_u32` and `next_u64` now use little-Endian conversion instead of native-Endian, affecting results on Big-Endian platforms (#1061) - The `nightly` feature no longer implies the `simd_support` feature (#1048) - Fix `simd_support` feature to work on current nightlies (#1056) ### Rngs - `ThreadRng` is no longer `Copy` to enable safe usage within thread-local destructors (#1035) - `gen_range(a, b)` was replaced with `gen_range(a..b)`. `gen_range(a..=b)` is also supported. Note that `a` and `b` can no longer be references or SIMD types. (#744, #1003) - Replace `AsByteSliceMut` with `Fill` and add support for `[bool], [char], [f32], [f64]` (#940) - Restrict `rand::rngs::adapter` to `std` (#1027; see also #928) - `StdRng`: add new `std_rng` feature flag (enabled by default, but might need to be used if disabling default crate features) (#948) - `StdRng`: Switch from ChaCha20 to ChaCha12 for better performance (#1028) - `SmallRng`: Replace PCG algorithm with xoshiro{128,256}++ (#1038) ### Sequences - Add `IteratorRandom::choose_stable` as an alternative to `choose` which does not depend on size hints (#1057) - Improve accuracy and performance of `IteratorRandom::choose` (#1059) - Implement `IntoIterator` for `IndexVec`, replacing the `into_iter` method (#1007) - Add value stability tests for `seq` module (#933) ### Misc - Support `PartialEq` and `Eq` for `StdRng`, `SmallRng` and `StepRng` (#979) - Added a `serde1` feature and added Serialize/Deserialize to `UniformInt` and `WeightedIndex` (#974) - Drop some unsafe code (#962, #963, #1011) - Reduce packaged crate size (#983) - Migrate to GitHub Actions from Travis+AppVeyor (#1073) ### Distributions - `Alphanumeric` samples bytes instead of chars (#935) - `Uniform` now supports `char`, enabling `rng.gen_range('A'..='Z')` (#1068) - Add `UniformSampler::sample_single_inclusive` (#1003) #### Weighted sampling - Implement weighted sampling without replacement (#976, #1013) - `rand::distributions::alias_method::WeightedIndex` was moved to `rand_distr::WeightedAliasIndex`. The simpler alternative `rand::distribution::WeightedIndex` remains. (#945) - Improve treatment of rounding errors in `WeightedIndex::update_weights` (#956) - `WeightedIndex`: return error on NaN instead of panic (#1005) ### Documentation - Document types supported by `random` (#994) - Document notes on password generation (#995) - Note that `SmallRng` may not be the best choice for performance and in some other cases (#1038) - Use `doc(cfg)` to annotate feature-gated items (#1019) - Adjust README (#1065) ## [0.7.3] - 2020-01-10 ### Fixes - The `Bernoulli` distribution constructors now reports an error on NaN and on `denominator == 0`. (#925) - Use `std::sync::Once` to register fork handler, avoiding possible atomicity violation (#928) - Fix documentation on the precision of generated floating-point values ### Changes - Unix: make libc dependency optional; only use fork protection with std feature (#928) ### Additions - Implement `std::error::Error` for `BernoulliError` (#919) ## [0.7.2] - 2019-09-16 ### Fixes - Fix dependency on `rand_core` 0.5.1 (#890) ### Additions - Unit tests for value stability of distributions added (#888) ## [0.7.1] - 2019-09-13 ### Yanked This release was yanked since it depends on `rand_core::OsRng` added in 0.5.1 but specifies a dependency on version 0.5.0 (#890), causing a broken builds when updating from `rand 0.7.0` without also updating `rand_core`. ### Fixes - Fix `no_std` behaviour, appropriately enable c2-chacha's `std` feature (#844) - `alloc` feature in `no_std` is available since Rust 1.36 (#856) - Fix or squelch issues from Clippy lints (#840) ### Additions - Add a `no_std` target to CI to continuously evaluate `no_std` status (#844) - `WeightedIndex`: allow adjusting a sub-set of weights (#866) ## [0.7.0] - 2019-06-28 ### Fixes - Fix incorrect pointer usages revealed by Miri testing (#780, #781) - Fix (tiny!) bias in `Uniform` for 8- and 16-bit ints (#809) ### Crate - Bumped MSRV (min supported Rust version) to 1.32.0 - Updated to Rust Edition 2018 (#823, #824) - Removed dependence on `rand_xorshift`, `rand_isaac`, `rand_jitter` crates (#759, #765) - Remove dependency on `winapi` (#724) - Removed all `build.rs` files (#824) - Removed code already deprecated in version 0.6 (#757) - Removed the serde1 feature (It's still available for backwards compatibility, but it does not do anything. #830) - Many documentation changes ### rand_core - Updated to `rand_core` 0.5.0 - `Error` type redesigned with new API (#800) - Move `from_entropy` method to `SeedableRng` and remove `FromEntropy` (#800) - `SeedableRng::from_rng` is now expected to be value-stable (#815) ### Standard RNGs - OS interface moved from `rand_os` to new `getrandom` crate (#765, [getrandom](https://github.com/rust-random/getrandom)) - Use ChaCha for `StdRng` and `ThreadRng` (#792) - Feature-gate `SmallRng` (#792) - `ThreadRng` now supports `Copy` (#758) - Deprecated `EntropyRng` (#765) - Enable fork protection of ReseedingRng without `std` (#724) ### Distributions - Many distributions have been moved to `rand_distr` (#761) - `Bernoulli::new` constructor now returns a `Result` (#803) - `Distribution::sample_iter` adjusted for more flexibility (#758) - Added `distributions::weighted::alias_method::WeightedIndex` for `O(1)` sampling (#692) - Support sampling `NonZeroU*` types with the `Standard` distribution (#728) - Optimised `Binomial` distribution sampling (#735, #740, #752) - Optimised SIMD float sampling (#739) ### Sequences - Make results portable across 32- and 64-bit by using `u32` samples for `usize` where possible (#809) ## [0.6.5] - 2019-01-28 ### Crates - Update `rand_core` to 0.4 (#703) - Move `JitterRng` to its own crate (#685) - Add a wasm-bindgen test crate (#696) ### Platforms - Fuchsia: Replaced fuchsia-zircon with fuchsia-cprng ### Doc - Use RFC 1946 for doc links (#691) - Fix some doc links and notes (#711) ## [0.6.4] - 2019-01-08 ### Fixes - Move wasm-bindgen shims to correct crate (#686) - Make `wasm32-unknown-unknown` compile but fail at run-time if missing bindingsg (#686) ## [0.6.3] - 2019-01-04 ### Fixes - Make the `std` feature require the optional `rand_os` dependency (#675) - Re-export the optional WASM dependencies of `rand_os` from `rand` to avoid breakage (#674) ## [0.6.2] - 2019-01-04 ### Additions - Add `Default` for `ThreadRng` (#657) - Move `rngs::OsRng` to `rand_os` sub-crate; clean up code; use as dependency (#643) ##BLOCKER## - Add `rand_xoshiro` sub-crate, plus benchmarks (#642, #668) ### Fixes - Fix bias in `UniformInt::sample_single` (#662) - Use `autocfg` instead of `rustc_version` for rustc version detection (#664) - Disable `i128` and `u128` if the `target_os` is `emscripten` (#671: work-around Emscripten limitation) - CI fixes (#660, #671) ### Optimisations - Optimise memory usage of `UnitCircle` and `UnitSphereSurface` distributions (no PR) ## [0.6.1] - 2018-11-22 - Support sampling `Duration` also for `no_std` (only since Rust 1.25) (#649) - Disable default features of `libc` (#647) ## [0.6.0] - 2018-11-14 ### Project organisation - Rand has moved from [rust-lang-nursery](https://github.com/rust-lang-nursery/rand) to [rust-random](https://github.com/rust-random/rand)! (#578) - Created [The Rust Random Book](https://rust-random.github.io/book/) ([source](https://github.com/rust-random/book)) - Update copyright and licence notices (#591, #611) - Migrate policy documentation from the wiki (#544) ### Platforms - Add fork protection on Unix (#466) - Added support for wasm-bindgen. (#541, #559, #562, #600) - Enable `OsRng` for powerpc64, sparc and sparc64 (#609) - Use `syscall` from `libc` on Linux instead of redefining it (#629) ### RNGs - Switch `SmallRng` to use PCG (#623) - Implement `Pcg32` and `Pcg64Mcg` generators (#632) - Move ISAAC RNGs to a dedicated crate (#551) - Move Xorshift RNG to its own crate (#557) - Move ChaCha and HC128 RNGs to dedicated crates (#607, #636) - Remove usage of `Rc` from `ThreadRng` (#615) ### Sampling and distributions - Implement `Rng.gen_ratio()` and `Bernoulli::new_ratio()` (#491) - Make `Uniform` strictly respect `f32` / `f64` high/low bounds (#477) - Allow `gen_range` and `Uniform` to work on non-`Copy` types (#506) - `Uniform` supports inclusive ranges: `Uniform::from(a..=b)`. This is automatically enabled for Rust >= 1.27. (#566) - Implement `TrustedLen` and `FusedIterator` for `DistIter` (#620) #### New distributions - Add the `Dirichlet` distribution (#485) - Added sampling from the unit sphere and circle. (#567) - Implement the triangular distribution (#575) - Implement the Weibull distribution (#576) - Implement the Beta distribution (#574) #### Optimisations - Optimise `Bernoulli::new` (#500) - Optimise `char` sampling (#519) - Optimise sampling of `std::time::Duration` (#583) ### Sequences - Redesign the `seq` module (#483, #515) - Add `WeightedIndex` and `choose_weighted` (#518, #547) - Optimised and changed return type of the `sample_indices` function. (#479) - Use `Iterator::size_hint()` to speed up `IteratorRandom::choose` (#593) ### SIMD - Support for generating SIMD types (#523, #542, #561, #630) ### Other - Revise CI scripts (#632, #635) - Remove functionality already deprecated in 0.5 (#499) - Support for `i128` and `u128` is automatically enabled for Rust >= 1.26. This renders the `i128_support` feature obsolete. It still exists for backwards compatibility but does not have any effect. This breaks programs using Rand with `i128_support` on nightlies older than Rust 1.26. (#571) ## [0.5.5] - 2018-08-07 ### Documentation - Fix links in documentation (#582) ## [0.5.4] - 2018-07-11 ### Platform support - Make `OsRng` work via WASM/stdweb for WebWorkers ## [0.5.3] - 2018-06-26 ### Platform support - OpenBSD, Bitrig: fix compilation (broken in 0.5.1) (#530) ## [0.5.2] - 2018-06-18 ### Platform support - Hide `OsRng` and `JitterRng` on unsupported platforms (#512; fixes #503). ## [0.5.1] - 2018-06-08 ### New distributions - Added Cauchy distribution. (#474, #486) - Added Pareto distribution. (#495) ### Platform support and `OsRng` - Remove blanket Unix implementation. (#484) - Remove Wasm unimplemented stub. (#484) - Dragonfly BSD: read from `/dev/random`. (#484) - Bitrig: use `getentropy` like OpenBSD. (#484) - Solaris: (untested) use `getrandom` if available, otherwise `/dev/random`. (#484) - Emscripten, `stdweb`: split the read up in chunks. (#484) - Emscripten, Haiku: don't do an extra blocking read from `/dev/random`. (#484) - Linux, NetBSD, Solaris: read in blocking mode on first use in `fill_bytes`. (#484) - Fuchsia, CloudABI: fix compilation (broken in Rand 0.5). (#484) ## [0.5.0] - 2018-05-21 ### Crate features and organisation - Minimum Rust version update: 1.22.0. (#239) - Create a separate `rand_core` crate. (#288) - Deprecate `rand_derive`. (#256) - Add `prelude` (and module reorganisation). (#435) - Add `log` feature. Logging is now available in `JitterRng`, `OsRng`, `EntropyRng` and `ReseedingRng`. (#246) - Add `serde1` feature for some PRNGs. (#189) - `stdweb` feature for `OsRng` support on WASM via stdweb. (#272, #336) ### `Rng` trait - Split `Rng` in `RngCore` and `Rng` extension trait. `next_u32`, `next_u64` and `fill_bytes` are now part of `RngCore`. (#265) - Add `Rng::sample`. (#256) - Deprecate `Rng::gen_weighted_bool`. (#308) - Add `Rng::gen_bool`. (#308) - Remove `Rng::next_f32` and `Rng::next_f64`. (#273) - Add optimized `Rng::fill` and `Rng::try_fill` methods. (#247) - Deprecate `Rng::gen_iter`. (#286) - Deprecate `Rng::gen_ascii_chars`. (#279) ### `rand_core` crate - `rand` now depends on new `rand_core` crate (#288) - `RngCore` and `SeedableRng` are now part of `rand_core`. (#288) - Add modules to help implementing RNGs `impl` and `le`. (#209, #228) - Add `Error` and `ErrorKind`. (#225) - Add `CryptoRng` marker trait. (#273) - Add `BlockRngCore` trait. (#281) - Add `BlockRng` and `BlockRng64` wrappers to help implementations. (#281, #325) - Revise the `SeedableRng` trait. (#233) - Remove default implementations for `RngCore::next_u64` and `RngCore::fill_bytes`. (#288) - Add `RngCore::try_fill_bytes`. (#225) ### Other traits and types - Add `FromEntropy` trait. (#233, #375) - Add `SmallRng` wrapper. (#296) - Rewrite `ReseedingRng` to only work with `BlockRngCore` (substantial performance improvement). (#281) - Deprecate `weak_rng`. Use `SmallRng` instead. (#296) - Deprecate `AsciiGenerator`. (#279) ### Random number generators - Switch `StdRng` and `thread_rng` to HC-128. (#277) - `StdRng` must now be created with `from_entropy` instead of `new` - Change `thread_rng` reseeding threshold to 32 MiB. (#277) - PRNGs no longer implement `Copy`. (#209) - `Debug` implementations no longer show internals. (#209) - Implement `Clone` for `ReseedingRng`, `JitterRng`, OsRng`. (#383, #384) - Implement serialization for `XorShiftRng`, `IsaacRng` and `Isaac64Rng` under the `serde1` feature. (#189) - Implement `BlockRngCore` for `ChaChaCore` and `Hc128Core`. (#281) - All PRNGs are now portable across big- and little-endian architectures. (#209) - `Isaac64Rng::next_u32` no longer throws away half the results. (#209) - Add `IsaacRng::new_from_u64` and `Isaac64Rng::new_from_u64`. (#209) - Add the HC-128 CSPRNG `Hc128Rng`. (#210) - Change ChaCha20 to have 64-bit counter and 64-bit stream. (#349) - Changes to `JitterRng` to get its size down from 2112 to 24 bytes. (#251) - Various performance improvements to all PRNGs. ### Platform support and `OsRng` - Add support for CloudABI. (#224) - Remove support for NaCl. (#225) - WASM support for `OsRng` via stdweb, behind the `stdweb` feature. (#272, #336) - Use `getrandom` on more platforms for Linux, and on Android. (#338) - Use the `SecRandomCopyBytes` interface on macOS. (#322) - On systems that do not have a syscall interface, only keep a single file descriptor open for `OsRng`. (#239) - On Unix, first try a single read from `/dev/random`, then `/dev/urandom`. (#338) - Better error handling and reporting in `OsRng` (using new error type). (#225) - `OsRng` now uses non-blocking when available. (#225) - Add `EntropyRng`, which provides `OsRng`, but has `JitterRng` as a fallback. (#235) ### Distributions - New `Distribution` trait. (#256) - Add `Distribution::sample_iter` and `Rng::::sample_iter`. (#361) - Deprecate `Rand`, `Sample` and `IndependentSample` traits. (#256) - Add a `Standard` distribution (replaces most `Rand` implementations). (#256) - Add `Binomial` and `Poisson` distributions. (#96) - Add `Bernoulli` dsitribution. (#411) - Add `Alphanumeric` distribution. (#279) - Remove `Closed01` distribution, add `OpenClosed01`. (#274, #420) - Rework `Range` type, making it possible to implement it for user types. (#274) - Rename `Range` to `Uniform`. (#395) - Add `Uniform::new_inclusive` for inclusive ranges. (#274) - Use widening multiply method for much faster integer range reduction. (#274) - `Standard` distribution for `char` uses `Uniform` internally. (#274) - `Standard` distribution for `bool` uses sign test. (#274) - Implement `Standard` distribution for `Wrapping`. (#436) - Implement `Uniform` distribution for `Duration`. (#427) ## [0.4.3] - 2018-08-16 ### Fixed - Use correct syscall number for PowerPC (#589) ## [0.4.2] - 2018-01-06 ### Changed - Use `winapi` on Windows - Update for Fuchsia OS - Remove dev-dependency on `log` ## [0.4.1] - 2017-12-17 ### Added - `no_std` support ## [0.4.0-pre.0] - 2017-12-11 ### Added - `JitterRng` added as a high-quality alternative entropy source using the system timer - new `seq` module with `sample_iter`, `sample_slice`, etc. - WASM support via dummy implementations (fail at run-time) - Additional benchmarks, covering generators and new seq code ### Changed - `thread_rng` uses `JitterRng` if seeding from system time fails (slower but more secure than previous method) ### Deprecated - `sample` function deprecated (replaced by `sample_iter`) ## [0.3.20] - 2018-01-06 ### Changed - Remove dev-dependency on `log` - Update `fuchsia-zircon` dependency to 0.3.2 ## [0.3.19] - 2017-12-27 ### Changed - Require `log <= 0.3.8` for dev builds - Update `fuchsia-zircon` dependency to 0.3 - Fix broken links in docs (to unblock compiler docs testing CI) ## [0.3.18] - 2017-11-06 ### Changed - `thread_rng` is seeded from the system time if `OsRng` fails - `weak_rng` now uses `thread_rng` internally ## [0.3.17] - 2017-10-07 ### Changed - Fuchsia: Magenta was renamed Zircon ## [0.3.16] - 2017-07-27 ### Added - Implement Debug for mote non-public types - implement `Rand` for (i|u)i128 - Support for Fuchsia ### Changed - Add inline attribute to SampleRange::construct_range. This improves the benchmark for sample in 11% and for shuffle in 16%. - Use `RtlGenRandom` instead of `CryptGenRandom` ## [0.3.15] - 2016-11-26 ### Added - Add `Rng` trait method `choose_mut` - Redox support ### Changed - Use `arc4rand` for `OsRng` on FreeBSD. - Use `arc4random(3)` for `OsRng` on OpenBSD. ### Fixed - Fix filling buffers 4 GiB or larger with `OsRng::fill_bytes` on Windows ## [0.3.14] - 2016-02-13 ### Fixed - Inline definitions from winapi/advapi32, which decreases build times ## [0.3.13] - 2016-01-09 ### Fixed - Compatible with Rust 1.7.0-nightly (needed some extra type annotations) ## [0.3.12] - 2015-11-09 ### Changed - Replaced the methods in `next_f32` and `next_f64` with the technique described Saito & Matsumoto at MCQMC'08. The new method should exhibit a slightly more uniform distribution. - Depend on libc 0.2 ### Fixed - Fix iterator protocol issue in `rand::sample` ## [0.3.11] - 2015-08-31 ### Added - Implement `Rand` for arrays with n <= 32 ## [0.3.10] - 2015-08-17 ### Added - Support for NaCl platforms ### Changed - Allow `Rng` to be `?Sized`, impl for `&mut R` and `Box` where `R: ?Sized + Rng` ## [0.3.9] - 2015-06-18 ### Changed - Use `winapi` for Windows API things ### Fixed - Fixed test on stable/nightly - Fix `getrandom` syscall number for aarch64-unknown-linux-gnu ## [0.3.8] - 2015-04-23 ### Changed - `log` is a dev dependency ### Fixed - Fix race condition of atomics in `is_getrandom_available` ## [0.3.7] - 2015-04-03 ### Fixed - Derive Copy/Clone changes ## [0.3.6] - 2015-04-02 ### Changed - Move to stable Rust! ## [0.3.5] - 2015-04-01 ### Fixed - Compatible with Rust master ## [0.3.4] - 2015-03-31 ### Added - Implement Clone for `Weighted` ### Fixed - Compatible with Rust master ## [0.3.3] - 2015-03-26 ### Fixed - Fix compile on Windows ## [0.3.2] - 2015-03-26 ## [0.3.1] - 2015-03-26 ### Fixed - Fix compile on Windows ## [0.3.0] - 2015-03-25 ### Changed - Update to use log version 0.3.x ## [0.2.1] - 2015-03-22 ### Fixed - Compatible with Rust master - Fixed iOS compilation ## [0.2.0] - 2015-03-06 ### Fixed - Compatible with Rust master (move from `old_io` to `std::io`) ## [0.1.4] - 2015-03-04 ### Fixed - Compatible with Rust master (use wrapping ops) ## [0.1.3] - 2015-02-20 ### Fixed - Compatible with Rust master ### Removed - Removed Copy implementations from RNGs ## [0.1.2] - 2015-02-03 ### Added - Imported functionality from `std::rand`, including: - `StdRng`, `SeedableRng`, `TreadRng`, `weak_rng()` - `ReaderRng`: A wrapper around any Reader to treat it as an RNG. - Imported documentation from `std::rand` - Imported tests from `std::rand` ## [0.1.1] - 2015-02-03 ### Added - Migrate to a cargo-compatible directory structure. ### Fixed - Do not use entropy during `gen_weighted_bool(1)` ## [Rust 0.12.0] - 2014-10-09 ### Added - Impl Rand for tuples of arity 11 and 12 - Include ChaCha pseudorandom generator - Add `next_f64` and `next_f32` to Rng - Implement Clone for PRNGs ### Changed - Rename `TaskRng` to `ThreadRng` and `task_rng` to `thread_rng` (since a runtime is removed from Rust). ### Fixed - Improved performance of ISAAC and ISAAC64 by 30% and 12 % respectively, by informing the optimiser that indexing is never out-of-bounds. ### Removed - Removed the Deprecated `choose_option` ## [Rust 0.11.0] - 2014-07-02 ### Added - document when to use `OSRng` in cryptographic context, and explain why we use `/dev/urandom` instead of `/dev/random` - `Rng::gen_iter()` which will return an infinite stream of random values - `Rng::gen_ascii_chars()` which will return an infinite stream of random ascii characters ### Changed - Now only depends on libcore! - Remove `Rng.choose()`, rename `Rng.choose_option()` to `.choose()` - Rename OSRng to OsRng - The WeightedChoice structure is no longer built with a `Vec>`, but rather a `&mut [Weighted]`. This means that the WeightedChoice structure now has a lifetime associated with it. - The `sample` method on `Rng` has been moved to a top-level function in the `rand` module due to its dependence on `Vec`. ### Removed - `Rng::gen_vec()` was removed. Previous behavior can be regained with `rng.gen_iter().take(n).collect()` - `Rng::gen_ascii_str()` was removed. Previous behavior can be regained with `rng.gen_ascii_chars().take(n).collect()` - {IsaacRng, Isaac64Rng, XorShiftRng}::new() have all been removed. These all relied on being able to use an OSRng for seeding, but this is no longer available in librand (where these types are defined). To retain the same functionality, these types now implement the `Rand` trait so they can be generated with a random seed from another random number generator. This allows the stdlib to use an OSRng to create seeded instances of these RNGs. - Rand implementations for `Box` and `@T` were removed. These seemed to be pretty rare in the codebase, and it allows for librand to not depend on liballoc. Additionally, other pointer types like Rc and Arc were not supported. - Remove a slew of old deprecated functions ## [Rust 0.10] - 2014-04-03 ### Changed - replace `Rng.shuffle's` functionality with `.shuffle_mut` - bubble up IO errors when creating an OSRng ### Fixed - Use `fill()` instead of `read()` - Rewrite OsRng in Rust for windows ## [0.10-pre] - 2014-03-02 ### Added - Separate `rand` out of the standard library # Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [0.9.3] — 2025-02-29 ### Other - Remove `zerocopy` dependency (#1607) - Deprecate `rand_core::impls::fill_via_u32_chunks`, `fill_via_u64_chunks` (#1607) ## [0.9.2] - 2025-02-22 ### API changes - Relax `Sized` bound on impls of `TryRngCore`, `TryCryptoRng` and `UnwrapMut` (#1593) - Add `UnwrapMut::re` to reborrow the inner rng with a tighter lifetime (#1595) ## [0.9.1] - 2025-02-16 ### API changes - Add `TryRngCore::unwrap_mut`, providing an impl of `RngCore` over `&mut rng` (#1589) ## [0.9.0] - 2025-01-27 ### Dependencies and features - Bump the MSRV to 1.63.0 (#1207, #1246, #1269, #1341, #1416, #1536); note that 1.60.0 may work for dependents when using `--ignore-rust-version` - Update to `getrandom` v0.3.0 (#1558) - Use `zerocopy` to replace some `unsafe` code (#1349, #1393, #1446, #1502) - Rename feature `serde1` to `serde` (#1477) - Rename feature `getrandom` to `os_rng` (#1537) ### API changes - Allow `rand_core::impls::fill_via_u*_chunks` to mutate source (#1182) - Add fn `RngCore::read_adapter` implementing `std::io::Read` (#1267) - Add trait `CryptoBlockRng: BlockRngCore`; make `trait CryptoRng: RngCore` replacing `CryptoRngCore` (#1273) - Add traits `TryRngCore`, `TryCryptoRng` (#1424, #1499) - Rename `fn SeedableRng::from_rng` -> `try_from_rng` and add infallible variant `fn from_rng` (#1424) - Rename `fn SeedableRng::from_entropy` -> `from_os_rng` and add fallible variant `fn try_from_os_rng` (#1424) - Add bounds `Clone` and `AsRef` to associated type `SeedableRng::Seed` (#1491) ## [0.6.4] - 2022-09-15 - Fix unsoundness in `::next_u32` (#1160) - Reduce use of `unsafe` and improve gen_bytes performance (#1180) - Add `CryptoRngCore` trait (#1187, #1230) ## [0.6.3] - 2021-06-15 ### Changed - Improved bound for `serde` impls on `BlockRng` (#1130) - Minor doc additions (#1118) ## [0.6.2] - 2021-02-12 ### Fixed - Fixed assertions in `le::read_u32_into` and `le::read_u64_into` which could have allowed buffers not to be fully populated (#1096) ## [0.6.1] - 2021-01-03 ### Fixed - Avoid panic when using `RngCore::seed_from_u64` with a seed which is not a multiple of four (#1082) ### Other - Enable all stable features in the playground (#1081) ## [0.6.0] - 2020-12-08 ### Breaking changes - Bump MSRV to 1.36, various code improvements (#1011) - Update to getrandom v0.2 (#1041) - Fix: `next_u32_via_fill` and `next_u64_via_fill` now use LE as documented (#1061) ### Other - Reduce usage of `unsafe` (#962, #963, #1011) - Annotate feature-gates in documentation (#1019) - Document available error codes (#1061) - Various documentation tweaks - Fix some clippy warnings (#1036) - Apply rustfmt (#926) ## [0.5.1] - 2019-08-28 - `OsRng` added to `rand_core` (#863) - `Error::INTERNAL_START` and `Error::CUSTOM_START` constants (#864) - `Error::raw_os_error` method (#864) - `Debug` and `Display` formatting for `getrandom` error codes without `std` (#864) ### Changed - `alloc` feature in `no_std` is available since Rust 1.36 (#856) - Added `#[inline]` to `Error` conversion methods (#864) ## [0.5.0] - 2019-06-06 ### Changed - Enable testing with Miri and fix incorrect pointer usages (#779, #780, #781, #783, #784) - Rewrite `Error` type and adjust API (#800) - Adjust usage of `#[inline]` for `BlockRng` and `BlockRng64` ## [0.4.0] - 2019-01-24 ### Changed - Disable the `std` feature by default (#702) ## [0.3.0] - 2018-09-24 ### Added - Add `SeedableRng::seed_from_u64` for convenient seeding. (#537) ## [0.2.1] - 2018-06-08 ### Added - References to a `CryptoRng` now also implement `CryptoRng`. (#470) ## [0.2.0] - 2018-05-21 ### Changed - Enable the `std` feature by default. (#409) - Remove `BlockRng{64}::inner` and `BlockRng::inner_mut`; instead making `core` public - Change `BlockRngCore::Results` bound to also require `AsMut<[Self::Item]>`. (#419) ### Added - Add `BlockRng{64}::index` and `BlockRng{64}::generate_and_set`. (#374, #419) - Implement `std::io::Read` for RngCore. (#434) ## [0.1.0] - 2018-04-17 (Split out of the Rand crate, changes here are relative to rand 0.4.2.) ### Added - `RngCore` and `SeedableRng` are now part of `rand_core`. (#288) - Add modules to help implementing RNGs `impl` and `le`. (#209, #228) - Add `Error` and `ErrorKind`. (#225) - Add `CryptoRng` marker trait. (#273) - Add `BlockRngCore` trait. (#281) - Add `BlockRng` and `BlockRng64` wrappers to help implementations. (#281, #325) - Add `RngCore::try_fill_bytes`. (#225) ### Changed - Revise the `SeedableRng` trait. (#233) - Remove default implementations for `RngCore::next_u64` and `RngCore::fill_bytes`. (#288) ## [0.0.1] - 2017-09-14 (yanked) Experimental version as part of the rand crate refactor. # Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [0.4.0] - 2025-01-27 - Bump the MSRV to 1.63 (#58) - Update to `rand_core` v0.9.0 (#58) - Rename feature `serde1` to `serde` (#58) - Document how zero seeds are handled - Correctly document MSRV as 1.36 - Speed up `from_seed` implementation for 128-bit seeds - Add examples for initializing the RNGs ## [0.3.0] - 2020-12-18 - Bump `rand_core` version to 0.6 (#17) - Derive PartialEq+Eq for XorShiftRng (#6) - Bump serde to 1.0.118 so that `serde1` feature can also be no-std (#12) ## [0.2.0] - 2019-06-12 - Bump minor crate version since rand_core bump is a breaking change - Switch to Edition 2018 ## [0.1.2] - 2019-06-06 - yanked - Bump `rand_core` version - Make XorShiftRng::from_rng portable by enforcing Endianness (#815) ## [0.1.1] - 2019-01-04 - Reorganise code and tests; tweak doc ## [0.1.0] - 2018-07-16 - Pulled out of the Rand crate name: Release-plz permissions: pull-requests: write contents: write on: push: branches: - main jobs: release-plz: name: Release-plz runs-on: ubuntu-24.04 steps: - name: Checkout repository uses: actions/checkout@v4 with: fetch-depth: 0 - name: Install Rust (rustup) run: rustup update nightly --no-self-update && rustup default nightly - name: Run release-plz uses: MarcoIeni/release-plz-action@v0.5 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} # Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] ## [0.1.27](https://github.com/rust-lang/rustc-demangle/compare/rustc-demangle-v0.1.26...rustc-demangle-v0.1.27) - 2026-01-15 ### Other - Support v0 demangling of trait object types with assoc const bindings ## [0.1.26](https://github.com/rust-lang/rustc-demangle/compare/rustc-demangle-v0.1.25...rustc-demangle-v0.1.26) - 2025-07-16 ### Other - Add new v0 demangling tags for pattern types - Do not publish the `native-c` crate - Use release-plz for releases - Add a CI workflow to publish new releases after a tag is pushed # 0.0.5 - Use `NonZero` in `unescape_c_str` and `check_raw_c_str` to statically exclude nuls - Add `#[inline]` to small functions for improved performance # 0.0.4 - Add `check_raw_str`, `check_raw_byte_str`, `check_raw_c_str`, - Add `unescape_str`, `unescape_byte_str`, `unescape_c_str`, - Add `check_for_errors`, - Remove: `unescape_unicode` and `unescape_mixed` # 0.0.3 - Extend `rustc-dep-of-std` feature to include `libcore` # 0.0.2 - Add new `rustc-dep-of-std` feature to allow building `libproc-macro` # 0.0.1 - Add `EscapeError`, `MixedUnit` and `Mode` enums - Add `byte_from_char`, `unescape_byte`, `unescape_char`, `unescape_mixed` and `unescape_unicode` functions # 1.2.0 * Adds `bytes` module to support operating directly on byte strings. # 1.1.0 * Adds the `std` feature (enabled by default) * Disabling the `std` feature makes the crate work in `#![no_std]` mode, assuming presence of the `alloc` crate # 1.0.0 * Adds the `join` convenience function. * Fixes parsing of `'\\n'` to match the behavior of bash/Zsh/Python `shlex`. The result was previously `\n`, now it is `\\n`. # 0.1.1 * Adds handling of `#` comments. # 0.1.0 This is the initial release. # Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## 0.8.4 (2024-02-13) ### Changed - Assert soundness preconditions for ARMv8 key expansion ([#407], [#408]) [#407]: https://github.com/RustCrypto/block-ciphers/pull/407 [#408]: https://github.com/RustCrypto/block-ciphers/pull/408 ## 0.8.3 (2023-06-17) ### Added - Support `aes_armv8` on Rust 1.61+ using `asm!` ([#365]) [#365]: https://github.com/RustCrypto/block-ciphers/pull/365 ## 0.8.2 (2022-10-27) ### Fixed - Crate documentation around configuration flags ([#343]) [#343]: https://github.com/RustCrypto/block-ciphers/pull/343 ## 0.8.1 (2022-02-17) ### Fixed - Minimal versions build ([#303]) [#303]: https://github.com/RustCrypto/block-ciphers/pull/303 ## 0.8.0 (2022-02-10) ### Changed - Bump `cipher` dependency to v0.4 ([#284]) ### Added - Encrypt-only and decrypt-only cipher types ([#284]) [#284]: https://github.com/RustCrypto/block-ciphers/pull/284 ## 0.7.5 (2021-08-26) ### Changed - Bump `ctr` dependency to v0.8 ([#275]) - Use the `aes` target feature instead of `crypto` on ARMv8 ([#279]) - Use `core::arch::aarch64::vst1q_u8` intrinsic on `armv8` ([#280]) - Bump `cpufeatures` dependency to v0.2 ([#281]) [#275]: https://github.com/RustCrypto/block-ciphers/pull/275 [#279]: https://github.com/RustCrypto/block-ciphers/pull/279 [#280]: https://github.com/RustCrypto/block-ciphers/pull/280 [#281]: https://github.com/RustCrypto/block-ciphers/pull/281 ## 0.7.4 (2021-06-01) ### Added - Soft `hazmat` backend ([#267], [#268]) - Parallel `hazmat` APIs ([#269]) [#267]: https://github.com/RustCrypto/block-ciphers/pull/267 [#268]: https://github.com/RustCrypto/block-ciphers/pull/268 [#269]: https://github.com/RustCrypto/block-ciphers/pull/269 ## 0.7.3 (2021-05-26) ### Added - `hazmat` feature/module providing round function access ([#257], [#259], [#260]) - `BLOCK_SIZE` constant ([#263]) [#257]: https://github.com/RustCrypto/block-ciphers/pull/257 [#259]: https://github.com/RustCrypto/block-ciphers/pull/259 [#260]: https://github.com/RustCrypto/block-ciphers/pull/260 [#263]: https://github.com/RustCrypto/block-ciphers/pull/263 ## 0.7.2 (2021-05-17) ### Added - Nightly-only ARMv8 intrinsics support gated under the `armv8` feature ([#250]) [#250]: https://github.com/RustCrypto/block-ciphers/pull/250 ## 0.7.1 (2021-05-09) ### Fixed - Restore `fixslice64.rs` ([#247]) [#247]: https://github.com/RustCrypto/block-ciphers/pull/247 ## 0.7.0 (2021-04-29) ### Added - Auto-detection support for AES-NI; MSRV 1.49+ ([#208], [#214], [#215], [#216]) - `ctr` feature providing SIMD accelerated AES-CTR ([#200]) ### Changed - Unify the `aes`, `aesni`, `aes-ctr`, and `aes-soft` crates ([#200]) - Use `cfg-if` crate ([#203]) - Rename `semi_fixslice` feature to `compact` ([#204]) - Refactor NI backend ([#224], [#225]) - Bump `cipher` crate dependency to v0.3 ([#235]) - Bump `ctr` crate dependency to v0.7 ([#237]) [#200]: https://github.com/RustCrypto/block-ciphers/pull/200 [#203]: https://github.com/RustCrypto/block-ciphers/pull/203 [#204]: https://github.com/RustCrypto/block-ciphers/pull/204 [#208]: https://github.com/RustCrypto/block-ciphers/pull/208 [#214]: https://github.com/RustCrypto/block-ciphers/pull/214 [#215]: https://github.com/RustCrypto/block-ciphers/pull/215 [#216]: https://github.com/RustCrypto/block-ciphers/pull/216 [#224]: https://github.com/RustCrypto/block-ciphers/pull/224 [#225]: https://github.com/RustCrypto/block-ciphers/pull/225 [#235]: https://github.com/RustCrypto/block-ciphers/pull/235 [#237]: https://github.com/RustCrypto/block-ciphers/pull/237 ## 0.6.0 (2020-10-16) ### Changed - Replace `block-cipher`/`stream-cipher` with `cipher` crate ([#167]) [#167]: https://github.com/RustCrypto/block-ciphers/pull/167 ## 0.5.1 (2020-08-25) ### Changed - Bump `aesni` dependency to v0.9 ([#158]) [#158]: https://github.com/RustCrypto/block-ciphers/pull/158 ## 0.5.0 (2020-08-07) ### Changed - Bump `block-cipher` dependency to v0.8 ([#138]) - Bump `opaque-debug` dependency to v0.3 ([#140]) [#138]: https://github.com/RustCrypto/block-ciphers/pull/138 [#140]: https://github.com/RustCrypto/block-ciphers/pull/140 ## 0.4.0 (2020-06-05) ### Changed - Bump `block-cipher` dependency to v0.7 ([#86], [#122]) - Update to Rust 2018 edition ([#86]) [#121]: https://github.com/RustCrypto/block-ciphers/pull/122 [#86]: https://github.com/RustCrypto/block-ciphers/pull/86 ## 0.3.2 (2018-11-01) ## 0.3.1 (2018-10-04) ## 0.3.0 (2018-10-03) ## 0.2.0 (2018-07-27) ## 0.1.0 (2018-06-22) # Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## 0.9.0 (2026-04-10) ### Changed - Bump `cipher` dependency to v0.5 - Edition changed to 2024 and MSRV bumped to 1.85 ([#472]) - Refactor ARMv8 `expand_key` ([#367]) - Added `#[inline]` attributes for `KeyInit::new` impls ([#386]) - Rework backends ([#442]) - Move `Block8` to the hazmat module ([#468]) - Relax MSRV policy and allow MSRV bumps in patch releases ([#477]) - Replace inline ASM with ARMv8 intrinsics ([#380]) - Enable ARMv8 backend by default ([#395]) [#367]: https://github.com/RustCrypto/block-ciphers/pull/367 [#380]: https://github.com/RustCrypto/block-ciphers/pull/380 [#386]: https://github.com/RustCrypto/block-ciphers/pull/386 [#395]: https://github.com/RustCrypto/block-ciphers/pull/395 [#442]: https://github.com/RustCrypto/block-ciphers/pull/442 [#468]: https://github.com/RustCrypto/block-ciphers/pull/468 [#472]: https://github.com/RustCrypto/block-ciphers/pull/472 [#477]: https://github.com/RustCrypto/block-ciphers/pull/477 ## 0.8.4 (2024-02-13) ### Changed - Assert soundness preconditions for ARMv8 key expansion ([#407], [#408]) [#407]: https://github.com/RustCrypto/block-ciphers/pull/407 [#408]: https://github.com/RustCrypto/block-ciphers/pull/408 ## 0.8.3 (2023-06-17) ### Added - Support `aes_armv8` on Rust 1.61+ using `asm!` ([#365]) [#365]: https://github.com/RustCrypto/block-ciphers/pull/365 ## 0.8.2 (2022-10-27) ### Fixed - Crate documentation around configuration flags ([#343]) [#343]: https://github.com/RustCrypto/block-ciphers/pull/343 ## 0.8.1 (2022-02-17) ### Fixed - Minimal versions build ([#303]) [#303]: https://github.com/RustCrypto/block-ciphers/pull/303 ## 0.8.0 (2022-02-10) ### Changed - Bump `cipher` dependency to v0.4 ([#284]) ### Added - Encrypt-only and decrypt-only cipher types ([#284]) [#284]: https://github.com/RustCrypto/block-ciphers/pull/284 ## 0.7.5 (2021-08-26) ### Changed - Bump `ctr` dependency to v0.8 ([#275]) - Use the `aes` target feature instead of `crypto` on ARMv8 ([#279]) - Use `core::arch::aarch64::vst1q_u8` intrinsic on `armv8` ([#280]) - Bump `cpufeatures` dependency to v0.2 ([#281]) [#275]: https://github.com/RustCrypto/block-ciphers/pull/275 [#279]: https://github.com/RustCrypto/block-ciphers/pull/279 [#280]: https://github.com/RustCrypto/block-ciphers/pull/280 [#281]: https://github.com/RustCrypto/block-ciphers/pull/281 ## 0.7.4 (2021-06-01) ### Added - Soft `hazmat` backend ([#267], [#268]) - Parallel `hazmat` APIs ([#269]) [#267]: https://github.com/RustCrypto/block-ciphers/pull/267 [#268]: https://github.com/RustCrypto/block-ciphers/pull/268 [#269]: https://github.com/RustCrypto/block-ciphers/pull/269 ## 0.7.3 (2021-05-26) ### Added - `hazmat` feature/module providing round function access ([#257], [#259], [#260]) - `BLOCK_SIZE` constant ([#263]) [#257]: https://github.com/RustCrypto/block-ciphers/pull/257 [#259]: https://github.com/RustCrypto/block-ciphers/pull/259 [#260]: https://github.com/RustCrypto/block-ciphers/pull/260 [#263]: https://github.com/RustCrypto/block-ciphers/pull/263 ## 0.7.2 (2021-05-17) ### Added - Nightly-only ARMv8 intrinsics support gated under the `armv8` feature ([#250]) [#250]: https://github.com/RustCrypto/block-ciphers/pull/250 ## 0.7.1 (2021-05-09) ### Fixed - Restore `fixslice64.rs` ([#247]) [#247]: https://github.com/RustCrypto/block-ciphers/pull/247 ## 0.7.0 (2021-04-29) ### Added - Auto-detection support for AES-NI; MSRV 1.49+ ([#208], [#214], [#215], [#216]) - `ctr` feature providing SIMD accelerated AES-CTR ([#200]) ### Changed - Unify the `aes`, `aesni`, `aes-ctr`, and `aes-soft` crates ([#200]) - Use `cfg-if` crate ([#203]) - Rename `semi_fixslice` feature to `compact` ([#204]) - Refactor NI backend ([#224], [#225]) - Bump `cipher` crate dependency to v0.3 ([#235]) - Bump `ctr` crate dependency to v0.7 ([#237]) [#200]: https://github.com/RustCrypto/block-ciphers/pull/200 [#203]: https://github.com/RustCrypto/block-ciphers/pull/203 [#204]: https://github.com/RustCrypto/block-ciphers/pull/204 [#208]: https://github.com/RustCrypto/block-ciphers/pull/208 [#214]: https://github.com/RustCrypto/block-ciphers/pull/214 [#215]: https://github.com/RustCrypto/block-ciphers/pull/215 [#216]: https://github.com/RustCrypto/block-ciphers/pull/216 [#224]: https://github.com/RustCrypto/block-ciphers/pull/224 [#225]: https://github.com/RustCrypto/block-ciphers/pull/225 [#235]: https://github.com/RustCrypto/block-ciphers/pull/235 [#237]: https://github.com/RustCrypto/block-ciphers/pull/237 ## 0.6.0 (2020-10-16) ### Changed - Replace `block-cipher`/`stream-cipher` with `cipher` crate ([#167]) [#167]: https://github.com/RustCrypto/block-ciphers/pull/167 ## 0.5.1 (2020-08-25) ### Changed - Bump `aesni` dependency to v0.9 ([#158]) [#158]: https://github.com/RustCrypto/block-ciphers/pull/158 ## 0.5.0 (2020-08-07) ### Changed - Bump `block-cipher` dependency to v0.8 ([#138]) - Bump `opaque-debug` dependency to v0.3 ([#140]) [#138]: https://github.com/RustCrypto/block-ciphers/pull/138 [#140]: https://github.com/RustCrypto/block-ciphers/pull/140 ## 0.4.0 (2020-06-05) ### Changed - Bump `block-cipher` dependency to v0.7 ([#86], [#122]) - Update to Rust 2018 edition ([#86]) [#121]: https://github.com/RustCrypto/block-ciphers/pull/122 [#86]: https://github.com/RustCrypto/block-ciphers/pull/86 ## 0.3.2 (2018-11-01) ## 0.3.1 (2018-10-04) ## 0.3.0 (2018-10-03) ## 0.2.0 (2018-07-27) ## 0.1.0 (2018-06-22) # 1.9.0 * Promote certain orderings to SeqCst. Original proofs based on wrong reading of standard :-(. Expect some performance degradation (#198, #200). # 1.8.2 * Proper gate of `Pin` (since 1.39 - we are not using only `Pin`, but also `Pin::into_inner`, #197). # 1.8.1 * Some more careful orderings (#195). # 1.8.0 * Support for Pin (#185, #183). * Fix (hopefully) crash on ARM (#164). * Fix Miri check (#186, #156). * Fix support for Rust 1.31.0. * Some minor clippy lints. # 1.7.1 * Fix docs build (mutually exclusive features, #112). # 1.7.0 * Support for no-std builds with the `experimental-thread-local`. Needs nightly compiler. No stability guarantees with this feature (#93). # 1.6.0 * Fix a data race reported by MIRI. * Avoid violating stacked borrows (AFAIK these are still experimental and not normative, but better safe than sorry). (#80). * The `AccessConvert` wrapper is needed less often in practice (#77). # 1.5.1 * bug: Insufficient synchronization on weak platforms (#76). Never observed in practice (it's suspected practical weak platforms like ARM are still stronger than the model), but still technically UB. * docs: Mention triomphe's `ThinArc` around the fat-pointer limitations. # 1.5.0 * Support serde (by a feature). # 1.4.0 * Allow const-initializing ArcSwapOption (`const_empty` method). # 1.3.2 * More helpful description of the `AsRaw` trait (isn't implemented for owned `Arc`/`Option`). # 1.3.1 * Cache doc improvements. # 1.3.0 * Allow mapping of DynAccess. * Fix some lints. * Don't leave threads running in tests/doctests. It's a bad form and annoys miri. # 1.2.0 * Miri and 32 bit tests in CI. * Making the writers lock-free. Soft-removing the IndependentStrategy, as it is no longer needed (hidden and the same as the DafultStrategy). # 1.1.0 * Fix soundness bug around access::Map. Technically a breaking change, but unlikely to bite and breaking seems to be the least bad option. #45. # 1.0.0 * Remove Clone implementation. People are often confused by it and it is easy to emulate by hand in the rare case it is actually needed. # 1.0.0-rc1 * Get rid of the `load_signal_safe`. It only complicates things and it is niche; signal-hook-registry has its own simplified version. * Avoid `from_ptr(as_ptr())`. Slight change in `RefCnt::inc` which technically is API breaking change, but this one should not matter in practice. * Extend documentation about clone behaviour. * Few more traits for Guard (`From`, `Default`). * Get rid of `rcu_unwap`, the whole concept is a trap. * Hide the whole gen lock thing. * Introduce the `Strategy`, as a high level way to choose how exactly the locking happens. - Not possible to implement by downstream users just yet, or call them. - The CaS is its own trait for flexibility. * Adding the SimpleGenLock experimental strategy. - Not part of stability guarantees. # 0.4.7 * Rename the `unstable-weak` to `weak` feature. The support is now available on 1.45 (currently in beta). # 0.4.6 * Adjust to `Weak::as_ptr` from std (the weak pointer support, relying on unstable features). * Support running on miri (without some optimizations), so dependencies may run miri tests. * Little optimization when waiting out the contention on write operations. # 0.4.5 * Added `Guard::from_inner`. # 0.4.4 * Top-level docs rewrite (less rambling, hopefully more readable). # 0.4.3 * Fix the `Display` implementation on `Guard` to correctly delegate to the underlying `Display` implementation. # 0.4.2 * The Access functionality ‒ ability to pass a handle to subpart of held data to somewhere with the ability to update itself. * Mapped cache can take `FnMut` as well as `Fn`. # 0.4.1 * Mapped caches ‒ to allow giving access to parts of config only. # 0.4.0 * Support for Weak pointers. * RefCnt implemented for Rc. * Breaking: Big API cleanups. - Peek is gone. - Terminology of getting the data unified to `load`. - There's only one kind of `Guard` now. - Guard derefs to the `Arc`/`Option` or similar. - `Cache` got moved to top level of the crate. - Several now unneeded semi-internal traits and trait methods got removed. * Splitting benchmarks into a separate sub-crate. * Minor documentation improvements. # 0.3.11 * Prevention against UB due to dropping Guards and overflowing the guard counter (aborting instead, such problem is very degenerate anyway and wouldn't work in the first place). # 0.3.10 * Tweak slot allocation to take smaller performance hit if some leases are held. * Increase the number of lease slots per thread to 8. * Added a cache for faster access by keeping an already loaded instance around. # 0.3.9 * Fix Send/Sync for Guard and Lease (they were broken in the safe but uncomfortable direction ‒ not implementing them even if they could). # 0.3.8 * `Lease>::unwrap()`, `expect()` and `into_option()` for convenient use. # 0.3.7 * Use the correct `#[deprecated]` syntax. # 0.3.6 * Another locking store (`PrivateSharded`) to complement the global and private unsharded ones. * Comparison to other crates/approaches in the docs. # 0.3.5 * Updates to documentation, made it hopefully easier to digest. * Added the ability to separate gen-locks of one ArcSwapAny from others. * Some speed improvements by inlining. * Simplified the `lease` method internally, making it faster in optimistic cases. # 0.3.4 * Another potentially weak ordering discovered (with even less practical effect than the previous). # 0.3.3 * Increased potentially weak ordering (probably without any practical effect). # 0.3.2 * Documentation link fix. # 0.3.1 * Few convenience constructors. * More tests (some randomized property testing). # 0.3.0 * `compare_and_swap` no longer takes `&Guard` as current as that is a sure way to create a deadlock. * Introduced `Lease` for temporary storage, which doesn't suffer from contention like `load`, but doesn't block writes like `Guard`. The downside is it slows down with number of held by the current thread. * `compare_and_swap` and `rcu` uses leases. * Made the `ArcSwap` as small as the pointer itself, by making the shards/counters and generation ID global. This comes at a theoretical cost of more contention when different threads use different instances. # 0.2.0 * Added an `ArcSwapOption`, which allows storing NULL values (as None) as well as a valid pointer. * `compare_and_swap` accepts borrowed `Arc` as `current` and doesn't consume one ref count. * Sharding internal counters, to improve performance on read-mostly contented scenarios. * Providing `peek_signal_safe` as the only async signal safe method to use inside signal handlers. This removes the footgun with dropping the `Arc` returned from `load` inside a signal handler. # 0.1.4 * The `peek` method to use the `Arc` inside without incrementing the reference count. * Some more (and hopefully better) benchmarks. # 0.1.3 * Documentation fix (swap is *not* lock-free in current implementation). # 0.1.2 * More freedom in the `rcu` and `rcu_unwrap` return types. # 0.1.1 * `rcu` support. * `compare_and_swap` support. * Added some primitive benchmarks. # 0.1.0 * Initial implementation. # 1.9.1 * One more SeqCst :-| (#204). # 1.9.0 * Promote certain orderings to SeqCst. Original proofs based on wrong reading of standard :-(. Expect some performance degradation (#198, #200). # 1.8.2 * Proper gate of `Pin` (since 1.39 - we are not using only `Pin`, but also `Pin::into_inner`, #197). # 1.8.1 * Some more careful orderings (#195). # 1.8.0 * Support for Pin (#185, #183). * Fix (hopefully) crash on ARM (#164). * Fix Miri check (#186, #156). * Fix support for Rust 1.31.0. * Some minor clippy lints. # 1.7.1 * Fix docs build (mutually exclusive features, #112). # 1.7.0 * Support for no-std builds with the `experimental-thread-local`. Needs nightly compiler. No stability guarantees with this feature (#93). # 1.6.0 * Fix a data race reported by MIRI. * Avoid violating stacked borrows (AFAIK these are still experimental and not normative, but better safe than sorry). (#80). * The `AccessConvert` wrapper is needed less often in practice (#77). # 1.5.1 * bug: Insufficient synchronization on weak platforms (#76). Never observed in practice (it's suspected practical weak platforms like ARM are still stronger than the model), but still technically UB. * docs: Mention triomphe's `ThinArc` around the fat-pointer limitations. # 1.5.0 * Support serde (by a feature). # 1.4.0 * Allow const-initializing ArcSwapOption (`const_empty` method). # 1.3.2 * More helpful description of the `AsRaw` trait (isn't implemented for owned `Arc`/`Option`). # 1.3.1 * Cache doc improvements. # 1.3.0 * Allow mapping of DynAccess. * Fix some lints. * Don't leave threads running in tests/doctests. It's a bad form and annoys miri. # 1.2.0 * Miri and 32 bit tests in CI. * Making the writers lock-free. Soft-removing the IndependentStrategy, as it is no longer needed (hidden and the same as the DafultStrategy). # 1.1.0 * Fix soundness bug around access::Map. Technically a breaking change, but unlikely to bite and breaking seems to be the least bad option. #45. # 1.0.0 * Remove Clone implementation. People are often confused by it and it is easy to emulate by hand in the rare case it is actually needed. # 1.0.0-rc1 * Get rid of the `load_signal_safe`. It only complicates things and it is niche; signal-hook-registry has its own simplified version. * Avoid `from_ptr(as_ptr())`. Slight change in `RefCnt::inc` which technically is API breaking change, but this one should not matter in practice. * Extend documentation about clone behaviour. * Few more traits for Guard (`From`, `Default`). * Get rid of `rcu_unwap`, the whole concept is a trap. * Hide the whole gen lock thing. * Introduce the `Strategy`, as a high level way to choose how exactly the locking happens. - Not possible to implement by downstream users just yet, or call them. - The CaS is its own trait for flexibility. * Adding the SimpleGenLock experimental strategy. - Not part of stability guarantees. # 0.4.7 * Rename the `unstable-weak` to `weak` feature. The support is now available on 1.45 (currently in beta). # 0.4.6 * Adjust to `Weak::as_ptr` from std (the weak pointer support, relying on unstable features). * Support running on miri (without some optimizations), so dependencies may run miri tests. * Little optimization when waiting out the contention on write operations. # 0.4.5 * Added `Guard::from_inner`. # 0.4.4 * Top-level docs rewrite (less rambling, hopefully more readable). # 0.4.3 * Fix the `Display` implementation on `Guard` to correctly delegate to the underlying `Display` implementation. # 0.4.2 * The Access functionality ‒ ability to pass a handle to subpart of held data to somewhere with the ability to update itself. * Mapped cache can take `FnMut` as well as `Fn`. # 0.4.1 * Mapped caches ‒ to allow giving access to parts of config only. # 0.4.0 * Support for Weak pointers. * RefCnt implemented for Rc. * Breaking: Big API cleanups. - Peek is gone. - Terminology of getting the data unified to `load`. - There's only one kind of `Guard` now. - Guard derefs to the `Arc`/`Option` or similar. - `Cache` got moved to top level of the crate. - Several now unneeded semi-internal traits and trait methods got removed. * Splitting benchmarks into a separate sub-crate. * Minor documentation improvements. # 0.3.11 * Prevention against UB due to dropping Guards and overflowing the guard counter (aborting instead, such problem is very degenerate anyway and wouldn't work in the first place). # 0.3.10 * Tweak slot allocation to take smaller performance hit if some leases are held. * Increase the number of lease slots per thread to 8. * Added a cache for faster access by keeping an already loaded instance around. # 0.3.9 * Fix Send/Sync for Guard and Lease (they were broken in the safe but uncomfortable direction ‒ not implementing them even if they could). # 0.3.8 * `Lease>::unwrap()`, `expect()` and `into_option()` for convenient use. # 0.3.7 * Use the correct `#[deprecated]` syntax. # 0.3.6 * Another locking store (`PrivateSharded`) to complement the global and private unsharded ones. * Comparison to other crates/approaches in the docs. # 0.3.5 * Updates to documentation, made it hopefully easier to digest. * Added the ability to separate gen-locks of one ArcSwapAny from others. * Some speed improvements by inlining. * Simplified the `lease` method internally, making it faster in optimistic cases. # 0.3.4 * Another potentially weak ordering discovered (with even less practical effect than the previous). # 0.3.3 * Increased potentially weak ordering (probably without any practical effect). # 0.3.2 * Documentation link fix. # 0.3.1 * Few convenience constructors. * More tests (some randomized property testing). # 0.3.0 * `compare_and_swap` no longer takes `&Guard` as current as that is a sure way to create a deadlock. * Introduced `Lease` for temporary storage, which doesn't suffer from contention like `load`, but doesn't block writes like `Guard`. The downside is it slows down with number of held by the current thread. * `compare_and_swap` and `rcu` uses leases. * Made the `ArcSwap` as small as the pointer itself, by making the shards/counters and generation ID global. This comes at a theoretical cost of more contention when different threads use different instances. # 0.2.0 * Added an `ArcSwapOption`, which allows storing NULL values (as None) as well as a valid pointer. * `compare_and_swap` accepts borrowed `Arc` as `current` and doesn't consume one ref count. * Sharding internal counters, to improve performance on read-mostly contented scenarios. * Providing `peek_signal_safe` as the only async signal safe method to use inside signal handlers. This removes the footgun with dropping the `Arc` returned from `load` inside a signal handler. # 0.1.4 * The `peek` method to use the `Arc` inside without incrementing the reference count. * Some more (and hopefully better) benchmarks. # 0.1.3 * Documentation fix (swap is *not* lock-free in current implementation). # 0.1.2 * More freedom in the `rcu` and `rcu_unwrap` return types. # 0.1.1 * `rcu` support. * `compare_and_swap` support. * Added some primitive benchmarks. # 0.1.0 * Initial implementation. # Changelog Notable changes to this project should be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). The backtrace crate attempts to adhere to the modified [Cargo interpretation of SemVer](https://doc.rust-lang.org/cargo/reference/resolver.html#semver-compatibility). As a unique component of `std` it may make exceptional changes in order to support `std`. ## [Unreleased] ## [0.3.76](https://github.com/rust-lang/backtrace-rs/compare/backtrace-v0.3.75...backtrace-v0.3.76) - 2025-09-26 ### Behavior - Fix inverted polarity of "full printing" logic in rust-lang/backtrace-rs#726: Previously we used to do the opposite of what you would expect. ### Platform Support - Windows: Removed hypothetical soundness risk from padding bytes in rust-lang/backtrace-rs#737 - Fuchsia: Added appropriate alignment checks during `Elf_Nhdr` parsing in rust-lang/backtrace-rs#725 - Cygwin: Added support in rust-lang/backtrace-rs#704 - Windows (32-bit Arm): Restore support in rust-lang/backtrace-rs#685 - NuttX (32-bit Arm): Use builtin `_Unwind_GetIP` in rust-lang/backtrace-rs#692 - RTEMS: Enable libunwind in rust-lang/backtrace-rs#682 ### Dependencies - Update cpp_demangle to 0.5 in rust-lang/backtrace-rs#732 - Update memchr to 2.7.6 in rust-lang/backtrace-rs#734 - Switch from windows-targets to windows-link in rust-lang/backtrace-rs#727 - Update ruzstd to 0.8.1 in rust-lang/backtrace-rs#718 - Update object to 0.37 in rust-lang/backtrace-rs#718 - Update addr2line to 0.25 in rust-lang/backtrace-rs#718 # 2.11.0 ## What's Changed * Fix use of Result in macro output by @james7132 in https://github.com/bitflags/bitflags/pull/462 * Add methods to get the known/unknown bits from a flags value by @WaterWhisperer in https://github.com/bitflags/bitflags/pull/473 ## New Contributors * @james7132 made their first contribution in https://github.com/bitflags/bitflags/pull/462 * @WaterWhisperer made their first contribution in https://github.com/bitflags/bitflags/pull/473 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.10.0...2.11.0 # 2.10.0 ## What's Changed * Implement iterator for all named flags by @ssrlive in https://github.com/bitflags/bitflags/pull/465 * Depend on serde_core instead of serde by @KodrAus in https://github.com/bitflags/bitflags/pull/467 ## New Contributors * @ssrlive made their first contribution in https://github.com/bitflags/bitflags/pull/465 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.9.4...2.10.0 # 2.9.4 ## What's Changed * Add Cargo features to readme by @KodrAus in https://github.com/bitflags/bitflags/pull/460 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.9.3...2.9.4 # 2.9.3 ## What's Changed * Streamline generated code by @nnethercote in https://github.com/bitflags/bitflags/pull/458 ## New Contributors * @nnethercote made their first contribution in https://github.com/bitflags/bitflags/pull/458 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.9.2...2.9.3 # 2.9.2 ## What's Changed * Fix difference in the spec by @KodrAus in https://github.com/bitflags/bitflags/pull/446 * Fix up inaccurate docs on bitflags_match by @KodrAus in https://github.com/bitflags/bitflags/pull/453 * Remove rustc internal crate feature by @KodrAus in https://github.com/bitflags/bitflags/pull/454 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.9.1...2.9.2 # 2.9.1 ## What's Changed * Document Cargo features by @KodrAus in https://github.com/bitflags/bitflags/pull/444 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.9.0...2.9.1 # 2.9.0 ## What's Changed * `Flags` trait: add `clear(&mut self)` method by @wysiwys in https://github.com/bitflags/bitflags/pull/437 * Fix up UI tests by @KodrAus in https://github.com/bitflags/bitflags/pull/438 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.8.0...2.9.0 # 2.8.0 ## What's Changed * feat(core): Add bitflags_match macro for bitflag matching by @YuniqueUnic in https://github.com/bitflags/bitflags/pull/423 * Finalize bitflags_match by @KodrAus in https://github.com/bitflags/bitflags/pull/431 ## New Contributors * @YuniqueUnic made their first contribution in https://github.com/bitflags/bitflags/pull/423 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.7.0...2.8.0 # 2.7.0 ## What's Changed * Fix `clippy::doc_lazy_continuation` lints by @waywardmonkeys in https://github.com/bitflags/bitflags/pull/414 * Run clippy on extra features in CI. by @waywardmonkeys in https://github.com/bitflags/bitflags/pull/415 * Fix CI: trybuild refresh, allow some clippy restrictions. by @waywardmonkeys in https://github.com/bitflags/bitflags/pull/417 * Update zerocopy version in example by @KodrAus in https://github.com/bitflags/bitflags/pull/422 * Add method to check if unknown bits are set by @wysiwys in https://github.com/bitflags/bitflags/pull/426 * Update error messages by @KodrAus in https://github.com/bitflags/bitflags/pull/427 * Add `truncate(&mut self)` method to unset unknown bits by @wysiwys in https://github.com/bitflags/bitflags/pull/428 * Update error messages by @KodrAus in https://github.com/bitflags/bitflags/pull/429 ## New Contributors * @wysiwys made their first contribution in https://github.com/bitflags/bitflags/pull/426 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.6.0...2.7.0 # 2.6.0 ## What's Changed * Sync CHANGELOG.md with github release notes by @dextero in https://github.com/bitflags/bitflags/pull/402 * Update error messages and zerocopy by @KodrAus in https://github.com/bitflags/bitflags/pull/403 * Bump minimum declared versions of dependencies by @dextero in https://github.com/bitflags/bitflags/pull/404 * chore(deps): bump serde_derive and bytemuck versions by @joshka in https://github.com/bitflags/bitflags/pull/405 * add OSFF Scorecard workflow by @KodrAus in https://github.com/bitflags/bitflags/pull/396 * Update stderr messages by @KodrAus in https://github.com/bitflags/bitflags/pull/408 * Fix typo by @waywardmonkeys in https://github.com/bitflags/bitflags/pull/410 * Allow specifying outer attributes in impl mode by @KodrAus in https://github.com/bitflags/bitflags/pull/411 ## New Contributors * @dextero made their first contribution in https://github.com/bitflags/bitflags/pull/402 * @joshka made their first contribution in https://github.com/bitflags/bitflags/pull/405 * @waywardmonkeys made their first contribution in https://github.com/bitflags/bitflags/pull/410 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.5.0...2.6.0 # 2.5.0 ## What's Changed * Derive `Debug` for `Flag` by @tgross35 in https://github.com/bitflags/bitflags/pull/398 * Support truncating or strict-named variants of parsing and formatting by @KodrAus in https://github.com/bitflags/bitflags/pull/400 ## New Contributors * @tgross35 made their first contribution in https://github.com/bitflags/bitflags/pull/398 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.4.2...2.5.0 # 2.4.2 ## What's Changed * Cargo.toml: Anchor excludes to root of the package by @jamessan in https://github.com/bitflags/bitflags/pull/387 * Update error messages by @KodrAus in https://github.com/bitflags/bitflags/pull/390 * Add support for impl mode structs to be repr(packed) by @GnomedDev in https://github.com/bitflags/bitflags/pull/388 * Remove old `unused_tuple_struct_fields` lint by @dtolnay in https://github.com/bitflags/bitflags/pull/393 * Delete use of `local_inner_macros` by @dtolnay in https://github.com/bitflags/bitflags/pull/392 ## New Contributors * @jamessan made their first contribution in https://github.com/bitflags/bitflags/pull/387 * @GnomedDev made their first contribution in https://github.com/bitflags/bitflags/pull/388 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.4.1...2.4.2 # 2.4.1 ## What's Changed * Allow some new pedantic clippy lints by @KodrAus in https://github.com/bitflags/bitflags/pull/380 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.4.0...2.4.1 # 2.4.0 ## What's Changed * Remove html_root_url by @eldruin in https://github.com/bitflags/bitflags/pull/368 * Support unnamed flags by @KodrAus in https://github.com/bitflags/bitflags/pull/371 * Update smoke test to verify all Clippy and rustc lints by @MitMaro in https://github.com/bitflags/bitflags/pull/374 * Specify the behavior of bitflags by @KodrAus in https://github.com/bitflags/bitflags/pull/369 ## New Contributors * @eldruin made their first contribution in https://github.com/bitflags/bitflags/pull/368 * @MitMaro made their first contribution in https://github.com/bitflags/bitflags/pull/374 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.3.3...2.4.0 # 2.3.3 ## Changes to `-=` The `-=` operator was incorrectly changed to truncate bits that didn't correspond to valid flags in `2.3.0`. This has been fixed up so it once again behaves the same as `-` and `difference`. ## Changes to `!` The `!` operator previously called `Self::from_bits_truncate`, which would truncate any bits that only partially overlapped with a valid flag. It will now use `bits & Self::all().bits()`, so any bits that overlap any bits specified by any flag will be respected. This is unlikely to have any practical implications, but enables defining a flag like `const ALL = !0` as a way to signal that any bit pattern is a known set of flags. ## Changes to formatting Zero-valued flags will never be printed. You'll either get `0x0` for empty flags using debug formatting, or the set of flags with zero-valued flags omitted for others. Composite flags will no longer be redundantly printed if there are extra bits to print at the end that don't correspond to a valid flag. ## What's Changed * Fix up incorrect sub assign behavior and other cleanups by @KodrAus in https://github.com/bitflags/bitflags/pull/366 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.3.2...2.3.3 # 2.3.2 ## What's Changed * [doc] [src/lib.rs] delete redundant path prefix by @OccupyMars2025 in https://github.com/bitflags/bitflags/pull/361 ## New Contributors * @OccupyMars2025 made their first contribution in https://github.com/bitflags/bitflags/pull/361 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.3.1...2.3.2 # 2.3.1 ## What's Changed * Fix Self in flags value expressions by @KodrAus in https://github.com/bitflags/bitflags/pull/355 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.3.0...2.3.1 # 2.3.0 ## Major changes ### `BitFlags` trait deprecated in favor of `Flags` trait This release introduces the `Flags` trait and deprecates the `BitFlags` trait. These two traits are semver compatible so if you have public API code depending on `BitFlags` you can move to `Flags` without breaking end-users. This is possible because the `BitFlags` trait was never publicly implementable, so it now carries `Flags` as a supertrait. All implementations of `Flags` additionally implement `BitFlags`. The `Flags` trait is a publicly implementable version of the old `BitFlags` trait. The original `BitFlags` trait carried some macro baggage that made it difficult to implement, so a new `Flags` trait has been introduced as the _One True Trait_ for interacting with flags types generically. See the the `macro_free` and `custom_derive` examples for more details. ### `Bits` trait publicly exposed The `Bits` trait for the underlying storage of flags values is also now publicly implementable. This lets you define your own exotic backing storage for flags. See the `custom_bits_type` example for more details. ## What's Changed * Use explicit hashes for actions steps by @KodrAus in https://github.com/bitflags/bitflags/pull/350 * Support ejecting flags types from the bitflags macro by @KodrAus in https://github.com/bitflags/bitflags/pull/351 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.2.1...2.3.0 # 2.2.1 ## What's Changed * Refactor attribute filtering to apply per-flag by @KodrAus in https://github.com/bitflags/bitflags/pull/345 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.2.0...2.2.1 # 2.2.0 ## What's Changed * Create SECURITY.md by @KodrAus in https://github.com/bitflags/bitflags/pull/338 * add docs to describe the behavior of multi-bit flags by @nicholasbishop in https://github.com/bitflags/bitflags/pull/340 * Add support for bytemuck by @KodrAus in https://github.com/bitflags/bitflags/pull/336 * Add a top-level macro for filtering attributes by @KodrAus in https://github.com/bitflags/bitflags/pull/341 ## New Contributors * @nicholasbishop made their first contribution in https://github.com/bitflags/bitflags/pull/340 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.1.0...2.2.0 # 2.1.0 ## What's Changed * Add docs for the internal Field0 and examples of formatting/parsing by @KodrAus in https://github.com/bitflags/bitflags/pull/328 * Add support for arbitrary by @KodrAus in https://github.com/bitflags/bitflags/pull/324 * Fix up missing docs for consts within consts by @KodrAus in https://github.com/bitflags/bitflags/pull/330 * Ignore clippy lint in generated code by @Jake-Shadle in https://github.com/bitflags/bitflags/pull/331 ## New Contributors * @Jake-Shadle made their first contribution in https://github.com/bitflags/bitflags/pull/331 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.0.2...2.1.0 # 2.0.2 ## What's Changed * Fix up missing isize and usize Bits impls by @KodrAus in https://github.com/bitflags/bitflags/pull/321 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.0.1...2.0.2 # 2.0.1 ## What's Changed * Fix up some docs issues by @KodrAus in https://github.com/bitflags/bitflags/pull/309 * Make empty_flag() const. by @tormeh in https://github.com/bitflags/bitflags/pull/313 * Fix formatting of multi-bit flags with partial overlap by @KodrAus in https://github.com/bitflags/bitflags/pull/316 ## New Contributors * @tormeh made their first contribution in https://github.com/bitflags/bitflags/pull/313 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.0.0...2.0.1 # 2.0.0 ## Major changes This release includes some major changes over `1.x`. If you use `bitflags!` types in your public API then upgrading this library may cause breakage in your downstream users. ### ⚠️ Serialization You'll need to add the `serde` Cargo feature in order to `#[derive(Serialize, Deserialize)]` on your generated flags types: ```rust bitflags! { #[derive(Serialize, Deserialize)] #[serde(transparent)] pub struct Flags: T { .. } } ``` where `T` is the underlying bits type you're using, such as `u32`. The default serialization format with `serde` **has changed** if you `#[derive(Serialize, Deserialize)]` on your generated flags types. It will now use a formatted string for human-readable formats and the underlying bits type for compact formats. To keep the old format, see the https://github.com/KodrAus/bitflags-serde-legacy library. ### ⚠️ Traits Generated flags types now derive fewer traits. If you need to maintain backwards compatibility, you can derive the following yourself: ```rust #[derive(PartialEq, Eq, PartialOrd, Ord, Hash, Debug, Clone, Copy)] ``` ### ⚠️ Methods The unsafe `from_bits_unchecked` method is now a safe `from_bits_retain` method. You can add the following method to your generated types to keep them compatible: ```rust #[deprecated = "use the safe `from_bits_retain` method instead"] pub unsafe fn from_bits_unchecked(bits: T) -> Self { Self::from_bits_retain(bits) } ``` where `T` is the underlying bits type you're using, such as `u32`. ### ⚠️ `.bits` field You can now use the `.bits()` method instead of the old `.bits`. The representation of generated flags types has changed from a struct with the single field `bits` to a newtype. ## What's Changed * Fix a typo and call out MSRV bump by @KodrAus in https://github.com/bitflags/bitflags/pull/259 * BitFlags trait by @arturoc in https://github.com/bitflags/bitflags/pull/220 * Add a hidden trait to discourage manual impls of BitFlags by @KodrAus in https://github.com/bitflags/bitflags/pull/261 * Sanitize `Ok` by @konsumlamm in https://github.com/bitflags/bitflags/pull/266 * Fix bug in `Debug` implementation by @konsumlamm in https://github.com/bitflags/bitflags/pull/268 * Fix a typo in the generated documentation by @wackbyte in https://github.com/bitflags/bitflags/pull/271 * Use SPDX license format by @atouchet in https://github.com/bitflags/bitflags/pull/272 * serde tests fail in CI by @arturoc in https://github.com/bitflags/bitflags/pull/277 * Fix beta test output by @KodrAus in https://github.com/bitflags/bitflags/pull/279 * Add example to the README.md file by @tiaanl in https://github.com/bitflags/bitflags/pull/270 * Iterator over all the enabled options by @arturoc in https://github.com/bitflags/bitflags/pull/278 * from_bits_(truncate) fail with composite flags by @arturoc in https://github.com/bitflags/bitflags/pull/276 * Add more platform coverage to CI by @KodrAus in https://github.com/bitflags/bitflags/pull/280 * rework the way cfgs are handled by @KodrAus in https://github.com/bitflags/bitflags/pull/281 * Split generated code into two types by @KodrAus in https://github.com/bitflags/bitflags/pull/282 * expose bitflags iters using nameable types by @KodrAus in https://github.com/bitflags/bitflags/pull/286 * Support creating flags from their names by @KodrAus in https://github.com/bitflags/bitflags/pull/287 * Update README.md by @KodrAus in https://github.com/bitflags/bitflags/pull/288 * Prepare for 2.0.0-rc.1 release by @KodrAus in https://github.com/bitflags/bitflags/pull/289 * Add missing "if" to contains doc-comment in traits.rs by @rusty-snake in https://github.com/bitflags/bitflags/pull/291 * Forbid unsafe_code by @fintelia in https://github.com/bitflags/bitflags/pull/294 * serde: enable no-std support by @nim65s in https://github.com/bitflags/bitflags/pull/296 * Add a parser for flags formatted as bar-separated-values by @KodrAus in https://github.com/bitflags/bitflags/pull/297 * Prepare for 2.0.0-rc.2 release by @KodrAus in https://github.com/bitflags/bitflags/pull/299 * Use strip_prefix instead of starts_with + slice by @QuinnPainter in https://github.com/bitflags/bitflags/pull/301 * Fix up some clippy lints by @KodrAus in https://github.com/bitflags/bitflags/pull/302 * Prepare for 2.0.0-rc.3 release by @KodrAus in https://github.com/bitflags/bitflags/pull/303 * feat: Add minimum permissions to rust.yml workflow by @gabibguti in https://github.com/bitflags/bitflags/pull/305 ## New Contributors * @wackbyte made their first contribution in https://github.com/bitflags/bitflags/pull/271 * @atouchet made their first contribution in https://github.com/bitflags/bitflags/pull/272 * @tiaanl made their first contribution in https://github.com/bitflags/bitflags/pull/270 * @rusty-snake made their first contribution in https://github.com/bitflags/bitflags/pull/291 * @fintelia made their first contribution in https://github.com/bitflags/bitflags/pull/294 * @nim65s made their first contribution in https://github.com/bitflags/bitflags/pull/296 * @QuinnPainter made their first contribution in https://github.com/bitflags/bitflags/pull/301 * @gabibguti made their first contribution in https://github.com/bitflags/bitflags/pull/305 **Full Changelog**: https://github.com/bitflags/bitflags/compare/1.3.2...2.0.0 # 2.0.0-rc.3 ## What's Changed * Use strip_prefix instead of starts_with + slice by @QuinnPainter in https://github.com/bitflags/bitflags/pull/301 * Fix up some clippy lints by @KodrAus in https://github.com/bitflags/bitflags/pull/302 ## New Contributors * @QuinnPainter made their first contribution in https://github.com/bitflags/bitflags/pull/301 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.0.0-rc.2...2.0.0-rc.3 # 2.0.0-rc.2 ## Changes to `serde` serialization **⚠️ NOTE ⚠️** This release changes the default serialization you'll get if you `#[derive(Serialize, Deserialize)]` on your generated flags types. It will now use a formatted string for human-readable formats and the underlying bits type for compact formats. To keep the old behavior, see the [`bitflags-serde-legacy`](https://github.com/KodrAus/bitflags-serde-legacy) library. ## What's Changed * Add missing "if" to contains doc-comment in traits.rs by @rusty-snake in https://github.com/bitflags/bitflags/pull/291 * Forbid unsafe_code by @fintelia in https://github.com/bitflags/bitflags/pull/294 * serde: enable no-std support by @nim65s in https://github.com/bitflags/bitflags/pull/296 * Add a parser for flags formatted as bar-separated-values by @KodrAus in https://github.com/bitflags/bitflags/pull/297 ## New Contributors * @rusty-snake made their first contribution in https://github.com/bitflags/bitflags/pull/291 * @fintelia made their first contribution in https://github.com/bitflags/bitflags/pull/294 * @nim65s made their first contribution in https://github.com/bitflags/bitflags/pull/296 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.0.0-rc.1...2.0.0-rc.2 # 2.0.0-rc.1 This is a big release including a few years worth of work on a new `BitFlags` trait, iteration, and better macro organization for future extensibility. ## What's Changed * Fix a typo and call out MSRV bump by @KodrAus in https://github.com/bitflags/bitflags/pull/259 * BitFlags trait by @arturoc in https://github.com/bitflags/bitflags/pull/220 * Add a hidden trait to discourage manual impls of BitFlags by @KodrAus in https://github.com/bitflags/bitflags/pull/261 * Sanitize `Ok` by @konsumlamm in https://github.com/bitflags/bitflags/pull/266 * Fix bug in `Debug` implementation by @konsumlamm in https://github.com/bitflags/bitflags/pull/268 * Fix a typo in the generated documentation by @wackbyte in https://github.com/bitflags/bitflags/pull/271 * Use SPDX license format by @atouchet in https://github.com/bitflags/bitflags/pull/272 * serde tests fail in CI by @arturoc in https://github.com/bitflags/bitflags/pull/277 * Fix beta test output by @KodrAus in https://github.com/bitflags/bitflags/pull/279 * Add example to the README.md file by @tiaanl in https://github.com/bitflags/bitflags/pull/270 * Iterator over all the enabled options by @arturoc in https://github.com/bitflags/bitflags/pull/278 * from_bits_(truncate) fail with composite flags by @arturoc in https://github.com/bitflags/bitflags/pull/276 * Add more platform coverage to CI by @KodrAus in https://github.com/bitflags/bitflags/pull/280 * rework the way cfgs are handled by @KodrAus in https://github.com/bitflags/bitflags/pull/281 * Split generated code into two types by @KodrAus in https://github.com/bitflags/bitflags/pull/282 * expose bitflags iters using nameable types by @KodrAus in https://github.com/bitflags/bitflags/pull/286 * Support creating flags from their names by @KodrAus in https://github.com/bitflags/bitflags/pull/287 * Update README.md by @KodrAus in https://github.com/bitflags/bitflags/pull/288 ## New Contributors * @wackbyte made their first contribution in https://github.com/bitflags/bitflags/pull/271 * @atouchet made their first contribution in https://github.com/bitflags/bitflags/pull/272 * @tiaanl made their first contribution in https://github.com/bitflags/bitflags/pull/270 **Full Changelog**: https://github.com/bitflags/bitflags/compare/1.3.2...2.0.0-rc.1 # 1.3.2 - Allow `non_snake_case` in generated flags types ([#256]) [#256]: https://github.com/bitflags/bitflags/pull/256 # 1.3.1 - Revert unconditional `#[repr(transparent)]` ([#252]) [#252]: https://github.com/bitflags/bitflags/pull/252 # 1.3.0 (yanked) **This release bumps the Minimum Supported Rust Version to `1.46.0`** - Add `#[repr(transparent)]` ([#187]) - End `empty` doc comment with full stop ([#202]) - Fix typo in crate root docs ([#206]) - Document from_bits_unchecked unsafety ([#207]) - Let `is_all` ignore extra bits ([#211]) - Allows empty flag definition ([#225]) - Making crate accessible from std ([#227]) - Make `from_bits` a const fn ([#229]) - Allow multiple bitflags structs in one macro invocation ([#235]) - Add named functions to perform set operations ([#244]) - Fix typos in method docs ([#245]) - Modernization of the `bitflags` macro to take advantage of newer features and 2018 idioms ([#246]) - Fix regression (in an unreleased feature) and simplify tests ([#247]) - Use `Self` and fix bug when overriding `stringify!` ([#249]) [#187]: https://github.com/bitflags/bitflags/pull/187 [#202]: https://github.com/bitflags/bitflags/pull/202 [#206]: https://github.com/bitflags/bitflags/pull/206 [#207]: https://github.com/bitflags/bitflags/pull/207 [#211]: https://github.com/bitflags/bitflags/pull/211 [#225]: https://github.com/bitflags/bitflags/pull/225 [#227]: https://github.com/bitflags/bitflags/pull/227 [#229]: https://github.com/bitflags/bitflags/pull/229 [#235]: https://github.com/bitflags/bitflags/pull/235 [#244]: https://github.com/bitflags/bitflags/pull/244 [#245]: https://github.com/bitflags/bitflags/pull/245 [#246]: https://github.com/bitflags/bitflags/pull/246 [#247]: https://github.com/bitflags/bitflags/pull/247 [#249]: https://github.com/bitflags/bitflags/pull/249 # 1.2.1 - Remove extraneous `#[inline]` attributes ([#194]) [#194]: https://github.com/bitflags/bitflags/pull/194 # 1.2.0 - Fix typo: {Lower, Upper}Exp - {Lower, Upper}Hex ([#183]) - Add support for "unknown" bits ([#188]) [#183]: https://github.com/rust-lang-nursery/bitflags/pull/183 [#188]: https://github.com/rust-lang-nursery/bitflags/pull/188 # 1.1.0 This is a re-release of `1.0.5`, which was yanked due to a bug in the RLS. # 1.0.5 - Use compiletest_rs flags supported by stable toolchain ([#171]) - Put the user provided attributes first ([#173]) - Make bitflags methods `const` on newer compilers ([#175]) [#171]: https://github.com/rust-lang-nursery/bitflags/pull/171 [#173]: https://github.com/rust-lang-nursery/bitflags/pull/173 [#175]: https://github.com/rust-lang-nursery/bitflags/pull/175 # 1.0.4 - Support Rust 2018 style macro imports ([#165]) ```rust use bitflags::bitflags; ``` [#165]: https://github.com/rust-lang-nursery/bitflags/pull/165 # 1.0.3 - Improve zero value flag handling and documentation ([#157]) [#157]: https://github.com/rust-lang-nursery/bitflags/pull/157 # 1.0.2 - 30% improvement in compile time of bitflags crate ([#156]) - Documentation improvements ([#153]) - Implementation cleanup ([#149]) [#156]: https://github.com/rust-lang-nursery/bitflags/pull/156 [#153]: https://github.com/rust-lang-nursery/bitflags/pull/153 [#149]: https://github.com/rust-lang-nursery/bitflags/pull/149 # 1.0.1 - Add support for `pub(restricted)` specifier on the bitflags struct ([#135]) - Optimize performance of `all()` when called from a separate crate ([#136]) [#135]: https://github.com/rust-lang-nursery/bitflags/pull/135 [#136]: https://github.com/rust-lang-nursery/bitflags/pull/136 # 1.0.0 - **[breaking change]** Macro now generates [associated constants](https://doc.rust-lang.org/reference/items.html#associated-constants) ([#24]) - **[breaking change]** Minimum supported version is Rust **1.20**, due to usage of associated constants - After being broken in 0.9, the `#[deprecated]` attribute is now supported again ([#112]) - Other improvements to unit tests and documentation ([#106] and [#115]) [#24]: https://github.com/rust-lang-nursery/bitflags/pull/24 [#106]: https://github.com/rust-lang-nursery/bitflags/pull/106 [#112]: https://github.com/rust-lang-nursery/bitflags/pull/112 [#115]: https://github.com/rust-lang-nursery/bitflags/pull/115 ## How to update your code to use associated constants Assuming the following structure definition: ```rust bitflags! { struct Something: u8 { const FOO = 0b01, const BAR = 0b10 } } ``` In 0.9 and older you could do: ```rust let x = FOO.bits | BAR.bits; ``` Now you must use: ```rust let x = Something::FOO.bits | Something::BAR.bits; ``` # 0.9.1 - Fix the implementation of `Formatting` traits when other formatting traits were present in scope ([#105]) [#105]: https://github.com/rust-lang-nursery/bitflags/pull/105 # 0.9.0 - **[breaking change]** Use struct keyword instead of flags to define bitflag types ([#84]) - **[breaking change]** Terminate const items with semicolons instead of commas ([#87]) - Implement the `Hex`, `Octal`, and `Binary` formatting traits ([#86]) - Printing an empty flag value with the `Debug` trait now prints "(empty)" instead of nothing ([#85]) - The `bitflags!` macro can now be used inside of a fn body, to define a type local to that function ([#74]) [#74]: https://github.com/rust-lang-nursery/bitflags/pull/74 [#84]: https://github.com/rust-lang-nursery/bitflags/pull/84 [#85]: https://github.com/rust-lang-nursery/bitflags/pull/85 [#86]: https://github.com/rust-lang-nursery/bitflags/pull/86 [#87]: https://github.com/rust-lang-nursery/bitflags/pull/87 # 0.8.2 - Update feature flag used when building bitflags as a dependency of the Rust toolchain # 0.8.1 - Allow bitflags to be used as a dependency of the Rust toolchain # 0.8.0 - Add support for the experimental `i128` and `u128` integer types ([#57]) - Add set method: `flags.set(SOME_FLAG, true)` or `flags.set(SOME_FLAG, false)` ([#55]) This may break code that defines its own set method [#55]: https://github.com/rust-lang-nursery/bitflags/pull/55 [#57]: https://github.com/rust-lang-nursery/bitflags/pull/57 # 0.7.1 *(yanked)* # 0.7.0 - Implement the Extend trait ([#49]) - Allow definitions inside the `bitflags!` macro to refer to items imported from other modules ([#51]) [#49]: https://github.com/rust-lang-nursery/bitflags/pull/49 [#51]: https://github.com/rust-lang-nursery/bitflags/pull/51 # 0.6.0 - The `no_std` feature was removed as it is now the default - The `assignment_operators` feature was remove as it is now enabled by default - Some clippy suggestions have been applied # 2.11.1 ## What's Changed * Bless compile-fail tests for current beta by @DanielEScherzer in https://github.com/bitflags/bitflags/pull/478 * example_generated.rs: add missing third slash for doc comment by @DanielEScherzer in https://github.com/bitflags/bitflags/pull/477 * Clarify self and other in method docs by @KodrAus in https://github.com/bitflags/bitflags/pull/481 ## New Contributors * @DanielEScherzer made their first contribution in https://github.com/bitflags/bitflags/pull/478 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.11.0...2.11.1 # 2.11.0 ## What's Changed * Fix use of Result in macro output by @james7132 in https://github.com/bitflags/bitflags/pull/462 * Add methods to get the known/unknown bits from a flags value by @WaterWhisperer in https://github.com/bitflags/bitflags/pull/473 ## New Contributors * @james7132 made their first contribution in https://github.com/bitflags/bitflags/pull/462 * @WaterWhisperer made their first contribution in https://github.com/bitflags/bitflags/pull/473 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.10.0...2.11.0 # 2.10.0 ## What's Changed * Implement iterator for all named flags by @ssrlive in https://github.com/bitflags/bitflags/pull/465 * Depend on serde_core instead of serde by @KodrAus in https://github.com/bitflags/bitflags/pull/467 ## New Contributors * @ssrlive made their first contribution in https://github.com/bitflags/bitflags/pull/465 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.9.4...2.10.0 # 2.9.4 ## What's Changed * Add Cargo features to readme by @KodrAus in https://github.com/bitflags/bitflags/pull/460 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.9.3...2.9.4 # 2.9.3 ## What's Changed * Streamline generated code by @nnethercote in https://github.com/bitflags/bitflags/pull/458 ## New Contributors * @nnethercote made their first contribution in https://github.com/bitflags/bitflags/pull/458 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.9.2...2.9.3 # 2.9.2 ## What's Changed * Fix difference in the spec by @KodrAus in https://github.com/bitflags/bitflags/pull/446 * Fix up inaccurate docs on bitflags_match by @KodrAus in https://github.com/bitflags/bitflags/pull/453 * Remove rustc internal crate feature by @KodrAus in https://github.com/bitflags/bitflags/pull/454 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.9.1...2.9.2 # 2.9.1 ## What's Changed * Document Cargo features by @KodrAus in https://github.com/bitflags/bitflags/pull/444 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.9.0...2.9.1 # 2.9.0 ## What's Changed * `Flags` trait: add `clear(&mut self)` method by @wysiwys in https://github.com/bitflags/bitflags/pull/437 * Fix up UI tests by @KodrAus in https://github.com/bitflags/bitflags/pull/438 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.8.0...2.9.0 # 2.8.0 ## What's Changed * feat(core): Add bitflags_match macro for bitflag matching by @YuniqueUnic in https://github.com/bitflags/bitflags/pull/423 * Finalize bitflags_match by @KodrAus in https://github.com/bitflags/bitflags/pull/431 ## New Contributors * @YuniqueUnic made their first contribution in https://github.com/bitflags/bitflags/pull/423 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.7.0...2.8.0 # 2.7.0 ## What's Changed * Fix `clippy::doc_lazy_continuation` lints by @waywardmonkeys in https://github.com/bitflags/bitflags/pull/414 * Run clippy on extra features in CI. by @waywardmonkeys in https://github.com/bitflags/bitflags/pull/415 * Fix CI: trybuild refresh, allow some clippy restrictions. by @waywardmonkeys in https://github.com/bitflags/bitflags/pull/417 * Update zerocopy version in example by @KodrAus in https://github.com/bitflags/bitflags/pull/422 * Add method to check if unknown bits are set by @wysiwys in https://github.com/bitflags/bitflags/pull/426 * Update error messages by @KodrAus in https://github.com/bitflags/bitflags/pull/427 * Add `truncate(&mut self)` method to unset unknown bits by @wysiwys in https://github.com/bitflags/bitflags/pull/428 * Update error messages by @KodrAus in https://github.com/bitflags/bitflags/pull/429 ## New Contributors * @wysiwys made their first contribution in https://github.com/bitflags/bitflags/pull/426 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.6.0...2.7.0 # 2.6.0 ## What's Changed * Sync CHANGELOG.md with github release notes by @dextero in https://github.com/bitflags/bitflags/pull/402 * Update error messages and zerocopy by @KodrAus in https://github.com/bitflags/bitflags/pull/403 * Bump minimum declared versions of dependencies by @dextero in https://github.com/bitflags/bitflags/pull/404 * chore(deps): bump serde_derive and bytemuck versions by @joshka in https://github.com/bitflags/bitflags/pull/405 * add OSFF Scorecard workflow by @KodrAus in https://github.com/bitflags/bitflags/pull/396 * Update stderr messages by @KodrAus in https://github.com/bitflags/bitflags/pull/408 * Fix typo by @waywardmonkeys in https://github.com/bitflags/bitflags/pull/410 * Allow specifying outer attributes in impl mode by @KodrAus in https://github.com/bitflags/bitflags/pull/411 ## New Contributors * @dextero made their first contribution in https://github.com/bitflags/bitflags/pull/402 * @joshka made their first contribution in https://github.com/bitflags/bitflags/pull/405 * @waywardmonkeys made their first contribution in https://github.com/bitflags/bitflags/pull/410 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.5.0...2.6.0 # 2.5.0 ## What's Changed * Derive `Debug` for `Flag` by @tgross35 in https://github.com/bitflags/bitflags/pull/398 * Support truncating or strict-named variants of parsing and formatting by @KodrAus in https://github.com/bitflags/bitflags/pull/400 ## New Contributors * @tgross35 made their first contribution in https://github.com/bitflags/bitflags/pull/398 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.4.2...2.5.0 # 2.4.2 ## What's Changed * Cargo.toml: Anchor excludes to root of the package by @jamessan in https://github.com/bitflags/bitflags/pull/387 * Update error messages by @KodrAus in https://github.com/bitflags/bitflags/pull/390 * Add support for impl mode structs to be repr(packed) by @GnomedDev in https://github.com/bitflags/bitflags/pull/388 * Remove old `unused_tuple_struct_fields` lint by @dtolnay in https://github.com/bitflags/bitflags/pull/393 * Delete use of `local_inner_macros` by @dtolnay in https://github.com/bitflags/bitflags/pull/392 ## New Contributors * @jamessan made their first contribution in https://github.com/bitflags/bitflags/pull/387 * @GnomedDev made their first contribution in https://github.com/bitflags/bitflags/pull/388 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.4.1...2.4.2 # 2.4.1 ## What's Changed * Allow some new pedantic clippy lints by @KodrAus in https://github.com/bitflags/bitflags/pull/380 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.4.0...2.4.1 # 2.4.0 ## What's Changed * Remove html_root_url by @eldruin in https://github.com/bitflags/bitflags/pull/368 * Support unnamed flags by @KodrAus in https://github.com/bitflags/bitflags/pull/371 * Update smoke test to verify all Clippy and rustc lints by @MitMaro in https://github.com/bitflags/bitflags/pull/374 * Specify the behavior of bitflags by @KodrAus in https://github.com/bitflags/bitflags/pull/369 ## New Contributors * @eldruin made their first contribution in https://github.com/bitflags/bitflags/pull/368 * @MitMaro made their first contribution in https://github.com/bitflags/bitflags/pull/374 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.3.3...2.4.0 # 2.3.3 ## Changes to `-=` The `-=` operator was incorrectly changed to truncate bits that didn't correspond to valid flags in `2.3.0`. This has been fixed up so it once again behaves the same as `-` and `difference`. ## Changes to `!` The `!` operator previously called `Self::from_bits_truncate`, which would truncate any bits that only partially overlapped with a valid flag. It will now use `bits & Self::all().bits()`, so any bits that overlap any bits specified by any flag will be respected. This is unlikely to have any practical implications, but enables defining a flag like `const ALL = !0` as a way to signal that any bit pattern is a known set of flags. ## Changes to formatting Zero-valued flags will never be printed. You'll either get `0x0` for empty flags using debug formatting, or the set of flags with zero-valued flags omitted for others. Composite flags will no longer be redundantly printed if there are extra bits to print at the end that don't correspond to a valid flag. ## What's Changed * Fix up incorrect sub assign behavior and other cleanups by @KodrAus in https://github.com/bitflags/bitflags/pull/366 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.3.2...2.3.3 # 2.3.2 ## What's Changed * [doc] [src/lib.rs] delete redundant path prefix by @OccupyMars2025 in https://github.com/bitflags/bitflags/pull/361 ## New Contributors * @OccupyMars2025 made their first contribution in https://github.com/bitflags/bitflags/pull/361 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.3.1...2.3.2 # 2.3.1 ## What's Changed * Fix Self in flags value expressions by @KodrAus in https://github.com/bitflags/bitflags/pull/355 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.3.0...2.3.1 # 2.3.0 ## Major changes ### `BitFlags` trait deprecated in favor of `Flags` trait This release introduces the `Flags` trait and deprecates the `BitFlags` trait. These two traits are semver compatible so if you have public API code depending on `BitFlags` you can move to `Flags` without breaking end-users. This is possible because the `BitFlags` trait was never publicly implementable, so it now carries `Flags` as a supertrait. All implementations of `Flags` additionally implement `BitFlags`. The `Flags` trait is a publicly implementable version of the old `BitFlags` trait. The original `BitFlags` trait carried some macro baggage that made it difficult to implement, so a new `Flags` trait has been introduced as the _One True Trait_ for interacting with flags types generically. See the the `macro_free` and `custom_derive` examples for more details. ### `Bits` trait publicly exposed The `Bits` trait for the underlying storage of flags values is also now publicly implementable. This lets you define your own exotic backing storage for flags. See the `custom_bits_type` example for more details. ## What's Changed * Use explicit hashes for actions steps by @KodrAus in https://github.com/bitflags/bitflags/pull/350 * Support ejecting flags types from the bitflags macro by @KodrAus in https://github.com/bitflags/bitflags/pull/351 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.2.1...2.3.0 # 2.2.1 ## What's Changed * Refactor attribute filtering to apply per-flag by @KodrAus in https://github.com/bitflags/bitflags/pull/345 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.2.0...2.2.1 # 2.2.0 ## What's Changed * Create SECURITY.md by @KodrAus in https://github.com/bitflags/bitflags/pull/338 * add docs to describe the behavior of multi-bit flags by @nicholasbishop in https://github.com/bitflags/bitflags/pull/340 * Add support for bytemuck by @KodrAus in https://github.com/bitflags/bitflags/pull/336 * Add a top-level macro for filtering attributes by @KodrAus in https://github.com/bitflags/bitflags/pull/341 ## New Contributors * @nicholasbishop made their first contribution in https://github.com/bitflags/bitflags/pull/340 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.1.0...2.2.0 # 2.1.0 ## What's Changed * Add docs for the internal Field0 and examples of formatting/parsing by @KodrAus in https://github.com/bitflags/bitflags/pull/328 * Add support for arbitrary by @KodrAus in https://github.com/bitflags/bitflags/pull/324 * Fix up missing docs for consts within consts by @KodrAus in https://github.com/bitflags/bitflags/pull/330 * Ignore clippy lint in generated code by @Jake-Shadle in https://github.com/bitflags/bitflags/pull/331 ## New Contributors * @Jake-Shadle made their first contribution in https://github.com/bitflags/bitflags/pull/331 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.0.2...2.1.0 # 2.0.2 ## What's Changed * Fix up missing isize and usize Bits impls by @KodrAus in https://github.com/bitflags/bitflags/pull/321 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.0.1...2.0.2 # 2.0.1 ## What's Changed * Fix up some docs issues by @KodrAus in https://github.com/bitflags/bitflags/pull/309 * Make empty_flag() const. by @tormeh in https://github.com/bitflags/bitflags/pull/313 * Fix formatting of multi-bit flags with partial overlap by @KodrAus in https://github.com/bitflags/bitflags/pull/316 ## New Contributors * @tormeh made their first contribution in https://github.com/bitflags/bitflags/pull/313 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.0.0...2.0.1 # 2.0.0 ## Major changes This release includes some major changes over `1.x`. If you use `bitflags!` types in your public API then upgrading this library may cause breakage in your downstream users. ### ⚠️ Serialization You'll need to add the `serde` Cargo feature in order to `#[derive(Serialize, Deserialize)]` on your generated flags types: ```rust bitflags! { #[derive(Serialize, Deserialize)] #[serde(transparent)] pub struct Flags: T { .. } } ``` where `T` is the underlying bits type you're using, such as `u32`. The default serialization format with `serde` **has changed** if you `#[derive(Serialize, Deserialize)]` on your generated flags types. It will now use a formatted string for human-readable formats and the underlying bits type for compact formats. To keep the old format, see the https://github.com/KodrAus/bitflags-serde-legacy library. ### ⚠️ Traits Generated flags types now derive fewer traits. If you need to maintain backwards compatibility, you can derive the following yourself: ```rust #[derive(PartialEq, Eq, PartialOrd, Ord, Hash, Debug, Clone, Copy)] ``` ### ⚠️ Methods The unsafe `from_bits_unchecked` method is now a safe `from_bits_retain` method. You can add the following method to your generated types to keep them compatible: ```rust #[deprecated = "use the safe `from_bits_retain` method instead"] pub unsafe fn from_bits_unchecked(bits: T) -> Self { Self::from_bits_retain(bits) } ``` where `T` is the underlying bits type you're using, such as `u32`. ### ⚠️ `.bits` field You can now use the `.bits()` method instead of the old `.bits`. The representation of generated flags types has changed from a struct with the single field `bits` to a newtype. ## What's Changed * Fix a typo and call out MSRV bump by @KodrAus in https://github.com/bitflags/bitflags/pull/259 * BitFlags trait by @arturoc in https://github.com/bitflags/bitflags/pull/220 * Add a hidden trait to discourage manual impls of BitFlags by @KodrAus in https://github.com/bitflags/bitflags/pull/261 * Sanitize `Ok` by @konsumlamm in https://github.com/bitflags/bitflags/pull/266 * Fix bug in `Debug` implementation by @konsumlamm in https://github.com/bitflags/bitflags/pull/268 * Fix a typo in the generated documentation by @wackbyte in https://github.com/bitflags/bitflags/pull/271 * Use SPDX license format by @atouchet in https://github.com/bitflags/bitflags/pull/272 * serde tests fail in CI by @arturoc in https://github.com/bitflags/bitflags/pull/277 * Fix beta test output by @KodrAus in https://github.com/bitflags/bitflags/pull/279 * Add example to the README.md file by @tiaanl in https://github.com/bitflags/bitflags/pull/270 * Iterator over all the enabled options by @arturoc in https://github.com/bitflags/bitflags/pull/278 * from_bits_(truncate) fail with composite flags by @arturoc in https://github.com/bitflags/bitflags/pull/276 * Add more platform coverage to CI by @KodrAus in https://github.com/bitflags/bitflags/pull/280 * rework the way cfgs are handled by @KodrAus in https://github.com/bitflags/bitflags/pull/281 * Split generated code into two types by @KodrAus in https://github.com/bitflags/bitflags/pull/282 * expose bitflags iters using nameable types by @KodrAus in https://github.com/bitflags/bitflags/pull/286 * Support creating flags from their names by @KodrAus in https://github.com/bitflags/bitflags/pull/287 * Update README.md by @KodrAus in https://github.com/bitflags/bitflags/pull/288 * Prepare for 2.0.0-rc.1 release by @KodrAus in https://github.com/bitflags/bitflags/pull/289 * Add missing "if" to contains doc-comment in traits.rs by @rusty-snake in https://github.com/bitflags/bitflags/pull/291 * Forbid unsafe_code by @fintelia in https://github.com/bitflags/bitflags/pull/294 * serde: enable no-std support by @nim65s in https://github.com/bitflags/bitflags/pull/296 * Add a parser for flags formatted as bar-separated-values by @KodrAus in https://github.com/bitflags/bitflags/pull/297 * Prepare for 2.0.0-rc.2 release by @KodrAus in https://github.com/bitflags/bitflags/pull/299 * Use strip_prefix instead of starts_with + slice by @QuinnPainter in https://github.com/bitflags/bitflags/pull/301 * Fix up some clippy lints by @KodrAus in https://github.com/bitflags/bitflags/pull/302 * Prepare for 2.0.0-rc.3 release by @KodrAus in https://github.com/bitflags/bitflags/pull/303 * feat: Add minimum permissions to rust.yml workflow by @gabibguti in https://github.com/bitflags/bitflags/pull/305 ## New Contributors * @wackbyte made their first contribution in https://github.com/bitflags/bitflags/pull/271 * @atouchet made their first contribution in https://github.com/bitflags/bitflags/pull/272 * @tiaanl made their first contribution in https://github.com/bitflags/bitflags/pull/270 * @rusty-snake made their first contribution in https://github.com/bitflags/bitflags/pull/291 * @fintelia made their first contribution in https://github.com/bitflags/bitflags/pull/294 * @nim65s made their first contribution in https://github.com/bitflags/bitflags/pull/296 * @QuinnPainter made their first contribution in https://github.com/bitflags/bitflags/pull/301 * @gabibguti made their first contribution in https://github.com/bitflags/bitflags/pull/305 **Full Changelog**: https://github.com/bitflags/bitflags/compare/1.3.2...2.0.0 # 2.0.0-rc.3 ## What's Changed * Use strip_prefix instead of starts_with + slice by @QuinnPainter in https://github.com/bitflags/bitflags/pull/301 * Fix up some clippy lints by @KodrAus in https://github.com/bitflags/bitflags/pull/302 ## New Contributors * @QuinnPainter made their first contribution in https://github.com/bitflags/bitflags/pull/301 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.0.0-rc.2...2.0.0-rc.3 # 2.0.0-rc.2 ## Changes to `serde` serialization **⚠️ NOTE ⚠️** This release changes the default serialization you'll get if you `#[derive(Serialize, Deserialize)]` on your generated flags types. It will now use a formatted string for human-readable formats and the underlying bits type for compact formats. To keep the old behavior, see the [`bitflags-serde-legacy`](https://github.com/KodrAus/bitflags-serde-legacy) library. ## What's Changed * Add missing "if" to contains doc-comment in traits.rs by @rusty-snake in https://github.com/bitflags/bitflags/pull/291 * Forbid unsafe_code by @fintelia in https://github.com/bitflags/bitflags/pull/294 * serde: enable no-std support by @nim65s in https://github.com/bitflags/bitflags/pull/296 * Add a parser for flags formatted as bar-separated-values by @KodrAus in https://github.com/bitflags/bitflags/pull/297 ## New Contributors * @rusty-snake made their first contribution in https://github.com/bitflags/bitflags/pull/291 * @fintelia made their first contribution in https://github.com/bitflags/bitflags/pull/294 * @nim65s made their first contribution in https://github.com/bitflags/bitflags/pull/296 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.0.0-rc.1...2.0.0-rc.2 # 2.0.0-rc.1 This is a big release including a few years worth of work on a new `BitFlags` trait, iteration, and better macro organization for future extensibility. ## What's Changed * Fix a typo and call out MSRV bump by @KodrAus in https://github.com/bitflags/bitflags/pull/259 * BitFlags trait by @arturoc in https://github.com/bitflags/bitflags/pull/220 * Add a hidden trait to discourage manual impls of BitFlags by @KodrAus in https://github.com/bitflags/bitflags/pull/261 * Sanitize `Ok` by @konsumlamm in https://github.com/bitflags/bitflags/pull/266 * Fix bug in `Debug` implementation by @konsumlamm in https://github.com/bitflags/bitflags/pull/268 * Fix a typo in the generated documentation by @wackbyte in https://github.com/bitflags/bitflags/pull/271 * Use SPDX license format by @atouchet in https://github.com/bitflags/bitflags/pull/272 * serde tests fail in CI by @arturoc in https://github.com/bitflags/bitflags/pull/277 * Fix beta test output by @KodrAus in https://github.com/bitflags/bitflags/pull/279 * Add example to the README.md file by @tiaanl in https://github.com/bitflags/bitflags/pull/270 * Iterator over all the enabled options by @arturoc in https://github.com/bitflags/bitflags/pull/278 * from_bits_(truncate) fail with composite flags by @arturoc in https://github.com/bitflags/bitflags/pull/276 * Add more platform coverage to CI by @KodrAus in https://github.com/bitflags/bitflags/pull/280 * rework the way cfgs are handled by @KodrAus in https://github.com/bitflags/bitflags/pull/281 * Split generated code into two types by @KodrAus in https://github.com/bitflags/bitflags/pull/282 * expose bitflags iters using nameable types by @KodrAus in https://github.com/bitflags/bitflags/pull/286 * Support creating flags from their names by @KodrAus in https://github.com/bitflags/bitflags/pull/287 * Update README.md by @KodrAus in https://github.com/bitflags/bitflags/pull/288 ## New Contributors * @wackbyte made their first contribution in https://github.com/bitflags/bitflags/pull/271 * @atouchet made their first contribution in https://github.com/bitflags/bitflags/pull/272 * @tiaanl made their first contribution in https://github.com/bitflags/bitflags/pull/270 **Full Changelog**: https://github.com/bitflags/bitflags/compare/1.3.2...2.0.0-rc.1 # 1.3.2 - Allow `non_snake_case` in generated flags types ([#256]) [#256]: https://github.com/bitflags/bitflags/pull/256 # 1.3.1 - Revert unconditional `#[repr(transparent)]` ([#252]) [#252]: https://github.com/bitflags/bitflags/pull/252 # 1.3.0 (yanked) **This release bumps the Minimum Supported Rust Version to `1.46.0`** - Add `#[repr(transparent)]` ([#187]) - End `empty` doc comment with full stop ([#202]) - Fix typo in crate root docs ([#206]) - Document from_bits_unchecked unsafety ([#207]) - Let `is_all` ignore extra bits ([#211]) - Allows empty flag definition ([#225]) - Making crate accessible from std ([#227]) - Make `from_bits` a const fn ([#229]) - Allow multiple bitflags structs in one macro invocation ([#235]) - Add named functions to perform set operations ([#244]) - Fix typos in method docs ([#245]) - Modernization of the `bitflags` macro to take advantage of newer features and 2018 idioms ([#246]) - Fix regression (in an unreleased feature) and simplify tests ([#247]) - Use `Self` and fix bug when overriding `stringify!` ([#249]) [#187]: https://github.com/bitflags/bitflags/pull/187 [#202]: https://github.com/bitflags/bitflags/pull/202 [#206]: https://github.com/bitflags/bitflags/pull/206 [#207]: https://github.com/bitflags/bitflags/pull/207 [#211]: https://github.com/bitflags/bitflags/pull/211 [#225]: https://github.com/bitflags/bitflags/pull/225 [#227]: https://github.com/bitflags/bitflags/pull/227 [#229]: https://github.com/bitflags/bitflags/pull/229 [#235]: https://github.com/bitflags/bitflags/pull/235 [#244]: https://github.com/bitflags/bitflags/pull/244 [#245]: https://github.com/bitflags/bitflags/pull/245 [#246]: https://github.com/bitflags/bitflags/pull/246 [#247]: https://github.com/bitflags/bitflags/pull/247 [#249]: https://github.com/bitflags/bitflags/pull/249 # 1.2.1 - Remove extraneous `#[inline]` attributes ([#194]) [#194]: https://github.com/bitflags/bitflags/pull/194 # 1.2.0 - Fix typo: {Lower, Upper}Exp - {Lower, Upper}Hex ([#183]) - Add support for "unknown" bits ([#188]) [#183]: https://github.com/rust-lang-nursery/bitflags/pull/183 [#188]: https://github.com/rust-lang-nursery/bitflags/pull/188 # 1.1.0 This is a re-release of `1.0.5`, which was yanked due to a bug in the RLS. # 1.0.5 - Use compiletest_rs flags supported by stable toolchain ([#171]) - Put the user provided attributes first ([#173]) - Make bitflags methods `const` on newer compilers ([#175]) [#171]: https://github.com/rust-lang-nursery/bitflags/pull/171 [#173]: https://github.com/rust-lang-nursery/bitflags/pull/173 [#175]: https://github.com/rust-lang-nursery/bitflags/pull/175 # 1.0.4 - Support Rust 2018 style macro imports ([#165]) ```rust use bitflags::bitflags; ``` [#165]: https://github.com/rust-lang-nursery/bitflags/pull/165 # 1.0.3 - Improve zero value flag handling and documentation ([#157]) [#157]: https://github.com/rust-lang-nursery/bitflags/pull/157 # 1.0.2 - 30% improvement in compile time of bitflags crate ([#156]) - Documentation improvements ([#153]) - Implementation cleanup ([#149]) [#156]: https://github.com/rust-lang-nursery/bitflags/pull/156 [#153]: https://github.com/rust-lang-nursery/bitflags/pull/153 [#149]: https://github.com/rust-lang-nursery/bitflags/pull/149 # 1.0.1 - Add support for `pub(restricted)` specifier on the bitflags struct ([#135]) - Optimize performance of `all()` when called from a separate crate ([#136]) [#135]: https://github.com/rust-lang-nursery/bitflags/pull/135 [#136]: https://github.com/rust-lang-nursery/bitflags/pull/136 # 1.0.0 - **[breaking change]** Macro now generates [associated constants](https://doc.rust-lang.org/reference/items.html#associated-constants) ([#24]) - **[breaking change]** Minimum supported version is Rust **1.20**, due to usage of associated constants - After being broken in 0.9, the `#[deprecated]` attribute is now supported again ([#112]) - Other improvements to unit tests and documentation ([#106] and [#115]) [#24]: https://github.com/rust-lang-nursery/bitflags/pull/24 [#106]: https://github.com/rust-lang-nursery/bitflags/pull/106 [#112]: https://github.com/rust-lang-nursery/bitflags/pull/112 [#115]: https://github.com/rust-lang-nursery/bitflags/pull/115 ## How to update your code to use associated constants Assuming the following structure definition: ```rust bitflags! { struct Something: u8 { const FOO = 0b01, const BAR = 0b10 } } ``` In 0.9 and older you could do: ```rust let x = FOO.bits | BAR.bits; ``` Now you must use: ```rust let x = Something::FOO.bits | Something::BAR.bits; ``` # 0.9.1 - Fix the implementation of `Formatting` traits when other formatting traits were present in scope ([#105]) [#105]: https://github.com/rust-lang-nursery/bitflags/pull/105 # 0.9.0 - **[breaking change]** Use struct keyword instead of flags to define bitflag types ([#84]) - **[breaking change]** Terminate const items with semicolons instead of commas ([#87]) - Implement the `Hex`, `Octal`, and `Binary` formatting traits ([#86]) - Printing an empty flag value with the `Debug` trait now prints "(empty)" instead of nothing ([#85]) - The `bitflags!` macro can now be used inside of a fn body, to define a type local to that function ([#74]) [#74]: https://github.com/rust-lang-nursery/bitflags/pull/74 [#84]: https://github.com/rust-lang-nursery/bitflags/pull/84 [#85]: https://github.com/rust-lang-nursery/bitflags/pull/85 [#86]: https://github.com/rust-lang-nursery/bitflags/pull/86 [#87]: https://github.com/rust-lang-nursery/bitflags/pull/87 # 0.8.2 - Update feature flag used when building bitflags as a dependency of the Rust toolchain # 0.8.1 - Allow bitflags to be used as a dependency of the Rust toolchain # 0.8.0 - Add support for the experimental `i128` and `u128` integer types ([#57]) - Add set method: `flags.set(SOME_FLAG, true)` or `flags.set(SOME_FLAG, false)` ([#55]) This may break code that defines its own set method [#55]: https://github.com/rust-lang-nursery/bitflags/pull/55 [#57]: https://github.com/rust-lang-nursery/bitflags/pull/57 # 0.7.1 *(yanked)* # 0.7.0 - Implement the Extend trait ([#49]) - Allow definitions inside the `bitflags!` macro to refer to items imported from other modules ([#51]) [#49]: https://github.com/rust-lang-nursery/bitflags/pull/49 [#51]: https://github.com/rust-lang-nursery/bitflags/pull/51 # 0.6.0 - The `no_std` feature was removed as it is now the default - The `assignment_operators` feature was remove as it is now enabled by default - Some clippy suggestions have been applied #! /usr/bin/env python3 import github import os import sys import time RETRIES = 10 g = github.Github(os.environ["GITHUB_TOKEN"]) tag_name = os.environ["GITHUB_TAG"] tag_prefix = "refs/tags/" if tag_name.startswith(tag_prefix): tag_name = tag_name[len(tag_prefix) :] assert len(sys.argv) == 2 asset_path = sys.argv[1] asset_name = os.path.basename(asset_path) repo = g.get_repo(os.environ["GITHUB_REPOSITORY"]) tags = list(repo.get_tags()) for tag in tags: if tag.name == tag_name: break else: raise RuntimeError("no tag named " + repr(tag_name)) try: print("Creating GitHub release for tag " + repr(tag_name) + "...") repo.create_git_release(tag_name, tag_name, tag.commit.commit.message) except github.GithubException as github_error: if github_error.data["errors"][0]["code"] == "already_exists": print("Release for tag " + repr(tag_name) + " already exists.") else: raise def get_release(): for i in range(RETRIES): releases = list(repo.get_releases()) for release in releases: if release.tag_name == tag_name: return release print(f"Release for tag {repr(tag_name)} not found. Retrying...") time.sleep(1) raise RuntimeError("no release for tag " + repr(tag_name)) release = get_release() print("Uploading " + repr(asset_path) + "...") for i in range(RETRIES): try: print("Upload attempt #{} of {}...".format(i + 1, RETRIES)) release.upload_asset(asset_path) break except github.GithubException as github_error: # Unfortunately the asset upload API is flaky. Even worse, it often # partially succeeds, returning an error to the caller but leaving the # release in a state where subsequent uploads of the same asset will # fail with an "already_exists" error. (Though the asset is not visible # on github.com, so we can't just declare victory and move on.) If we # detect this case, explicitly delete the asset and continue retrying. print(github_error) for asset in release.get_assets(): if asset.name == asset_name: print("Found uploaded asset after failure. Deleting...") asset.delete_asset() else: raise RuntimeError("All upload attempts failed.") print("Success!") # Release checklist - Make sure `cargo outdated -R` is clean in the root and in b3sum/. - Bump the version in the root Cargo.toml. - Bump the version in b3sum/Cargo.toml. - Bump the dependency on the root crate too, if new features are used. - Delete b3sum/Cargo.lock and recreate it with `cargo build` or similar. - Update the `-h` output in b3sum/README.md if it's changed. - Bump `BLAKE3_VERSION_STRING` in c/blake3.h. - Bump `VERSION` in c/CMakeLists.txt. - Make a version bump commit with change notes. - `git push` and make sure CI is green. - `git tag` the version bump commit with the new version number. - `git push --tags` - `cargo publish` in the root. - `cargo publish` in b3sum/. # Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] ## [1.2.58](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.57...cc-v1.2.58) - 2026-03-27 ### Other - Update Compile-time Requirements to add info about clang-cl.exe ([#1693](https://github.com/rust-lang/cc-rs/pull/1693)) ## [1.2.57](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.56...cc-v1.2.57) - 2026-03-13 ### Other - Size archiver batches according to argument length not argument count ([#1689](https://github.com/rust-lang/cc-rs/pull/1689)) - Added `Build::env` for setting environment variables of compiler invocations and other child processes ([#1656](https://github.com/rust-lang/cc-rs/pull/1656) [#1682](https://github.com/rust-lang/cc-rs/pull/1682)) ## [1.2.56](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.55...cc-v1.2.56) - 2026-02-13 ### Other - Regenerate target info ([#1676](https://github.com/rust-lang/cc-rs/pull/1676)) - Fix `clang-cl` target when cross-compiling ([#1670](https://github.com/rust-lang/cc-rs/pull/1670)) ## [1.2.55](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.54...cc-v1.2.55) - 2026-01-30 ### Other - Regenerate target info ([#1667](https://github.com/rust-lang/cc-rs/pull/1667)) - Fix RUSTFLAGS typo in test-linker-plugin-lto ([#1665](https://github.com/rust-lang/cc-rs/pull/1665)) - Disable PIC for armv7-sony-vita-newlibeabihf ([#1664](https://github.com/rust-lang/cc-rs/pull/1664)) ## [1.2.54](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.53...cc-v1.2.54) - 2026-01-23 ### Other - Fix x86_64-unknown-linux-gnuasan parsing ([#1661](https://github.com/rust-lang/cc-rs/pull/1661)) - Regenerate target info ([#1660](https://github.com/rust-lang/cc-rs/pull/1660)) ## [1.2.53](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.52...cc-v1.2.53) - 2026-01-16 ### Other - Add missing RISC-V targets ([#1657](https://github.com/rust-lang/cc-rs/pull/1657)) ## [1.2.52](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.51...cc-v1.2.52) - 2026-01-09 ### Other - Fix contradictory doc for CC compiler in crate doc ([#1650](https://github.com/rust-lang/cc-rs/pull/1650)) - Have CUDA compilaion check for sbsa-linux when targeting aarch64. ([#1647](https://github.com/rust-lang/cc-rs/pull/1647)) - Update link for -Cdwarf-version; Remove -Z (stabilized in 1.88) ([#1648](https://github.com/rust-lang/cc-rs/pull/1648)) - Fix Build::env_tool to check for .exe on windows ([#1646](https://github.com/rust-lang/cc-rs/pull/1646)) ## [1.2.51](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.50...cc-v1.2.51) - 2025-12-26 ### Other - Regenerate target info ([#1642](https://github.com/rust-lang/cc-rs/pull/1642)) - Update Readmes ([#1641](https://github.com/rust-lang/cc-rs/pull/1641)) ## [1.2.50](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.49...cc-v1.2.50) - 2025-12-19 ### Other - Add tests for `OUT_DIR` escape for '..' file paths (#1631) - Fix #283: Make warnings(false) actually suppress compiler warnings ([#1633](https://github.com/rust-lang/cc-rs/pull/1633)) ## [1.2.49](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.48...cc-v1.2.49) - 2025-12-06 ### Other - Fix run_output to prevent infinite blocking ([#1627](https://github.com/rust-lang/cc-rs/pull/1627)) - Fix detect_family deadlock ([#1626](https://github.com/rust-lang/cc-rs/pull/1626)) - Fix link in new debug_str doc comment ([#1625](https://github.com/rust-lang/cc-rs/pull/1625)) - Support more of Cargo's debug levels with Build::debug_str ([#1624](https://github.com/rust-lang/cc-rs/pull/1624)) ## [1.2.48](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.47...cc-v1.2.48) - 2025-11-28 ### Other - Regenerate target info ([#1620](https://github.com/rust-lang/cc-rs/pull/1620)) ## [1.2.47](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.46...cc-v1.2.47) - 2025-11-21 ### Other - add helenos linker identifications ([#1615](https://github.com/rust-lang/cc-rs/pull/1615)) ## [1.2.46](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.45...cc-v1.2.46) - 2025-11-14 ### Other - Add Visual Studio 2026 support ([#1609](https://github.com/rust-lang/cc-rs/pull/1609)) ## [1.2.45](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.44...cc-v1.2.45) - 2025-11-07 ### Other - Regenerate target info ([#1606](https://github.com/rust-lang/cc-rs/pull/1606)) - Use a default check for the "env" variable in apple_sdk_name ([#1605](https://github.com/rust-lang/cc-rs/pull/1605)) ## [1.2.44](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.43...cc-v1.2.44) - 2025-10-31 ### Other - Fix debug assertion for env/abi mismatch ([#1604](https://github.com/rust-lang/cc-rs/pull/1604)) - Update CHANGELOG for version 1.2.43 ([#1602](https://github.com/rust-lang/cc-rs/pull/1602)) - Stop passing an invalid target to `llvm-mingw`'s cross-compilation wrappers ([#1495](https://github.com/rust-lang/cc-rs/pull/1495)) ## [1.2.43](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.42...cc-v1.2.43) - 2025-10-24 ### Other - Mark `static_flag` and `shared_flag` as deprecated ([#1582](https://github.com/rust-lang/cc-rs/pull/1582)) ## [1.2.42](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.41...cc-v1.2.42) - 2025-10-24 ### Other - Fix check-semver-checks ([#1600](https://github.com/rust-lang/cc-rs/pull/1600)) - minor improvement for docs ([#1598](https://github.com/rust-lang/cc-rs/pull/1598)) - Fix linker-plugin-lto: use `-flto=thin` ([#1594](https://github.com/rust-lang/cc-rs/pull/1594)) - Disable check-buildstd for armv7k-apple-watchos ([#1599](https://github.com/rust-lang/cc-rs/pull/1599)) - Add elf abi to ppc64 targets ([#1596](https://github.com/rust-lang/cc-rs/pull/1596)) ## [1.2.41](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.40...cc-v1.2.41) - 2025-10-10 ### Other - Allow using VCToolsVersion to request a specific msvc version ([#1589](https://github.com/rust-lang/cc-rs/pull/1589)) - Regenerate target info ([#1592](https://github.com/rust-lang/cc-rs/pull/1592)) - Regenerate windows sys bindings ([#1591](https://github.com/rust-lang/cc-rs/pull/1591)) - Update windows-bindgen requirement from 0.64 to 0.65 ([#1590](https://github.com/rust-lang/cc-rs/pull/1590)) - Fix `get_base_archiver_variant` for clang-cl: use `--print-search-dirs` ([#1587](https://github.com/rust-lang/cc-rs/pull/1587)) ## [1.2.40](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.39...cc-v1.2.40) - 2025-10-03 ### Other - Reorder changelog and remove duplicate Unreleased section ([#1579](https://github.com/rust-lang/cc-rs/pull/1579)) - Prefer clang if linker-plugin-lto specified ([#1573](https://github.com/rust-lang/cc-rs/pull/1573)) - Fix building for Mac Catalyst ([#1577](https://github.com/rust-lang/cc-rs/pull/1577)) - Improve ESP microcontroller targets ([#1574](https://github.com/rust-lang/cc-rs/pull/1574)) ## [1.2.39](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.38...cc-v1.2.39) - 2025-09-26 ### Other - Fix cross compilation to xtensa-esp32s3-espidf ([#1569](https://github.com/rust-lang/cc-rs/pull/1569)) - Fix autodetect_wasi_compiler: support non utf-8 path ([#1568](https://github.com/rust-lang/cc-rs/pull/1568)) - Regenerate target info ([#1567](https://github.com/rust-lang/cc-rs/pull/1567)) - Fix rustcflags mapping: require -Clinker-plugin-lto for -flto ([#1564](https://github.com/rust-lang/cc-rs/pull/1564)) - Use `$WASI_SDK_PATH` on WASI targets by default ([#1562](https://github.com/rust-lang/cc-rs/pull/1562)) - Fix atomicity violations in concurrent cache operations ([#1559](https://github.com/rust-lang/cc-rs/pull/1559)) ## [1.2.38](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.37...cc-v1.2.38) - 2025-09-19 ### Other - updated the following local packages: find-msvc-tools ## [1.2.37](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.36...cc-v1.2.37) - 2025-09-12 ### Other - Fix errmsg in RustcCodegenFlags::set_rustc_flag ([#1551](https://github.com/rust-lang/cc-rs/pull/1551)) - propagate stack protector to Linux C compilers ([#1550](https://github.com/rust-lang/cc-rs/pull/1550)) - Extract new fn `run_commands_in_parallel` ([#1549](https://github.com/rust-lang/cc-rs/pull/1549)) ## [1.2.36](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.35...cc-v1.2.36) - 2025-09-05 ### Other - Regenerate windows sys bindings ([#1548](https://github.com/rust-lang/cc-rs/pull/1548)) - Update windows-bindgen requirement from 0.62 to 0.63 ([#1547](https://github.com/rust-lang/cc-rs/pull/1547)) - Add fn get_ucrt_dir for find-msvc-tools ([#1546](https://github.com/rust-lang/cc-rs/pull/1546)) - Regenerate target info ([#1544](https://github.com/rust-lang/cc-rs/pull/1544)) - fix publish.yml ([#1543](https://github.com/rust-lang/cc-rs/pull/1543)) - Replace periods with underscores as well when parsing env variables ([#1541](https://github.com/rust-lang/cc-rs/pull/1541)) ## [1.2.35](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.34...cc-v1.2.35) - 2025-09-01 ### Fixed - fix building for aarch64-apple-visionos-sim on nightly ([#1534](https://github.com/rust-lang/cc-rs/pull/1534)) - fix tests apple_sdkroot_wrong ([#1530](https://github.com/rust-lang/cc-rs/pull/1530)) ### Other - Regenerate target info ([#1536](https://github.com/rust-lang/cc-rs/pull/1536)) - Optimize Tool::to_command ([#1535](https://github.com/rust-lang/cc-rs/pull/1535)) - Extract find-msvc-tools ([#1531](https://github.com/rust-lang/cc-rs/pull/1531)) - Add prefer_clang_cl_over_msvc ([#1516](https://github.com/rust-lang/cc-rs/pull/1516)) ## [1.2.34](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.33...cc-v1.2.34) - 2025-08-22 ### Fixed - add `-mcpu=mvp` and `-mmutable-globals` for `wasm32v1-none` ([#1524](https://github.com/rust-lang/cc-rs/pull/1524)) ### Other - Optimize parse_version in find_tools.rs ([#1527](https://github.com/rust-lang/cc-rs/pull/1527)) - Fallback to manually searching for tool dir ([#1526](https://github.com/rust-lang/cc-rs/pull/1526)) ## [1.2.33](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.32...cc-v1.2.33) - 2025-08-15 ### Other - Regenerate target info ([#1521](https://github.com/rust-lang/cc-rs/pull/1521)) - [win][arm64ec] Add testing for Arm64EC Windows ([#1512](https://github.com/rust-lang/cc-rs/pull/1512)) - Fix parsing of nigthly targets ([#1517](https://github.com/rust-lang/cc-rs/pull/1517)) - [win][arm64ec] Fix finding assembler and setting is_arm for Arm64EC ([#1511](https://github.com/rust-lang/cc-rs/pull/1511)) ## [1.2.32](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.31...cc-v1.2.32) - 2025-08-08 ### Fixed - fix new clippy lint introduced in rust 1.89.0 ([#1509](https://github.com/rust-lang/cc-rs/pull/1509)) ### Other - clarify cargo default if no rerun emitted ([#1508](https://github.com/rust-lang/cc-rs/pull/1508)) - extract compile_objects_sequential ([#1507](https://github.com/rust-lang/cc-rs/pull/1507)) - Windows `find_tools`: add support for finding Clang ([#1506](https://github.com/rust-lang/cc-rs/pull/1506)) - Add m68k-unknown-linux-gnu cross-compile target ([#1505](https://github.com/rust-lang/cc-rs/pull/1505)) ## [1.2.31](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.30...cc-v1.2.31) - 2025-08-01 ### Other - Add doc for using sccache/ccache etc ([#1502](https://github.com/rust-lang/cc-rs/pull/1502)) - ability to statically link against C++ stdlib ([#1497](https://github.com/rust-lang/cc-rs/pull/1497)) - Add instructions on using sccache ([#1503](https://github.com/rust-lang/cc-rs/pull/1503)) - Add support for recognizing some architectures supported by GCC, but not LLVM. ([#1500](https://github.com/rust-lang/cc-rs/pull/1500)) ## [1.2.30](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.29...cc-v1.2.30) - 2025-07-18 ### Other - define _REENTRANT by default ([#1496](https://github.com/rust-lang/cc-rs/pull/1496)) ## [1.2.29](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.28...cc-v1.2.29) - 2025-07-05 ### Other - Fix target parsing for powerpc ([#1490](https://github.com/rust-lang/cc-rs/pull/1490)) ## [1.2.28](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.27...cc-v1.2.28) - 2025-07-04 ### Other - Recognize `mlibc` environment ([#1488](https://github.com/rust-lang/cc-rs/pull/1488)) - Fix clippy warnings about not using variables in `format!` strings ([#1489](https://github.com/rust-lang/cc-rs/pull/1489)) ## [1.2.27](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.26...cc-v1.2.27) - 2025-06-13 ### Other - Regenerate windows sys bindings ([#1485](https://github.com/rust-lang/cc-rs/pull/1485)) - Update windows-bindgen requirement from 0.61 to 0.62 ([#1484](https://github.com/rust-lang/cc-rs/pull/1484)) - Regenerate target info ([#1483](https://github.com/rust-lang/cc-rs/pull/1483)) ## [1.2.26](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.25...cc-v1.2.26) - 2025-06-06 ### Other - Also set `SDKROOT` when building apple platforms ([#1475](https://github.com/rust-lang/cc-rs/pull/1475)) - use windows 2022 in CI ([#1479](https://github.com/rust-lang/cc-rs/pull/1479)) - Detect -Wslash-u-filename warning on clang-cl ([#1477](https://github.com/rust-lang/cc-rs/pull/1477)) ## [1.2.25](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.24...cc-v1.2.25) - 2025-05-30 ### Other - make `powerp64` use `powerpc64-linux-gnu` prefix ([#1474](https://github.com/rust-lang/cc-rs/pull/1474)) ## [1.2.24](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.23...cc-v1.2.24) - 2025-05-23 ### Other - Regenerate windows sys bindings ([#1471](https://github.com/rust-lang/cc-rs/pull/1471)) ## [1.2.23](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.22...cc-v1.2.23) - 2025-05-16 ### Other - support "vxworks" and "nto" OSes on `get_base_archiver_variant` ([#1456](https://github.com/rust-lang/cc-rs/pull/1456)) ## [1.2.22](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.21...cc-v1.2.22) - 2025-05-09 ### Other - Add `flags` method to `cc::Build` for adding multiple flags ([#1466](https://github.com/rust-lang/cc-rs/pull/1466)) ## [1.2.21](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.20...cc-v1.2.21) - 2025-05-02 ### Other - Fix wasm32-unknown-unknown by passing -c ([#1424](https://github.com/rust-lang/cc-rs/pull/1424)) ## [1.2.20](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.19...cc-v1.2.20) - 2025-04-25 ### Other - Regenerate target info ([#1461](https://github.com/rust-lang/cc-rs/pull/1461)) - Fix parser.rs on latest rustc nightly ([#1459](https://github.com/rust-lang/cc-rs/pull/1459)) ## [1.2.19](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.18...cc-v1.2.19) - 2025-04-11 ### Other - Fix musl compilation: Add musl as a prefix fallback ([#1455](https://github.com/rust-lang/cc-rs/pull/1455)) ## [1.2.18](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.17...cc-v1.2.18) - 2025-04-04 ### Other - Regenerate target info ([#1450](https://github.com/rust-lang/cc-rs/pull/1450)) - Use `std::thread::available_parallelism` for determining the default number of jobs ([#1447](https://github.com/rust-lang/cc-rs/pull/1447)) - Fix mips64-openwrt-linux-musl parsing ([#1449](https://github.com/rust-lang/cc-rs/pull/1449)) - Use compiler prefix `x86_64-linux-musl` ([#1443](https://github.com/rust-lang/cc-rs/pull/1443)) ## [1.2.17](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.16...cc-v1.2.17) - 2025-03-21 ### Other - Regenerate target info ([#1439](https://github.com/rust-lang/cc-rs/pull/1439)) - Regenerate windows sys bindings ([#1437](https://github.com/rust-lang/cc-rs/pull/1437)) - Fix wasm32-wali-linux-musl target parsing ([#1434](https://github.com/rust-lang/cc-rs/pull/1434)) - Parse `rustc` target names ([#1413](https://github.com/rust-lang/cc-rs/pull/1413)) - Regenerate target info ([#1429](https://github.com/rust-lang/cc-rs/pull/1429)) - Added base support for `wasm32-wali-linux-musl` target ([#1373](https://github.com/rust-lang/cc-rs/pull/1373)) ## [1.2.16](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.15...cc-v1.2.16) - 2025-02-28 ### Fixed - force windows compiler to run in `out_dir` to prevent artifacts in cwd (#1415) ### Other - use `/arch:SSE2` for `x86` target arch (#1425) - Regenerate windows-sys binding ([#1422](https://github.com/rust-lang/cc-rs/pull/1422)) - Regenerate target info ([#1418](https://github.com/rust-lang/cc-rs/pull/1418)) - Add LIB var when compiling flag_check (#1417) - Change flag ordering ([#1403](https://github.com/rust-lang/cc-rs/pull/1403)) - Fix archiver detection for musl cross compilation ([#1404](https://github.com/rust-lang/cc-rs/pull/1404)) ## [1.2.15](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.14...cc-v1.2.15) - 2025-02-21 ### Other - Regenerate target info ([#1406](https://github.com/rust-lang/cc-rs/pull/1406)) - Always read from all `CFLAGS`-style flags ([#1401](https://github.com/rust-lang/cc-rs/pull/1401)) - Simplify the error output on failed `Command` invocation ([#1397](https://github.com/rust-lang/cc-rs/pull/1397)) ## [1.2.14](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.13...cc-v1.2.14) - 2025-02-14 ### Other - Regenerate target info ([#1398](https://github.com/rust-lang/cc-rs/pull/1398)) - Add support for setting `-gdwarf-{version}` based on RUSTFLAGS ([#1395](https://github.com/rust-lang/cc-rs/pull/1395)) - Add support for alternative network stack io-sock on QNX 7.1 aarch64 and x86_64 ([#1312](https://github.com/rust-lang/cc-rs/pull/1312)) ## [1.2.13](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.12...cc-v1.2.13) - 2025-02-08 ### Other - Fix cross-compiling for Apple platforms ([#1389](https://github.com/rust-lang/cc-rs/pull/1389)) ## [1.2.12](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.11...cc-v1.2.12) - 2025-02-04 ### Other - Split impl Build ([#1382](https://github.com/rust-lang/cc-rs/pull/1382)) - Don't specify both `-target` and `-mtargetos=` on Apple targets ([#1384](https://github.com/rust-lang/cc-rs/pull/1384)) ## [1.2.11](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.10...cc-v1.2.11) - 2025-01-31 ### Other - Fix more flag inheritance ([#1380](https://github.com/rust-lang/cc-rs/pull/1380)) - Include wrapper args. in `stdout` family heuristics to restore classifying `clang --driver-mode=cl` as `Msvc { clang_cl: true }` ([#1378](https://github.com/rust-lang/cc-rs/pull/1378)) - Constrain `-Clto` and `-Cembed-bitcode` flag inheritance to be `clang`-only ([#1379](https://github.com/rust-lang/cc-rs/pull/1379)) - Pass deployment target with `-m*-version-min=` ([#1339](https://github.com/rust-lang/cc-rs/pull/1339)) - Regenerate target info ([#1376](https://github.com/rust-lang/cc-rs/pull/1376)) ## [1.2.10](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.9...cc-v1.2.10) - 2025-01-17 ### Other - Fix CC_FORCE_DISABLE=0 evaluating to true ([#1371](https://github.com/rust-lang/cc-rs/pull/1371)) - Regenerate target info ([#1369](https://github.com/rust-lang/cc-rs/pull/1369)) - Make hidden lifetimes explicit. ([#1366](https://github.com/rust-lang/cc-rs/pull/1366)) ## [1.2.9](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.8...cc-v1.2.9) - 2025-01-12 ### Other - Don't pass inherited PGO flags to GNU compilers (#1363) - Adjusted zig cc judgment and avoided zigbuild errors([#1360](https://github.com/rust-lang/cc-rs/pull/1360)) ([#1361](https://github.com/rust-lang/cc-rs/pull/1361)) - Fix compilation on macOS using clang and fix compilation using zig-cc ([#1364](https://github.com/rust-lang/cc-rs/pull/1364)) ## [1.2.8](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.7...cc-v1.2.8) - 2025-01-11 ### Other - Add `is_like_clang_cl()` getter (#1357) - Fix clippy error in lib.rs ([#1356](https://github.com/rust-lang/cc-rs/pull/1356)) - Regenerate target info ([#1352](https://github.com/rust-lang/cc-rs/pull/1352)) - Fix compiler family detection issue with clang-cl on macOS ([#1328](https://github.com/rust-lang/cc-rs/pull/1328)) - Update `windows-bindgen` dependency ([#1347](https://github.com/rust-lang/cc-rs/pull/1347)) - Fix clippy warnings ([#1346](https://github.com/rust-lang/cc-rs/pull/1346)) ## [1.2.7](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.6...cc-v1.2.7) - 2025-01-03 ### Other - Regenerate target info ([#1342](https://github.com/rust-lang/cc-rs/pull/1342)) - Document new supported architecture names in windows::find - Make is_flag_supported_inner take an &Tool ([#1337](https://github.com/rust-lang/cc-rs/pull/1337)) - Fix is_flag_supported on msvc ([#1336](https://github.com/rust-lang/cc-rs/pull/1336)) - Allow using Visual Studio target names in `find_tool` ([#1335](https://github.com/rust-lang/cc-rs/pull/1335)) ## [1.2.6](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.5...cc-v1.2.6) - 2024-12-27 ### Other - Don't inherit the `/Oy` flag for 64-bit targets ([#1330](https://github.com/rust-lang/cc-rs/pull/1330)) ## [1.2.5](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.4...cc-v1.2.5) - 2024-12-19 ### Other - Check linking when testing if compiler flags are supported ([#1322](https://github.com/rust-lang/cc-rs/pull/1322)) ## [1.2.4](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.3...cc-v1.2.4) - 2024-12-13 ### Other - Add support for C/C++ compiler for Neutrino QNX: `qcc` ([#1319](https://github.com/rust-lang/cc-rs/pull/1319)) - use -maix64 instead of -m64 ([#1307](https://github.com/rust-lang/cc-rs/pull/1307)) ## [1.2.3](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.2...cc-v1.2.3) - 2024-12-06 ### Other - Improve detection of environment when compiling from msbuild or msvc ([#1310](https://github.com/rust-lang/cc-rs/pull/1310)) - Better error message when failing on unknown targets ([#1313](https://github.com/rust-lang/cc-rs/pull/1313)) - Optimize RustcCodegenFlags ([#1305](https://github.com/rust-lang/cc-rs/pull/1305)) ## [1.2.2](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.1...cc-v1.2.2) - 2024-11-29 ### Other - Inherit flags from rustc ([#1279](https://github.com/rust-lang/cc-rs/pull/1279)) - Add support for using sccache wrapper with cuda/nvcc ([#1304](https://github.com/rust-lang/cc-rs/pull/1304)) - Fix msvc stdout not shown on error ([#1303](https://github.com/rust-lang/cc-rs/pull/1303)) - Regenerate target info ([#1301](https://github.com/rust-lang/cc-rs/pull/1301)) - Fix compilation of C++ code for armv7-unknown-linux-gnueabihf ([#1298](https://github.com/rust-lang/cc-rs/pull/1298)) - Fetch target info from Cargo even if `Build::target` is manually set ([#1299](https://github.com/rust-lang/cc-rs/pull/1299)) - Fix two files with different extensions having the same object name ([#1295](https://github.com/rust-lang/cc-rs/pull/1295)) - Allow disabling cc's ability to compile via env var CC_FORCE_DISABLE ([#1292](https://github.com/rust-lang/cc-rs/pull/1292)) - Regenerate target info ([#1293](https://github.com/rust-lang/cc-rs/pull/1293)) ## [1.2.1](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.0...cc-v1.2.1) - 2024-11-14 ### Other - When invoking `cl -?`, set stdin to null ([#1288](https://github.com/rust-lang/cc-rs/pull/1288)) ## [1.2.0](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.37...cc-v1.2.0) - 2024-11-11 ### Added - add i686-pc-windows-gnullvm prefix detection ([#1283](https://github.com/rust-lang/cc-rs/pull/1283)) ### Other - Allow only specifying the architecture ([#1285](https://github.com/rust-lang/cc-rs/pull/1285)) - Fix WASM vs. WASI options ([#1284](https://github.com/rust-lang/cc-rs/pull/1284)) ## [1.1.37](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.36...cc-v1.1.37) - 2024-11-08 ### Other - Use relative directory for obj files hash ([#1270](https://github.com/rust-lang/cc-rs/pull/1270)) - Regenerate target info ([#1280](https://github.com/rust-lang/cc-rs/pull/1280)) ## [1.1.36](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.35...cc-v1.1.36) - 2024-11-05 ### Other - Fix CUDA build with clang++. ([#1273](https://github.com/rust-lang/cc-rs/pull/1273)) ## [1.1.35](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.34...cc-v1.1.35) - 2024-11-04 ### Other - Remove support for FRC ([#1268](https://github.com/rust-lang/cc-rs/pull/1268)) - Do not add -fPIC by default on UEFI targets ([#1263](https://github.com/rust-lang/cc-rs/pull/1263)) - Use -windows-gnu for all UEFI targets ([#1264](https://github.com/rust-lang/cc-rs/pull/1264)) ## [1.1.34](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.33...cc-v1.1.34) - 2024-11-02 ### Other - Remove redundant flags ([#1256](https://github.com/rust-lang/cc-rs/pull/1256)) ## [1.1.33](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.32...cc-v1.1.33) - 2024-11-02 ### Other - Reduce size of `cc::Build` and size of generated targets ([#1257](https://github.com/rust-lang/cc-rs/pull/1257)) ## [1.1.32](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.31...cc-v1.1.32) - 2024-11-02 ### Other - Use `rustc`'s knowledge of LLVM/Clang target triples ([#1252](https://github.com/rust-lang/cc-rs/pull/1252)) - Use Cargo's target information when possible ([#1225](https://github.com/rust-lang/cc-rs/pull/1225)) ## [1.1.31](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.30...cc-v1.1.31) - 2024-10-19 ### Other - Add comment explaining why cc does not rebuild on env PATH change ([#1247](https://github.com/rust-lang/cc-rs/pull/1247)) ## [1.1.30](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.29...cc-v1.1.30) - 2024-10-11 ### Other - Don't pass -fPIC by default on wasm ([#1245](https://github.com/rust-lang/cc-rs/pull/1245)) ## [1.1.29](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.28...cc-v1.1.29) - 2024-10-11 ### Other - Regenerate target info ([#1243](https://github.com/rust-lang/cc-rs/pull/1243)) ## [1.1.28](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.27...cc-v1.1.28) - 2024-10-06 ### Other - Environment variables: For one accepting boolean, treat "0", "false" and empty env as false ([#1238](https://github.com/rust-lang/cc-rs/pull/1238)) ## [1.1.27](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.26...cc-v1.1.27) - 2024-10-06 ### Other - Revert "Use debug version of MSVC runtime library on debug ([#1231](https://github.com/rust-lang/cc-rs/pull/1231))" ([#1237](https://github.com/rust-lang/cc-rs/pull/1237)) - Disable `CC_ENABLE_DEBUG_OUTPUT` if it is set to "0" ([#1234](https://github.com/rust-lang/cc-rs/pull/1234)) ## [1.1.26](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.25...cc-v1.1.26) - 2024-10-06 ### Other - Use debug version of MSVC runtime library on debug ([#1231](https://github.com/rust-lang/cc-rs/pull/1231)) ## [1.1.25](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.24...cc-v1.1.25) - 2024-10-05 ### Other - Remove incorrect "lib" prefixes in CXXSTDLIB doc comments ([#1228](https://github.com/rust-lang/cc-rs/pull/1228)) ## [1.1.24](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.23...cc-v1.1.24) - 2024-10-01 ### Other - Fix wasm32-wasip1-threads: shared-memory disallowed due to not compiled with 'atomics' or 'bulk-memory' features ([#1221](https://github.com/rust-lang/cc-rs/pull/1221)) - Reduce the need for the host target triple ([#1224](https://github.com/rust-lang/cc-rs/pull/1224)) - Add auto cancellation for CI jobs ([#1222](https://github.com/rust-lang/cc-rs/pull/1222)) ## [1.1.23](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.22...cc-v1.1.23) - 2024-09-30 ### Other - Update doc for detecting changes/upgrades of compilers ([#1218](https://github.com/rust-lang/cc-rs/pull/1218)) ## [1.1.22](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.21...cc-v1.1.22) - 2024-09-27 ### Other - Don't rerun if PATH changes ([#1215](https://github.com/rust-lang/cc-rs/pull/1215)) ## [1.1.21](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.20...cc-v1.1.21) - 2024-09-18 ### Other - disable pic for targets that end in `-none` ([#1212](https://github.com/rust-lang/cc-rs/pull/1212)) ## [1.1.20](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.19...cc-v1.1.20) - 2024-09-17 ### Other - Add buildcache as known Rust and C/C++ compiler wrapper ([#1209](https://github.com/rust-lang/cc-rs/pull/1209)) ## [1.1.19](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.18...cc-v1.1.19) - 2024-09-15 ### Other - Add support arm64e-apple-darwin ([#1207](https://github.com/rust-lang/cc-rs/pull/1207)) ## [1.1.18](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.17...cc-v1.1.18) - 2024-09-07 ### Other - Fixed unsoundness in `StderrForwarder::forward_available` ([#1203](https://github.com/rust-lang/cc-rs/pull/1203)) ## [1.1.17](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.16...cc-v1.1.17) - 2024-09-06 ### Fixed - fix finding toolchains when invoked by msbuild ([#1201](https://github.com/rust-lang/cc-rs/pull/1201)) ## [1.1.16](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.15...cc-v1.1.16) - 2024-09-04 ### Other - Treat VxWorks wr-cc as a Gnu compiler ([#1198](https://github.com/rust-lang/cc-rs/pull/1198)) ## [1.1.15](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.14...cc-v1.1.15) - 2024-08-26 ### Other - Add -mfloat-abi=hard as a default argument when using any arm/thumb-none-eabihf target ([#1194](https://github.com/rust-lang/cc-rs/pull/1194)) ## [1.1.14](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.13...cc-v1.1.14) - 2024-08-23 ### Other - allow finding tools from path if VisualStudioDir is set ## [1.1.13](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.12...cc-v1.1.13) - 2024-08-16 ### Other - Fix detect family: should detect emscripten as clang, closes [#1185](https://github.com/rust-lang/cc-rs/pull/1185) ([#1186](https://github.com/rust-lang/cc-rs/pull/1186)) ## [1.1.12](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.11...cc-v1.1.12) - 2024-08-15 ### Other - improve docs ([#1183](https://github.com/rust-lang/cc-rs/pull/1183)) ## [1.1.11](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.10...cc-v1.1.11) - 2024-08-14 ### Other - Add support for parsing shell encoded `*FLAGS` ([#1181](https://github.com/rust-lang/cc-rs/pull/1181)) - Replace vector of tuples with BTreeMap which already is sorted and free of duplicates ([#1177](https://github.com/rust-lang/cc-rs/pull/1177)) ## [1.1.10](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.9...cc-v1.1.10) - 2024-08-11 ### Other - Remap Windows targets triples to their LLVM counterparts ([#1176](https://github.com/rust-lang/cc-rs/pull/1176)) ## [1.1.9](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.8...cc-v1.1.9) - 2024-08-11 ### Other - Add custom CC wrapper to the wrapper whitelist ([#1175](https://github.com/rust-lang/cc-rs/pull/1175)) ## [1.1.8](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.7...cc-v1.1.8) - 2024-08-06 ### Other - Fix broken link in docs.rs ([#1173](https://github.com/rust-lang/cc-rs/pull/1173)) ## [1.1.7](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.6...cc-v1.1.7) - 2024-07-29 ### Other - add `.objects` ([#1166](https://github.com/rust-lang/cc-rs/pull/1166)) ## [1.1.6](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.5...cc-v1.1.6) - 2024-07-19 ### Other - Clippy fixes ([#1163](https://github.com/rust-lang/cc-rs/pull/1163)) ## [1.1.5](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.4...cc-v1.1.5) - 2024-07-15 ### Other - Fix cyclic compilation: Use vendored once_cell ([#1154](https://github.com/rust-lang/cc-rs/pull/1154)) ## [1.1.4](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.3...cc-v1.1.4) - 2024-07-14 ### Other - Support compiling on wasm targets (Supersede [#1068](https://github.com/rust-lang/cc-rs/pull/1068)) ([#1160](https://github.com/rust-lang/cc-rs/pull/1160)) ## [1.1.3](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.2...cc-v1.1.3) - 2024-07-14 ### Other - Reduce msrv to 1.63 ([#1158](https://github.com/rust-lang/cc-rs/pull/1158)) - Revert "Use raw-dylib for windows-sys ([#1137](https://github.com/rust-lang/cc-rs/pull/1137))" ([#1157](https://github.com/rust-lang/cc-rs/pull/1157)) - Fix typos ([#1152](https://github.com/rust-lang/cc-rs/pull/1152)) - Fix `doc_lazy_continuation` lints ([#1153](https://github.com/rust-lang/cc-rs/pull/1153)) ## [1.1.2](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.1...cc-v1.1.2) - 2024-07-12 ### Other - Add empty `jobserver` feature. ([#1150](https://github.com/rust-lang/cc-rs/pull/1150)) ## [1.1.1](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.0...cc-v1.1.1) - 2024-07-12 ### Other - Fix is_flag_supported not respecting emit_rerun_if_env_changed ([#1147](https://github.com/rust-lang/cc-rs/pull/1147)) ([#1148](https://github.com/rust-lang/cc-rs/pull/1148)) ## [1.1.0](https://github.com/rust-lang/cc-rs/compare/cc-v1.0.106...cc-v1.1.0) - 2024-07-08 ### Added - add cargo_output to eliminate last vestiges of stdout pollution ([#1141](https://github.com/rust-lang/cc-rs/pull/1141)) ## [1.0.106](https://github.com/rust-lang/cc-rs/compare/cc-v1.0.105...cc-v1.0.106) - 2024-07-08 ### Other - Drop support for Visual Studio 12 (2013) ([#1046](https://github.com/rust-lang/cc-rs/pull/1046)) - Use raw-dylib for windows-sys ([#1137](https://github.com/rust-lang/cc-rs/pull/1137)) - Bump msrv to 1.67 ([#1143](https://github.com/rust-lang/cc-rs/pull/1143)) - Bump msrv to 1.65 ([#1140](https://github.com/rust-lang/cc-rs/pull/1140)) - Fix clippy warnings ([#1138](https://github.com/rust-lang/cc-rs/pull/1138)) ## [1.0.105](https://github.com/rust-lang/cc-rs/compare/cc-v1.0.104...cc-v1.0.105) - 2024-07-07 ### Other - Regenerate windows sys bindings ([#1132](https://github.com/rust-lang/cc-rs/pull/1132)) - Fix generate-windows-sys-bindings ([#1133](https://github.com/rust-lang/cc-rs/pull/1133)) - Fix gen-windows-sys-binding ([#1130](https://github.com/rust-lang/cc-rs/pull/1130)) - Fix gen-windows-sys-binding ([#1127](https://github.com/rust-lang/cc-rs/pull/1127)) - Update windows-bindgen requirement from 0.57 to 0.58 ([#1123](https://github.com/rust-lang/cc-rs/pull/1123)) ## [1.0.104](https://github.com/rust-lang/cc-rs/compare/cc-v1.0.103...cc-v1.0.104) - 2024-07-01 ### Other - Fixed link break about compile-time-requirements ([#1118](https://github.com/rust-lang/cc-rs/pull/1118)) ## [1.0.103](https://github.com/rust-lang/cc-rs/compare/cc-v1.0.102...cc-v1.0.103) - 2024-06-30 ### Other - Fix compilation for wasm: env WASI_SYSROOT should be optional ([#1114](https://github.com/rust-lang/cc-rs/pull/1114)) ## [1.0.102](https://github.com/rust-lang/cc-rs/compare/cc-v1.0.101...cc-v1.0.102) - 2024-06-29 ### Other - Fix invalid wasi targets compatibility ([#1105](https://github.com/rust-lang/cc-rs/pull/1105)) - Speedup regenerate-target-info and regenerate-windows-sys ([#1110](https://github.com/rust-lang/cc-rs/pull/1110)) ## [1.0.101](https://github.com/rust-lang/cc-rs/compare/cc-v1.0.100...cc-v1.0.101) - 2024-06-25 ### Other - Use `Build::getenv` instead of `env::var*` in anywhere that makes sense ([#1103](https://github.com/rust-lang/cc-rs/pull/1103)) ## [1.0.100](https://github.com/rust-lang/cc-rs/compare/cc-v1.0.99...cc-v1.0.100) - 2024-06-23 ### Other - Update publish.yml to use release-plz ([#1101](https://github.com/rust-lang/cc-rs/pull/1101)) - Accept `OsStr` instead of `str` for flags ([#1100](https://github.com/rust-lang/cc-rs/pull/1100)) - Use `dep:` syntax to avoid implicit features. ([#1099](https://github.com/rust-lang/cc-rs/pull/1099)) - Minor clippy fixes. ([#1098](https://github.com/rust-lang/cc-rs/pull/1098)) - Fix WASI compilation for C++ ([#1083](https://github.com/rust-lang/cc-rs/pull/1083)) - Regenerate windows sys bindings ([#1096](https://github.com/rust-lang/cc-rs/pull/1096)) - Rename regenerate-windows-sys to regenerate-windows-sys.yml ([#1095](https://github.com/rust-lang/cc-rs/pull/1095)) - Create regenerate-windows-sys.yml ([#1094](https://github.com/rust-lang/cc-rs/pull/1094)) - Update windows-bindgen requirement from 0.56 to 0.57 ([#1091](https://github.com/rust-lang/cc-rs/pull/1091)) - Eagerly close tempfile to fix [#1082](https://github.com/rust-lang/cc-rs/pull/1082) ([#1087](https://github.com/rust-lang/cc-rs/pull/1087)) - Output msvc.exe in the output directory ([#1090](https://github.com/rust-lang/cc-rs/pull/1090)) - Fix clippy warnings on Windows ([#1088](https://github.com/rust-lang/cc-rs/pull/1088)) - Don't try to free DLL on drop ([#1089](https://github.com/rust-lang/cc-rs/pull/1089)) - Fix panic safety issue in StderrForwarder ([#1079](https://github.com/rust-lang/cc-rs/pull/1079)) # Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] ## [1.2.61](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.60...cc-v1.2.61) - 2026-04-24 ### Other - fix `OutputKind::Capture` documentation ([#1705](https://github.com/rust-lang/cc-rs/pull/1705)) ## [1.2.60](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.59...cc-v1.2.60) - 2026-04-10 ### Fixed - *(ar)* suppress warnings from `D` modifier probe ([#1700](https://github.com/rust-lang/cc-rs/pull/1700)) ## [1.2.59](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.58...cc-v1.2.59) - 2026-04-03 ### Fixed - *(ar)* deterministic archives with `D` modifier ([#1697](https://github.com/rust-lang/cc-rs/pull/1697)) ### Other - Regenerate target info ([#1698](https://github.com/rust-lang/cc-rs/pull/1698)) - Fix target abi parsing for sanitiser targets ([#1695](https://github.com/rust-lang/cc-rs/pull/1695)) ## [1.2.58](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.57...cc-v1.2.58) - 2026-03-27 ### Other - Update Compile-time Requirements to add info about clang-cl.exe ([#1693](https://github.com/rust-lang/cc-rs/pull/1693)) ## [1.2.57](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.56...cc-v1.2.57) - 2026-03-13 ### Other - Size archiver batches according to argument length not argument count ([#1689](https://github.com/rust-lang/cc-rs/pull/1689)) - Added `Build::env` for setting environment variables of compiler invocations and other child processes ([#1656](https://github.com/rust-lang/cc-rs/pull/1656) [#1682](https://github.com/rust-lang/cc-rs/pull/1682)) ## [1.2.56](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.55...cc-v1.2.56) - 2026-02-13 ### Other - Regenerate target info ([#1676](https://github.com/rust-lang/cc-rs/pull/1676)) - Fix `clang-cl` target when cross-compiling ([#1670](https://github.com/rust-lang/cc-rs/pull/1670)) ## [1.2.55](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.54...cc-v1.2.55) - 2026-01-30 ### Other - Regenerate target info ([#1667](https://github.com/rust-lang/cc-rs/pull/1667)) - Fix RUSTFLAGS typo in test-linker-plugin-lto ([#1665](https://github.com/rust-lang/cc-rs/pull/1665)) - Disable PIC for armv7-sony-vita-newlibeabihf ([#1664](https://github.com/rust-lang/cc-rs/pull/1664)) ## [1.2.54](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.53...cc-v1.2.54) - 2026-01-23 ### Other - Fix x86_64-unknown-linux-gnuasan parsing ([#1661](https://github.com/rust-lang/cc-rs/pull/1661)) - Regenerate target info ([#1660](https://github.com/rust-lang/cc-rs/pull/1660)) ## [1.2.53](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.52...cc-v1.2.53) - 2026-01-16 ### Other - Add missing RISC-V targets ([#1657](https://github.com/rust-lang/cc-rs/pull/1657)) ## [1.2.52](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.51...cc-v1.2.52) - 2026-01-09 ### Other - Fix contradictory doc for CC compiler in crate doc ([#1650](https://github.com/rust-lang/cc-rs/pull/1650)) - Have CUDA compilaion check for sbsa-linux when targeting aarch64. ([#1647](https://github.com/rust-lang/cc-rs/pull/1647)) - Update link for -Cdwarf-version; Remove -Z (stabilized in 1.88) ([#1648](https://github.com/rust-lang/cc-rs/pull/1648)) - Fix Build::env_tool to check for .exe on windows ([#1646](https://github.com/rust-lang/cc-rs/pull/1646)) ## [1.2.51](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.50...cc-v1.2.51) - 2025-12-26 ### Other - Regenerate target info ([#1642](https://github.com/rust-lang/cc-rs/pull/1642)) - Update Readmes ([#1641](https://github.com/rust-lang/cc-rs/pull/1641)) ## [1.2.50](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.49...cc-v1.2.50) - 2025-12-19 ### Other - Add tests for `OUT_DIR` escape for '..' file paths (#1631) - Fix #283: Make warnings(false) actually suppress compiler warnings ([#1633](https://github.com/rust-lang/cc-rs/pull/1633)) ## [1.2.49](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.48...cc-v1.2.49) - 2025-12-06 ### Other - Fix run_output to prevent infinite blocking ([#1627](https://github.com/rust-lang/cc-rs/pull/1627)) - Fix detect_family deadlock ([#1626](https://github.com/rust-lang/cc-rs/pull/1626)) - Fix link in new debug_str doc comment ([#1625](https://github.com/rust-lang/cc-rs/pull/1625)) - Support more of Cargo's debug levels with Build::debug_str ([#1624](https://github.com/rust-lang/cc-rs/pull/1624)) ## [1.2.48](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.47...cc-v1.2.48) - 2025-11-28 ### Other - Regenerate target info ([#1620](https://github.com/rust-lang/cc-rs/pull/1620)) ## [1.2.47](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.46...cc-v1.2.47) - 2025-11-21 ### Other - add helenos linker identifications ([#1615](https://github.com/rust-lang/cc-rs/pull/1615)) ## [1.2.46](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.45...cc-v1.2.46) - 2025-11-14 ### Other - Add Visual Studio 2026 support ([#1609](https://github.com/rust-lang/cc-rs/pull/1609)) ## [1.2.45](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.44...cc-v1.2.45) - 2025-11-07 ### Other - Regenerate target info ([#1606](https://github.com/rust-lang/cc-rs/pull/1606)) - Use a default check for the "env" variable in apple_sdk_name ([#1605](https://github.com/rust-lang/cc-rs/pull/1605)) ## [1.2.44](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.43...cc-v1.2.44) - 2025-10-31 ### Other - Fix debug assertion for env/abi mismatch ([#1604](https://github.com/rust-lang/cc-rs/pull/1604)) - Update CHANGELOG for version 1.2.43 ([#1602](https://github.com/rust-lang/cc-rs/pull/1602)) - Stop passing an invalid target to `llvm-mingw`'s cross-compilation wrappers ([#1495](https://github.com/rust-lang/cc-rs/pull/1495)) ## [1.2.43](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.42...cc-v1.2.43) - 2025-10-24 ### Other - Mark `static_flag` and `shared_flag` as deprecated ([#1582](https://github.com/rust-lang/cc-rs/pull/1582)) ## [1.2.42](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.41...cc-v1.2.42) - 2025-10-24 ### Other - Fix check-semver-checks ([#1600](https://github.com/rust-lang/cc-rs/pull/1600)) - minor improvement for docs ([#1598](https://github.com/rust-lang/cc-rs/pull/1598)) - Fix linker-plugin-lto: use `-flto=thin` ([#1594](https://github.com/rust-lang/cc-rs/pull/1594)) - Disable check-buildstd for armv7k-apple-watchos ([#1599](https://github.com/rust-lang/cc-rs/pull/1599)) - Add elf abi to ppc64 targets ([#1596](https://github.com/rust-lang/cc-rs/pull/1596)) ## [1.2.41](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.40...cc-v1.2.41) - 2025-10-10 ### Other - Allow using VCToolsVersion to request a specific msvc version ([#1589](https://github.com/rust-lang/cc-rs/pull/1589)) - Regenerate target info ([#1592](https://github.com/rust-lang/cc-rs/pull/1592)) - Regenerate windows sys bindings ([#1591](https://github.com/rust-lang/cc-rs/pull/1591)) - Update windows-bindgen requirement from 0.64 to 0.65 ([#1590](https://github.com/rust-lang/cc-rs/pull/1590)) - Fix `get_base_archiver_variant` for clang-cl: use `--print-search-dirs` ([#1587](https://github.com/rust-lang/cc-rs/pull/1587)) ## [1.2.40](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.39...cc-v1.2.40) - 2025-10-03 ### Other - Reorder changelog and remove duplicate Unreleased section ([#1579](https://github.com/rust-lang/cc-rs/pull/1579)) - Prefer clang if linker-plugin-lto specified ([#1573](https://github.com/rust-lang/cc-rs/pull/1573)) - Fix building for Mac Catalyst ([#1577](https://github.com/rust-lang/cc-rs/pull/1577)) - Improve ESP microcontroller targets ([#1574](https://github.com/rust-lang/cc-rs/pull/1574)) ## [1.2.39](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.38...cc-v1.2.39) - 2025-09-26 ### Other - Fix cross compilation to xtensa-esp32s3-espidf ([#1569](https://github.com/rust-lang/cc-rs/pull/1569)) - Fix autodetect_wasi_compiler: support non utf-8 path ([#1568](https://github.com/rust-lang/cc-rs/pull/1568)) - Regenerate target info ([#1567](https://github.com/rust-lang/cc-rs/pull/1567)) - Fix rustcflags mapping: require -Clinker-plugin-lto for -flto ([#1564](https://github.com/rust-lang/cc-rs/pull/1564)) - Use `$WASI_SDK_PATH` on WASI targets by default ([#1562](https://github.com/rust-lang/cc-rs/pull/1562)) - Fix atomicity violations in concurrent cache operations ([#1559](https://github.com/rust-lang/cc-rs/pull/1559)) ## [1.2.38](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.37...cc-v1.2.38) - 2025-09-19 ### Other - updated the following local packages: find-msvc-tools ## [1.2.37](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.36...cc-v1.2.37) - 2025-09-12 ### Other - Fix errmsg in RustcCodegenFlags::set_rustc_flag ([#1551](https://github.com/rust-lang/cc-rs/pull/1551)) - propagate stack protector to Linux C compilers ([#1550](https://github.com/rust-lang/cc-rs/pull/1550)) - Extract new fn `run_commands_in_parallel` ([#1549](https://github.com/rust-lang/cc-rs/pull/1549)) ## [1.2.36](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.35...cc-v1.2.36) - 2025-09-05 ### Other - Regenerate windows sys bindings ([#1548](https://github.com/rust-lang/cc-rs/pull/1548)) - Update windows-bindgen requirement from 0.62 to 0.63 ([#1547](https://github.com/rust-lang/cc-rs/pull/1547)) - Add fn get_ucrt_dir for find-msvc-tools ([#1546](https://github.com/rust-lang/cc-rs/pull/1546)) - Regenerate target info ([#1544](https://github.com/rust-lang/cc-rs/pull/1544)) - fix publish.yml ([#1543](https://github.com/rust-lang/cc-rs/pull/1543)) - Replace periods with underscores as well when parsing env variables ([#1541](https://github.com/rust-lang/cc-rs/pull/1541)) ## [1.2.35](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.34...cc-v1.2.35) - 2025-09-01 ### Fixed - fix building for aarch64-apple-visionos-sim on nightly ([#1534](https://github.com/rust-lang/cc-rs/pull/1534)) - fix tests apple_sdkroot_wrong ([#1530](https://github.com/rust-lang/cc-rs/pull/1530)) ### Other - Regenerate target info ([#1536](https://github.com/rust-lang/cc-rs/pull/1536)) - Optimize Tool::to_command ([#1535](https://github.com/rust-lang/cc-rs/pull/1535)) - Extract find-msvc-tools ([#1531](https://github.com/rust-lang/cc-rs/pull/1531)) - Add prefer_clang_cl_over_msvc ([#1516](https://github.com/rust-lang/cc-rs/pull/1516)) ## [1.2.34](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.33...cc-v1.2.34) - 2025-08-22 ### Fixed - add `-mcpu=mvp` and `-mmutable-globals` for `wasm32v1-none` ([#1524](https://github.com/rust-lang/cc-rs/pull/1524)) ### Other - Optimize parse_version in find_tools.rs ([#1527](https://github.com/rust-lang/cc-rs/pull/1527)) - Fallback to manually searching for tool dir ([#1526](https://github.com/rust-lang/cc-rs/pull/1526)) ## [1.2.33](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.32...cc-v1.2.33) - 2025-08-15 ### Other - Regenerate target info ([#1521](https://github.com/rust-lang/cc-rs/pull/1521)) - [win][arm64ec] Add testing for Arm64EC Windows ([#1512](https://github.com/rust-lang/cc-rs/pull/1512)) - Fix parsing of nigthly targets ([#1517](https://github.com/rust-lang/cc-rs/pull/1517)) - [win][arm64ec] Fix finding assembler and setting is_arm for Arm64EC ([#1511](https://github.com/rust-lang/cc-rs/pull/1511)) ## [1.2.32](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.31...cc-v1.2.32) - 2025-08-08 ### Fixed - fix new clippy lint introduced in rust 1.89.0 ([#1509](https://github.com/rust-lang/cc-rs/pull/1509)) ### Other - clarify cargo default if no rerun emitted ([#1508](https://github.com/rust-lang/cc-rs/pull/1508)) - extract compile_objects_sequential ([#1507](https://github.com/rust-lang/cc-rs/pull/1507)) - Windows `find_tools`: add support for finding Clang ([#1506](https://github.com/rust-lang/cc-rs/pull/1506)) - Add m68k-unknown-linux-gnu cross-compile target ([#1505](https://github.com/rust-lang/cc-rs/pull/1505)) ## [1.2.31](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.30...cc-v1.2.31) - 2025-08-01 ### Other - Add doc for using sccache/ccache etc ([#1502](https://github.com/rust-lang/cc-rs/pull/1502)) - ability to statically link against C++ stdlib ([#1497](https://github.com/rust-lang/cc-rs/pull/1497)) - Add instructions on using sccache ([#1503](https://github.com/rust-lang/cc-rs/pull/1503)) - Add support for recognizing some architectures supported by GCC, but not LLVM. ([#1500](https://github.com/rust-lang/cc-rs/pull/1500)) ## [1.2.30](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.29...cc-v1.2.30) - 2025-07-18 ### Other - define _REENTRANT by default ([#1496](https://github.com/rust-lang/cc-rs/pull/1496)) ## [1.2.29](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.28...cc-v1.2.29) - 2025-07-05 ### Other - Fix target parsing for powerpc ([#1490](https://github.com/rust-lang/cc-rs/pull/1490)) ## [1.2.28](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.27...cc-v1.2.28) - 2025-07-04 ### Other - Recognize `mlibc` environment ([#1488](https://github.com/rust-lang/cc-rs/pull/1488)) - Fix clippy warnings about not using variables in `format!` strings ([#1489](https://github.com/rust-lang/cc-rs/pull/1489)) ## [1.2.27](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.26...cc-v1.2.27) - 2025-06-13 ### Other - Regenerate windows sys bindings ([#1485](https://github.com/rust-lang/cc-rs/pull/1485)) - Update windows-bindgen requirement from 0.61 to 0.62 ([#1484](https://github.com/rust-lang/cc-rs/pull/1484)) - Regenerate target info ([#1483](https://github.com/rust-lang/cc-rs/pull/1483)) ## [1.2.26](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.25...cc-v1.2.26) - 2025-06-06 ### Other - Also set `SDKROOT` when building apple platforms ([#1475](https://github.com/rust-lang/cc-rs/pull/1475)) - use windows 2022 in CI ([#1479](https://github.com/rust-lang/cc-rs/pull/1479)) - Detect -Wslash-u-filename warning on clang-cl ([#1477](https://github.com/rust-lang/cc-rs/pull/1477)) ## [1.2.25](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.24...cc-v1.2.25) - 2025-05-30 ### Other - make `powerp64` use `powerpc64-linux-gnu` prefix ([#1474](https://github.com/rust-lang/cc-rs/pull/1474)) ## [1.2.24](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.23...cc-v1.2.24) - 2025-05-23 ### Other - Regenerate windows sys bindings ([#1471](https://github.com/rust-lang/cc-rs/pull/1471)) ## [1.2.23](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.22...cc-v1.2.23) - 2025-05-16 ### Other - support "vxworks" and "nto" OSes on `get_base_archiver_variant` ([#1456](https://github.com/rust-lang/cc-rs/pull/1456)) ## [1.2.22](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.21...cc-v1.2.22) - 2025-05-09 ### Other - Add `flags` method to `cc::Build` for adding multiple flags ([#1466](https://github.com/rust-lang/cc-rs/pull/1466)) ## [1.2.21](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.20...cc-v1.2.21) - 2025-05-02 ### Other - Fix wasm32-unknown-unknown by passing -c ([#1424](https://github.com/rust-lang/cc-rs/pull/1424)) ## [1.2.20](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.19...cc-v1.2.20) - 2025-04-25 ### Other - Regenerate target info ([#1461](https://github.com/rust-lang/cc-rs/pull/1461)) - Fix parser.rs on latest rustc nightly ([#1459](https://github.com/rust-lang/cc-rs/pull/1459)) ## [1.2.19](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.18...cc-v1.2.19) - 2025-04-11 ### Other - Fix musl compilation: Add musl as a prefix fallback ([#1455](https://github.com/rust-lang/cc-rs/pull/1455)) ## [1.2.18](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.17...cc-v1.2.18) - 2025-04-04 ### Other - Regenerate target info ([#1450](https://github.com/rust-lang/cc-rs/pull/1450)) - Use `std::thread::available_parallelism` for determining the default number of jobs ([#1447](https://github.com/rust-lang/cc-rs/pull/1447)) - Fix mips64-openwrt-linux-musl parsing ([#1449](https://github.com/rust-lang/cc-rs/pull/1449)) - Use compiler prefix `x86_64-linux-musl` ([#1443](https://github.com/rust-lang/cc-rs/pull/1443)) ## [1.2.17](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.16...cc-v1.2.17) - 2025-03-21 ### Other - Regenerate target info ([#1439](https://github.com/rust-lang/cc-rs/pull/1439)) - Regenerate windows sys bindings ([#1437](https://github.com/rust-lang/cc-rs/pull/1437)) - Fix wasm32-wali-linux-musl target parsing ([#1434](https://github.com/rust-lang/cc-rs/pull/1434)) - Parse `rustc` target names ([#1413](https://github.com/rust-lang/cc-rs/pull/1413)) - Regenerate target info ([#1429](https://github.com/rust-lang/cc-rs/pull/1429)) - Added base support for `wasm32-wali-linux-musl` target ([#1373](https://github.com/rust-lang/cc-rs/pull/1373)) ## [1.2.16](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.15...cc-v1.2.16) - 2025-02-28 ### Fixed - force windows compiler to run in `out_dir` to prevent artifacts in cwd (#1415) ### Other - use `/arch:SSE2` for `x86` target arch (#1425) - Regenerate windows-sys binding ([#1422](https://github.com/rust-lang/cc-rs/pull/1422)) - Regenerate target info ([#1418](https://github.com/rust-lang/cc-rs/pull/1418)) - Add LIB var when compiling flag_check (#1417) - Change flag ordering ([#1403](https://github.com/rust-lang/cc-rs/pull/1403)) - Fix archiver detection for musl cross compilation ([#1404](https://github.com/rust-lang/cc-rs/pull/1404)) ## [1.2.15](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.14...cc-v1.2.15) - 2025-02-21 ### Other - Regenerate target info ([#1406](https://github.com/rust-lang/cc-rs/pull/1406)) - Always read from all `CFLAGS`-style flags ([#1401](https://github.com/rust-lang/cc-rs/pull/1401)) - Simplify the error output on failed `Command` invocation ([#1397](https://github.com/rust-lang/cc-rs/pull/1397)) ## [1.2.14](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.13...cc-v1.2.14) - 2025-02-14 ### Other - Regenerate target info ([#1398](https://github.com/rust-lang/cc-rs/pull/1398)) - Add support for setting `-gdwarf-{version}` based on RUSTFLAGS ([#1395](https://github.com/rust-lang/cc-rs/pull/1395)) - Add support for alternative network stack io-sock on QNX 7.1 aarch64 and x86_64 ([#1312](https://github.com/rust-lang/cc-rs/pull/1312)) ## [1.2.13](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.12...cc-v1.2.13) - 2025-02-08 ### Other - Fix cross-compiling for Apple platforms ([#1389](https://github.com/rust-lang/cc-rs/pull/1389)) ## [1.2.12](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.11...cc-v1.2.12) - 2025-02-04 ### Other - Split impl Build ([#1382](https://github.com/rust-lang/cc-rs/pull/1382)) - Don't specify both `-target` and `-mtargetos=` on Apple targets ([#1384](https://github.com/rust-lang/cc-rs/pull/1384)) ## [1.2.11](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.10...cc-v1.2.11) - 2025-01-31 ### Other - Fix more flag inheritance ([#1380](https://github.com/rust-lang/cc-rs/pull/1380)) - Include wrapper args. in `stdout` family heuristics to restore classifying `clang --driver-mode=cl` as `Msvc { clang_cl: true }` ([#1378](https://github.com/rust-lang/cc-rs/pull/1378)) - Constrain `-Clto` and `-Cembed-bitcode` flag inheritance to be `clang`-only ([#1379](https://github.com/rust-lang/cc-rs/pull/1379)) - Pass deployment target with `-m*-version-min=` ([#1339](https://github.com/rust-lang/cc-rs/pull/1339)) - Regenerate target info ([#1376](https://github.com/rust-lang/cc-rs/pull/1376)) ## [1.2.10](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.9...cc-v1.2.10) - 2025-01-17 ### Other - Fix CC_FORCE_DISABLE=0 evaluating to true ([#1371](https://github.com/rust-lang/cc-rs/pull/1371)) - Regenerate target info ([#1369](https://github.com/rust-lang/cc-rs/pull/1369)) - Make hidden lifetimes explicit. ([#1366](https://github.com/rust-lang/cc-rs/pull/1366)) ## [1.2.9](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.8...cc-v1.2.9) - 2025-01-12 ### Other - Don't pass inherited PGO flags to GNU compilers (#1363) - Adjusted zig cc judgment and avoided zigbuild errors([#1360](https://github.com/rust-lang/cc-rs/pull/1360)) ([#1361](https://github.com/rust-lang/cc-rs/pull/1361)) - Fix compilation on macOS using clang and fix compilation using zig-cc ([#1364](https://github.com/rust-lang/cc-rs/pull/1364)) ## [1.2.8](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.7...cc-v1.2.8) - 2025-01-11 ### Other - Add `is_like_clang_cl()` getter (#1357) - Fix clippy error in lib.rs ([#1356](https://github.com/rust-lang/cc-rs/pull/1356)) - Regenerate target info ([#1352](https://github.com/rust-lang/cc-rs/pull/1352)) - Fix compiler family detection issue with clang-cl on macOS ([#1328](https://github.com/rust-lang/cc-rs/pull/1328)) - Update `windows-bindgen` dependency ([#1347](https://github.com/rust-lang/cc-rs/pull/1347)) - Fix clippy warnings ([#1346](https://github.com/rust-lang/cc-rs/pull/1346)) ## [1.2.7](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.6...cc-v1.2.7) - 2025-01-03 ### Other - Regenerate target info ([#1342](https://github.com/rust-lang/cc-rs/pull/1342)) - Document new supported architecture names in windows::find - Make is_flag_supported_inner take an &Tool ([#1337](https://github.com/rust-lang/cc-rs/pull/1337)) - Fix is_flag_supported on msvc ([#1336](https://github.com/rust-lang/cc-rs/pull/1336)) - Allow using Visual Studio target names in `find_tool` ([#1335](https://github.com/rust-lang/cc-rs/pull/1335)) ## [1.2.6](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.5...cc-v1.2.6) - 2024-12-27 ### Other - Don't inherit the `/Oy` flag for 64-bit targets ([#1330](https://github.com/rust-lang/cc-rs/pull/1330)) ## [1.2.5](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.4...cc-v1.2.5) - 2024-12-19 ### Other - Check linking when testing if compiler flags are supported ([#1322](https://github.com/rust-lang/cc-rs/pull/1322)) ## [1.2.4](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.3...cc-v1.2.4) - 2024-12-13 ### Other - Add support for C/C++ compiler for Neutrino QNX: `qcc` ([#1319](https://github.com/rust-lang/cc-rs/pull/1319)) - use -maix64 instead of -m64 ([#1307](https://github.com/rust-lang/cc-rs/pull/1307)) ## [1.2.3](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.2...cc-v1.2.3) - 2024-12-06 ### Other - Improve detection of environment when compiling from msbuild or msvc ([#1310](https://github.com/rust-lang/cc-rs/pull/1310)) - Better error message when failing on unknown targets ([#1313](https://github.com/rust-lang/cc-rs/pull/1313)) - Optimize RustcCodegenFlags ([#1305](https://github.com/rust-lang/cc-rs/pull/1305)) ## [1.2.2](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.1...cc-v1.2.2) - 2024-11-29 ### Other - Inherit flags from rustc ([#1279](https://github.com/rust-lang/cc-rs/pull/1279)) - Add support for using sccache wrapper with cuda/nvcc ([#1304](https://github.com/rust-lang/cc-rs/pull/1304)) - Fix msvc stdout not shown on error ([#1303](https://github.com/rust-lang/cc-rs/pull/1303)) - Regenerate target info ([#1301](https://github.com/rust-lang/cc-rs/pull/1301)) - Fix compilation of C++ code for armv7-unknown-linux-gnueabihf ([#1298](https://github.com/rust-lang/cc-rs/pull/1298)) - Fetch target info from Cargo even if `Build::target` is manually set ([#1299](https://github.com/rust-lang/cc-rs/pull/1299)) - Fix two files with different extensions having the same object name ([#1295](https://github.com/rust-lang/cc-rs/pull/1295)) - Allow disabling cc's ability to compile via env var CC_FORCE_DISABLE ([#1292](https://github.com/rust-lang/cc-rs/pull/1292)) - Regenerate target info ([#1293](https://github.com/rust-lang/cc-rs/pull/1293)) ## [1.2.1](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.0...cc-v1.2.1) - 2024-11-14 ### Other - When invoking `cl -?`, set stdin to null ([#1288](https://github.com/rust-lang/cc-rs/pull/1288)) ## [1.2.0](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.37...cc-v1.2.0) - 2024-11-11 ### Added - add i686-pc-windows-gnullvm prefix detection ([#1283](https://github.com/rust-lang/cc-rs/pull/1283)) ### Other - Allow only specifying the architecture ([#1285](https://github.com/rust-lang/cc-rs/pull/1285)) - Fix WASM vs. WASI options ([#1284](https://github.com/rust-lang/cc-rs/pull/1284)) ## [1.1.37](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.36...cc-v1.1.37) - 2024-11-08 ### Other - Use relative directory for obj files hash ([#1270](https://github.com/rust-lang/cc-rs/pull/1270)) - Regenerate target info ([#1280](https://github.com/rust-lang/cc-rs/pull/1280)) ## [1.1.36](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.35...cc-v1.1.36) - 2024-11-05 ### Other - Fix CUDA build with clang++. ([#1273](https://github.com/rust-lang/cc-rs/pull/1273)) ## [1.1.35](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.34...cc-v1.1.35) - 2024-11-04 ### Other - Remove support for FRC ([#1268](https://github.com/rust-lang/cc-rs/pull/1268)) - Do not add -fPIC by default on UEFI targets ([#1263](https://github.com/rust-lang/cc-rs/pull/1263)) - Use -windows-gnu for all UEFI targets ([#1264](https://github.com/rust-lang/cc-rs/pull/1264)) ## [1.1.34](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.33...cc-v1.1.34) - 2024-11-02 ### Other - Remove redundant flags ([#1256](https://github.com/rust-lang/cc-rs/pull/1256)) ## [1.1.33](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.32...cc-v1.1.33) - 2024-11-02 ### Other - Reduce size of `cc::Build` and size of generated targets ([#1257](https://github.com/rust-lang/cc-rs/pull/1257)) ## [1.1.32](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.31...cc-v1.1.32) - 2024-11-02 ### Other - Use `rustc`'s knowledge of LLVM/Clang target triples ([#1252](https://github.com/rust-lang/cc-rs/pull/1252)) - Use Cargo's target information when possible ([#1225](https://github.com/rust-lang/cc-rs/pull/1225)) ## [1.1.31](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.30...cc-v1.1.31) - 2024-10-19 ### Other - Add comment explaining why cc does not rebuild on env PATH change ([#1247](https://github.com/rust-lang/cc-rs/pull/1247)) ## [1.1.30](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.29...cc-v1.1.30) - 2024-10-11 ### Other - Don't pass -fPIC by default on wasm ([#1245](https://github.com/rust-lang/cc-rs/pull/1245)) ## [1.1.29](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.28...cc-v1.1.29) - 2024-10-11 ### Other - Regenerate target info ([#1243](https://github.com/rust-lang/cc-rs/pull/1243)) ## [1.1.28](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.27...cc-v1.1.28) - 2024-10-06 ### Other - Environment variables: For one accepting boolean, treat "0", "false" and empty env as false ([#1238](https://github.com/rust-lang/cc-rs/pull/1238)) ## [1.1.27](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.26...cc-v1.1.27) - 2024-10-06 ### Other - Revert "Use debug version of MSVC runtime library on debug ([#1231](https://github.com/rust-lang/cc-rs/pull/1231))" ([#1237](https://github.com/rust-lang/cc-rs/pull/1237)) - Disable `CC_ENABLE_DEBUG_OUTPUT` if it is set to "0" ([#1234](https://github.com/rust-lang/cc-rs/pull/1234)) ## [1.1.26](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.25...cc-v1.1.26) - 2024-10-06 ### Other - Use debug version of MSVC runtime library on debug ([#1231](https://github.com/rust-lang/cc-rs/pull/1231)) ## [1.1.25](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.24...cc-v1.1.25) - 2024-10-05 ### Other - Remove incorrect "lib" prefixes in CXXSTDLIB doc comments ([#1228](https://github.com/rust-lang/cc-rs/pull/1228)) ## [1.1.24](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.23...cc-v1.1.24) - 2024-10-01 ### Other - Fix wasm32-wasip1-threads: shared-memory disallowed due to not compiled with 'atomics' or 'bulk-memory' features ([#1221](https://github.com/rust-lang/cc-rs/pull/1221)) - Reduce the need for the host target triple ([#1224](https://github.com/rust-lang/cc-rs/pull/1224)) - Add auto cancellation for CI jobs ([#1222](https://github.com/rust-lang/cc-rs/pull/1222)) ## [1.1.23](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.22...cc-v1.1.23) - 2024-09-30 ### Other - Update doc for detecting changes/upgrades of compilers ([#1218](https://github.com/rust-lang/cc-rs/pull/1218)) ## [1.1.22](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.21...cc-v1.1.22) - 2024-09-27 ### Other - Don't rerun if PATH changes ([#1215](https://github.com/rust-lang/cc-rs/pull/1215)) ## [1.1.21](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.20...cc-v1.1.21) - 2024-09-18 ### Other - disable pic for targets that end in `-none` ([#1212](https://github.com/rust-lang/cc-rs/pull/1212)) ## [1.1.20](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.19...cc-v1.1.20) - 2024-09-17 ### Other - Add buildcache as known Rust and C/C++ compiler wrapper ([#1209](https://github.com/rust-lang/cc-rs/pull/1209)) ## [1.1.19](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.18...cc-v1.1.19) - 2024-09-15 ### Other - Add support arm64e-apple-darwin ([#1207](https://github.com/rust-lang/cc-rs/pull/1207)) ## [1.1.18](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.17...cc-v1.1.18) - 2024-09-07 ### Other - Fixed unsoundness in `StderrForwarder::forward_available` ([#1203](https://github.com/rust-lang/cc-rs/pull/1203)) ## [1.1.17](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.16...cc-v1.1.17) - 2024-09-06 ### Fixed - fix finding toolchains when invoked by msbuild ([#1201](https://github.com/rust-lang/cc-rs/pull/1201)) ## [1.1.16](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.15...cc-v1.1.16) - 2024-09-04 ### Other - Treat VxWorks wr-cc as a Gnu compiler ([#1198](https://github.com/rust-lang/cc-rs/pull/1198)) ## [1.1.15](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.14...cc-v1.1.15) - 2024-08-26 ### Other - Add -mfloat-abi=hard as a default argument when using any arm/thumb-none-eabihf target ([#1194](https://github.com/rust-lang/cc-rs/pull/1194)) ## [1.1.14](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.13...cc-v1.1.14) - 2024-08-23 ### Other - allow finding tools from path if VisualStudioDir is set ## [1.1.13](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.12...cc-v1.1.13) - 2024-08-16 ### Other - Fix detect family: should detect emscripten as clang, closes [#1185](https://github.com/rust-lang/cc-rs/pull/1185) ([#1186](https://github.com/rust-lang/cc-rs/pull/1186)) ## [1.1.12](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.11...cc-v1.1.12) - 2024-08-15 ### Other - improve docs ([#1183](https://github.com/rust-lang/cc-rs/pull/1183)) ## [1.1.11](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.10...cc-v1.1.11) - 2024-08-14 ### Other - Add support for parsing shell encoded `*FLAGS` ([#1181](https://github.com/rust-lang/cc-rs/pull/1181)) - Replace vector of tuples with BTreeMap which already is sorted and free of duplicates ([#1177](https://github.com/rust-lang/cc-rs/pull/1177)) ## [1.1.10](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.9...cc-v1.1.10) - 2024-08-11 ### Other - Remap Windows targets triples to their LLVM counterparts ([#1176](https://github.com/rust-lang/cc-rs/pull/1176)) ## [1.1.9](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.8...cc-v1.1.9) - 2024-08-11 ### Other - Add custom CC wrapper to the wrapper whitelist ([#1175](https://github.com/rust-lang/cc-rs/pull/1175)) ## [1.1.8](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.7...cc-v1.1.8) - 2024-08-06 ### Other - Fix broken link in docs.rs ([#1173](https://github.com/rust-lang/cc-rs/pull/1173)) ## [1.1.7](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.6...cc-v1.1.7) - 2024-07-29 ### Other - add `.objects` ([#1166](https://github.com/rust-lang/cc-rs/pull/1166)) ## [1.1.6](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.5...cc-v1.1.6) - 2024-07-19 ### Other - Clippy fixes ([#1163](https://github.com/rust-lang/cc-rs/pull/1163)) ## [1.1.5](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.4...cc-v1.1.5) - 2024-07-15 ### Other - Fix cyclic compilation: Use vendored once_cell ([#1154](https://github.com/rust-lang/cc-rs/pull/1154)) ## [1.1.4](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.3...cc-v1.1.4) - 2024-07-14 ### Other - Support compiling on wasm targets (Supersede [#1068](https://github.com/rust-lang/cc-rs/pull/1068)) ([#1160](https://github.com/rust-lang/cc-rs/pull/1160)) ## [1.1.3](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.2...cc-v1.1.3) - 2024-07-14 ### Other - Reduce msrv to 1.63 ([#1158](https://github.com/rust-lang/cc-rs/pull/1158)) - Revert "Use raw-dylib for windows-sys ([#1137](https://github.com/rust-lang/cc-rs/pull/1137))" ([#1157](https://github.com/rust-lang/cc-rs/pull/1157)) - Fix typos ([#1152](https://github.com/rust-lang/cc-rs/pull/1152)) - Fix `doc_lazy_continuation` lints ([#1153](https://github.com/rust-lang/cc-rs/pull/1153)) ## [1.1.2](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.1...cc-v1.1.2) - 2024-07-12 ### Other - Add empty `jobserver` feature. ([#1150](https://github.com/rust-lang/cc-rs/pull/1150)) ## [1.1.1](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.0...cc-v1.1.1) - 2024-07-12 ### Other - Fix is_flag_supported not respecting emit_rerun_if_env_changed ([#1147](https://github.com/rust-lang/cc-rs/pull/1147)) ([#1148](https://github.com/rust-lang/cc-rs/pull/1148)) ## [1.1.0](https://github.com/rust-lang/cc-rs/compare/cc-v1.0.106...cc-v1.1.0) - 2024-07-08 ### Added - add cargo_output to eliminate last vestiges of stdout pollution ([#1141](https://github.com/rust-lang/cc-rs/pull/1141)) ## [1.0.106](https://github.com/rust-lang/cc-rs/compare/cc-v1.0.105...cc-v1.0.106) - 2024-07-08 ### Other - Drop support for Visual Studio 12 (2013) ([#1046](https://github.com/rust-lang/cc-rs/pull/1046)) - Use raw-dylib for windows-sys ([#1137](https://github.com/rust-lang/cc-rs/pull/1137)) - Bump msrv to 1.67 ([#1143](https://github.com/rust-lang/cc-rs/pull/1143)) - Bump msrv to 1.65 ([#1140](https://github.com/rust-lang/cc-rs/pull/1140)) - Fix clippy warnings ([#1138](https://github.com/rust-lang/cc-rs/pull/1138)) ## [1.0.105](https://github.com/rust-lang/cc-rs/compare/cc-v1.0.104...cc-v1.0.105) - 2024-07-07 ### Other - Regenerate windows sys bindings ([#1132](https://github.com/rust-lang/cc-rs/pull/1132)) - Fix generate-windows-sys-bindings ([#1133](https://github.com/rust-lang/cc-rs/pull/1133)) - Fix gen-windows-sys-binding ([#1130](https://github.com/rust-lang/cc-rs/pull/1130)) - Fix gen-windows-sys-binding ([#1127](https://github.com/rust-lang/cc-rs/pull/1127)) - Update windows-bindgen requirement from 0.57 to 0.58 ([#1123](https://github.com/rust-lang/cc-rs/pull/1123)) ## [1.0.104](https://github.com/rust-lang/cc-rs/compare/cc-v1.0.103...cc-v1.0.104) - 2024-07-01 ### Other - Fixed link break about compile-time-requirements ([#1118](https://github.com/rust-lang/cc-rs/pull/1118)) ## [1.0.103](https://github.com/rust-lang/cc-rs/compare/cc-v1.0.102...cc-v1.0.103) - 2024-06-30 ### Other - Fix compilation for wasm: env WASI_SYSROOT should be optional ([#1114](https://github.com/rust-lang/cc-rs/pull/1114)) ## [1.0.102](https://github.com/rust-lang/cc-rs/compare/cc-v1.0.101...cc-v1.0.102) - 2024-06-29 ### Other - Fix invalid wasi targets compatibility ([#1105](https://github.com/rust-lang/cc-rs/pull/1105)) - Speedup regenerate-target-info and regenerate-windows-sys ([#1110](https://github.com/rust-lang/cc-rs/pull/1110)) ## [1.0.101](https://github.com/rust-lang/cc-rs/compare/cc-v1.0.100...cc-v1.0.101) - 2024-06-25 ### Other - Use `Build::getenv` instead of `env::var*` in anywhere that makes sense ([#1103](https://github.com/rust-lang/cc-rs/pull/1103)) ## [1.0.100](https://github.com/rust-lang/cc-rs/compare/cc-v1.0.99...cc-v1.0.100) - 2024-06-23 ### Other - Update publish.yml to use release-plz ([#1101](https://github.com/rust-lang/cc-rs/pull/1101)) - Accept `OsStr` instead of `str` for flags ([#1100](https://github.com/rust-lang/cc-rs/pull/1100)) - Use `dep:` syntax to avoid implicit features. ([#1099](https://github.com/rust-lang/cc-rs/pull/1099)) - Minor clippy fixes. ([#1098](https://github.com/rust-lang/cc-rs/pull/1098)) - Fix WASI compilation for C++ ([#1083](https://github.com/rust-lang/cc-rs/pull/1083)) - Regenerate windows sys bindings ([#1096](https://github.com/rust-lang/cc-rs/pull/1096)) - Rename regenerate-windows-sys to regenerate-windows-sys.yml ([#1095](https://github.com/rust-lang/cc-rs/pull/1095)) - Create regenerate-windows-sys.yml ([#1094](https://github.com/rust-lang/cc-rs/pull/1094)) - Update windows-bindgen requirement from 0.56 to 0.57 ([#1091](https://github.com/rust-lang/cc-rs/pull/1091)) - Eagerly close tempfile to fix [#1082](https://github.com/rust-lang/cc-rs/pull/1082) ([#1087](https://github.com/rust-lang/cc-rs/pull/1087)) - Output msvc.exe in the output directory ([#1090](https://github.com/rust-lang/cc-rs/pull/1090)) - Fix clippy warnings on Windows ([#1088](https://github.com/rust-lang/cc-rs/pull/1088)) - Don't try to free DLL on drop ([#1089](https://github.com/rust-lang/cc-rs/pull/1089)) - Fix panic safety issue in StderrForwarder ([#1079](https://github.com/rust-lang/cc-rs/pull/1079)) # Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## 0.4.4 (2022-03-09) ### Changed - Move `ParBlocks`/`ParBlocksSizeUser` to the `crypto-common` crate ([#1052]) ### Fixed - Unsoundness triggered by zero block size ([#1277]) [#1052]: https://github.com/RustCrypto/traits/pull/1052 [#1277]: https://github.com/RustCrypto/traits/pull/1277 ## 0.4.3 (2022-02-22) ### Fixed - Do not enable the `alloc` feature by default ([#953]) [#953]: https://github.com/RustCrypto/traits/pull/953 ## 0.4.2 (2022-02-16) [YANKED] ### Fixed - Rename `BlockDecryptMut::decrypt_padded_vec` to `decrypt_padded_vec_mut` for consistency with other methods ([#941]) [#941]: https://github.com/RustCrypto/traits/pull/941 ## 0.4.1 (2022-02-16) [YANKED] ### Added - Allocating padded encrypt/decrypt ([#936]) ### Fixed - Minimal versions build ([#940]) [#940]: https://github.com/RustCrypto/traits/pull/940 [#936]: https://github.com/RustCrypto/traits/pull/936 ## 0.4.0 (2022-02-10) ### Changed - Major rework of traits. Core functionality of block and stream ciphers is defined using rank-2 closures with convenience methods built on top of it. Expose block-level trait for stream ciphers and add generic wrapper around it. The async stream cipher trait is defined as sub-trait of mutable block cipher traits. ([#849]) ### Added - Re-export `rand_core` ([#683]) [#683]: https://github.com/RustCrypto/traits/pull/683 [#849]: https://github.com/RustCrypto/traits/pull/849 ## 0.3.0 (2021-04-28) ### Added - Encrypt/decrypt-only block cipher traits ([#352]) - Re-export `blobby` from root ([#435]) - Block cipher trait blanket impls for refs ([#441]) - `generate_key` method to `New*` trait ([#513]) ### Changed - Consolidate error types ([#373]) - Change `SeekNum` impls to fit with the new `BlockBuffer` ([#435]) - Reorganize modules ([#435]) - Renamed `new_var` to `new_from_slice(s)` ([#442]) [#352]: https://github.com/RustCrypto/traits/pull/352 [#373]: https://github.com/RustCrypto/traits/pull/373 [#435]: https://github.com/RustCrypto/traits/pull/435 [#441]: https://github.com/RustCrypto/traits/pull/441 [#442]: https://github.com/RustCrypto/traits/pull/442 [#513]: https://github.com/RustCrypto/traits/pull/513 ## 0.2.5 (2020-11-01) ### Fixed - Nested macros used old deprecated names ([#360]) [#360]: https://github.com/RustCrypto/traits/pull/360 ## 0.2.4 (2020-11-01) ### Fixed - Macro expansion error ([#358]) [#358]: https://github.com/RustCrypto/traits/pull/358 ## 0.2.3 (2020-11-01) [YANKED] ### Fixed - Legacy macro wrappers ([#356]) [#356]: https://github.com/RustCrypto/traits/pull/356 ## 0.2.2 (2020-11-01) [YANKED] ### Added - `BlockCipher::{encrypt_slice, decrypt_slice}` methods ([#351]) ### Changed - Revamp macro names ([#350]) [#351]: https://github.com/RustCrypto/traits/pull/351 [#350]: https://github.com/RustCrypto/traits/pull/350 ## 0.2.1 (2020-10-16) ### Added - Re-export `generic_array` from toplevel ([#343]) ### Fixed - `dev` macro imports ([#345]) [#343]: https://github.com/RustCrypto/traits/pull/343 [#345]: https://github.com/RustCrypto/traits/pull/345 ## 0.2.0 (2020-10-15) [YANKED] ### Changed - Unify `block-cipher` and `stream-cipher` into `cipher` ([#337]) [#337]: https://github.com/RustCrypto/traits/pull/337 ## 0.1.1 (2015-06-25) ## 0.1.0 (2015-06-24) - Initial release # Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## 0.5.1 (UNRELEASED) ### Changed - Block sizes no longer bounded by `crypto_common::BlockSizes` ([#2309]) - `StreamCipherCoreWrapper` is now bounded by `block_buffer::BlockSizes` instead of `crypto_common::BlockSizes` ([#2309]) - Bump `block-buffer` dependency to v0.12 ([#2309]) ### Fixed - `Key:` option in the `stream_cipher_bench` macro ([#2290]) [#2290]: https://github.com/RustCrypto/traits/pull/2290 [#2309]: https://github.com/RustCrypto/traits/pull/2309 ## 0.5.0 (2026-02-04) [YANKED] ### Added - Traits for tweakable block ciphers ([#1721]) - Methods for writing keystream ([#1907]) ### Changed - Replaced `generic-array` with `hybrid-array` ([#1358]) - Rename `BlockCipher*`/`BlockMode*` ([#1482]) - `BlockEncrypt` => `BlockCipherEncrypt` - `BlockDecrypt` => `BlockCipherDecrypt` - `BlockEncryptMut` => `BlockModeEncrypt` - `BlockDecryptMut` => `BlockModeDecrypt` - Split `BlockBackend` traits into 4 specific traits: ([#1636]) - `BlockCipherEncBackend` - `BlockCipherDecBackend` - `BlockModeEncBackend` - `BlockModeDecBackend` - Edition changed to 2024 and MSRV bumped to 1.85 ([#1759]) - Use `block_buffer::ReadBuffer` in `StreamCipherCoreWrapper` ([#1959]) - Re-export of `crypto-common` moved to `cipher::common` ([#2237], [#2260]) - `crypto-common` dependency bumped to v0.2 ([#2276]) - `blobby` requirement bumped to v0.4 ([#2147]) - `inout` dependency bumped to v0.2.2 ([#2149]) ### Fixed - Bugs in `StreamCipherCoreWrapper` trait implementations ([#1421]) - Seeking implementation in the stream cipher wrapper ([#2052]) ### Removed - `std` feature ([#1691]) - `BlockCipherEncrypt::encrypt_padded*` and `BlockCipherDecrypt::decrypt_padded*` methods. Users of the ECB mode should use the `ecb-mode` crate instead. ([#2245]) - `AsyncStreamCipher` trait ([#2280]) [#1358]: https://github.com/RustCrypto/traits/pull/1358 [#1421]: https://github.com/RustCrypto/traits/pull/1421 [#1482]: https://github.com/RustCrypto/traits/pull/1482 [#1636]: https://github.com/RustCrypto/traits/pull/1636 [#1691]: https://github.com/RustCrypto/traits/pull/1691 [#1721]: https://github.com/RustCrypto/traits/pull/1721 [#1759]: https://github.com/RustCrypto/traits/pull/1759 [#1907]: https://github.com/RustCrypto/traits/pull/1907 [#1959]: https://github.com/RustCrypto/traits/pull/1959 [#2052]: https://github.com/RustCrypto/traits/pull/2052 [#2147]: https://github.com/RustCrypto/traits/pull/2147 [#2149]: https://github.com/RustCrypto/traits/pull/2149 [#2237]: https://github.com/RustCrypto/traits/pull/2237 [#2245]: https://github.com/RustCrypto/traits/pull/2245 [#2260]: https://github.com/RustCrypto/traits/pull/2260 [#2276]: https://github.com/RustCrypto/traits/pull/2276 [#2280]: https://github.com/RustCrypto/traits/pull/2280 ## 0.4.4 (2022-03-09) ### Changed - Move `ParBlocks`/`ParBlocksSizeUser` to the `crypto-common` crate ([#1052]) ### Fixed - Unsoundness triggered by zero block size ([#1277]) [#1052]: https://github.com/RustCrypto/traits/pull/1052 [#1277]: https://github.com/RustCrypto/traits/pull/1277 ## 0.4.3 (2022-02-22) ### Fixed - Do not enable the `alloc` feature by default ([#953]) [#953]: https://github.com/RustCrypto/traits/pull/953 ## 0.4.2 (2022-02-16) [YANKED] ### Fixed - Rename `BlockDecryptMut::decrypt_padded_vec` to `decrypt_padded_vec_mut` for consistency with other methods ([#941]) [#941]: https://github.com/RustCrypto/traits/pull/941 ## 0.4.1 (2022-02-16) [YANKED] ### Added - Allocating padded encrypt/decrypt ([#936]) ### Fixed - Minimal versions build ([#940]) [#940]: https://github.com/RustCrypto/traits/pull/940 [#936]: https://github.com/RustCrypto/traits/pull/936 ## 0.4.0 (2022-02-10) ### Changed - Major rework of traits. Core functionality of block and stream ciphers is defined using rank-2 closures with convenience methods built on top of it. Expose block-level trait for stream ciphers and add generic wrapper around it. The async stream cipher trait is defined as sub-trait of mutable block cipher traits. ([#849]) ### Added - Re-export `rand_core` ([#683]) [#683]: https://github.com/RustCrypto/traits/pull/683 [#849]: https://github.com/RustCrypto/traits/pull/849 ## 0.3.0 (2021-04-28) ### Added - Encrypt/decrypt-only block cipher traits ([#352]) - Re-export `blobby` from root ([#435]) - Block cipher trait blanket impls for refs ([#441]) - `generate_key` method to `New*` trait ([#513]) ### Changed - Consolidate error types ([#373]) - Change `SeekNum` impls to fit with the new `BlockBuffer` ([#435]) - Reorganize modules ([#435]) - Renamed `new_var` to `new_from_slice(s)` ([#442]) [#352]: https://github.com/RustCrypto/traits/pull/352 [#373]: https://github.com/RustCrypto/traits/pull/373 [#435]: https://github.com/RustCrypto/traits/pull/435 [#441]: https://github.com/RustCrypto/traits/pull/441 [#442]: https://github.com/RustCrypto/traits/pull/442 [#513]: https://github.com/RustCrypto/traits/pull/513 ## 0.2.5 (2020-11-01) ### Fixed - Nested macros used old deprecated names ([#360]) [#360]: https://github.com/RustCrypto/traits/pull/360 ## 0.2.4 (2020-11-01) ### Fixed - Macro expansion error ([#358]) [#358]: https://github.com/RustCrypto/traits/pull/358 ## 0.2.3 (2020-11-01) [YANKED] ### Fixed - Legacy macro wrappers ([#356]) [#356]: https://github.com/RustCrypto/traits/pull/356 ## 0.2.2 (2020-11-01) [YANKED] ### Added - `BlockCipher::{encrypt_slice, decrypt_slice}` methods ([#351]) ### Changed - Revamp macro names ([#350]) [#351]: https://github.com/RustCrypto/traits/pull/351 [#350]: https://github.com/RustCrypto/traits/pull/350 ## 0.2.1 (2020-10-16) ### Added - Re-export `generic_array` from toplevel ([#343]) ### Fixed - `dev` macro imports ([#345]) [#343]: https://github.com/RustCrypto/traits/pull/343 [#345]: https://github.com/RustCrypto/traits/pull/345 ## 0.2.0 (2020-10-15) [YANKED] ### Changed - Unify `block-cipher` and `stream-cipher` into `cipher` ([#337]) [#337]: https://github.com/RustCrypto/traits/pull/337 ## 0.1.1 (2015-06-25) ## 0.1.0 (2015-06-24) - Initial release # Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## 0.5.2 (2026-01-20) ### Fixed - `Cmov` impl for `isize`/`usize` ([#1412]) [#1412]: https://github.com/RustCrypto/utils/pull/1412 ## 0.5.1 (2026-01-18) ### Added - `riscv32` optimised mask generation ([#1396]) - `riscv64` optimised mask generation ([#1397]) - Support for `core::num::NonZero*` and `core::cmp::Ordering` ([#1404]) [#1396]: https://github.com/RustCrypto/utils/pull/1396 [#1397]: https://github.com/RustCrypto/utils/pull/1397 [#1404]: https://github.com/RustCrypto/utils/pull/1404 ## 0.5.0 (2026-01-17) ### Added - Optimized `CmovEq` for `[u8]` ([#1356]) - Optimized `CmovEq` for `[u16]` ([#1370]) - Impl `Cmov`/`CmovEq` for slices of unsigned integers ([#1370], [#1372]) - Impl `Cmov`/`CmovEq` for slices of signed integers ([#1373]) - Impl `Cmov`/`CmovEq` for `isize`/`usize` ([#1375]) ### Changed - Impls of `Cmov`/`CmovEq` for `[T; N]` are now bounded on `[T]: Cmov(Eq)` ([#1372]) ### Removed - Generic impl of `CmovEq` for `[T]` where `T: CmovEq` in favor of specialized impls ([#1356]) [#1356]: https://github.com/RustCrypto/utils/pull/1356 [#1370]: https://github.com/RustCrypto/utils/pull/1370 [#1372]: https://github.com/RustCrypto/utils/pull/1372 [#1373]: https://github.com/RustCrypto/utils/pull/1373 [#1375]: https://github.com/RustCrypto/utils/pull/1375 ## 0.4.6 (2026-01-16) ### Added - Optimized `Cmov` for `[u8; N]` ([#1350]) - Optimized `CmovEq` for `[u8; N]` ([#1353]) - Optimized `Cmov` for `[u8]` ([#1354]) ### Fixed - Provided `Cmov::cmovz` impl ([#1351]) [#1350]: https://github.com/RustCrypto/utils/pull/1350 [#1351]: https://github.com/RustCrypto/utils/pull/1351 [#1353]: https://github.com/RustCrypto/utils/pull/1353 [#1354]: https://github.com/RustCrypto/utils/pull/1354 ## 0.4.5 (2026-01-15) ### Changed - Introduce small ARM32 `asm!` optimization which also guarantees constant-time operation ([#1336], [#1346]) [#1336]: https://github.com/RustCrypto/utils/pull/1336 [#1346]: https://github.com/RustCrypto/utils/pull/1346 ## 0.4.4 (2026-01-14) ### Security - Fix non-constant-time assembly being emitted from portable backend on `thumbv6m-none-eabi` ([#1332]) [#1332]: https://github.com/RustCrypto/utils/pull/1332 ## 0.4.3 (2025-12-27) ### Fixed - `aarch64` ASM bug ([#1299]) - Truncation bug in portable implementation ([#1300]) [#1299]: https://github.com/RustCrypto/utils/pull/1299 [#1300]: https://github.com/RustCrypto/utils/pull/1300 ## 0.4.2 (2025-12-26) ### Added - Signed integer support ([#1280]) [#1280]: https://github.com/RustCrypto/utils/pull/1280 ## 0.4.1 (2025-12-19) ### Changed - Use `black_box` in portable impl ([#1255]) [#1255]: https://github.com/RustCrypto/utils/pull/1255 ## 0.4.0 (2025-09-10) ### Changed - Edition changed to 2024 and MSRV bumped to 1.85 ([#1149]) [#1149]: https://github.com/RustCrypto/utils/pull/1149 ## 0.3.1 (2023-10-14) ### Added - `CmovEq` impl for slices ([#954]) ### Changed - Use `#[inline]` instead of `#[inline(always)]` ([#924]) - `CmovEq` now invokes XOR within the ASM block ([#925]) [#924]: https://github.com/RustCrypto/utils/pull/924 [#925]: https://github.com/RustCrypto/utils/pull/925 [#954]: https://github.com/RustCrypto/utils/pull/954 ## 0.3.0 (2023-04-02) ### Added - `miri` support by forcing the `portable` backend ([#864]) - Constant-time equality comparisons ([#873]) ### Changed - Make `Cmov::cmovz` a provided method ([#871]) ### Fixed - Builds on `x86` (32-bit) targets ([#863]) [#863]: https://github.com/RustCrypto/utils/pull/863 [#864]: https://github.com/RustCrypto/utils/pull/864 [#871]: https://github.com/RustCrypto/utils/pull/871 [#873]: https://github.com/RustCrypto/utils/pull/873 ## 0.2.0 (2023-02-26) ### Added - `Condition` alias for `u8` ([#830]) ### Changed - Redesigned trait-based API ([#830]) - Built around a `Cmov` trait - Trait is impl'd for `u8`, `u16`, `u32`, `u64`, `u128` - Accepts a `Condition` (i.e. `u8`) as a predicate - MSRV 1.60 ([#839]) [#830]: https://github.com/RustCrypto/utils/pull/830 [#839]: https://github.com/RustCrypto/utils/pull/839 ## 0.1.1 (2022-03-02) ### Added - `cmovz`/`cmovnz`-alike support for AArch64 targets ([#744]) [#744]: https://github.com/RustCrypto/utils/pull/744 ## 0.1.0 (2022-02-27) - Initial release # Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## 0.5.3 (2026-04-02) ### Added - Impl `Cmov`/`CmovEq` for `NonZeroUsize`/`NonZeroIsize` ([#1415]) ### Changed - Avoid using `asm!` under `cfg(miri)` ([#1436]) [#1415]: https://github.com/RustCrypto/utils/pull/1415 [#1436]: https://github.com/RustCrypto/utils/pull/1436 ## 0.5.2 (2026-01-20) ### Fixed - `Cmov` impl for `isize`/`usize` ([#1412]) [#1412]: https://github.com/RustCrypto/utils/pull/1412 ## 0.5.1 (2026-01-18) ### Added - `riscv32` optimised mask generation ([#1396]) - `riscv64` optimised mask generation ([#1397]) - Support for `core::num::NonZero*` and `core::cmp::Ordering` ([#1404]) [#1396]: https://github.com/RustCrypto/utils/pull/1396 [#1397]: https://github.com/RustCrypto/utils/pull/1397 [#1404]: https://github.com/RustCrypto/utils/pull/1404 ## 0.5.0 (2026-01-17) ### Added - Optimized `CmovEq` for `[u8]` ([#1356]) - Optimized `CmovEq` for `[u16]` ([#1370]) - Impl `Cmov`/`CmovEq` for slices of unsigned integers ([#1370], [#1372]) - Impl `Cmov`/`CmovEq` for slices of signed integers ([#1373]) - Impl `Cmov`/`CmovEq` for `isize`/`usize` ([#1375]) ### Changed - Impls of `Cmov`/`CmovEq` for `[T; N]` are now bounded on `[T]: Cmov(Eq)` ([#1372]) ### Removed - Generic impl of `CmovEq` for `[T]` where `T: CmovEq` in favor of specialized impls ([#1356]) [#1356]: https://github.com/RustCrypto/utils/pull/1356 [#1370]: https://github.com/RustCrypto/utils/pull/1370 [#1372]: https://github.com/RustCrypto/utils/pull/1372 [#1373]: https://github.com/RustCrypto/utils/pull/1373 [#1375]: https://github.com/RustCrypto/utils/pull/1375 ## 0.4.6 (2026-01-16) ### Added - Optimized `Cmov` for `[u8; N]` ([#1350]) - Optimized `CmovEq` for `[u8; N]` ([#1353]) - Optimized `Cmov` for `[u8]` ([#1354]) ### Fixed - Provided `Cmov::cmovz` impl ([#1351]) [#1350]: https://github.com/RustCrypto/utils/pull/1350 [#1351]: https://github.com/RustCrypto/utils/pull/1351 [#1353]: https://github.com/RustCrypto/utils/pull/1353 [#1354]: https://github.com/RustCrypto/utils/pull/1354 ## 0.4.5 (2026-01-15) ### Changed - Introduce small ARM32 `asm!` optimization which also guarantees constant-time operation ([#1336], [#1346]) [#1336]: https://github.com/RustCrypto/utils/pull/1336 [#1346]: https://github.com/RustCrypto/utils/pull/1346 ## 0.4.4 (2026-01-14) ### Security - Fix non-constant-time assembly being emitted from portable backend on `thumbv6m-none-eabi` ([#1332]) [#1332]: https://github.com/RustCrypto/utils/pull/1332 ## 0.4.3 (2025-12-27) ### Fixed - `aarch64` ASM bug ([#1299]) - Truncation bug in portable implementation ([#1300]) [#1299]: https://github.com/RustCrypto/utils/pull/1299 [#1300]: https://github.com/RustCrypto/utils/pull/1300 ## 0.4.2 (2025-12-26) ### Added - Signed integer support ([#1280]) [#1280]: https://github.com/RustCrypto/utils/pull/1280 ## 0.4.1 (2025-12-19) ### Changed - Use `black_box` in portable impl ([#1255]) [#1255]: https://github.com/RustCrypto/utils/pull/1255 ## 0.4.0 (2025-09-10) ### Changed - Edition changed to 2024 and MSRV bumped to 1.85 ([#1149]) [#1149]: https://github.com/RustCrypto/utils/pull/1149 ## 0.3.1 (2023-10-14) ### Added - `CmovEq` impl for slices ([#954]) ### Changed - Use `#[inline]` instead of `#[inline(always)]` ([#924]) - `CmovEq` now invokes XOR within the ASM block ([#925]) [#924]: https://github.com/RustCrypto/utils/pull/924 [#925]: https://github.com/RustCrypto/utils/pull/925 [#954]: https://github.com/RustCrypto/utils/pull/954 ## 0.3.0 (2023-04-02) ### Added - `miri` support by forcing the `portable` backend ([#864]) - Constant-time equality comparisons ([#873]) ### Changed - Make `Cmov::cmovz` a provided method ([#871]) ### Fixed - Builds on `x86` (32-bit) targets ([#863]) [#863]: https://github.com/RustCrypto/utils/pull/863 [#864]: https://github.com/RustCrypto/utils/pull/864 [#871]: https://github.com/RustCrypto/utils/pull/871 [#873]: https://github.com/RustCrypto/utils/pull/873 ## 0.2.0 (2023-02-26) ### Added - `Condition` alias for `u8` ([#830]) ### Changed - Redesigned trait-based API ([#830]) - Built around a `Cmov` trait - Trait is impl'd for `u8`, `u16`, `u32`, `u64`, `u128` - Accepts a `Condition` (i.e. `u8`) as a predicate - MSRV 1.60 ([#839]) [#830]: https://github.com/RustCrypto/utils/pull/830 [#839]: https://github.com/RustCrypto/utils/pull/839 ## 0.1.1 (2022-03-02) ### Added - `cmovz`/`cmovnz`-alike support for AArch64 targets ([#744]) [#744]: https://github.com/RustCrypto/utils/pull/744 ## 0.1.0 (2022-02-27) - Initial release # Unreleased - Updated top-level docs to include a note about `ColoredString`\'s role in the `Colorize` pipeline as well as link to it to suggest learning more about how to manipulate existing `ColoredString`\'s. - Changes to `ColoredString`: - Expose fields. - **[DEPRECATION]:** Deprecated methods `fgcolor`, `bgcolor`, and `style` due to their obsolescence in the face of the exposing of their represented fields. - Add methods for clearing specific elements of `fgcolor`, `bgcolor`, and `style`. - Change Default implementation to be via derive as Style now implements Default (see changes to Style below). - Add implementation of `DerefMut`. - Updated docs to reflect the above changes as well as generally greatly expand them. - Changes to `Style`: - Implemented `Default` for `Style` (returns `CLEAR`). This exposes a method by which users can create plain `Style`\'s from scratch. - Implemented `From` for `Style`. This lets users easily create `Style`\'s from specific styles. - Exposed previously private method `add`. - Created method `remove` which essentially does the opposite. - Added builder-style methods in the vein of `Colorize` to add stylings (e.g. `bold`, `underline`, `italic`, `strikethrough`). - Implemented bitwise operators `BitAnd`, `BitOr`, `BitXor`, and `Not` as well as their representative assignment operators. You can also use a `Styles` as an operand for these. - Implemented `FromIterator` for Style. - Changes to `Styles`: - Implemented bitwise operators `BitAnd`, `BitOr`, `BitXor`, and `Not` which all combine `Styles`\'s and output `Style`\'s. These can also take a `Style` as an operand. - Added additional testing for all of the above changes. - Added methods `with_style` and `with_color_and_style` to `Colorize`. # 2.1.0 * Impl From for ColoredString by @mahor1221 in https://github.com/colored-rs/colored/pull/126 * Allow conversion from ColoredString to Error by @spenserblack in https://github.com/colored-rs/colored/pull/86 * Suggestion for minor documentation clarification by @jonasbn in https://github.com/colored-rs/colored/pull/98 * Remove unnecessary is_terminal dependency by @Oakchris1955 in https://github.com/colored-rs/colored/pull/149 - Document crate MSRV of `1.70`. # 2.0.4 - Switch from `winapi` to `windows-sys`. # 2.0.3 - Document crate MSRV of `1.63`. # 2.0.2 - Fix typo in `src/control.rs`. - Replace `atty` dependency with `is-terminal`. # 2.0.1 (July 3, 2023) - Add edition for future compatibility. - Implement custom colors that can be stored in a variable. # 2.0.0 (July 14, 2020) - Add support for true colours. - Alter `Color` interface to return `Cow<'static, str>` # 1.9.3 (February 24, 2020) - Fix compilation regression for 1.34.0. Thanks @jlevon for reporting. # 1.9.2 (January 11, 2020) - Exposed `ColoredString` data through methods for purposes of interrogating the applied colours. - Increased documentation. # 1.9.1 (December 31, 2019) - Remove deprecated `try!` macro in codebase - Reduce allocations in `ColoredString` impl (PR#65) - Added `"purple"` as match in `impl FromStr for Color` (PR#71) # 1.9.0 (November 11, 2019) - **[POSSIBLE_BREAKING CHANGE]:** Replace `winconsole` with `winapi`: - Changes `set_virtual_terminal` function signature. - Update dependencies - Add Dockerfile - Respect tty discovery for CLICOLOR # 1.8.0 (April 30, 2019) - FEAT: support Windows 10 colors # 1.7.0 (January, 2019) - TECH: update lazy\_static - FEAT: introduce respect for the `NO_COLOR` environment variable # 1.6.1 (July 9, 2018) - TECH: update lazy\_static - CHORE: fix typos in README and documentation # 1.6.0 (October 31, 2017) - FEAT: introduced bright colors. `"hello".bright_blue().on_bright_red();` - FEAT: introduced strikethrough styling. `"hello".strikethrough();` # 1.5.3 (September 28, 2017) - FEAT: derive Copy and Clone for `Color` - FEAT: derive Clone for `ColoredString` # 1.5.2 (July 6, 2017) - FIX: method `Colorize::reversed` has been added. `Colorize::reverse` was a typo, that we will keep for compatibility # 1.5.1 (May 9, 2017) - Update lazy\_static to 0.2. # 1.5.0 (May 1, 2017) - FEAT: support for `"hello".color("blue")` (dynamic colors) # 1.3.2 (Nov 26, 2016) - FIX: usage of nested ColoredString again, no more style broken mid-line # 1.3.1 (Oct 14, 2016) - FIX: usage of ColoredString in a nested way broke the styling mid-line # 1.3.0 (Jul 31, 2016) - Provide various options for disabling the coloring in an API-compatible way # 1.2.0 (Mar 30, 2016) - Support the different formatting options, like padding and alignment # 1.1.0 (Mar 15, 2016) - Respect the CLICOLOR/CLICOLOR\_FORCE behavior. See [this specs](http://bixense.com/clicolors/) # 1.0.1 (Mar 14, 2016) - Add a CHANGLOG - Fix crate dependencies: move `ansi_term` in dev\_dependencies # 1.0.0 (Mar 13, 2016) - Initial release # Unreleased # 3.0.0 - **[BREAKING CHANGE]:** Upgrade MSRV to 1.80 and remove the then unnecessary lazy_static dependency. # 2.2.0 - Updated top-level docs to include a note about `ColoredString`\'s role in the `Colorize` pipeline as well as link to it to suggest learning more about how to manipulate existing `ColoredString`\'s. - Changes to `ColoredString`: - Expose fields. - **[DEPRECATION]:** Deprecated methods `fgcolor`, `bgcolor`, and `style` due to their obsolescence in the face of the exposing of their represented fields. - Add methods for clearing specific elements of `fgcolor`, `bgcolor`, and `style`. - Change Default implementation to be via derive as Style now implements Default (see changes to Style below). - Add implementation of `DerefMut`. - Updated docs to reflect the above changes as well as generally greatly expand them. - Changes to `Style`: - Implemented `Default` for `Style` (returns `CLEAR`). This exposes a method by which users can create plain `Style`\'s from scratch. - Implemented `From` for `Style`. This lets users easily create `Style`\'s from specific styles. - Exposed previously private method `add`. - Created method `remove` which essentially does the opposite. - Added builder-style methods in the vein of `Colorize` to add stylings (e.g. `bold`, `underline`, `italic`, `strikethrough`). - Implemented bitwise operators `BitAnd`, `BitOr`, `BitXor`, and `Not` as well as their representative assignment operators. You can also use a `Styles` as an operand for these. - Implemented `FromIterator` for Style. - Changes to `Styles`: - Implemented bitwise operators `BitAnd`, `BitOr`, `BitXor`, and `Not` which all combine `Styles`\'s and output `Style`\'s. These can also take a `Style` as an operand. - Added additional testing for all of the above changes. - Added methods `with_style` and `with_color_and_style` to `Colorize`. # 2.1.0 * Impl From for ColoredString by @mahor1221 in https://github.com/colored-rs/colored/pull/126 * Allow conversion from ColoredString to Error by @spenserblack in https://github.com/colored-rs/colored/pull/86 * Suggestion for minor documentation clarification by @jonasbn in https://github.com/colored-rs/colored/pull/98 * Remove unnecessary is_terminal dependency by @Oakchris1955 in https://github.com/colored-rs/colored/pull/149 - Document crate MSRV of `1.70`. # 2.0.4 - Switch from `winapi` to `windows-sys`. # 2.0.3 - Document crate MSRV of `1.63`. # 2.0.2 - Fix typo in `src/control.rs`. - Replace `atty` dependency with `is-terminal`. # 2.0.1 (July 3, 2023) - Add edition for future compatibility. - Implement custom colors that can be stored in a variable. # 2.0.0 (July 14, 2020) - Add support for true colours. - Alter `Color` interface to return `Cow<'static, str>` # 1.9.3 (February 24, 2020) - Fix compilation regression for 1.34.0. Thanks @jlevon for reporting. # 1.9.2 (January 11, 2020) - Exposed `ColoredString` data through methods for purposes of interrogating the applied colours. - Increased documentation. # 1.9.1 (December 31, 2019) - Remove deprecated `try!` macro in codebase - Reduce allocations in `ColoredString` impl (PR#65) - Added `"purple"` as match in `impl FromStr for Color` (PR#71) # 1.9.0 (November 11, 2019) - **[POSSIBLE_BREAKING CHANGE]:** Replace `winconsole` with `winapi`: - Changes `set_virtual_terminal` function signature. - Update dependencies - Add Dockerfile - Respect tty discovery for CLICOLOR # 1.8.0 (April 30, 2019) - FEAT: support Windows 10 colors # 1.7.0 (January, 2019) - TECH: update lazy\_static - FEAT: introduce respect for the `NO_COLOR` environment variable # 1.6.1 (July 9, 2018) - TECH: update lazy\_static - CHORE: fix typos in README and documentation # 1.6.0 (October 31, 2017) - FEAT: introduced bright colors. `"hello".bright_blue().on_bright_red();` - FEAT: introduced strikethrough styling. `"hello".strikethrough();` # 1.5.3 (September 28, 2017) - FEAT: derive Copy and Clone for `Color` - FEAT: derive Clone for `ColoredString` # 1.5.2 (July 6, 2017) - FIX: method `Colorize::reversed` has been added. `Colorize::reverse` was a typo, that we will keep for compatibility # 1.5.1 (May 9, 2017) - Update lazy\_static to 0.2. # 1.5.0 (May 1, 2017) - FEAT: support for `"hello".color("blue")` (dynamic colors) # 1.3.2 (Nov 26, 2016) - FIX: usage of nested ColoredString again, no more style broken mid-line # 1.3.1 (Oct 14, 2016) - FIX: usage of ColoredString in a nested way broke the styling mid-line # 1.3.0 (Jul 31, 2016) - Provide various options for disabling the coloring in an API-compatible way # 1.2.0 (Mar 30, 2016) - Support the different formatting options, like padding and alignment # 1.1.0 (Mar 15, 2016) - Respect the CLICOLOR/CLICOLOR\_FORCE behavior. See [this specs](http://bixense.com/clicolors/) # 1.0.1 (Mar 14, 2016) - Add a CHANGLOG - Fix crate dependencies: move `ansi_term` in dev\_dependencies # 1.0.0 (Mar 13, 2016) - Initial release # Unreleased - Added methods `ansi_color` and `on_ansi_color` to `Colorize`. # 3.0.0 - **[BREAKING CHANGE]:** Upgrade MSRV to 1.80 and remove the then unnecessary lazy_static dependency. # 2.2.0 - Updated top-level docs to include a note about `ColoredString`\'s role in the `Colorize` pipeline as well as link to it to suggest learning more about how to manipulate existing `ColoredString`\'s. - Changes to `ColoredString`: - Expose fields. - **[DEPRECATION]:** Deprecated methods `fgcolor`, `bgcolor`, and `style` due to their obsolescence in the face of the exposing of their represented fields. - Add methods for clearing specific elements of `fgcolor`, `bgcolor`, and `style`. - Change Default implementation to be via derive as Style now implements Default (see changes to Style below). - Add implementation of `DerefMut`. - Updated docs to reflect the above changes as well as generally greatly expand them. - Changes to `Style`: - Implemented `Default` for `Style` (returns `CLEAR`). This exposes a method by which users can create plain `Style`\'s from scratch. - Implemented `From` for `Style`. This lets users easily create `Style`\'s from specific styles. - Exposed previously private method `add`. - Created method `remove` which essentially does the opposite. - Added builder-style methods in the vein of `Colorize` to add stylings (e.g. `bold`, `underline`, `italic`, `strikethrough`). - Implemented bitwise operators `BitAnd`, `BitOr`, `BitXor`, and `Not` as well as their representative assignment operators. You can also use a `Styles` as an operand for these. - Implemented `FromIterator` for Style. - Changes to `Styles`: - Implemented bitwise operators `BitAnd`, `BitOr`, `BitXor`, and `Not` which all combine `Styles`\'s and output `Style`\'s. These can also take a `Style` as an operand. - Added additional testing for all of the above changes. - Added methods `with_style` and `with_color_and_style` to `Colorize`. # 2.1.0 * Impl From for ColoredString by @mahor1221 in https://github.com/colored-rs/colored/pull/126 * Allow conversion from ColoredString to Error by @spenserblack in https://github.com/colored-rs/colored/pull/86 * Suggestion for minor documentation clarification by @jonasbn in https://github.com/colored-rs/colored/pull/98 * Remove unnecessary is_terminal dependency by @Oakchris1955 in https://github.com/colored-rs/colored/pull/149 - Document crate MSRV of `1.70`. # 2.0.4 - Switch from `winapi` to `windows-sys`. # 2.0.3 - Document crate MSRV of `1.63`. # 2.0.2 - Fix typo in `src/control.rs`. - Replace `atty` dependency with `is-terminal`. # 2.0.1 (July 3, 2023) - Add edition for future compatibility. - Implement custom colors that can be stored in a variable. # 2.0.0 (July 14, 2020) - Add support for true colours. - Alter `Color` interface to return `Cow<'static, str>` # 1.9.3 (February 24, 2020) - Fix compilation regression for 1.34.0. Thanks @jlevon for reporting. # 1.9.2 (January 11, 2020) - Exposed `ColoredString` data through methods for purposes of interrogating the applied colours. - Increased documentation. # 1.9.1 (December 31, 2019) - Remove deprecated `try!` macro in codebase - Reduce allocations in `ColoredString` impl (PR#65) - Added `"purple"` as match in `impl FromStr for Color` (PR#71) # 1.9.0 (November 11, 2019) - **[POSSIBLE_BREAKING CHANGE]:** Replace `winconsole` with `winapi`: - Changes `set_virtual_terminal` function signature. - Update dependencies - Add Dockerfile - Respect tty discovery for CLICOLOR # 1.8.0 (April 30, 2019) - FEAT: support Windows 10 colors # 1.7.0 (January, 2019) - TECH: update lazy\_static - FEAT: introduce respect for the `NO_COLOR` environment variable # 1.6.1 (July 9, 2018) - TECH: update lazy\_static - CHORE: fix typos in README and documentation # 1.6.0 (October 31, 2017) - FEAT: introduced bright colors. `"hello".bright_blue().on_bright_red();` - FEAT: introduced strikethrough styling. `"hello".strikethrough();` # 1.5.3 (September 28, 2017) - FEAT: derive Copy and Clone for `Color` - FEAT: derive Clone for `ColoredString` # 1.5.2 (July 6, 2017) - FIX: method `Colorize::reversed` has been added. `Colorize::reverse` was a typo, that we will keep for compatibility # 1.5.1 (May 9, 2017) - Update lazy\_static to 0.2. # 1.5.0 (May 1, 2017) - FEAT: support for `"hello".color("blue")` (dynamic colors) # 1.3.2 (Nov 26, 2016) - FIX: usage of nested ColoredString again, no more style broken mid-line # 1.3.1 (Oct 14, 2016) - FIX: usage of ColoredString in a nested way broke the styling mid-line # 1.3.0 (Jul 31, 2016) - Provide various options for disabling the coloring in an API-compatible way # 1.2.0 (Mar 30, 2016) - Support the different formatting options, like padding and alignment # 1.1.0 (Mar 15, 2016) - Respect the CLICOLOR/CLICOLOR\_FORCE behavior. See [this specs](http://bixense.com/clicolors/) # 1.0.1 (Mar 14, 2016) - Add a CHANGLOG - Fix crate dependencies: move `ansi_term` in dev\_dependencies # 1.0.0 (Mar 13, 2016) - Initial release # Changelog Newer changelog entries can be found [on GitHub](https://github.com/console-rs/console/releases). ## 0.15.8 ### Enhancements * Added `wasm32-unknown-emscripten` target. (#179) * `read_line_initial_text` now retains the initial prefix. (#190) * Reading raw input now traps Ctrl+C. (#189) ### Bugfixes * Properly use configured output of `Term` to get terminal size (#186) * Aligned `read_line` and `read_line_initial_text`'s behavior. (#181) * Fixed soundness issue in `msys_tty_on`. (#183) ## 0.15.7 ### Enhancements * Set an appropriate lower version of libc for macos changes. * Improved behavior of `read_single_key` so it does not disturb other threads quite as much. (#165) * More reliably reset raw mode in terminal. (#171) ## 0.15.6 ### Enhancements * Switch to `select()` on macOS for polling on TTYs to work around a macOS bug. (#169) * Added blink fast and strikethrough attributes. (#159) ## 0.15.5 ### Enhancements * Removed `regex` dependency. (#153) * Clarified that `clicolors-control` is no longer used. * Handle non-tty terminals in `read_char`. (#124) ## 0.15.4 ### Enhancements * Fix for regression where console size was misreported on windows. (#151) ## 0.15.3 ### Enhancements * Dropped `terminal_size` dependency. ## 0.15.2 ### Enhancements * Dropped `once_cell` dependency to support MSRV again. ## 0.15.1 ### Enhancements * ANSI support no longer depends on `regex` crate. * Crate now supports `minver`. ## 0.15.0 ### Enhancements * Added more key recognitions * Exposed `pad_str_with` to public API * Added `ReadWritePair` * Support `color256` in `Style::from_dotted_str` ### BREAKING * Added `ReadWritePair` to `TermTarget` to allow arbitrary read write pairs behave as a term * Removed `Copy` and `PartialEq` from `TermTarget` ## 0.14.1 ### Enhancements * Added `NO_COLOR` support * Added some more key recognitions * Undeprecate `Term::is_term` ## 0.14.0 ### Enhancements * Added emoji support for newer Windows terminals. ### BREAKING * Made the windows terminal emulation a non default feature (`windows-console-colors`) ## 0.13.0 ### Enhancements * Added `user_attended_stderr` for checking if stderr is a terminal * Removed `termios` dependency ### Bug Fixes * Better handling of key recognition on unix * `Term::terminal_size()` on stderr terms correctly returns stderr term info ### Deprecated * Deprecate `Term::is_term()` in favor of `Term::features().is_attended()` ### BREAKING * Remove `Term::want_emoji()` in favor of `Term::features().wants_emoji()` # Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## 0.1.1 (2026-04-28) ### Fixed - Output for 16-bit targets ([#1470]) [#1470]: https://github.com/RustCrypto/utils/pull/1470 ## 0.1.0 (2026-02-22) Initial release # Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## 0.4.0 (2026-01-19) ### Added - `core::num::NonZero` support ([#1368]) - Pluggable trait impls for `[T]` and `[T; N]` using helper traits: ([#1388]) - `CtAssign`: `CtAssignSlice` - `CtEq`: `CtEqSlice` - `CtSelect`: `CtSelectArray` - `CtSelectUsingCtAssign` marker trait ([#1391]) ### Changed - Split `CtAssign` out of `CtSelect` ([#1363]) - Bump `cmov` to v0.5 ([#1386]) ### Removed - `BytesCtEq`/`BytesCtSelect` no longer needed because default `[u8]` impls are fast ([#1376]) - `target_pointer_width` gating ([#1389]) - `unsafe` code ([#1405]) [#1363]: https://github.com/RustCrypto/utils/pull/1363 [#1368]: https://github.com/RustCrypto/utils/pull/1368 [#1376]: https://github.com/RustCrypto/utils/pull/1376 [#1386]: https://github.com/RustCrypto/utils/pull/1386 [#1388]: https://github.com/RustCrypto/utils/pull/1388 [#1389]: https://github.com/RustCrypto/utils/pull/1389 [#1391]: https://github.com/RustCrypto/utils/pull/1391 [#1405]: https://github.com/RustCrypto/utils/pull/1405 ## 0.3.2 (2026-01-16) ### Added - `BytesCtEq` and `BytesCtSelect` traits ([#1359]) - `CtFind` trait ([#1361]) - `CtLookup` trait ([#1362]) ### Changed - Bump `cmov` crate dependency to v0.5.0-pre.0 ([#1357]) [#1357]: https://github.com/RustCrypto/utils/pull/1357 [#1359]: https://github.com/RustCrypto/utils/pull/1359 [#1361]: https://github.com/RustCrypto/utils/pull/1361 [#1362]: https://github.com/RustCrypto/utils/pull/1362 ## 0.3.1 (2026-01-03) ### Added - `Choice::to_u8_mask`/`to_u16_mask` ([#1322]) - `Choice::select_u8`/`select_u16` ([#1324]) [#1322]: https://github.com/RustCrypto/utils/pull/1322 [#1324]: https://github.com/RustCrypto/utils/pull/1324 ## 0.3.0 (2025-12-29) ### Removed - `Choice::new` ([#1314]) - `(Partial)Eq` impls for `Choice` ([#1315]) [#1314]: https://github.com/RustCrypto/utils/pull/1314 [#1315]: https://github.com/RustCrypto/utils/pull/1315 ## 0.2.3 (2025-12-29) ### Added - Impl `From` for `Choice` ([#1309]) - `Choice::from_u8*` and `from_u16*` ([#1311]) ### Changed - Deprecate `Choice::new` ([#1312]) [#1309]: https://github.com/RustCrypto/utils/pull/1309 [#1311]: https://github.com/RustCrypto/utils/pull/1311 [#1312]: https://github.com/RustCrypto/utils/pull/1312 ## 0.2.2 (2025-12-28) ### Added - Unsigned `CtNeg` impls ([#1306]) [#1306]: https://github.com/RustCrypto/utils/pull/1306 ## 0.2.1 (2025-12-27) ### Added - Enhanced `subtle` interop ([#1289]) ### Security - Pin to `cmov` v0.4.3+ - includes important security fixes ([#1304]) [#1289]: https://github.com/RustCrypto/utils/pull/1304 [#1304]: https://github.com/RustCrypto/utils/pull/1304 ## 0.2.0 (2025-12-27) ### Added - Additional `Choice::from_u128*` constructors ([#1285]) - `CtNeg` trait ([#1286]) ### Changed - Renamed `Choice::from_*_nonzero` => `from_*_nz` ([#1287]) [#1285]: https://github.com/RustCrypto/utils/pull/1285 [#1286]: https://github.com/RustCrypto/utils/pull/1286 [#1287]: https://github.com/RustCrypto/utils/pull/1287 ## 0.1.4 (2025-12-26) ### Added - Impl `CtEq`/`CtSelect` for `isize` ([#1283]) [#1283]: https://github.com/RustCrypto/utils/pull/1283 ## 0.1.3 (2025-12-26) ### Fixed - Rustdoc syntax for variable-time-related warning text ([#1278]) [#1278]: https://github.com/RustCrypto/utils/pull/1278 ## 0.1.2 (2025-12-26) ### Added - Additional methods for `CtOption` ([#1274]): - `some` - `none` - `into_option_copied` - `filter_by` - `as_inner_unchecked` - `to_inner_unchecked` - `Default` impl for `CtOption` ([#1274]) - `map!` and `unwrap_or!` macros ([#1274]) - `u128` methods for `Choice` ([#1277]): - `from_u128_le` - `from_u128_lsb` - `select_u128` [#1274]: https://github.com/RustCrypto/utils/pull/1274 [#1277]: https://github.com/RustCrypto/utils/pull/1277 ## 0.1.1 (2025-12-26) ### Added - Additional `const fn` constructor and predication methods for `Choice` ([#1266], [#1272]) [#1266]: https://github.com/RustCrypto/utils/pull/1266 [#1272]: https://github.com/RustCrypto/utils/pull/1272 ## 0.1.0 (2025-12-19) - Initial release # Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## 0.4.2 (2026-04-02) ### Fixed - `cmov` v0.5.3 version requirement ([#1467]) [#1467]: https://github.com/RustCrypto/utils/pull/1467 ## 0.4.1 (2026-04-02) ### Added - `isize`/`usize` and `NonZero*` trait impls ([#1416]) - `subtle` migration guide ([#1465]) [#1416]: https://github.com/RustCrypto/utils/pull/1416 [#1465]: https://github.com/RustCrypto/utils/pull/1465 ## 0.4.0 (2026-01-19) ### Added - `core::num::NonZero` support ([#1368]) - Pluggable trait impls for `[T]` and `[T; N]` using helper traits: ([#1388]) - `CtAssign`: `CtAssignSlice` - `CtEq`: `CtEqSlice` - `CtSelect`: `CtSelectArray` - `CtSelectUsingCtAssign` marker trait ([#1391]) ### Changed - Split `CtAssign` out of `CtSelect` ([#1363]) - Bump `cmov` to v0.5 ([#1386]) ### Removed - `BytesCtEq`/`BytesCtSelect` no longer needed because default `[u8]` impls are fast ([#1376]) - `target_pointer_width` gating ([#1389]) - `unsafe` code ([#1405]) [#1363]: https://github.com/RustCrypto/utils/pull/1363 [#1368]: https://github.com/RustCrypto/utils/pull/1368 [#1376]: https://github.com/RustCrypto/utils/pull/1376 [#1386]: https://github.com/RustCrypto/utils/pull/1386 [#1388]: https://github.com/RustCrypto/utils/pull/1388 [#1389]: https://github.com/RustCrypto/utils/pull/1389 [#1391]: https://github.com/RustCrypto/utils/pull/1391 [#1405]: https://github.com/RustCrypto/utils/pull/1405 ## 0.3.2 (2026-01-16) ### Added - `BytesCtEq` and `BytesCtSelect` traits ([#1359]) - `CtFind` trait ([#1361]) - `CtLookup` trait ([#1362]) ### Changed - Bump `cmov` crate dependency to v0.5.0-pre.0 ([#1357]) [#1357]: https://github.com/RustCrypto/utils/pull/1357 [#1359]: https://github.com/RustCrypto/utils/pull/1359 [#1361]: https://github.com/RustCrypto/utils/pull/1361 [#1362]: https://github.com/RustCrypto/utils/pull/1362 ## 0.3.1 (2026-01-03) ### Added - `Choice::to_u8_mask`/`to_u16_mask` ([#1322]) - `Choice::select_u8`/`select_u16` ([#1324]) [#1322]: https://github.com/RustCrypto/utils/pull/1322 [#1324]: https://github.com/RustCrypto/utils/pull/1324 ## 0.3.0 (2025-12-29) ### Removed - `Choice::new` ([#1314]) - `(Partial)Eq` impls for `Choice` ([#1315]) [#1314]: https://github.com/RustCrypto/utils/pull/1314 [#1315]: https://github.com/RustCrypto/utils/pull/1315 ## 0.2.3 (2025-12-29) ### Added - Impl `From` for `Choice` ([#1309]) - `Choice::from_u8*` and `from_u16*` ([#1311]) ### Changed - Deprecate `Choice::new` ([#1312]) [#1309]: https://github.com/RustCrypto/utils/pull/1309 [#1311]: https://github.com/RustCrypto/utils/pull/1311 [#1312]: https://github.com/RustCrypto/utils/pull/1312 ## 0.2.2 (2025-12-28) ### Added - Unsigned `CtNeg` impls ([#1306]) [#1306]: https://github.com/RustCrypto/utils/pull/1306 ## 0.2.1 (2025-12-27) ### Added - Enhanced `subtle` interop ([#1289]) ### Security - Pin to `cmov` v0.4.3+ - includes important security fixes ([#1304]) [#1289]: https://github.com/RustCrypto/utils/pull/1304 [#1304]: https://github.com/RustCrypto/utils/pull/1304 ## 0.2.0 (2025-12-27) ### Added - Additional `Choice::from_u128*` constructors ([#1285]) - `CtNeg` trait ([#1286]) ### Changed - Renamed `Choice::from_*_nonzero` => `from_*_nz` ([#1287]) [#1285]: https://github.com/RustCrypto/utils/pull/1285 [#1286]: https://github.com/RustCrypto/utils/pull/1286 [#1287]: https://github.com/RustCrypto/utils/pull/1287 ## 0.1.4 (2025-12-26) ### Added - Impl `CtEq`/`CtSelect` for `isize` ([#1283]) [#1283]: https://github.com/RustCrypto/utils/pull/1283 ## 0.1.3 (2025-12-26) ### Fixed - Rustdoc syntax for variable-time-related warning text ([#1278]) [#1278]: https://github.com/RustCrypto/utils/pull/1278 ## 0.1.2 (2025-12-26) ### Added - Additional methods for `CtOption` ([#1274]): - `some` - `none` - `into_option_copied` - `filter_by` - `as_inner_unchecked` - `to_inner_unchecked` - `Default` impl for `CtOption` ([#1274]) - `map!` and `unwrap_or!` macros ([#1274]) - `u128` methods for `Choice` ([#1277]): - `from_u128_le` - `from_u128_lsb` - `select_u128` [#1274]: https://github.com/RustCrypto/utils/pull/1274 [#1277]: https://github.com/RustCrypto/utils/pull/1277 ## 0.1.1 (2025-12-26) ### Added - Additional `const fn` constructor and predication methods for `Choice` ([#1266], [#1272]) [#1266]: https://github.com/RustCrypto/utils/pull/1266 [#1272]: https://github.com/RustCrypto/utils/pull/1272 ## 0.1.0 (2025-12-19) - Initial release curl and libcurl 8.17.0 Public curl releases: 271 Command line options: 273 curl_easy_setopt() options: 308 Public functions in libcurl: 100 Contributors: 3536 This release includes the following changes: o build: drop Heimdal support [267] o build: drop the winbuild build system [81] o krb5: drop support for Kerberos FTP [43] o libssh2: up the minimum requirement to 1.9.0 [85] o multi: add notifications API [250] o progress: expand to use 6 characters per size [234] o ssl: support Apple SecTrust configurations [240] o tool_getparam: add --knownhosts [204] o vssh: drop support for wolfSSH [58] o wcurl: import v2025.11.04 [431] o write-out: make %header{} able to output *all* occurrences of a header [25] This release includes the following bugfixes: o ares: fix leak in tracing [91] o asyn-ares: remove wrong comment about the callback argument [306] o asyn-ares: use the duped hostname pointer for all calls [158] o asyn-thrdd resolver: clear timeout when done [97] o asyn-thrdd: drop pthread_cancel [30] o autotools: add support for libgsasl auto-detection via pkg-config [112] o autotools: capitalize Rustls in the log output [106] o autotools: drop detection of ancient OpenSSL libs RSAglue and rsaref [354] o autotools: fix duplicate UNIX and BSD flags in buildinfo.txt [113] o autotools: fix silly mistake in clang detection for buildinfo.txt [114] o autotools: make --enable-code-coverage support llvm/clang [79] o autotools: merge `if`s in GnuTLS/OpenSSL feature detection [385] o aws-lc: re-enable large read-ahead with v1.61.0 again [16] o base64: accept zero length argument to base64_encode [82] o build: address some -Weverything warnings, update picky warnings [74] o build: avoid overriding system open and stat symbols [141] o build: avoid overriding system symbols for fopen functions [150] o build: avoid overriding system symbols for socket functions [68] o build: show llvm/clang in platform flags and buildinfo.txt [126] o c-ares: when resolving failed, persist error [270] o cf-h2-proxy: break loop on edge case [140] o cf-ip-happy: mention unix domain path, not port number [161] o cf-socket: always check Curl_cf_socket_peek() return code [198] o cf-socket: check params and remove accept procondition [197] o cf-socket: make set_local_ip void, and remove failf() [390] o cf-socket: set FD_CLOEXEC on all sockets opened [273] o cf-socket: tweak a memcpy() to read better [177] o cf-socket: use the right byte order for ports in bindlocal [61] o cfilter: unlink and discard [46] o cfilters: check return code from Curl_pollset_set_out_only() [402] o checksrc: allow disabling warnings on FIXME/TODO comments [324] o checksrc: catch banned functions when preceded by ( [146] o checksrc: fix possible endless loop when detecting BANNEDFUNC [149] o checksrc: fix possible endless loops in the banned function logic [220] o checksrc: fix to handle ) predecing a banned function [229] o checksrc: reduce directory-specific exceptions [228] o CI.md: refresh [280] o cmake/FindGSS: dedupe pkg-config module strings [277] o cmake/FindGSS: drop wrong header check for GNU GSS [278] o cmake/FindGSS: fix pkg-config fallback logic for CMake <3.16 [189] o cmake/FindGSS: simplify/de-dupe lib setup [253] o cmake/FindGSS: whitespace/formatting [268] o cmake: add and use local FindGnuTLS module [379] o cmake: add CURL_CODE_COVERAGE option [78] o cmake: build the "all" examples source list dynamically [245] o cmake: clang detection tidy-ups [116] o cmake: drop exclamation in comment looking like a name [160] o cmake: fix `HAVE_GNUTLS_SRP` detection after adding local FindGnuTLS module [458] o cmake: fix building docs when the base directory contains .3 [18] o cmake: fix Linux pre-fill `HAVE_POSIX_STRERROR_R` (when `_CURL_PREFILL=ON`) o cmake: fix Linux pre-fills for non-glibc (when `_CURL_PREFILL=ON`) [372] o cmake: minor Heimdal flavour detection fix [269] o cmake: pre-fill three more type sizes on Windows [244] o cmake: say 'absolute path' in option descriptions and docs [378] o cmake: support building some complicated examples, build them in CI [235] o cmake: use modern alternatives for get_filename_component() [102] o cmake: use more COMPILER_OPTIONS, LINK_OPTIONS / LINK_FLAGS [152] o cmdline-docs: extended, clarified, refreshed [28] o cmdline-opts/_PROGRESS.md: explain the suffixes [154] o configure: add "-mt" for pthread support on HP-UX [52] o conn: fix hostname move on connection reuse [272] o conncache: prevent integer overflow in maxconnects calculation [438] o connect: for CONNECT_ONLY, CURLOPT_TIMEOUT does not apply [404] o connect: remove redundant condition in shutdown start [289] o cookie: avoid saving a cookie file if no transfer was done [11] o cookie: only count accepted cookies in Curl_cookie_add [364] o cookie: remove the temporary file on (all) errors [356] o cpool: make bundle->dest an array; fix UB [218] o curl.h: remove incorrect comment about CURLOPT_PINNEDPUBLICKEY [320] o curl_easy_getinfo: error code on NULL arg [2] o curl_easy_setopt.md: add missing CURLOPT_POSTFIELDS [319] o curl_mem_undef.h: limit to CURLDEBUG for non-memalloc overrides [19] o curl_ngtcp2: fix `-Wunreachable-code` with H3 !verbose !unity clang [383] o curl_osslq: error out properly if BIO_ADDR_rawmake() fails [184] o curl_path: make sure just whitespace is illegal [351] o Curl_resolv: fix comment. 'entry' argument is not optional [187] o curl_slist_append.md: clarify that a NULL pointer is not acceptable [72] o curl_threads: delete WinCE fallback branch [233] o CURLINFO_FTP_ENTRY_PATH.md: this is for SFTP as well [8] o CURLOPT_COOKIEFILE.md: clarify when the cookies are loaded [159] o CURLOPT_COPYPOSTFIELDS.md: used with MQTT and RTSP as well [457] o CURLOPT_HEADER/WRITEFUNCTION.md: drop '* size' since size is always 1 [63] o CURLOPT_MAXLIFETIME_CONN: make default 24 hours [10] o CURLOPT_POSTFIELDSIZE*: these also work for MQTT and RTSP [395] o CURLOPT_SERVER_RESPONSE_TIMEOUT*: add default and see-also [397] o CURLOPT_SSL_VERIFYHOST.md: add see-also to two other VERIFYHOST options [32] o CURLOPT_TIMECONDITION.md: works for FILE and FTP as well [27] o cw-out: fix EAGAIN handling on pause [452] o cw-out: unify the error handling pattern in cw_out_do_write [414] o digest_sspi: fix two memory leaks in error branches [77] o dist: do not distribute CI.md [29] o docs/cmdline-opts: drop double quotes from GLOBBING and URL examples [238] o docs/libcurl: clarify some timeout option behavior [15] o docs/libcurl: remove ancient version references [7] o docs/libcurl: use lowercase must [5] o docs: expand on quoting rules for file names in SFTP quote [300] o docs: fix/tidy code fences [87] o doh: cleanup resources on error paths [434] o doswin: CloseHandle the thread on shutdown [307] o easy_getinfo: check magic, Curl_close safety [3] o ECH.md: make OpenSSL branch clone instructions work [430] o examples/chkspeed: portable printing when outputting curl_off_t values [365] o examples/http2-serverpush: fix file handle leaks [428] o examples/sessioninfo: cast printf string mask length to int [232] o examples/sessioninfo: do not disable security [255] o examples/synctime: fix null termination assumptions [297] o examples/synctime: make the sscanf not overflow the local buffer [252] o examples/usercertinmem: avoid stripping const [247] o examples/websocket: fix use of uninitialized rlen [346] o examples: call curl_global_cleanup() where missing [323] o examples: check more errors, fix cleanups, scope variables [318] o examples: drop unused curl/mprintf.h includes [224] o examples: fix build issues in 'complicated' examples [243] o examples: fix more potential resource leaks, and more [426] o examples: fix two build issues surfaced with WinCE [223] o examples: fix two issues found by CodeQL [35] o examples: fix two more cases of stat() TOCTOU [147] o examples: improve global init, error checks and returning errors [321] o examples: replace casts with `curl_off_t` printf masks [358] o examples: return curl_easy_perform() results [322] o firefox-db2pem.sh: add macOS support, tidy-ups [348] o form.md: drop reference to MANUAL [178] o ftp: add extra buffer length check [195] o ftp: check errors on remote ip for data connection [423] o ftp: fix ftp_do_more returning with *completep unset [122] o ftp: fix port number range loop for PORT commands [66] o ftp: fix the 213 scanner memchr buffer limit argument [196] o ftp: improve fragile check for first digit > 3 [194] o ftp: reduce size of some struct fields [418] o ftp: remove 'newhost' and 'newport' from the ftp_conn struct [419] o ftp: remove misleading comments [193] o ftp: remove the retr_size_saved struct field [416] o ftp: remove the state_saved struct field [417] o ftp: replace strstr() in ;type= handling [313] o ftp: simplify the 150/126 size scanner [288] o gnutls: check conversion of peer cert chain [275] o gnutls: fix re-handshake comments [422] o gssapi: make channel binding conditional on GSS_C_CHANNEL_BOUND_FLAG [446] o gtls: avoid potential use of uninitialized variable in trace output [83] o gtls: check the return value of gnutls_pubkey_init() [456] o header.md: see-also --proxy-header and vice versa [396] o hmac: free memory properly on errors [377] o hostip: don't store negative resolves due unrelated errors [256] o hostip: fix infof() output for non-ipv6 builds using IPv6 address [338] o hostip: remove leftover INT_MAX check in Curl_dnscache_prune [88] o http2: check push header names by length first [261] o http2: cleanup pushed newhandle on fail [260] o http2: ingress handling edge cases [259] o HTTP3: clarify the status for "old" OpenSSL, not current [394] o http: check the return value of strdup [437] o http: fix `-Wunreachable-code` in !websockets !unity builds [443] o http: fix `-Wunused-variable` in !alt-svc !proxy !ws builds [442] o http: handle user-defined connection headers [165] o http: look for trailing 'type=' in ftp:// without strstr [315] o http: make Content-Length parser more WHATWG [183] o http: only accept ';' as a separator for custom headers [407] o http: return error for a second Location: header [393] o http_aws_sigv4: check the return value of curl_maprintf() [381] o http_proxy: fix adding custom proxy headers [424] o httpsrr: free old pointers when storing new [57] o httpsrr: send HTTPS query to the right target [435] o imap: fix custom FETCH commands to handle literal responses [441] o imap: parse and use UIDVALIDITY as a number [420] o imap: treat capabilities case insensitively [345] o INSTALL-CMAKE.md: add manual configuration examples [360] o INSTALL-CMAKE.md: document useful build targets [215] o INSTALL-CMAKE.md: fix descriptions for LDAP dependency options [382] o INSTALL: update the list of known operating systems [325] o INTERNALS: drop Winsock 2.2 from the dependency list [162] o ip-happy: do not set unnecessary timeout [95] o ip-happy: prevent event-based stall on retry [155] o kerberos: bump minimum to 1.3 (2003-07-08), drop legacy logic [279] o kerberos: drop logic for MIT Kerberos <1.2.3 (pre-2002) versions [285] o kerberos: stop including gssapi/gssapi_generic.h [282] o krb5: fix output_token allocators in the GSS debug stub (Windows) [326] o krb5: return appropriate error on send failures [22] o krb5_gssapi: fix memory leak on error path [190] o krb5_sspi: the chlg argument is NOT optional [200] o ldap: avoid null ptr deref on failure [284] o ldap: do not base64 encode zero length string [42] o ldap: do not pass a \n to failf() [370] o ldap: tidy-up types, fix error code confusion [191] o lib1514: fix return code mixup [304] o lib: delete unused crypto header includes [384] o lib: drop unused include and duplicate guards [226] o lib: fix build error with verbose strings disabled [173] o lib: remove newlines from failf() calls [366] o lib: remove personal names from comments [168] o lib: SSL connection reuse [301] o lib: stop NULL-checking conn->passwd and ->user [309] o lib: upgrade/multiplex handling [136] o libcurl-multi.md: added curl_multi_get_offt mention [53] o libcurl-security.md: mention long-running connections [6] o libssh/libssh2: reject quote command lines with too much data [299] o libssh/sftp: fix resume corruption by avoiding O_APPEND with rresume [263] o libssh2/sftp: fix resume corruption by avoiding O_APPEND with rresume [262] o libssh2/sftp_realpath: change state consistently [185] o libssh2: avoid risking using an uninitialized local struct field [209] o libssh2: bail out on chgrp and chown number parsing errors [202] o libssh2: clarify that sshp->path is always at least one byte [201] o libssh2: drop two redundant null-terminations [26] o libssh2: error check and null-terminate in ssh_state_sftp_readdir_link() [34] o libssh2: fix EAGAIN return in ssh_state_auth_agent [290] o libssh2: fix return code for EAGAIN [186] o libssh2: use sockindex consistently [302] o libssh: acknowledge SSH_AGAIN in the SFTP state machine [89] o libssh: catch a resume point larger than the size [281] o libssh: clarify myssh_block2waitfor [92] o libssh: drop two unused assignments [104] o libssh: error on bad chgrp number [71] o libssh: error on bad chown number and store the value [64] o libssh: fix range parsing error handling mistake [120] o libssh: make atime and mtime cap the timestamp instead of wrap [283] o libssh: react on errors from ssh_scp_read [24] o libssh: return out of memory correctly if aprintf fails [60] o libssh: return the proper error for readdir problems [355] o Makefile.example: bump default example from FTP to HTTPS [389] o Makefile.example: fix option order [231] o Makefile.example: make default options more likely to work [388] o Makefile.example: simplify and make it configurable [20] o managen: ignore version mentions < 7.66.0 [55] o managen: render better manpage references/links [54] o managen: strict protocol check [109] o managen: verify the options used in example lines [181] o mbedtls: add support for 4.0.0 [344] o mbedtls: check result of setting ALPN [127] o mbedtls: fix building with <3.6.1 [400] o mbedtls: fix building with sha-256 missing from PSA [391] o mbedtls: handle WANT_WRITE from mbedtls_ssl_read() [145] o md4: drop mbedtls implementation (not available in mbedtls v3+) [406] o mdlinkcheck: reject URLs containing quotes [174] o memdup0: handle edge case [241] o mime: fix unpausing of readers [375] o mime: fix use of fseek() [334] o multi.h: add CURLMINFO_LASTENTRY [51] o multi: check the return value of strdup() [436] o multi_ev: remove unnecessary data check that confuses analysers [167] o netrc: when the cached file is discarded, unmark it as loaded [409] o nghttp3: return NGHTTP3_ERR_CALLBACK_FAILURE from recv_header [227] o ngtcp2: add a comment explaining write result handling [340] o ngtcp2: adopt ngtcp2_conn_get_stream_user_data if available [362] o ngtcp2: check error code on connect failure [13] o ngtcp2: close just-opened QUIC stream when submit_request fails [222] o ngtcp2: compare idle timeout in ms to avoid overflow [248] o ngtcp2: fix early return [131] o ngtcp2: fix handling of blocked stream data [236] o ngtcp2: fix returns when TLS verify failed [251] o ngtcp2: overwrite rate-limits defaults [444] o noproxy: fix the IPV6 network mask pattern match [166] o NTLM: disable if DES support missing from OpenSSL or mbedTLS [399] o ntlm: improved error path on bad incoming NTLM TYPE3 message [412] o openldap/ldap; check for binary attribute case insensitively [445] o openldap: avoid indexing the result at -1 for blank responses [44] o openldap: check ber_sockbuf_add_io() return code [163] o openldap: check ldap_get_option() return codes [119] o openldap: do not pass newline to infof() [368] o openldap: fix memory-leak in error path [287] o openldap: fix memory-leak on oldap_do's exit path [286] o openldap: limit max incoming size [347] o openssl-quic: check results better [132] o openssl-quic: handle error in SSL_get_stream_read_error_code [129] o openssl-quic: ignore unexpected streams opened by server [176] o openssl: better return code checks when logging cert data [342] o openssl: call SSL_get_error() with proper error [207] o openssl: check CURL_SSLVERSION_MAX_DEFAULT properly [447] o openssl: clear retry flag on x509 error [130] o openssl: combine all the x509-store flags [451] o openssl: fail if more than MAX_ALLOWED_CERT_AMOUNT certs [339] o openssl: fail the transfer if ossl_certchain() fails [23] o openssl: fix build for v1.0.2 [225] o openssl: fix peer certificate leak in channel binding [258] o openssl: fix resource leak in provider error path [376] o openssl: fix unable do typo in failf() calls [341] o openssl: free UI_METHOD on exit path [373] o openssl: make the asn1_object_dump name null terminated [56] o openssl: only try engine/provider if a cert file/name is provided [415] o openssl: set io_need always [99] o openssl: skip session resumption when verifystatus is set [230] o os400: document threads handling in code. [254] o OS400: fix a use-after-free/double-free case [142] o osslq: set idle timeout to 0 [237] o pingpong: remove two old leftover debug infof() calls o pop3: check for CAPA responses case insensitively [439] o pop3: fix CAPA response termination detection [427] o pop3: function could get the ->transfer field wrong [292] o pytest: skip specific tests for no-verbose builds [171] o quic: fix min TLS version handling [14] o quic: ignore EMSGSIZE on receive [4] o quic: improve UDP GRO receives [330] o quic: remove data_idle handling [311] o quiche: fix possible leaks on teardown [205] o quiche: fix verbose message when ip quadruple cannot be obtained. [128] o quiche: handle tls fail correctly [266] o quiche: when ingress processing fails, return that error code [103] o rtsp: use explicit postfieldsize if specified [401] o runtests: tag tests that require curl verbose strings [172] o rustls: exit on error [335] o rustls: fix clang-tidy warning [107] o rustls: fix comment describing cr_recv() [117] o rustls: limit snprintf proper in cr_keylog_log_cb() [343] o rustls: make read_file_into not reject good files [328] o rustls: pass the correct result to rustls_failf [242] o rustls: typecast variable for safer trace output [69] o rustls: use %zu for size_t in failf() format string [121] o sasl: clear canceled mechanism instead of toggling it [41] o schannel: assign result before using it [62] o schannel: fix memory leak [363] o schannel: handle Curl_conn_cf_send() errors better [352] o schannel: lower the maximum allowed time to block to 7 seconds [333] o schannel: properly close the certfile on error [450] o schannel_verify: do not call infof with an appended \n [371] o schannel_verify: fix mem-leak in Curl_verify_host [208] o schannel_verify: use more human friendly error messages [96] o scp/sftp: fix disconnect [350] o scripts: pass -- before passing xargs [349] o setopt: accept *_SSL_VERIFYHOST set to 2L [31] o setopt: allow CURLOPT_DNS_CACHE_TIMEOUT set to -1 [257] o setopt: fix unused variable warning in minimal build [332] o setopt: make CURLOPT_MAXREDIRS accept -1 (again) [1] o singleuse.pl: fix string warning [392] o smb: adjust buffer size checks [45] o smb: transfer debugassert to real check [303] o smtp: check EHLO responses case insensitively [50] o smtp: fix EOB handling [410] o smtp: return value ignored [357] o socks: advance iobuf instead of reset [276] o socks: avoid UAF risk in error path [359] o socks: deny server basic-auth if not configured [264] o socks: handle error in verbose trace gracefully [94] o socks: handle premature close [246] o socks: make Curl_blockread_all return CURLcode [67] o socks: properly maintain the status of 'done' [405] o socks: rewwork, cleaning up socks state handling [135] o socks_gssapi: also reset buffer length after free [429] o socks_gssapi: make the gss_context a local variable [144] o socks_gssapi: reject too long tokens [90] o socks_gssapi: remove superfluous releases of the gss_recv_token [139] o socks_gssapi: remove the forced "no protection" [143] o socks_gssapi: replace `gss_release_buffer()` with curl free [386] o socks_sspi: bail out on too long fields [137] o socks_sspi: fix memory cleanup calls [40] o socks_sspi: remove the enforced mode clearing [291] o socks_sspi: restore non-blocking socket on error paths [48] o socks_sspi: use the correct free function [331] o socksd: remove --bindonly mention, there is no such option [305] o spelling: fix new finds by typos-cli 1.39.0 [454] o src/var: remove dead code [369] o ssl-session-cache: check use on config and availability [448] o ssl-sessions.md: mark option experimental [12] o strerror: drop workaround for SalfordC win32 header bug [214] o sws: fix checking sscanf() return value [17] o sws: pass in socket reference to allow function to close it [298] o tcp-nodelay.md: expand the documentation [153] o telnet: ignore empty suboptions [86] o telnet: make bad_option() consider NULL a bad option too [192] o telnet: make printsub require another byte input [21] o telnet: print DISPlay LOCation in printsub without mutating buffer [216] o telnet: refuse IAC codes in content [111] o telnet: return error if WSAEventSelect fails [180] o telnet: return error on crazy TTYPE or XDISPLOC lengths [123] o telnet: send failure logged but not returned [175] o telnet: use pointer[0] for "unknown" option instead of pointer[i] [217] o test1100: fix missing `` section [432] o tests/libtest/cli*: fix init/deinit, leaks, and more [455] o tests/server: drop pointless memory allocation overrides [219] o tests/server: drop unsafe open() override in signal handler (Windows) [151] o tftp: check and act on tftp_set_timeouts() returning error [38] o tftp: check for trailing ";mode=" in URL without strstr [312] o tftp: default timeout per block is now 15 seconds [156] o tftp: error requests for blank filenames [296] o tftp: handle tftp_multi_statemach() return code [65] o tftp: pin the first used address [110] o tftp: propagate expired timer from tftp_state_timeout() [39] o tftp: return error if it hits an illegal state [138] o tftp: return error when sendto() fails [59] o thread: errno on thread creation [271] o tidy-up: assortment of small fixes [115] o tidy-up: avoid using the reserved macro namespace [76] o tidy-up: fcntl.h includes [98] o tidy-up: update MS links, allow long URLs via checksrc [73] o tidy-up: URLs [101] o time-cond.md: refer to the singular curl_getdate man page [148] o TLS: IP address verification, extend test [398] o TODO: fix a typo [93] o TODO: remove already implemented or bad items [36] o tool: fix exponential retry delay [47] o tool_cb_hdr: fix fwrite check in header callback [49] o tool_cb_hdr: size is always 1 [70] o tool_cb_rea: use poll instead of select if available [329] o tool_cfgable: remove superfluous free calls [403] o tool_doswin: fix to use curl socket functions [108] o tool_filetime: cap crazy file times instead of erroring [327] o tool_filetime: replace cast with the fitting printf mask (Windows) [212] o tool_formparse: rewrite the headers file parser [374] o tool_getparam/set_rate: skip the multiplication on overflow [84] o tool_getparam: always disable "lib-ids" for tracing [169] o tool_getparam: make --fail and --fail-with-body override each other [293] o tool_getparam: warn if provided header looks malformed [179] o tool_ipfs: check the return value of curl_url_get for gwpath [453] o tool_ipfs: simplify the ipfs gateway logic [337] o tool_msgs: make errorf() show if --show-error [294] o tool_operate: improve wording in retry message [37] o tool_operate: keep failed partial download for retry auto-resume [210] o tool_operate: keep the progress meter for --out-null [33] o tool_operate: move the checks that skip ca cert detection [449] o tool_operate: retry on HTTP response codes 522 and 524 [317] o tool_operate: return error on strdup() failure [336] o tool_paramhlp: remove outdated comment in str2tls_max() [367] o tool_parsecfg: detect and error on recursive --config use [380] o tool_progress: handle possible integer overflows [164] o tool_progress: make max5data() use an algorithm [170] o transfer: avoid busy loop with tiny speed limit [100] o transfer: fix retry for empty downloads on reuse [411] o transfer: reset retry count on each request [310] o unit1323: sync time types and printf masks, drop casts [211] o unit1664: drop casts, expand masks to full values [221] o url: make Curl_init_userdefined return void [213] o urldata: FILE is not a list-only protocol [9] o urldata: make 'retrycount' a single byte [308] o urldata: make redirect counter 16 bit [295] o vauth/digest: improve the digest parser [203] o version: add GSS backend name and version [353] o vquic: fix idle-timeout checks (ms<-->ns), 64-bit log & honor 0=no-timeout [249] o vquic: fix recvmsg loop for max_pkts [421] o vquic: handling of io improvements [239] o vquic: sending non-gso packets fix for EAGAIN [265] o vtls: alpn setting, check proto parameter [134] o vtls: check final cfilter node in find_ssl_filter [440] o vtls: drop duplicate `CURL_SHA256_DIGEST_LENGTH` definition [387] o vtls: properly handle SSL shutdown timeout [433] o vtls: remove call to PKCS12_PBE_add() [408] o vtls: unify the error handling in ssl_cf_connect(). [413] o vtls_int.h: clarify data_pending [124] o vtls_scache: fix race condition [157] o wcurl: sync to +dev snapshot [425] o windows: replace _beginthreadex() with CreateThread() [80] o windows: stop passing unused, optional argument for Win9x compatibility [75] o windows: use consistent format when showing error codes [199] o windows: use native error code types more [206] o wolfssl: check BIO read parameters [133] o wolfssl: clear variable to avoid uninitialized use [361] o wolfssl: fix error check in shutdown [105] o wolfssl: fix resource leak in verify_pinned error paths [314] o wolfssl: no double get_error() detail [188] o ws: clarify an error message [125] o ws: fix some edge cases [274] o ws: fix type conversion check [316] o ws: reject curl_ws_recv called with NULL buffer with a buflen [118] This release includes the following known bugs: See https://curl.se/docs/knownbugs.html For all changes ever done in curl: See https://curl.se/changes.html Planned upcoming removals include: o Builds using VS2008 o OpenSSL 1.x support o OpenSSL-QUIC o Support for c-ares versions before 1.16.0 o Support for Windows XP/2003 o Windows CE support See https://curl.se/dev/deprecate.html This release would not have looked like this without help, code, reports and advice from friends like these: Adam Light, Alexander Blach, Alice Lee Poetics, Andrei Kurushin, Andrew Kirillov, Andrew Olsen, And-yW on github, BobodevMm on github, BohwaZ, Christian Schmitz, curl.stunt430, Dalei, Dan Fandrich, Daniel Stenberg, Daniel Terhorst-North, dependabot[bot], Devdatta Talele, divinity76 on github, Emilio Pozuelo Monfort, Emre Çalışkan, Ethan Everett, Evgeny Grin (Karlson2k), fds242 on github, Gunni on github, Harry Sintonen, Howard Chu, Ignat Loskutov, Jakub Stasiak, James Fuller, Javier Blazquez, Jicea, jmaggard10 on github, Jochen Sprickerhof, Johannes Schindelin, Jonathan Cardoso Machado, Joseph Birr-Pixton, Joshua Rogers, kapsiR on github, kuchara on github, madoe on github, Marc Aldorasi, Marcel Raad, Michael Osipov, Michał Petryka, Mitchell Blank Jr, Mohamed Daahir, Nir Azkiel, Patrick Monnerat, Pavel P, pennae on github, Peter Piekarski, plv1313 on github, Pocs Norbert, Ray Satiro, renovate[bot], rinsuki on github, Sakthi SK, Samuel Dionne-Riel, Samuel Henrique, Sergio Durigan Junior, Stanislav Fort, Stefan Eissing, Tatsuhiro Tsujikawa, TheBitBrine, Theo Buehler, Tim Becker, tkzv on github, Viktor Szakatas, Viktor Szakats, WangDaLei on github, Xiaoke Wang, Yedaya Katsman, 包布丁 (73 contributors) References to bug reports and discussions on issues: [1] = https://curl.se/bug/?i=18571 [2] = https://curl.se/bug/?i=18512 [3] = https://curl.se/bug/?i=18511 [4] = https://curl.se/bug/?i=18505 [5] = https://curl.se/bug/?i=18570 [6] = https://curl.se/bug/?i=18533 [7] = https://curl.se/bug/?i=18530 [8] = https://curl.se/bug/?i=18531 [9] = https://curl.se/bug/?i=18525 [10] = https://curl.se/bug/?i=18527 [11] = https://curl.se/bug/?i=18621 [12] = https://curl.se/bug/?i=18523 [13] = https://curl.se/bug/?i=18521 [14] = https://curl.se/bug/?i=18518 [15] = https://curl.se/bug/?i=18569 [16] = https://curl.se/bug/?i=18568 [17] = https://curl.se/bug/?i=18565 [18] = https://curl.se/bug/?i=18560 [19] = https://curl.se/bug/?i=18510 [20] = https://curl.se/bug/?i=18554 [21] = https://curl.se/bug/?i=18618 [22] = https://curl.se/bug/?i=18561 [23] = https://curl.se/bug/?i=18646 [24] = https://curl.se/bug/?i=18616 [25] = https://curl.se/bug/?i=18491 [26] = https://curl.se/bug/?i=18606 [27] = https://curl.se/bug/?i=18551 [28] = https://curl.se/bug/?i=18550 [29] = https://curl.se/bug/?i=18549 [30] = https://curl.se/bug/?i=18532 [31] = https://curl.se/mail/lib-2025-09/0031.html [32] = https://curl.se/bug/?i=18548 [33] = https://curl.se/bug/?i=18607 [34] = https://curl.se/bug/?i=18598 [35] = https://curl.se/bug/?i=18605 [36] = https://curl.se/bug/?i=18542 [37] = https://curl.se/bug/?i=18604 [38] = https://curl.se/bug/?i=18603 [39] = https://curl.se/bug/?i=18574 [40] = https://curl.se/bug/?i=18587 [41] = https://curl.se/bug/?i=18573 [42] = https://curl.se/bug/?i=18602 [43] = https://curl.se/bug/?i=18577 [44] = https://curl.se/bug/?i=18600 [45] = https://curl.se/bug/?i=18599 [46] = https://curl.se/bug/?i=18596 [47] = https://curl.se/bug/?i=18591 [48] = https://curl.se/bug/?i=18592 [49] = https://curl.se/bug/?i=18593 [50] = https://curl.se/bug/?i=18588 [51] = https://curl.se/bug/?i=18578 [52] = https://curl.se/bug/?i=18585 [53] = https://curl.se/bug/?i=18579 [54] = https://curl.se/bug/?i=18580 [55] = https://curl.se/bug/?i=18583 [56] = https://curl.se/bug/?i=18647 [57] = https://curl.se/bug/?i=18631 [58] = https://curl.se/bug/?i=18700 [59] = https://curl.se/bug/?i=18643 [60] = https://curl.se/bug/?i=18637 [61] = https://curl.se/bug/?i=18641 [62] = https://curl.se/bug/?i=18642 [63] = https://curl.se/bug/?i=18640 [64] = https://curl.se/bug/?i=18639 [65] = https://curl.se/bug/?i=18638 [66] = https://curl.se/bug/?i=18636 [67] = https://curl.se/bug/?i=18635 [68] = https://curl.se/bug/?i=18503 [69] = https://curl.se/bug/?i=18628 [70] = https://curl.se/bug/?i=18630 [71] = https://curl.se/bug/?i=18629 [72] = https://curl.se/bug/?i=18627 [73] = https://curl.se/bug/?i=18626 [74] = https://curl.se/bug/?i=18477 [75] = https://curl.se/bug/?i=18490 [76] = https://curl.se/bug/?i=18482 [77] = https://curl.se/bug/?i=18488 [78] = https://curl.se/bug/?i=18468 [79] = https://curl.se/bug/?i=18473 [80] = https://curl.se/bug/?i=18451 [81] = https://curl.se/bug/?i=18040 [82] = https://curl.se/bug/?i=18617 [83] = https://curl.se/bug/?i=18620 [84] = https://curl.se/bug/?i=18624 [85] = https://curl.se/bug/?i=18612 [86] = https://curl.se/bug/?i=18899 [87] = https://curl.se/bug/?i=18707 [88] = https://curl.se/bug/?i=18680 [89] = https://curl.se/bug/?i=18740 [90] = https://curl.se/bug/?i=18681 [91] = https://curl.se/bug/?i=18251 [92] = https://curl.se/bug/?i=18739 [93] = https://curl.se/bug/?i=18788 [94] = https://curl.se/bug/?i=18722 [95] = https://curl.se/bug/?i=18767 [96] = https://curl.se/bug/?i=18737 [97] = https://curl.se/bug/?i=18769 [98] = https://curl.se/bug/?i=18782 [99] = https://curl.se/bug/?i=18733 [100] = https://curl.se/bug/?i=18732 [101] = https://curl.se/bug/?i=18689 [102] = https://curl.se/bug/?i=18688 [103] = https://curl.se/bug/?i=18730 [104] = https://curl.se/bug/?i=18684 [105] = https://curl.se/bug/?i=18729 [106] = https://curl.se/bug/?i=18671 [107] = https://curl.se/bug/?i=18670 [108] = https://curl.se/bug/?i=18633 [109] = https://curl.se/bug/?i=18675 [110] = https://curl.se/bug/?i=18658 [111] = https://curl.se/bug/?i=18657 [112] = https://curl.se/bug/?i=18669 [113] = https://curl.se/bug/?i=18667 [114] = https://curl.se/bug/?i=18666 [115] = https://curl.se/bug/?i=18664 [116] = https://curl.se/bug/?i=18659 [117] = https://curl.se/bug/?i=18728 [118] = https://curl.se/bug/?i=18656 [119] = https://curl.se/bug/?i=18653 [120] = https://curl.se/bug/?i=18652 [121] = https://curl.se/bug/?i=18651 [122] = https://curl.se/bug/?i=18650 [123] = https://curl.se/bug/?i=18648 [124] = https://curl.se/bug/?i=18644 [125] = https://curl.se/bug/?i=18654 [126] = https://curl.se/bug/?i=18645 [127] = https://curl.se/bug/?i=18727 [128] = https://curl.se/bug/?i=18726 [129] = https://curl.se/bug/?i=18725 [130] = https://curl.se/bug/?i=18724 [131] = https://curl.se/bug/?i=18723 [132] = https://curl.se/bug/?i=18720 [133] = https://curl.se/bug/?i=18718 [134] = https://curl.se/bug/?i=18717 [135] = https://curl.se/bug/?i=18401 [136] = https://curl.se/bug/?i=18227 [137] = https://curl.se/bug/?i=18719 [138] = https://curl.se/bug/?i=18894 [139] = https://curl.se/bug/?i=18714 [140] = https://curl.se/bug/?i=18715 [141] = https://curl.se/bug/?i=18776 [142] = https://curl.se/bug/?i=18713 [143] = https://curl.se/bug/?i=18712 [144] = https://curl.se/bug/?i=18711 [145] = https://curl.se/bug/?i=18682 [146] = https://curl.se/bug/?i=18779 [147] = https://curl.se/bug/?i=18778 [148] = https://curl.se/bug/?i=18816 [149] = https://curl.se/bug/?i=18775 [150] = https://curl.se/bug/?i=18510 [151] = https://curl.se/bug/?i=18774 [152] = https://curl.se/bug/?i=18762 [153] = https://curl.se/bug/?i=18811 [154] = https://curl.se/bug/?i=18817 [155] = https://curl.se/bug/?i=18815 [156] = https://curl.se/bug/?i=18893 [157] = https://curl.se/bug/?i=18806 [158] = https://curl.se/bug/?i=18980 [159] = https://curl.se/bug/?i=18924 [160] = https://curl.se/bug/?i=18810 [161] = https://curl.se/bug/?i=18749 [162] = https://curl.se/bug/?i=18808 [163] = https://curl.se/bug/?i=18747 [164] = https://curl.se/bug/?i=18744 [165] = https://curl.se/bug/?i=18662 [166] = https://curl.se/bug/?i=18891 [167] = https://curl.se/bug/?i=18804 [168] = https://curl.se/bug/?i=18803 [169] = https://curl.se/bug/?i=18805 [170] = https://curl.se/bug/?i=18807 [171] = https://curl.se/bug/?i=18801 [172] = https://curl.se/bug/?i=18800 [173] = https://curl.se/bug/?i=18799 [174] = https://curl.se/bug/?i=18889 [175] = https://curl.se/bug/?i=18887 [176] = https://curl.se/bug/?i=18780 [177] = https://curl.se/bug/?i=18787 [178] = https://curl.se/bug/?i=18790 [179] = https://curl.se/bug/?i=18793 [180] = https://curl.se/bug/?i=18886 [181] = https://curl.se/bug/?i=18884 [183] = https://curl.se/bug/?i=18921 [184] = https://curl.se/bug/?i=18878 [185] = https://curl.se/bug/?i=18875 [186] = https://curl.se/bug/?i=18874 [187] = https://curl.se/bug/?i=18979 [188] = https://curl.se/bug/?i=18940 [189] = https://curl.se/bug/?i=18932 [190] = https://curl.se/bug/?i=18976 [191] = https://curl.se/bug/?i=18888 [192] = https://curl.se/bug/?i=18873 [193] = https://curl.se/bug/?i=18871 [194] = https://curl.se/bug/?i=18870 [195] = https://curl.se/bug/?i=18869 [196] = https://curl.se/bug/?i=18867 [197] = https://curl.se/bug/?i=18882 [198] = https://curl.se/bug/?i=18862 [199] = https://curl.se/bug/?i=18877 [200] = https://curl.se/bug/?i=18865 [201] = https://curl.se/bug/?i=18864 [202] = https://curl.se/bug/?i=18863 [203] = https://curl.se/bug/?i=18975 [204] = https://curl.se/bug/?i=18859 [205] = https://curl.se/bug/?i=18880 [206] = https://curl.se/bug/?i=18868 [207] = https://curl.se/bug/?i=18872 [208] = https://curl.se/bug/?i=18972 [209] = https://curl.se/bug/?i=19043 [210] = https://curl.se/bug/?i=18035 [211] = https://curl.se/bug/?i=18860 [212] = https://curl.se/bug/?i=18858 [213] = https://curl.se/bug/?i=18855 [214] = https://curl.se/bug/?i=18857 [215] = https://curl.se/bug/?i=18927 [216] = https://curl.se/bug/?i=18852 [217] = https://curl.se/bug/?i=18851 [218] = https://curl.se/bug/?i=18850 [219] = https://curl.se/bug/?i=18922 [220] = https://curl.se/bug/?i=18845 [221] = https://curl.se/bug/?i=18838 [222] = https://curl.se/bug/?i=18904 [223] = https://curl.se/bug/?i=18843 [224] = https://curl.se/bug/?i=18842 [225] = https://curl.se/bug/?i=18841 [226] = https://curl.se/bug/?i=18839 [227] = https://curl.se/bug/?i=18904 [228] = https://curl.se/bug/?i=18823 [229] = https://curl.se/bug/?i=18836 [230] = https://curl.se/bug/?i=18902 [231] = https://curl.se/bug/?i=18835 [232] = https://curl.se/bug/?i=18918 [233] = https://curl.se/bug/?i=19015 [234] = https://curl.se/bug/?i=18828 [235] = https://curl.se/bug/?i=18909 [236] = https://curl.se/bug/?i=18905 [237] = https://curl.se/bug/?i=18907 [238] = https://curl.se/bug/?i=18829 [239] = https://curl.se/bug/?i=18812 [240] = https://curl.se/bug/?i=18703 [241] = https://curl.se/bug/?i=18966 [242] = https://curl.se/bug/?i=18961 [243] = https://curl.se/bug/?i=18914 [244] = https://curl.se/bug/?i=19013 [245] = https://curl.se/bug/?i=18911 [246] = https://curl.se/bug/?i=18883 [247] = https://curl.se/bug/?i=18908 [248] = https://curl.se/bug/?i=18903 [249] = https://curl.se/bug/?i=18903 [250] = https://curl.se/bug/?i=18432 [251] = https://curl.se/bug/?i=18881 [252] = https://curl.se/bug/?i=18890 [253] = https://curl.se/bug/?i=19012 [254] = https://curl.se/bug/?i=18967 [255] = https://curl.se/bug/?i=18969 [256] = https://curl.se/bug/?i=18953 [257] = https://curl.se/bug/?i=18959 [258] = https://hackerone.com/reports/3373640 [259] = https://curl.se/bug/?i=18933 [260] = https://curl.se/bug/?i=18931 [261] = https://curl.se/bug/?i=18930 [262] = https://curl.se/bug/?i=18952 [263] = https://curl.se/bug/?i=18952 [264] = https://curl.se/bug/?i=18937 [265] = https://curl.se/bug/?i=18936 [266] = https://curl.se/bug/?i=18934 [267] = https://curl.se/bug/?i=18928 [268] = https://curl.se/bug/?i=18957 [269] = https://curl.se/bug/?i=18951 [270] = https://curl.se/bug/?i=18999 [271] = https://curl.se/bug/?i=18998 [272] = https://curl.se/bug/?i=18995 [273] = https://curl.se/bug/?i=18968 [274] = https://curl.se/bug/?i=18965 [275] = https://curl.se/bug/?i=18964 [276] = https://curl.se/bug/?i=18938 [277] = https://curl.se/bug/?i=18994 [278] = https://curl.se/bug/?i=18993 [279] = https://curl.se/bug/?i=18992 [280] = https://curl.se/bug/?i=18973 [281] = https://curl.se/bug/?i=19044 [282] = https://curl.se/bug/?i=18990 [283] = https://curl.se/bug/?i=18989 [284] = https://curl.se/bug/?i=18988 [285] = https://curl.se/bug/?i=18978 [286] = https://curl.se/bug/?i=18986 [287] = https://curl.se/bug/?i=18985 [288] = https://curl.se/bug/?i=18984 [289] = https://curl.se/bug/?i=19079 [290] = https://curl.se/bug/?i=19042 [291] = https://curl.se/bug/?i=19040 [292] = https://curl.se/bug/?i=19039 [293] = https://curl.se/bug/?i=19029 [294] = https://curl.se/bug/?i=19035 [295] = https://curl.se/bug/?i=19072 [296] = https://curl.se/bug/?i=19033 [297] = https://curl.se/bug/?i=19032 [298] = https://curl.se/bug/?i=19031 [299] = https://curl.se/bug/?i=19030 [300] = https://curl.se/bug/?i=19025 [301] = https://curl.se/bug/?i=19006 [302] = https://curl.se/bug/?i=19004 [303] = https://curl.se/bug/?i=19003 [304] = https://curl.se/bug/?i=19027 [305] = https://curl.se/bug/?i=19026 [306] = https://curl.se/bug/?i=19014 [307] = https://curl.se/bug/?i=18996 [308] = https://curl.se/bug/?i=19071 [309] = https://curl.se/bug/?i=19059 [310] = https://curl.se/bug/?i=18926 [311] = https://curl.se/bug/?i=19060 [312] = https://curl.se/bug/?i=19070 [313] = https://curl.se/bug/?i=19069 [314] = https://curl.se/bug/?i=19110 [315] = https://curl.se/bug/?i=19065 [316] = https://curl.se/bug/?i=19017 [317] = https://curl.se/bug/?i=16143 [318] = https://curl.se/bug/?i=19055 [319] = https://curl.se/bug/?i=19151 [320] = https://curl.se/mail/lib-2025-10/0018.html [321] = https://curl.se/bug/?i=19053 [322] = https://curl.se/bug/?i=19052 [323] = https://curl.se/bug/?i=19051 [324] = https://curl.se/bug/?i=19048 [325] = https://curl.se/bug/?i=19106 [326] = https://curl.se/bug/?i=19064 [327] = https://curl.se/bug/?i=19147 [328] = https://curl.se/bug/?i=19104 [329] = https://curl.se/bug/?i=19143 [330] = https://curl.se/bug/?i=19101 [331] = https://curl.se/bug/?i=19046 [332] = https://curl.se/bug/?i=19102 [333] = https://curl.se/bug/?i=19205 [334] = https://curl.se/bug/?i=19100 [335] = https://curl.se/bug/?i=19125 [336] = https://curl.se/bug/?i=19145 [337] = https://curl.se/bug/?i=19097 [338] = https://curl.se/bug/?i=19184 [339] = https://curl.se/bug/?i=19091 [340] = https://curl.se/bug/?i=19093 [341] = https://curl.se/bug/?i=19149 [342] = https://curl.se/bug/?i=19094 [343] = https://curl.se/bug/?i=19095 [344] = https://curl.se/bug/?i=19077 [345] = https://curl.se/bug/?i=19089 [346] = https://curl.se/bug/?i=19088 [347] = https://issues.oss-fuzz.com/issues/432441303 [348] = https://curl.se/bug/?i=19086 [349] = https://curl.se/bug/?i=19076 [350] = https://curl.se/bug/?i=19293 [351] = https://curl.se/bug/?i=19141 [352] = https://curl.se/bug/?i=19265 [353] = https://curl.se/bug/?i=19073 [354] = https://curl.se/bug/?i=19078 [355] = https://curl.se/bug/?i=19135 [356] = https://curl.se/bug/?i=19267 [357] = https://curl.se/bug/?i=19136 [358] = https://curl.se/bug/?i=19133 [359] = https://curl.se/bug/?i=19139 [360] = https://curl.se/bug/?i=19179 [361] = https://curl.se/bug/?i=19126 [362] = https://curl.se/bug/?i=19132 [363] = https://curl.se/bug/?i=19118 [364] = https://curl.se/bug/?i=19157 [365] = https://curl.se/bug/?i=19112 [366] = https://curl.se/bug/?i=19124 [367] = https://curl.se/bug/?i=19115 [368] = https://curl.se/bug/?i=19120 [369] = https://curl.se/bug/?i=19119 [370] = https://curl.se/bug/?i=19122 [371] = https://curl.se/bug/?i=19123 [372] = https://curl.se/bug/?i=19116 [373] = https://curl.se/bug/?i=19114 [374] = https://curl.se/bug/?i=19113 [375] = https://curl.se/bug/?i=18848 [376] = https://curl.se/bug/?i=19111 [377] = https://curl.se/bug/?i=19176 [378] = https://curl.se/bug/?i=19169 [379] = https://curl.se/bug/?i=19163 [380] = https://curl.se/bug/?i=19168 [381] = https://curl.se/bug/?i=9328 [382] = https://curl.se/bug/?i=19170 [383] = https://curl.se/bug/?i=19226 [384] = https://curl.se/bug/?i=19225 [385] = https://curl.se/bug/?i=19222 [386] = https://curl.se/bug/?i=19018 [387] = https://curl.se/bug/?i=19224 [388] = https://curl.se/bug/?i=19161 [389] = https://curl.se/bug/?i=19160 [390] = https://curl.se/bug/?i=19137 [391] = https://curl.se/bug/?i=19223 [392] = https://curl.se/bug/?i=19266 [393] = https://curl.se/bug/?i=19130 [394] = https://curl.se/bug/?i=19153 [395] = https://curl.se/bug/?i=19346 [396] = https://curl.se/bug/?i=19259 [397] = https://curl.se/bug/?i=19258 [398] = https://curl.se/bug/?i=19252 [399] = https://curl.se/bug/?i=19206 [400] = https://curl.se/bug/?i=19208 [401] = https://curl.se/bug/?i=19345 [402] = https://curl.se/bug/?i=19211 [403] = https://curl.se/bug/?i=19213 [404] = https://curl.se/bug/?i=18991 [405] = https://curl.se/bug/?i=19255 [406] = https://curl.se/bug/?i=19202 [407] = https://curl.se/bug/?i=19200 [408] = https://curl.se/bug/?i=19201 [409] = https://curl.se/bug/?i=19199 [410] = https://curl.se/bug/?i=18798 [411] = https://curl.se/bug/?i=19165 [412] = https://curl.se/bug/?i=19198 [413] = https://curl.se/bug/?i=19196 [414] = https://curl.se/bug/?i=19195 [415] = https://issues.oss-fuzz.com/issues/435278402 [416] = https://curl.se/bug/?i=19194 [417] = https://curl.se/bug/?i=19192 [418] = https://curl.se/bug/?i=19191 [419] = https://curl.se/bug/?i=19190 [420] = https://curl.se/bug/?i=19188 [421] = https://curl.se/bug/?i=19186 [422] = https://curl.se/bug/?i=19187 [423] = https://curl.se/bug/?i=19185 [424] = https://curl.se/bug/?i=19227 [425] = https://curl.se/bug/?i=19247 [426] = https://curl.se/bug/?i=19292 [427] = https://curl.se/bug/?i=19228 [428] = https://curl.se/bug/?i=19291 [429] = https://curl.se/bug/?i=19167 [430] = https://curl.se/bug/?i=19237 [431] = https://curl.se/bug/?i=19353 [432] = https://curl.se/bug/?i=19288 [433] = https://curl.se/bug/?i=19323 [434] = https://curl.se/bug/?i=19310 [435] = https://curl.se/bug/?i=19301 [436] = https://curl.se/bug/?i=19344 [437] = https://curl.se/bug/?i=19343 [438] = https://curl.se/bug/?i=19271 [439] = https://curl.se/bug/?i=19278 [440] = https://curl.se/bug/?i=19229 [441] = https://curl.se/bug/?i=18847 [442] = https://curl.se/bug/?i=19276 [443] = https://curl.se/bug/?i=19275 [444] = https://curl.se/bug/?i=19274 [445] = https://curl.se/bug/?i=19240 [446] = https://curl.se/bug/?i=19109 [447] = https://curl.se/bug/?i=19340 [448] = https://curl.se/bug/?i=18983 [449] = https://curl.se/bug/?i=19148 [450] = https://curl.se/bug/?i=19304 [451] = https://curl.se/bug/?i=19306 [452] = https://curl.se/bug/?i=19334 [453] = https://curl.se/bug/?i=19358 [454] = https://curl.se/bug/?i=19312 [455] = https://curl.se/bug/?i=19309 [456] = https://curl.se/bug/?i=19362 [457] = https://curl.se/bug/?i=19351 [458] = https://curl.se/bug/?i=19360 In a release tarball, check the RELEASE-NOTES file for what was done in the most recent release. In a git check-out, that file mentions changes that have been done since the previous release. See the online [changelog](https://curl.se/changes.html) for the edited and human readable version of what has changed in different curl releases. curl and libcurl 8.20.0 Public curl releases: 274 Command line options: 273 curl_easy_setopt() options: 308 Public functions in libcurl: 100 Authors: 1463 Contributors: 3664 This release includes the following changes: o async-thrdd: use thread queue for resolving [144] o build: make NTLM disabled by default [90] o cmake: drop support for CMake 3.17 and older [108] o lib: add thread pool and queue [74] o lib: drop support for < c-ares 1.16.0 [64] o lib: make SMB support opt-in [18] o multi.h: add CURLMNWC_CLEAR_ALL [127] o rtmp: drop support [91] This release includes the following bugfixes: o altsvc: cap the list at 5,000 entries [183] o altsvc: drop the prio field from the struct [185] o altsvc: skip expired entries read from file [187] o asyn-ares: connect async [220] o asyn-ares: drop orphaned variable references [86] o asyn-ares: fix HTTPS-lookup when not on port 443 [100] o asyn-thrdd: drop redundant `result` check [291] o asyn-thrdd: fix clang-tidy unused value warning [125] o async-ares: fix query counter handling [195] o autotools: limit checksrc target to ignore non-repo test sources [12] o badwords-all: exit with correct code on errors [50] o badwords: combine the whitelisting into a single regex [1] o badwords: detect the the and with with [51] o badwords: only check comments and strings in source code [61] o badwords: rework exceptions, fix many of them [15] o boringssl: fix more coexist cases with Schannel/WinCrypt [170] o build: adjust/add casts to fix `-Wformat-signedness` [218] o build: assume `snprintf()` in `mprintf`, drop feature check [107] o build: compiler warning silencing tidy-ups [4] o build: drop `openssl` module dependency for BoringSSL from `libcurl.pc` [33] o build: drop duplicate `pthread.h` includes [158] o build: drop redundant `USE_QUICHE` guards [159] o build: enable `-Wimplicit-int-enum-cast` compiler warning, fix issues [84] o build: fix `-Wformat-signedness` by adjusting printf masks [226] o build: link `bcrypt.lib` via vcxproj files [239] o build: skip detecting `pipe2()` for Apple targets [227] o build: stop building and installing `runtests.1` and `testcurl.1` [235] o cf-https-connect: silence `-Wimplicit-int-enum-cast` with HTTPS-RR [132] o cf-https-connect: silence `-Wimplicit-int-enum-cast` with HTTPS-RR [63] o cf-ip-happy: limit concurrent attempts [191] o cf-socket: avoid low risk integer overflow on ancient Solaris [56] o cfilters: fix Curl_pollset_poll() return code mixup [206] o clang-tidy: avoid assignments in `if` expressions [175] o clang-tidy: enable more checks, fix fallouts [254] o cmake: add CMake Config-based dependency detection [87] o cmake: add CMake Config-based dependency detection for c-ares, wolfSSL [134] o cmake: do not install `wcurl` when `BUILD_CURL_EXE=OFF` [265] o cmake: do not install shell completions when `BUILD_CURL_EXE=OFF` [263] o cmake: document functions used from Windows system DLLs [103] o cmake: enable pthreads for BoringSSL/AWS-LC [196] o cmake: resolve targets recursively when generating `libcurl.pc` [45] o cmake: rework binutils ld hack to not read `LOCATION` property [41] o cmake: silence bad library `Threads::Threads` warning [131] o cmake: use `AIX` built-in variable (with CMake 4.0+) [163] o config2setopts: make --capath work in proxy disabled builds [113] o configure: fix `--with-ngtcp2=` option for crypto libs [26] o configure: fix LibreSSL ngtcp2 1.15.0+ crypto lib selection logic [3] o configure: prefer dependency-specific variables over `$withval` [35] o configure: remove superfluous experimental warning for HTTP/3 [169] o configure: silence useless clang warnings in C89 builds [156] o configure: tidy up comments [202] o connect: fix typo on error message o cookie: fix rejection when tabs in value [189] o curl-wolfssl.m4: fix to use the correct value for pkg-config directory [36] o curl.h: replace macros with C++-friendly method to enforce 3 args [110] o curl_ctype.h: fix spelling in a couple of locally used macros [28] o curl_get_line: error out on read errors [9] o curl_get_line: fix potential infinite loop when filename is a directory [46] o curl_ngtcp2: extend and update callbacks for 1.22.0+ [165] o curl_ntlm_core: drop redundant PP condition [140] o curl_ntlm_core: use wolfCrypt DES API with wolfSSL [200] o curl_setup.h: drop stray/unused `USE_OPENSSL_QUIC` guard [210] o curl_sha512_256: support delegating to wolfSSL API [149] o curl_version_info.md: clarify age details [69] o CURLOPT_HAPROXY_CLIENT_IP.md: mention assumption on data format [96] o CURLOPT_RTSP_SESSION_ID.md: clarify reuse "dangers" [270] o CURLOPT_RTSP_SESSION_ID.md: expand the comment [267] o CURLOPT_RTSP_SESSION_ID.md: minor language fix o CURLOPT_SOCKS5_AUTH.md: an access property [212] o CURLOPT_SSL_CTX_FUNCTION.md: expand on effects connection reuse [105] o CURLOPT_UPLOAD_FLAGS.md: expand [223] o curlx_now(), prevent zero timestamp [93] o DEPRECATE: fix minor release number typo o digest: pass in the user name quoted (as well) [34] o dns: https-eyeballing async [229] o dnscache: own source file, improvements [116] o docs/cmdline-opts/write-out.md: tls_earlydata was adeded in 8.13.0 o docs/cmdline-opts: tidy up retry-connrefused [190] o docs/lib: fix typos [53] o docs/libcurl: improve easy setopt examples [266] o docs: clarify retry-max-time timing [294] o docs: CURLOPT_LOGIN_OPTIONS is a login property [228] o docs: enable more compiler warnings for C snippets, fix 3 finds [71] o docs: list more dependencies for running Python HTTP tests [123] o docs: mention more zip bomb precautions [166] o docs: minor wording tweaks o docs: noproxy wants the punycoded hostname version [214] o docs: SSH host verification is done at connect time [197] o docs: use the correct CURLOPT_WRITEFUNCTION signature [142] o doh: fix memory-leak when doing a second DoH resolve [55] o doh: remove superfluous doh_req check [222] o examples/websocket: fix to sleep more on Windows [92] o examples: drop warning silencers no longer hit [14] o examples: fix typo in comment [75] o file: init fd to -1 to prevent close fd 0 on early failure [40] o fopen: for temp files, inherit permissions only for owner [146] o ftp: do not strdup DATA hostname [29] o ftp: make the MDTM date parser stricter (again) [115] o ftp: reject PWD responses containing control characters [95] o gcc: guard `#pragma diagnostic` in core code for <4.6 [94] o generate.bat: remove extra % from VC11 and VC12 runs o genserv.pl: make external calls safe [119] o getinfo: initialize `PureInfo` field `used_proxy` [43] o getinfo: repair CURLINFO_TLS_SESSION [193] o gnutls: fix clang-tidy warning with !verbose [126] o gtls: fail for large files in `load_file()` [174] o h3: HTTPS-RR use in HTTP/3 [221] o Happy Eyeballs: add resolution time delay [238] o haproxy: use correct ip version on client supplied address [275] o hostip: clear the sockaddr_in6 structure before use [20] o hostip: init the curl_jmpenv_lock appropriately [278] o hostip: resolve user supplied ip addresses [259] o HSTS: cap the list [177] o hsts: make the HSTS read callback handle name dupes [141] o hsts: skip expired HSTS entries read from file [188] o hsts: when a dupe host adds subdomains, use that [130] o http2: clear the h2 session at delete [99] o http2: prevent secure schemes pushed over insecure connections [181] o http2: return error on OOM in push headers [65] o HTTP3.md: drop outdated mentions of OpenSSL-QUIC [2] o http: clear credentials better on redirect [204] o http: clear digest nonce on cross-orgin redirect [269] o http: clear the proxy credentials as well on port or scheme change [246] o http: fix auth_used and auth_avail [154] o http: fix Curl_compareheader for multi value headers [11] o http: make Curl_compareheader handle multiple commas in header o http: on 303, switch to GET [208] o http: use header_has_value() instead of duplicate code [251] o imap: reset the UIDVALIDITY state between transfers [7] o include: drop 'will' from public headers [73] o INSTALL.md: update Cygwin instructions [198] o keylog.h: replace literal number with macro in declaration [171] o keylog: drop unused/redundant includes and guards [172] o ldap: drop duplicate `ldap_set_option()` on Windows [42] o ldap: fix to initialize cleartext connection on Windows [49] o lib1560: fix comment typo o lib1960: fix test failure [255] o lib: accept larger input to md5/hmac/sha256/sha512 functions [194] o lib: always use Curl_1st_fatal instead of Curl_1st_err [89] o lib: fix typos in comments [240] o lib: make resolving HTTPS DNS records reliable: [176] o lib: minor comment typos [237] o lib: move request specific allocations to the request struct [256] o lib: replace `PRI*32` printf masks with C89 ones [201] o libssh2: allocate libssh2-friendly memory in kbd_callback [225] o libssh2: fix error handling on quote errors [21] o libssh: fix 64-bit printf mask for mingw-w64 <=6.0.0 [215] o libssh: fix `-Wsign-compare` in 32-bit builds [217] o libssh: path length precaution [164] o libssh: propagate error back in SFTP function [178] o libtest: drop duplicate include [111] o location/follow: mention netrc [138] o man: fix argument type for `CURLSHOPT_[UN]SHARE` options [211] o mbedtls: cleanup more without care for 'initialized' [262] o mbedtls: fix ECJPAKE matching [135] o mbedtls: remove failf() call with first argument as NULL [249] o md4, md5: switch to wolfCrypt API in wolfSSL builds [139] o mime: only allow 40 levels of calls [241] o misc: fix code quality findings [209] o mk-ca-bundle.pl: make `ca-bundle.crt` timestamp match `certdata.txt`'s [44] o multi: enhance pending handles fairness [284] o multi: fix connection retry for non-http [180] o multi: improve wakeup and wait code [118] o netrc: find login-less password when user is given in URL [6] o netrc: remove unused parsenetrc() macro for netrc-disabled [121] o netrc: skip malformed macdef lines [67] o openssl channel_binding: lookup digest algorithm without NID [117] o openssl: drop obsolete SSLv2 logic [27] o openssl: fix build with 4.0.0-beta1 no-deprecated [184] o openssl: fix memory leaks in ECH code (OpenSSL 3) [78] o openssl: fix unused variable warnings in !verbose builds [252] o openssl: trace count of found / imported Windows native CA roots [8] o OS400: add new definitions to the ILE/RPG binding. [153] o os400sys: fix typo in comment (symetry -> symmetry) [58] o parsedate: bsearch the time zones [232] o parsedate: fix wrong treatment of "military time zones" [182] o parsedate: refactor [230] o perl: harden external command invocations [133] o progress: count amount of data "delivered" to application [66] o protocol.h: fix the CURLPROTO_MASK [31] o protocol: disable connection reuse for SMB(S) [199] o protocol: use scheme names lowercase [38] o proxy: chunked response, error code [143] o pytest: add additional quiche check for flaky test_05_01 [22] o pytest: check 429 handling [268] o rand: use `BCryptGenRandom()` in UWP builds [88] o ratelimit: reset on start [150] o request: reset resp_trailer in new requests [186] o runtests: skip setting ed25519 SSH key format [264] o rustls: fix memory leak on repeated SSLKEYLOGFILE fails [280] o rustls: handle EOF during initial handshake [203] o schannel: increase renegotiation timeout to 60 seconds [261] o scripts: drop redundant double-quotes: `"$var"` -> `$var` (Perl) [109] o scripts: harden / tidy up more Perl `system()` calls [70] o sectrust: fail on missing OCSP stapling [250] o sendf: fix CR detection if no LF is in the chunk [219] o setopt: clear proxy auth properties when switching [192] o setopt: fix typos in comments [257] o setopt: move CURLOPT_CURLU [260] o setup connection filter: mark as setup [234] o sha256, sha512_256: switch to wolfCrypt API [147] o sha256: support delegating to wolfSSL API [148] o share: concurrency handling, easy updates [104] o share: do bitshifts after the type is checked to be valid [216] o socks: reject zero-length GSSAPI/SSPI tokens from proxy [157] o socks: use dns filter for resolving [244] o spelling: fix typos [173] o src: use ftruncate() unconditionally [128] o sshserver.pl: harden more `system()` calls [81] o sshserver.pl: pass command-line to `system()` safely [82] o strerr: correct the strerror_s() return code condition [25] o sws: fix potential OOB write [80] o synctime: fix off-by-one read and write to a read-only buffer (Windows) [85] o test 766: flag as timing-dependent [136] o test1675: unit tests for URL API helper functions [248] o test459: switch to mode="warn" for stderr check [5] o testcurl.pl: replace shell commands with Perl `rmtree()` [76] o tests/unit/README: describe how to unit test static functions [60] o tests: avoid infinite recursion for `make check` [253] o tests: use %b64[] instead of "raw" base64 [245] o tool: check for curlinfo->age when determining if ssh backend [77] o tool: fix memory mixups [106] o tool: fix retries in parallel mode [137] o tool: fix two more allocator mismatches [155] o tool_cb_hdr: only truncate etags output when regular file [129] o tool_cb_rea: make waitfd() return void [168] o tool_cb_wrt: fix no-clobber error handling [39] o tool_cfgable: free the SSL signature algorithms [62] o tool_dirhie: fix to create drive-relative directory [276] o tool_formparse: propagate my_get_line errors when reading headers [102] o tool_getparam: use correct free function for libcurl memory [68] o tool_ipfs: accept IPFS gateway URL without set port number [13] o tool_msgs: avoid null pointer deref for early errors [98] o tool_operate: actually apply the --parallel-max-host limit [167] o tool_operate: drop the scheme-guessing in the -G handling [54] o tool_operate: fix condition for loading `curl-ca-bundle.crt` (Windows) [79] o tool_operate: fix memory-leak on failed uploads [124] o tool_operate: fix minor memory-leak on early error [23] o tool_operate: reset the upload glob counter for next URL [162] o tool_operhlp: fix `add_file_name_to_url()` result on OOM [32] o tool_operhlp: iterate through all slashes to find name [114] o tool_operhlp: propagate low-level OOM in `add_file_name_to_url()` [112] o tool_setopt: return error on OOM correctly [152] o tool_urlglob: fix memory-leak on glob range overflow [19] o top-complexity: prevent filename-based shell injection risk [101] o transfer: clear the old autoreferer [236] o transfer: clear the URL pointer in OOM to avoid UAF [179] o transfer: enable custom methods again on next transfer [30] o transfer: enhance secure check [10] o unit1675: fix `-Wformat-signedness` [274] o url: do not reuse a non-tls starttls connection if new requires TLS [145] o url: improve connection reuse on negotiate [160] o url: init req.no_body in DO so that it works for h2 push [161] o url: set default upload flags to CURLULFLAG_SEEN [224] o url: use the socks type for socks proxy [47] o url: use URL for url even in comments [52] o urlapi: fix handling of "file:///" [122] o urlapi: make dedotdotify handle leading dots correctly [97] o urlapi: same origin tests [213] o urlapi: stop extracting hostname from file:// URLs on Windows [247] o urlapi: verify the last letter of a scheme when set explicitly [16] o urldata.h: fix typo and lingering backtick [279] o urldata: connection bit ipv6_ip is wrong [59] o urldata: import port types and conn destination format [57] o urldata: make hstslist only present in HSTS builds [120] o urldata: make speeder_c uint32 [37] o urldata: move cookiehost to struct SingleRequest [242] o urldata: remove trailers_state [17] o vquic: fix variable name in fallback code [207] o vtls: fix comment typos and tidy up a type [285] o vtls: log when key logging is enabled. [288] o vtls_scache: check reentrancy [243] o vtls_scache: include cert_blob independently of verifypeer [231] o wolfssl: document v5.0.0 (2021-11-01) as minimum required [151] o wolfssl: fix `-Wmissing-prototypes` [233] o wolfssl: fix handling of abrupt connection close [24] o write-out.md: minor language fix [273] o write-out.md: tls_earlydata was adeded in 8.13.0 o ws: fix a blocking curl_ws_send() to report written length correctly [258] o x509asn1: fix to return error in an error case from `encodeOID()` [83] o x509asn1: fixed and adapted for ASN1tostr unit testing [48] o x509asn1: improve encodeOID [72] This release includes the following known bugs: See https://curl.se/docs/knownbugs.html For all changes ever done in curl: See https://curl.se/changes.html Planned upcoming removals include: o local crypto implementations o NTLM o SMB o TLS-SRP support See https://curl.se/dev/deprecate.html This release would not have looked like this without help, code, reports and advice from friends like these: Alex Hamilton, am-perip on hackerone, Arkadi Vainbrand, bird on github, BlackFuffey on github, Carlos Carrillo, Carlos Henrique Lima Melara, crawfordxx, Cutiapreta on hackerone, Dag-Erling Smørgrav, Dan Arnfield, Dan Fandrich, Daniel McCarney, Daniel Schulte, Daniel Stenberg, dependabot[bot], Dexter Gerig, Dio Putra, Dwij Mehta, Ercan Ermis, fds242 on github, finkjsc on github, Fiona Klute, Flavio Amieiro, Geeknik Labs, Greg Kroah-Hartman, Harry Sintonen, Henrique Pereira, herbenderbler on github, Ian Spence, Izan on hackerone, James Fuller, Jason Stangroome, John Haugabook, Juan Belón, Kai Pastor, Kaixuan Li, kpcyrd, lg_oled77c5pua on hackerone, M42kL33 on hackerone, m777m0 on hackerone, Marcel Raad, Martin Dürrmeier, Mehtab Zafar, Michael Hendricks, Michael Kaufmann, Muhamad Arga Reksapati, Ngoc Hieu, nitrogene on github, Orgad Shaneh, Osama Hamad, Otis Cui Lei, Patrick Monnerat, Quac Tran, Ray Satiro, renovate[bot], Richard Tollerton, Rob Crittenden, Samuel Henrique, Scott Boudreaux, Sergey Fedorov, sergio-nsk on github, Stefan Eissing, Ted Lyngmo, Terrance Wong, Tim Omta, Viktor Szakats, Vladimír Marek, xkilua on hackerone, Yalguun Tumenkhuu, Yedaya Katsman, Yiwei Hou, Yoshiro Yoneya (73 contributors) References to bug reports and discussions on issues: [1] = https://curl.se/bug/?i=20880 [2] = https://curl.se/bug/?i=20914 [3] = https://curl.se/bug/?i=20889 [4] = https://curl.se/bug/?i=20908 [5] = https://curl.se/bug/?i=20910 [6] = https://curl.se/bug/?i=20950 [7] = https://curl.se/bug/?i=20962 [8] = https://curl.se/bug/?i=20899 [9] = https://curl.se/bug/?i=20958 [10] = https://curl.se/bug/?i=20951 [11] = https://curl.se/bug/?i=20894 [12] = https://curl.se/bug/?i=20898 [13] = https://curl.se/bug/?i=20957 [14] = https://curl.se/bug/?i=20896 [15] = https://curl.se/bug/?i=20886 [16] = https://curl.se/bug/?i=20893 [17] = https://curl.se/bug/?i=20960 [18] = https://curl.se/bug/?i=20846 [19] = https://curl.se/bug/?i=20956 [20] = https://curl.se/bug/?i=20885 [21] = https://curl.se/bug/?i=20883 [22] = https://curl.se/bug/?i=20952 [23] = https://curl.se/bug/?i=20954 [24] = https://curl.se/bug/?i=21002 [25] = https://curl.se/bug/?i=20955 [26] = https://curl.se/bug/?i=18022 [27] = https://curl.se/bug/?i=20945 [28] = https://curl.se/bug/?i=20810 [29] = https://curl.se/bug/?i=20953 [30] = https://curl.se/bug/?i=21037 [31] = https://curl.se/bug/?i=21031 [32] = https://curl.se/bug/?i=21011 [33] = https://curl.se/bug/?i=20926 [34] = https://curl.se/bug/?i=20940 [35] = https://curl.se/bug/?i=20944 [36] = https://curl.se/bug/?i=20943 [37] = https://curl.se/bug/?i=21036 [38] = https://curl.se/bug/?i=21033 [39] = https://curl.se/bug/?i=20939 [40] = https://curl.se/bug/?i=21029 [41] = https://curl.se/bug/?i=20839 [42] = https://curl.se/bug/?i=20930 [43] = https://curl.se/bug/?i=21020 [44] = https://curl.se/bug/?i=20528 [45] = https://curl.se/bug/?i=20840 [46] = https://curl.se/bug/?i=20823 [47] = https://curl.se/bug/?i=21025 [48] = https://curl.se/bug/?i=21013 [49] = https://curl.se/bug/?i=20927 [50] = https://curl.se/bug/?i=20934 [51] = https://curl.se/bug/?i=20934 [52] = https://curl.se/bug/?i=20935 [53] = https://curl.se/bug/?i=20933 [54] = https://curl.se/bug/?i=20992 [55] = https://curl.se/bug/?i=20929 [56] = https://curl.se/bug/?i=21111 [57] = https://curl.se/bug/?i=20918 [58] = https://curl.se/bug/?i=20923 [59] = https://curl.se/bug/?i=20919 [60] = https://curl.se/bug/?i=21018 [61] = https://curl.se/bug/?i=20909 [62] = https://curl.se/bug/?i=20915 [63] = https://curl.se/bug/?i=21057 [64] = https://curl.se/bug/?i=20911 [65] = https://hackerone.com/reports/3636044 [66] = https://curl.se/bug/?i=20787 [67] = https://curl.se/bug/?i=21049 [68] = https://curl.se/bug/?i=21075 [69] = https://curl.se/bug/?i=21052 [70] = https://curl.se/bug/?i=21007 [71] = https://curl.se/bug/?i=21006 [72] = https://curl.se/bug/?i=21003 [73] = https://curl.se/bug/?i=21005 [74] = https://curl.se/bug/?i=20916 [75] = https://curl.se/bug/?i=21001 [76] = https://curl.se/bug/?i=21053 [77] = https://curl.se/bug/?i=21050 [78] = https://curl.se/bug/?i=20993 [79] = https://curl.se/bug/?i=20989 [80] = https://curl.se/bug/?i=20988 [81] = https://curl.se/bug/?i=20997 [82] = https://curl.se/bug/?i=20996 [83] = https://curl.se/bug/?i=20991 [84] = https://curl.se/bug/?i=20990 [85] = https://curl.se/bug/?i=20987 [86] = https://curl.se/bug/?i=20999 [87] = https://curl.se/bug/?i=20814 [88] = https://curl.se/bug/?i=20983 [89] = https://curl.se/bug/?i=20980 [90] = https://curl.se/bug/?i=20698 [91] = https://curl.se/bug/?i=20673 [92] = https://curl.se/bug/?i=20978 [93] = https://curl.se/bug/?i=21034 [94] = https://curl.se/bug/?i=20892 [95] = https://curl.se/bug/?i=20949 [96] = https://curl.se/bug/?i=21042 [97] = https://curl.se/bug/?i=20974 [98] = https://curl.se/bug/?i=20967 [99] = https://curl.se/bug/?i=20975 [100] = https://curl.se/bug/?i=20966 [101] = https://curl.se/bug/?i=20969 [102] = https://curl.se/bug/?i=20963 [103] = https://curl.se/bug/?i=20965 [104] = https://curl.se/bug/?i=20870 [105] = https://curl.se/bug/?i=21164 [106] = https://curl.se/bug/?i=21099 [107] = https://curl.se/bug/?i=20763 [108] = https://curl.se/bug/?i=20407 [109] = https://curl.se/bug/?i=21009 [110] = https://curl.se/bug/?i=20709 [111] = https://curl.se/bug/?i=21046 [112] = https://curl.se/bug/?i=21011 [113] = https://curl.se/bug/?i=21063 [114] = https://curl.se/bug/?i=21165 [115] = https://curl.se/bug/?i=21041 [116] = https://curl.se/bug/?i=20864 [117] = https://curl.se/bug/?i=20590 [118] = https://curl.se/bug/?i=20832 [119] = https://curl.se/bug/?i=20971 [120] = https://curl.se/bug/?i=21068 [121] = https://curl.se/bug/?i=21067 [122] = https://curl.se/bug/?i=21070 [123] = https://curl.se/bug/?i=21110 [124] = https://curl.se/bug/?i=21062 [125] = https://curl.se/bug/?i=21061 [126] = https://curl.se/bug/?i=21060 [127] = https://curl.se/bug/?i=20968 [128] = https://curl.se/bug/?i=21109 [129] = https://curl.se/bug/?i=21103 [130] = https://curl.se/bug/?i=21108 [131] = https://curl.se/bug/?i=21170 [132] = https://curl.se/bug/?i=21167 [133] = https://curl.se/bug/?i=21097 [134] = https://curl.se/bug/?i=21098 [135] = https://curl.se/bug/?i=21264 [136] = https://curl.se/bug/?i=21155 [137] = https://curl.se/bug/?i=20669 [138] = https://curl.se/bug/?i=21091 [139] = https://curl.se/bug/?i=21093 [140] = https://curl.se/bug/?i=21096 [141] = https://curl.se/bug/?i=21201 [142] = https://curl.se/bug/?i=21265 [143] = https://curl.se/bug/?i=21084 [144] = https://curl.se/bug/?i=20936 [145] = https://curl.se/bug/?i=21082 [146] = https://curl.se/bug/?i=21092 [147] = https://curl.se/bug/?i=21090 [148] = https://curl.se/bug/?i=21078 [149] = https://curl.se/bug/?i=21077 [150] = https://curl.se/bug/?i=21086 [151] = https://curl.se/bug/?i=21080 [152] = https://curl.se/bug/?i=21083 [153] = https://curl.se/bug/?i=20672 [154] = https://curl.se/bug/?i=21274 [155] = https://curl.se/bug/?i=21150 [156] = https://curl.se/bug/?i=21263 [157] = https://curl.se/bug/?i=21159 [158] = https://curl.se/bug/?i=21144 [159] = https://curl.se/bug/?i=21135 [160] = https://curl.se/bug/?i=21203 [161] = https://curl.se/bug/?i=21194 [162] = https://curl.se/bug/?i=21402 [163] = https://curl.se/bug/?i=21134 [164] = https://curl.se/bug/?i=21193 [165] = https://curl.se/bug/?i=21152 [166] = https://curl.se/bug/?i=21143 [167] = https://curl.se/bug/?i=21147 [168] = https://curl.se/bug/?i=21127 [169] = https://curl.se/bug/?i=21139 [170] = https://curl.se/bug/?i=21136 [171] = https://curl.se/bug/?i=21141 [172] = https://curl.se/bug/?i=21137 [173] = https://curl.se/bug/?i=21198 [174] = https://curl.se/bug/?i=21256 [175] = https://curl.se/bug/?i=21256 [176] = https://curl.se/bug/?i=21175 [177] = https://curl.se/bug/?i=21190 [178] = https://curl.se/bug/?i=21122 [179] = https://curl.se/bug/?i=21123 [180] = https://curl.se/bug/?i=21121 [181] = https://curl.se/bug/?i=21113 [182] = https://curl.se/bug/?i=21251 [183] = https://curl.se/bug/?i=21183 [184] = https://curl.se/bug/?i=21119 [185] = https://curl.se/bug/?i=21188 [186] = https://curl.se/bug/?i=21112 [187] = https://curl.se/bug/?i=21187 [188] = https://curl.se/bug/?i=21186 [189] = https://curl.se/bug/?i=21185 [190] = https://curl.se/bug/?i=21182 [191] = https://curl.se/bug/?i=21252 [192] = https://curl.se/bug/?i=21453 [193] = https://curl.se/bug/?i=21290 [194] = https://curl.se/bug/?i=21174 [195] = https://curl.se/bug/?i=21399 [196] = https://curl.se/bug/?i=21168 [197] = https://curl.se/bug/?i=21173 [198] = https://curl.se/bug/?i=20995 [199] = https://curl.se/bug/?i=21238 [200] = https://curl.se/bug/?i=21247 [201] = https://curl.se/bug/?i=21234 [202] = https://curl.se/bug/?i=21246 [203] = https://curl.se/bug/?i=21242 [204] = https://curl.se/bug/?i=21345 [206] = https://curl.se/bug/?i=21231 [207] = https://curl.se/bug/?i=21281 [208] = https://curl.se/bug/?i=20715 [209] = https://curl.se/bug/?i=21393 [210] = https://curl.se/bug/?i=21235 [211] = https://curl.se/bug/?i=21232 [212] = https://curl.se/bug/?i=21230 [213] = https://curl.se/bug/?i=21328 [214] = https://curl.se/bug/?i=21228 [215] = https://curl.se/bug/?i=21229 [216] = https://curl.se/bug/?i=21224 [217] = https://curl.se/bug/?i=21225 [218] = https://curl.se/bug/?i=21339 [219] = https://curl.se/bug/?i=21221 [220] = https://curl.se/bug/?i=21205 [221] = https://curl.se/bug/?i=21253 [222] = https://curl.se/bug/?i=21216 [223] = https://curl.se/bug/?i=21218 [224] = https://curl.se/bug/?i=21217 [225] = https://curl.se/bug/?i=21336 [226] = https://curl.se/bug/?i=21335 [227] = https://curl.se/bug/?i=21236 [228] = https://curl.se/bug/?i=21215 [229] = https://curl.se/bug/?i=21267 [230] = https://curl.se/bug/?i=21394 [231] = https://curl.se/bug/?i=21222 [232] = https://curl.se/bug/?i=21266 [233] = https://curl.se/bug/?i=21392 [234] = https://curl.se/bug/?i=21437 [235] = https://curl.se/bug/?i=21461 [236] = https://curl.se/bug/?i=21322 [237] = https://curl.se/bug/?i=21388 [238] = https://curl.se/bug/?i=21354 [239] = https://curl.se/bug/?i=21386 [240] = https://curl.se/bug/?i=21385 [241] = https://curl.se/bug/?i=21384 [242] = https://curl.se/bug/?i=21312 [243] = https://curl.se/bug/?i=21383 [244] = https://curl.se/bug/?i=21297 [245] = https://curl.se/bug/?i=21313 [246] = https://curl.se/bug/?i=21304 [247] = https://curl.se/bug/?i=21296 [248] = https://curl.se/bug/?i=21296 [249] = https://curl.se/bug/?i=21441 [250] = https://curl.se/bug/?i=21444 [251] = https://curl.se/bug/?i=21302 [252] = https://curl.se/bug/?i=21380 [253] = https://curl.se/bug/?i=21378 [254] = https://curl.se/bug/?i=20794 [255] = https://curl.se/bug/?i=21377 [256] = https://curl.se/bug/?i=21301 [257] = https://curl.se/bug/?i=21303 [258] = https://curl.se/bug/?i=21372 [259] = https://curl.se/bug/?i=21146 [260] = https://curl.se/bug/?i=21298 [261] = https://curl.se/bug/?i=21270 [262] = https://curl.se/bug/?i=21440 [263] = https://curl.se/bug/?i=21460 [264] = https://curl.se/bug/?i=21360 [265] = https://curl.se/bug/?i=21458 [266] = https://curl.se/bug/?i=21364 [267] = https://curl.se/bug/?i=21363 [268] = https://curl.se/bug/?i=21357 [269] = https://curl.se/bug/?i=21359 [270] = https://curl.se/bug/?i=21358 [273] = https://curl.se/bug/?i=21455 [274] = https://curl.se/bug/?i=21351 [275] = https://curl.se/bug/?i=21340 [276] = https://curl.se/bug/?i=21449 [278] = https://curl.se/bug/?i=21432 [279] = https://curl.se/bug/?i=21430 [280] = https://curl.se/bug/?i=21427 [284] = https://curl.se/bug/?i=21396 [285] = https://curl.se/bug/?i=21421 [288] = https://curl.se/bug/?i=19814 [291] = https://curl.se/bug/?i=21415 [294] = https://curl.se/bug/?i=21411 $! File: Build_GNV_curl_release_notes.com $! $! Build the release note file from the four components: $! 1. The curl_release_note_start.txt $! 2. The hp_ssl_release_info.txt $! 3. [--]readme. file from the curl distribution. $! 4. The Curl_gnv-build_steps.txt. $! $! Set the name of the release notes from the GNV_PCSI_FILENAME_BASE $! logical name. $! $! Copyright (C) John Malmberg $! $! Permission to use, copy, modify, and/or distribute this software for any $! purpose with or without fee is hereby granted, provided that the above $! copyright notice and this permission notice appear in all copies. $! $! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES $! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF $! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR $! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES $! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN $! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT $! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. $! $! SPDX-License-Identifier: ISC $! $!=========================================================================== $! $ base_file = f$trnlnm("GNV_PCSI_FILENAME_BASE") $ if base_file .eqs. "" $ then $ write sys$output "@MAKE_PCSI_CURL_KIT_NAME.COM has not been run." $ goto all_exit $ endif $! $! $ curl_readme = f$search("sys$disk:[--]readme.") $ if curl_readme .eqs. "" $ then $ curl_readme = f$search("sys$disk:[--]$README.") $ endif $ if curl_readme .eqs. "" $ then $ write sys$output "Can not find curl readme file." $ goto all_exit $ endif $! $ curl_copying = f$search("sys$disk:[--]copying.") $ if curl_copying .eqs. "" $ then $ curl_copying = f$search("sys$disk:[--]$COPYING.") $ endif $ if curl_copying .eqs. "" $ then $ write sys$output "Can not find curl copying file." $ goto all_exit $ endif $! $ vms_readme = f$search("sys$disk:[]readme.") $ if vms_readme .eqs. "" $ then $ vms_readme = f$search("sys$disk:[]$README.") $ endif $ if vms_readme .eqs. "" $ then $ write sys$output "Can not find VMS specific curl readme file." $ goto all_exit $ endif $! $ curl_release_notes = f$search("sys$disk:[--]release-notes.") $ if curl_release_notes .eqs. "" $ then $ curl_release_notes = f$search("sys$disk:[--]$RELEASE-NOTES.") $ endif $ if curl_release_notes .eqs. "" $ then $ write sys$output "Can not find curl release-notes file." $ goto all_exit $ endif $! $ if f$search("sys$disk:[]hp_ssl_release_info.txt") .eqs. "" $ then $ write sys$output "GNV_LINK_CURL.COM has not been run!" $ goto all_exit $ endif $! $ type/noheader 'curl_readme', 'vms_readme', - 'curl_release_notes', - sys$disk:[]curl_release_note_start.txt, - sys$disk:[]hp_ssl_release_info.txt, - 'curl_copying', - sys$disk:[]curl_gnv_build_steps.txt - /out='base_file'.release_notes $! $ purge 'base_file'.release_notes $ rename 'base_file.release_notes ;1 $! $all_exit: $ exit From file: CURL_RELEASE_NOTE_START.TXT Note: These kits are produced by a hobbyist and are providing any support or any commitment to supply bug fixes or future releases. This code is as-is with no warranties. The testing of this build of curl was minimal and involved building some of the sample and test programs, accessing a public HTTPS: website, doing a form post of some VMS test files, and FTP upload of some text files. Due to the way that PCSI identifies packages, if you install a package from one producer and then want to upgrade it from another producer, you will probably need to uninstall the previous package first. OpenVMS specific building and kitting instructions are after the standard curl readme file. This product may be available for your platform in a PCSI kit. The source kit contains files for building curl using GNV or with a DCL procedure. The GNV based build creates a libcurl share imaged which is supplied in the PCSI kit. This version of curl will return VMS compatible status codes when run from DCL and Unix compatible exit codes and messages when run with the SHELL environment variable set. This port of curl uses the OpenSSL, Ldap, and Kerberos V5 that are bundled with OpenVMS or supplied as updates by HP. Ldap and Kerberos are not available on the VAX platform. See section below for a special note about HP OpenSSL on Alpha and IA64. The supplied CURL_STARTUP.COM procedure that is installed in [VMS$COMMON.SYS$STARTUP] can be put in your VMS startup procedure to install the GNV$LIBCURL shared image and create logical names GNV$LIBCURL to reference it. It will create the GNV$CURL_INCLUDE logical name for build procedures to access the header files. Normally to use curl from DCL, just create a foreign command as: curl :== $gnv$gnu:[usr.bin]gnv$curl.exe If you need to work around having the older HP SSL kit installed, then for DCL create this command procedure: $ create/dir gnv$gnu:[vms_bin]/prot=w:re $ create gnv$gnu:[vms_bin]curl.com $ curl := $gnv$gnu:[usr.bin]gnv$curl.exe $ define/user ssl$libcrypto_shr32 gnv$curl_ssl_libcryptoshr32 $ curl "''p1'" "''p2'" "''p3'" "''p4'" "''p5'" "''p6'" "''p7'" "''p8'" ^Z Then you can use: curl :== @gnv$gnu:[vms_bin]curl.com to run curl. For the HP SSL work around to work for GNV do the following: $ create/dir gnv$gnu:[usr.local.bin]/prot=w:re $ create gnv$gnu:[usr.local.bin]curl. #! /bin/sh dcl @gnv\$gnu:[vms_bin]curl.com $* ^Z Similar workarounds will be needed for any program linked with GNV$LIBCURL until the HP OpenSSL is upgraded to the current 1.4 version or later. If you are installing a "daily" build instead of a release build of curl, some things have been changed so that it can be installed at the same time as a production build without conflicts. The CURL_DAILY_STARTUP.COM will be supplied instead of CURL_STARTUP.COM. This file is actually not used with the daily package and is provided as a preview of what the next CURL_STARTUP.COM will be for the next release. Do not run it. The files that are normally installed in [VMS$COMMON.GNV.usr], for the daily build are installed in [VMS$COMMON.GNV.beta] directory. To use the daily GNV$LIBCURL image, you will need to define the logical name GNV$LIBCURL to the image. #!/usr/bin/env perl #*************************************************************************** # _ _ ____ _ # Project ___| | | | _ \| | # / __| | | | |_) | | # | (__| |_| | _ <| |___ # \___|\___/|_| \_\_____| # # Copyright (C) Daniel Stenberg, , et al. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at https://curl.se/docs/copyright.html. # # You may opt to use, copy, modify, merge, publish, distribute and/or sell # copies of the Software, and permit persons to whom the Software is # furnished to do so, under the terms of the COPYING file. # # This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY # KIND, either express or implied. # # SPDX-License-Identifier: curl # ########################################################################### ############################################### # # ==== How to use this script ==== # # 1. Get recent commits added to RELEASE-NOTES: # # $ ./scripts/release-notes.pl # # 2. Edit RELEASE-NOTES and remove all entries that do not belong. Unused # references below will be cleaned up in the next step. Make sure to move # "changes" up to the changes section. All entries will by default be listed # under bug-fixes as this script cannot know where to put them. # # 3. Run the cleanup script and let it sort the entries and remove unused # references from lines you removed in step (2): # # $ ./scripts/release-notes.pl cleanup # # 4. Reload RELEASE-NOTES and verify that things look okay. The cleanup # procedure can and should be re-run when lines are removed or rephrased. # # 5. Run ./scripts/contributors.sh and update the contributor list of names # The list can also be extended or edited manually. # # 6. Run ./scripts/delta and update the contributor count at the top, and # double-check/update the other counters. # # 7. Commit the file using "RELEASE-NOTES: synced" as commit message. # ################################################ use strict; use warnings; my $cleanup = (@ARGV && $ARGV[0] eq "cleanup"); my @gitlog=`git log @^{/RELEASE-NOTES:.synced}..` if(!$cleanup); my @releasenotes=`cat RELEASE-NOTES`; my @o; # the entire new RELEASE-NOTES my @refused; # [num] = [2 bits of use info] my @refs; # [number] = [URL] my %dupe; for my $l (@releasenotes) { if($l =~ /^ o .*\[(\d+)\]/) { # referenced, set bit 0 $refused[$1]=1; my $m = $l; chomp $m; $m =~ s/^ o //; $m =~ s/ \[\d+\]$//; $dupe{$m} = 1; # mark this as present } elsif($l =~ /^ \[(\d+)\] = (.*)/) { # listed in a reference, set bit 1 $refused[$1] |= 2; $refs[$1] = $2; } # mention without reference elsif($l =~ /^ o (.*)/) { my $m = $l; chomp $m; $m =~ s/^ o //; $dupe{$m} = 1; # mark this as present } } # Return a new fresh reference number sub getref { for my $r (1 .. $#refs) { if(!$refused[$r] & 1) { return $r; } } # add at the end return $#refs + 1; } # '#num' # 'num' # 'https://github.com/curl/curl/issues/6939' # 'https://github.com/curl/curl-www/issues/69' # 'https://elsewhere.example.com/discussion' sub extract { my ($ref)=@_; if($ref =~ /^(\#|)(\d+)/) { # return the plain number return $2; } elsif($ref =~ /^https:\/\/github.com\/curl\/curl\/.*\/(\d+)/) { # return the plain number return $1; } elsif($ref =~ /:\/\//) { # contains a '://', return the URL return $ref; } # false alarm, not a valid line } my @fixes; my @closes; my @bug; my @line; my %moreinfo; my $short; my $first; for my $l (@gitlog) { chomp $l; if($l =~ /^commit/) { if($first) { onecommit($short); } # starts a new commit undef @fixes; undef @closes; undef @bug; $short = ""; $first = 0; } elsif(($l =~ /^ (.*)/) && !$first) { # first line $short = $1; $short =~ s/ ?\[(ci skip|skip ci)\]//g; $first = 1; push @line, $short; } elsif(($l =~ /^ (.*)/) && $first) { # not the first my $line = $1; if($line =~ /^Fixes(:|) *(.*)/i) { my $ref = extract($2); push @fixes, $ref if($ref); } elsif($line =~ /^Cl([os]+)es(:|) *(.*)/i) { my $ref = extract($3); push @closes, $ref if($ref); } elsif($line =~ /^Bug: (.*)/i) { my $ref = extract($1); push @bug, $ref if($ref); } } } if($first) { onecommit($short); } # call at the end of a parsed commit sub onecommit { my ($short)=@_; my $ref = ''; if($dupe{$short}) { # this git commit message was found in the file return; } if($bug[0]) { $ref = $bug[0]; } elsif($fixes[0]) { $ref = $fixes[0]; } elsif($closes[0]) { $ref = $closes[0]; } if($ref =~ /^#?(\d+)/) { $ref = "https://curl.se/bug/?i=$1" } if($ref) { my $r = getref(); $refs[$r] = $ref; $moreinfo{$short}=$r; $refused[$r] |= 1; } } #### Output the new RELEASE-NOTES my @bullets; for my $l (@releasenotes) { if(($l =~ /^This release includes the following bugfixes:/) && !$cleanup) { push @o, $l; push @o, "\n"; for my $f (@line) { if($dupe{$f}) { # this item is already listed next; } push @o, sprintf " o %s%s\n", $f, $moreinfo{$f}? sprintf(" [%d]", $moreinfo{$f}): ""; if($moreinfo{$f}) { $refused[$moreinfo{$f}]=3; } } push @o, " --- new entries are listed above this ---"; next; } elsif($cleanup) { if($l =~ /^ --- new entries are listed/) { # ignore this if still around next; } elsif($l =~ /^ o .*/) { push @bullets, $l; next; } elsif($bullets[0]) { # output them case insensitively for my $b (sort { "\L$a" cmp "\L$b" } @bullets) { push @o, $b; } undef @bullets; } } if($l =~ /^ \[(\d+)\] = /) { # stop now last; } else { push @o, $l; } } my @srefs; my $ln; for my $n (1 .. $#refs) { my $r = $refs[$n]; if($r && ($refused[$n] & 1)) { push @o, sprintf " [%d] = %s\n", $n, $r; } } open(O, ">RELEASE-NOTES"); for my $l (@o) { print O $l; } close(O); exit; # Debug: show unused references for my $r (1 .. $#refs) { if($refused[$r] != 3) { printf "%s is %d!\n", $r, $refused[$r]; } } #!/bin/sh #*************************************************************************** # _ _ ____ _ # Project ___| | | | _ \| | # / __| | | | |_) | | # | (__| |_| | _ <| |___ # \___|\___/|_| \_\_____| # # Copyright (C) Daniel Stenberg, , et al. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at https://curl.se/docs/copyright.html. # # You may opt to use, copy, modify, merge, publish, distribute and/or sell # copies of the Software, and permit persons to whom the Software is # furnished to do so, under the terms of the COPYING file. # # This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY # KIND, either express or implied. # # SPDX-License-Identifier: curl # ########################################################################### set -eu # this should ideally be passed in timestamp=${1:-unknown} version=${2:-unknown} tag=$(echo "curl-$version" | tr '.' '_') commit=${3} if [ -n "$commit" ] && [ -r "docs/tarball-commit.txt.dist" ]; then # If commit is given, then the tag likely does not actually exist tag="$(cat docs/tarball-commit.txt.dist)" fi cat </dev/null; then echo "Error: could not find dpkg" >&2 exit 1 fi debian() { echo "- $1: $(dpkg -l "$1" | grep ^ii | awk '{print $3}')" } debian autoconf debian automake debian libtool debian make debian perl debian git cat <, et al. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at https://curl.se/docs/copyright.html. # # You may opt to use, copy, modify, merge, publish, distribute and/or sell # copies of the Software, and permit persons to whom the Software is # furnished to do so, under the terms of the COPYING file. # # This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY # KIND, either express or implied. # # SPDX-License-Identifier: curl # ########################################################################### # This script remakes a provided curl release and verifies that the newly # built version is identical to the original file. # # It is designed to be invoked in a clean directory with the path to the # release tarball as an argument. # set -eu tarball="${1:-}" if [ -z "$tarball" ]; then echo "Provide a curl release tarball name as argument" exit fi i="$(find . -maxdepth 1 -type d -name 'curl-*' | wc -l)" if test "$i" -gt 1; then echo "multiple curl-* entries found, disambiguate please" exit fi mkdir -p _tarballs rm -rf _tarballs/* # checksum the original tarball to compare with later sha256sum "$tarball" >_tarballs/checksum # extract the release contents tar xf "$tarball" curlver=$(grep '#define LIBCURL_VERSION ' curl-*/include/curl/curlver.h | sed 's/[^0-9.]//g') echo "version $curlver" timestamp=$(grep -Eo 'SOURCE_DATE_EPOCH=[0-9]*' curl-"$curlver"/docs/RELEASE-TOOLS.md | cut -d= -f2) pwd=$(pwd) cd "curl-$curlver" ./configure --without-ssl --without-libpsl ./scripts/dmaketgz "$curlver" "$timestamp" mv curl-"$curlver"* ../_tarballs/ cd "$pwd" cd "_tarballs" # compare the new tarball against the original sha256sum -c checksum D-Bus crate 0.7 overview ======================== In 0.7 the `Connection` struct has been rewritten (but the old one is still there). The new struct(s) have the following advantages: * It makes it possible to make a connection `Send`/`Sync`, see `blocking::SyncConnection`. * The call to `dbus_connection_dispatch` has been removed and what it did has been rewritten in Rust. This means better performance and panic safety. * The two-layer design (with `Channel` as a low-level connection) makes it easier to write a custom `Connection`, should that be necessary. * Preparation for a first class async/non-blocking `Connection`. A `nonblock` module is in the works. * Some preparations for interfacing the `dbus` crate with a native backend instead of relying on `libdbus`, should someone want to write such a backend. There is a lot more to do before that becomes a reality though. Things that have moved ====================== If you want the quickest upgrade experience, then you can just update your imports: * The old `Connection` is now at `ffidisp::Connection`, likewise for `ConnPath`, `BusType` and many others. Have a look at the `ffidisp` module to see if your struct has moved there. * The `stdintf` module is at `ffidisp::stdintf`. * The old `MessageItem`, should you still need it, is now under `arg::messageitem`. But do use the generic functions instead of `MessageItem` whenever possible. `MessageItem::DictEntry` has changed to `MessageItem::Dict` (which contains the entire dict, not just one entry) to make it less error prone. Migrating / upgrading ===================== On a long term, consider migrating / upgrading to `blocking::Connection` or `blocking::SyncConnection`. You would need to make the following adjustments: * Create and connect your connection easily with just `Connection::new_session()` or `Connection::new_system()`. * Instead of `ConnPath`, use a `Proxy`. It works approximately the same way. * `blocking::stdintf` can be helpful to make standard method calls, such as getting and setting properties on a remote peer. * `Connection::register_name` has been renamed to `request_name`. (This was just a misnaming.) * Instead of `incoming()` to process incoming messages, use `process()` (which takes a std `Duration`). This will not hand out any messages though, instead register callbacks using (in order from most convenient to most generic): `Proxy::match_signal`, `Proxy::match_start` or `channel::MatchingReceiver::start_receive`. * For `tree`s, you must now make sure the root path (`/`) is always part of your tree. * For `tree`s, call `Tree::start_receive()` to attach the tree and the connection, then call `Connection::process()` to process incoming messages. Have a look at the `client`, `server` and `match_signal` examples to get started. ReadAll / AppendAll =================== The `ReadAll` and `AppendAll` traits were present in later 0.6.x versions as well, but are worthy a mention because they can make code more ergonomic in many cases. They are implemented for tuples: the empty tuple `()`, the single-tuple `(TYPE,)`, and usual tuples `(TYPE1, TYPE2)` up to 11. So if you have a method call that takes `STRING arg1, INT32 arg2` and returns a `BOOLEAN`, you can call it like this: ``` let (r,): (bool,) = myProxy.method_call(interface, name, (arg1, arg2))?; ``` ...where `arg1` is a `&str` and `arg2` is a `i32`. # Version 2.4.1 - Fix build failure with `js` feature. (#125) # Version 2.4.0 - Bump MSRV to 1.63. (#104) - Improve quality of f32/f64 generation. (#103) - Add `f{32,64}_inclusive` and `Rng::f{32,64}_inclusive`. (#103) - Make `Rng::with_seed` const. (#107) - Update `getrandom` to 0.3. (#104) # Version 2.3.0 - Accept `IntoIterator` in `choose_multiple` functions instead of just `Iterator`. (#92) # Version 2.2.0 - Expose missing `fill` method for the global RNG. (#90) # Version 2.1.1 - Remove support for 128-bit targets, as they are not supported by rustc yet. (#87) # Version 2.1.0 - Change the RNG algorithm and the way that the seed is computed. This will cause the algorithm to emit different constants for different seeds, hence the minor SemVer change. - Update to the final WyRand v4.2 constants for better entropy. (#82) - Remove an unnecessary seed modification. (#73) # Version 2.0.2 - Slight restructuring of the `with_seed` function. (#79) # Version 2.0.1 - Clarify documentation for the `fork()` method. (#62) - Mention `fastrand-contrib` in documentation. (#70) # Version 2.0.0 - **Breaking:** Remove interior mutability from `Rng`. (#47) - Add a `fork()` method. (#49) - Add a `no_std` mode. (#50) - Add an iterator selection function. (#51) - Add a `choose_multiple()` function for sampling several elements from an iterator. (#55) - Use the `getrandom` crate for seeding on WebAssembly targets if the `js` feature is enabled. (#60) # Version 1.9.0 - Add `Rng::fill()` (#35, #43) - Add `#[must_use]` to `Rng::with_seed()` (#46) # Version 1.8.0 - Add `get_seed()` and `Rng::get_seed()` (#33) # Version 1.7.0 - Add `char()` and `Rng::char()` (#25) # Version 1.6.0 - Implement `PartialEq` and `Eq` for `Rng` (#23) # Version 1.5.0 - Switch to Wyrand (#14) # Version 1.4.1 - Fix bug when generating a signed integer within a range (#16) # Version 1.4.0 - Add wasm support. # Version 1.3.5 - Reword docs. - Add `Rng::with_seed()`. # Version 1.3.4 - Implement `Clone` for `Rng`. # Version 1.3.3 - Forbid unsafe code. # Version 1.3.2 - Support older Rust versions. # Version 1.3.1 - Tweak Cargo keywords. # Version 1.3.0 - Add `f32()` and `f64()`. - Add `lowercase()`, `uppercase()`, `alphabetic()`, and `digit()`. # Version 1.2.4 - Switch to PCG XSH RR 64/32. - Fix a bug in `gen_mod_u128`. - Fix bias in ranges. # Version 1.2.3 - Support Rust 1.32.0 # Version 1.2.2 - Use `std::$t::MAX` rather than `$t::MAX` to support older Rust versions. # Version 1.2.1 - Inline all functions. # Version 1.2.0 - Add `Rng` struct. # Version 1.1.0 - Switch to PCG implementation. - Add `alphanumeric()`. - Add `seed()`. # Version 1.0.0 - Initial version use super::ChangeDetached; use crate::{ bstr::{BStr, ByteSlice}, ext::ObjectIdExt, object::tree::diff::Change, Repository, }; impl Change<'_, '_, '_> { /// Produce a platform for performing a line-diff no matter whether the underlying [Change] is an addition, modification, /// deletion or rewrite. /// Use `resource_cache` to store the diffable data and possibly reuse previously stored data, usually obtained with /// [Repository::diff_resource_cache()]. /// Afterward the platform, which holds on to `resource_cache`, can be used to perform ready-made operations on the /// pre-set resources. /// /// ### Warning about Memory Consumption /// /// `resource_cache` only grows, so one should call [`gix_diff::blob::Platform::clear_resource_cache`] occasionally. pub fn diff<'b>( &self, resource_cache: &'b mut gix_diff::blob::Platform, ) -> Result, crate::object::blob::diff::init::Error> { resource_cache.set_resource_by_change((*self).into(), &self.id().repo.objects)?; Ok(crate::object::blob::diff::Platform { resource_cache }) } } impl<'a> From> for gix_diff::tree_with_rewrites::ChangeRef<'a> { fn from(value: Change<'a, '_, '_>) -> Self { use gix_diff::tree_with_rewrites::ChangeRef; match value { Change::Addition { location, entry_mode, relation, id, } => ChangeRef::Addition { location, entry_mode, relation, id: id.detach(), }, Change::Deletion { location, entry_mode, relation, id, } => ChangeRef::Deletion { location, entry_mode, relation, id: id.detach(), }, Change::Modification { location, previous_entry_mode, previous_id, entry_mode, id, } => ChangeRef::Modification { location, previous_entry_mode, previous_id: previous_id.detach(), entry_mode, id: id.detach(), }, Change::Rewrite { source_location, source_relation, source_entry_mode, source_id, diff, entry_mode, location, id, relation, copy, } => ChangeRef::Rewrite { source_location, source_entry_mode, source_relation, source_id: source_id.detach(), diff, entry_mode, id: id.detach(), location, relation, copy, }, } } } impl<'a, 'old, 'new> Change<'a, 'old, 'new> { /// Convert `change` into this instance type, attaching the `old_repo` and `new_repo` to each side respectively. /// Note that both repos are typically the same. pub fn from_change_ref( change: gix_diff::tree_with_rewrites::ChangeRef<'a>, old_repo: &'old Repository, new_repo: &'new Repository, ) -> Self { use gix_diff::tree_with_rewrites::ChangeRef; match change { ChangeRef::Addition { location, entry_mode, relation, id, } => Change::Addition { location, entry_mode, relation, id: id.attach(new_repo), }, ChangeRef::Deletion { location, entry_mode, relation, id, } => Change::Deletion { location, entry_mode, relation, id: id.attach(old_repo), }, ChangeRef::Modification { location, previous_entry_mode, previous_id, entry_mode, id, } => Change::Modification { location, previous_entry_mode, entry_mode, previous_id: previous_id.attach(old_repo), id: id.attach(new_repo), }, ChangeRef::Rewrite { source_location, source_entry_mode, source_relation, source_id, diff, entry_mode, id, location, relation, copy, } => Change::Rewrite { source_location, source_relation, source_entry_mode, source_id: source_id.attach(old_repo), diff, entry_mode, location, id: id.attach(new_repo), relation, copy, }, } } } /// Lifecycle impl Change<'_, '_, '_> { /// Detach the repository instance to obtain a fully-owned version pub fn detach(self) -> ChangeDetached { match self { Change::Addition { entry_mode, id, location, relation, } => ChangeDetached::Addition { entry_mode, id: id.detach(), location: location.to_owned(), relation, }, Change::Deletion { entry_mode, id, location, relation, } => ChangeDetached::Deletion { entry_mode, id: id.detach(), location: location.to_owned(), relation, }, Change::Modification { previous_entry_mode, previous_id, entry_mode, id, location, } => ChangeDetached::Modification { previous_entry_mode, previous_id: previous_id.detach(), entry_mode, id: id.detach(), location: location.to_owned(), }, Change::Rewrite { source_location, source_relation, source_entry_mode, source_id, diff, entry_mode, id, relation, copy, location, } => ChangeDetached::Rewrite { source_location: source_location.to_owned(), source_entry_mode, source_relation, source_id: source_id.detach(), diff, entry_mode, id: id.detach(), copy, location: location.to_owned(), relation, }, } } } impl crate::ext::TreeDiffChangeExt for gix_diff::tree_with_rewrites::Change { fn attach<'old, 'new>(&self, old_repo: &'old Repository, new_repo: &'new Repository) -> Change<'_, 'old, 'new> { match self { ChangeDetached::Addition { entry_mode, id, location, relation, } => Change::Addition { entry_mode: *entry_mode, id: id.attach(new_repo), location: location.as_bstr(), relation: *relation, }, ChangeDetached::Deletion { entry_mode, id, location, relation, } => Change::Deletion { entry_mode: *entry_mode, id: id.attach(old_repo), location: location.as_bstr(), relation: *relation, }, ChangeDetached::Modification { previous_entry_mode, previous_id, entry_mode, id, location, } => Change::Modification { previous_entry_mode: *previous_entry_mode, previous_id: previous_id.attach(old_repo), entry_mode: *entry_mode, id: id.attach(new_repo), location: location.as_bstr(), }, ChangeDetached::Rewrite { source_location, source_relation, source_entry_mode, source_id, diff, entry_mode, id, copy, location, relation, } => Change::Rewrite { source_location: source_location.as_ref(), source_relation: *source_relation, source_entry_mode: *source_entry_mode, source_id: source_id.attach(old_repo), diff: *diff, entry_mode: *entry_mode, id: id.attach(new_repo), copy: *copy, relation: *relation, location: location.as_bstr(), }, } } } impl Change<'_, '_, '_> { /// Return the current ID of the change. pub fn id(&self) -> crate::Id<'_> { match self { Change::Addition { id, .. } | Change::Deletion { id, .. } | Change::Modification { id, .. } | Change::Rewrite { id, .. } => *id, } } /// Return the location of this instance. pub fn location(&self) -> &BStr { match self { Change::Addition { location, .. } | Change::Deletion { location, .. } | Change::Modification { location, .. } | Change::Rewrite { location, .. } => location.as_bstr(), } } /// Return the current mode of this instance. pub fn entry_mode(&self) -> gix_object::tree::EntryMode { match self { Change::Addition { entry_mode, .. } | Change::Deletion { entry_mode, .. } | Change::Modification { entry_mode, .. } | Change::Rewrite { entry_mode, .. } => *entry_mode, } } } # Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## 0.10.0 (2026-02-22) ### Commit Statistics - 1 commit contributed to the release over the course of 10 calendar days. - 12 days passed between releases. - 0 commits were understood as [conventional](https://www.conventionalcommits.org). - 0 issues like '(#ID)' were seen in commit messages ### Commit Details
view details * **Uncategorized** - Merge branch 'release' ([`9327b73`](https://github.com/GitoxideLabs/gitoxide/commit/9327b73785227f1322a327cb48fbb0800e1286ae))
## 0.9.0 (2026-02-10) ### Commit Statistics - 8 commits contributed to the release over the course of 19 calendar days. - 19 days passed between releases. - 0 commits were understood as [conventional](https://www.conventionalcommits.org). - 0 issues like '(#ID)' were seen in commit messages ### Commit Details
view details * **Uncategorized** - Release gix-error v0.1.0, gix-date v0.14.0, gix-actor v0.39.0, gix-trace v0.1.18, gix-path v0.11.1, gix-features v0.46.1, gix-hash v0.22.1, gix-object v0.56.0, gix-quote v0.6.2, gix-attributes v0.30.1, gix-command v0.7.1, gix-packetline v0.21.1, gix-filter v0.26.0, gix-fs v0.19.1, gix-chunk v0.6.0, gix-commitgraph v0.33.0, gix-revwalk v0.27.0, gix-traverse v0.53.0, gix-worktree-stream v0.28.0, gix-archive v0.28.0, gix-bitmap v0.2.16, gix-tempfile v21.0.1, gix-lock v21.0.1, gix-index v0.47.0, gix-config-value v0.17.1, gix-pathspec v0.15.1, gix-worktree v0.48.0, gix-diff v0.59.0, gix-blame v0.9.0, gix-ref v0.59.0, gix-sec v0.13.1, gix-config v0.52.0, gix-prompt v0.13.1, gix-url v0.35.1, gix-credentials v0.36.0, gix-discover v0.47.0, gix-dir v0.21.0, gix-mailmap v0.31.0, gix-revision v0.41.0, gix-merge v0.12.0, gix-negotiate v0.27.0, gix-pack v0.66.0, gix-odb v0.76.0, gix-refspec v0.37.0, gix-shallow v0.8.1, gix-transport v0.54.0, gix-protocol v0.57.0, gix-status v0.26.0, gix-submodule v0.26.0, gix-worktree-state v0.26.0, gix v0.79.0, safety bump 35 crates ([`d66ac10`](https://github.com/GitoxideLabs/gitoxide/commit/d66ac1057a5b7bfb608d4e6be585c69fb692bfee)) - Merge pull request #2420 from cruessler/remove-imara-diff-0-1-in-gix-blame ([`28fbeb8`](https://github.com/GitoxideLabs/gitoxide/commit/28fbeb86a9b82b3eb69b6e3618e286b2507204eb)) - Refactor ([`f4064e5`](https://github.com/GitoxideLabs/gitoxide/commit/f4064e54de21b018c3e281dd7880f7996c3d7908)) - Don't remove blob feature ([`0392a6d`](https://github.com/GitoxideLabs/gitoxide/commit/0392a6d94d811ae7a85b34e7b91cfd0209229a6f)) - Switch to imara-diff 0.2 in gix-blame ([`90b4769`](https://github.com/GitoxideLabs/gitoxide/commit/90b4769f0716f37f9c8351d4f3f7209e223976f2)) - Merge pull request #2407 from GitoxideLabs/dependabot/cargo/cargo-fb4135702f ([`8bceefb`](https://github.com/GitoxideLabs/gitoxide/commit/8bceefbfc5f897517bfdd24744695a82cfa0d5be)) - Bump the cargo group with 59 updates ([`7ce3c55`](https://github.com/GitoxideLabs/gitoxide/commit/7ce3c5587aec1ca813039c047783b9cb2a106826)) - Merge pull request #2393 from GitoxideLabs/report ([`f7d0975`](https://github.com/GitoxideLabs/gitoxide/commit/f7d09758d245aaa89409e39bb6ba1ed6b7118ea5))
## 0.8.0 (2026-01-22) ### New Features (BREAKING) - Use `std::ops::ControlFlow` where possible - Use `gix-error` in `gix-date` This will make for easier introspection for users of these errors. ### Commit Statistics - 12 commits contributed to the release over the course of 21 calendar days. - 21 days passed between releases. - 2 commits were understood as [conventional](https://www.conventionalcommits.org). - 2 unique issues were worked on: [#2363](https://github.com/GitoxideLabs/gitoxide/issues/2363), [#2366](https://github.com/GitoxideLabs/gitoxide/issues/2366) ### Commit Details
view details * **[#2363](https://github.com/GitoxideLabs/gitoxide/issues/2363)** - Regenerate all changelogs with a more recent CSR version ([`cbbdef5`](https://github.com/GitoxideLabs/gitoxide/commit/cbbdef5095b894a944a526fb57dfebeb0f3ab5eb)) * **[#2366](https://github.com/GitoxideLabs/gitoxide/issues/2366)** - Add a test combining renames and edits on multiple branches ([`83c1dfb`](https://github.com/GitoxideLabs/gitoxide/commit/83c1dfb1ae4cfd1d3ef2383056200ae848707d5b)) * **Uncategorized** - Release gix-error v0.0.0, gix-date v0.13.0, gix-actor v0.38.0, gix-validate v0.11.0, gix-path v0.11.0, gix-features v0.46.0, gix-hash v0.22.0, gix-hashtable v0.12.0, gix-object v0.55.0, gix-glob v0.24.0, gix-attributes v0.30.0, gix-command v0.7.0, gix-packetline v0.21.0, gix-filter v0.25.0, gix-fs v0.19.0, gix-chunk v0.5.0, gix-commitgraph v0.32.0, gix-revwalk v0.26.0, gix-traverse v0.52.0, gix-worktree-stream v0.27.0, gix-archive v0.27.0, gix-tempfile v21.0.0, gix-lock v21.0.0, gix-index v0.46.0, gix-config-value v0.17.0, gix-pathspec v0.15.0, gix-ignore v0.19.0, gix-worktree v0.47.0, gix-diff v0.58.0, gix-blame v0.8.0, gix-ref v0.58.0, gix-sec v0.13.0, gix-config v0.51.0, gix-prompt v0.13.0, gix-url v0.35.0, gix-credentials v0.35.0, gix-discover v0.46.0, gix-dir v0.20.0, gix-mailmap v0.30.0, gix-revision v0.40.0, gix-merge v0.11.0, gix-negotiate v0.26.0, gix-pack v0.65.0, gix-odb v0.75.0, gix-refspec v0.36.0, gix-shallow v0.8.0, gix-transport v0.53.0, gix-protocol v0.56.0, gix-status v0.25.0, gix-submodule v0.25.0, gix-worktree-state v0.25.0, gix v0.78.0, gix-fsck v0.17.0, gitoxide-core v0.53.0, gitoxide v0.50.0, safety bump 50 crates ([`562e684`](https://github.com/GitoxideLabs/gitoxide/commit/562e684319fa649db6a96c0a22d64bbe3c11e9e6)) - Merge pull request #2378 from GitoxideLabs/gix-error ([`6cff657`](https://github.com/GitoxideLabs/gitoxide/commit/6cff65786b5213194fffd2c77b7c2dc44dcb4b52)) - Adapt to changes in `gix-commitgraph` ([`1f58905`](https://github.com/GitoxideLabs/gitoxide/commit/1f589054aad9b75f2c167a336acec9d297411564)) - Use `std::ops::ControlFlow` where possible ([`5c1bd03`](https://github.com/GitoxideLabs/gitoxide/commit/5c1bd0387f98eee37265a42ba4b6624c783c9a71)) - Merge pull request #2352 from GitoxideLabs/gix-error ([`ae23762`](https://github.com/GitoxideLabs/gitoxide/commit/ae23762932ea0d78e91463185a304d778746a167)) - Merge pull request #2364 from GitoxideLabs/changelogs ([`0a333e5`](https://github.com/GitoxideLabs/gitoxide/commit/0a333e5941a0a58727c694fcf7dc48f95d7481db)) - Use `gix-error` in `gix-date` ([`5ab19a7`](https://github.com/GitoxideLabs/gitoxide/commit/5ab19a7a3344c58ad1185a23a789848ed5e02241)) - Merge pull request #2346 from GitoxideLabs/release ([`c663b3f`](https://github.com/GitoxideLabs/gitoxide/commit/c663b3f05791db86d2e0a683e26e149f620bf2e4)) - Release gix-trace v0.1.17, gix-features v0.45.2, gix-command v0.6.5, gix-hash v0.21.2, gix-date v0.12.1, gix-actor v0.37.1, gix-object v0.54.1, gix-filter v0.24.1, gix-fs v0.18.2, gix-tempfile v20.0.1, gix-lock v20.0.1, gix-traverse v0.51.1, gix-index v0.45.1, gix-diff v0.57.1, gix-pack v0.64.1 ([`7be8f90`](https://github.com/GitoxideLabs/gitoxide/commit/7be8f9068ab875ca4123300ba08df9d32fd63941)) - Merge pull request #2322 from GitoxideLabs/report ([`211b4fb`](https://github.com/GitoxideLabs/gitoxide/commit/211b4fb5a31792eda91191789f3656c217960986))
## 0.7.0 (2025-12-31) ### Commit Statistics - 2 commits contributed to the release over the course of 9 calendar days. - 9 days passed between releases. - 0 commits were understood as [conventional](https://www.conventionalcommits.org). - 0 issues like '(#ID)' were seen in commit messages ### Commit Details
view details * **Uncategorized** - Release gix-date v0.12.0, gix-actor v0.37.0, gix-features v0.45.1, gix-hash v0.21.1, gix-object v0.54.0, gix-filter v0.24.0, gix-fs v0.18.1, gix-revwalk v0.25.0, gix-traverse v0.51.0, gix-worktree-stream v0.26.0, gix-archive v0.26.0, gix-index v0.45.0, gix-worktree v0.46.0, gix-diff v0.57.0, gix-blame v0.7.0, gix-ref v0.57.0, gix-config v0.50.0, gix-credentials v0.34.0, gix-discover v0.45.0, gix-dir v0.19.0, gix-mailmap v0.29.0, gix-revision v0.39.0, gix-merge v0.10.0, gix-negotiate v0.25.0, gix-pack v0.64.0, gix-odb v0.74.0, gix-refspec v0.35.0, gix-transport v0.52.0, gix-protocol v0.55.0, gix-status v0.24.0, gix-submodule v0.24.0, gix-worktree-state v0.24.0, gix v0.77.0, gix-fsck v0.16.0, gitoxide-core v0.52.0, gitoxide v0.49.0, safety bump 32 crates ([`115e208`](https://github.com/GitoxideLabs/gitoxide/commit/115e208b7bc7a96024e64ea872f2731b5125a6e0)) - Merge pull request #2299 from GitoxideLabs/report ([`d6c5b9d`](https://github.com/GitoxideLabs/gitoxide/commit/d6c5b9d7843c24663ffcf20bd756ea3eb747ca0a))
## 0.6.0 (2025-12-22) ### Commit Statistics - 6 commits contributed to the release over the course of 14 calendar days. - 29 days passed between releases. - 0 commits were understood as [conventional](https://www.conventionalcommits.org). - 0 issues like '(#ID)' were seen in commit messages ### Thanks Clippy [Clippy](https://github.com/rust-lang/rust-clippy) helped 1 time to make code idiomatic. ### Commit Details
view details * **Uncategorized** - Release gix-date v0.11.1, gix-actor v0.36.1, gix-trace v0.1.16, gix-features v0.45.0, gix-hash v0.21.0, gix-hashtable v0.11.0, gix-object v0.53.0, gix-glob v0.23.0, gix-attributes v0.29.0, gix-filter v0.23.0, gix-fs v0.18.0, gix-commitgraph v0.31.0, gix-revwalk v0.24.0, gix-traverse v0.50.0, gix-worktree-stream v0.25.0, gix-archive v0.25.0, gix-tempfile v20.0.0, gix-lock v20.0.0, gix-index v0.44.0, gix-config-value v0.16.0, gix-pathspec v0.14.0, gix-ignore v0.18.0, gix-worktree v0.45.0, gix-diff v0.56.0, gix-blame v0.6.0, gix-ref v0.56.0, gix-config v0.49.0, gix-prompt v0.12.0, gix-url v0.34.0, gix-credentials v0.33.0, gix-discover v0.44.0, gix-dir v0.18.0, gix-mailmap v0.28.1, gix-revision v0.38.0, gix-merge v0.9.0, gix-negotiate v0.24.0, gix-pack v0.63.0, gix-odb v0.73.0, gix-refspec v0.34.0, gix-shallow v0.7.0, gix-transport v0.51.0, gix-protocol v0.54.0, gix-status v0.23.0, gix-submodule v0.23.0, gix-worktree-state v0.23.0, gix v0.76.0, gix-fsck v0.15.0, gitoxide-core v0.51.0, gitoxide v0.48.0, safety bump 43 crates ([`21fecdf`](https://github.com/GitoxideLabs/gitoxide/commit/21fecdf928336ac5fa3dd1402f92e8200d8aff62)) - Merge pull request #2287 from cruessler/update-to-imara-diff-0-2-in-gix-blame ([`691a205`](https://github.com/GitoxideLabs/gitoxide/commit/691a2057966621a27062f05934dfe4b0dee11791)) - Refactor ([`0b7c1dd`](https://github.com/GitoxideLabs/gitoxide/commit/0b7c1ddc1b619c2dbe0ec3c0f5ab80d1cc6ffadb)) - Thanks clippy ([`ca9e4b9`](https://github.com/GitoxideLabs/gitoxide/commit/ca9e4b9626b69bf480ac07b54ea618db53ddd897)) - Add feature flag `blob-experimental` to `gix-blame` ([`ed9c437`](https://github.com/GitoxideLabs/gitoxide/commit/ed9c43753dfbff421c6b267264ae7f4cc3439b46)) - Update `gix-blame` to `imara-diff` 0.2 ([`2c88262`](https://github.com/GitoxideLabs/gitoxide/commit/2c88262a255d3afa14a49bfe73363aae2f4be60d))
## 0.5.0 (2025-11-22) ### Commit Statistics - 3 commits contributed to the release. - 0 commits were understood as [conventional](https://www.conventionalcommits.org). - 0 issues like '(#ID)' were seen in commit messages ### Commit Details
view details * **Uncategorized** - Release gix-date v0.11.0, gix-actor v0.36.0, gix-path v0.10.22, gix-object v0.52.0, gix-packetline v0.20.0, gix-filter v0.22.0, gix-revwalk v0.23.0, gix-traverse v0.49.0, gix-worktree-stream v0.24.0, gix-archive v0.24.0, gix-index v0.43.0, gix-worktree v0.44.0, gix-diff v0.55.0, gix-blame v0.5.0, gix-ref v0.55.0, gix-config v0.48.0, gix-url v0.33.2, gix-credentials v0.32.0, gix-discover v0.43.0, gix-dir v0.17.0, gix-mailmap v0.28.0, gix-revision v0.37.0, gix-merge v0.8.0, gix-negotiate v0.23.0, gix-pack v0.62.0, gix-odb v0.72.0, gix-refspec v0.33.0, gix-transport v0.50.0, gix-protocol v0.53.0, gix-status v0.22.0, gix-submodule v0.22.0, gix-worktree-state v0.22.0, gix v0.75.0, gix-fsck v0.14.0, gitoxide-core v0.50.0, gitoxide v0.47.0, safety bump 32 crates ([`82ff92f`](https://github.com/GitoxideLabs/gitoxide/commit/82ff92fa943bad88dc7d5bfa100404de477a3608)) - Merge pull request #2204 from cruessler/improve-blame-ranges ([`663b41e`](https://github.com/GitoxideLabs/gitoxide/commit/663b41eb65f0fffbc8397e91ce5107382b08b441)) - Merge pull request #2224 from GitoxideLabs/report ([`3313233`](https://github.com/GitoxideLabs/gitoxide/commit/3313233aa4e7009aed0ddf644f4271fd2a98e8d4))
## 0.4.0 (2025-10-22) ### New Features (BREAKING) - support multiple range formats in `BlameRanges` This modification introduces changes to the `BlameRanges` struct, converting it into an enum to support both `PartialFile` and `WholeFile`. Internally the ranges in `BlameRanges` are stored as zero-based exclusive ranges now. - rename range to ranges ### Commit Statistics - 26 commits contributed to the release over the course of 99 calendar days. - 99 days passed between releases. - 2 commits were understood as [conventional](https://www.conventionalcommits.org). - 0 issues like '(#ID)' were seen in commit messages ### Commit Details
view details * **Uncategorized** - Release gix-date v0.10.6, gix-utils v0.3.1, gix-actor v0.35.5, gix-trace v0.1.14, gix-validate v0.10.1, gix-path v0.10.21, gix-features v0.44.0, gix-hash v0.20.0, gix-hashtable v0.10.0, gix-object v0.51.0, gix-glob v0.22.0, gix-quote v0.6.1, gix-attributes v0.28.0, gix-command v0.6.3, gix-packetline-blocking v0.19.2, gix-filter v0.21.0, gix-fs v0.17.0, gix-chunk v0.4.12, gix-commitgraph v0.30.0, gix-revwalk v0.22.0, gix-traverse v0.48.0, gix-worktree-stream v0.23.0, gix-archive v0.23.0, gix-bitmap v0.2.15, gix-tempfile v19.0.0, gix-lock v19.0.0, gix-index v0.42.0, gix-config-value v0.15.2, gix-pathspec v0.13.0, gix-ignore v0.17.0, gix-worktree v0.43.0, gix-diff v0.54.0, gix-blame v0.4.0, gix-ref v0.54.0, gix-sec v0.12.1, gix-config v0.47.0, gix-prompt v0.11.2, gix-url v0.33.0, gix-credentials v0.31.0, gix-discover v0.42.0, gix-dir v0.16.0, gix-mailmap v0.27.3, gix-revision v0.36.0, gix-merge v0.7.0, gix-negotiate v0.22.0, gix-pack v0.61.0, gix-odb v0.71.0, gix-refspec v0.32.0, gix-shallow v0.6.0, gix-packetline v0.19.2, gix-transport v0.49.0, gix-protocol v0.52.0, gix-status v0.21.0, gix-submodule v0.21.0, gix-worktree-state v0.21.0, gix v0.74.0, gix-fsck v0.13.0, gitoxide-core v0.49.0, gitoxide v0.46.0, safety bump 42 crates ([`89fb308`](https://github.com/GitoxideLabs/gitoxide/commit/89fb308f1283b404b55916304f7d161fbf13fe10)) - Merge pull request #2217 from GitoxideLabs/copilot/update-msrv-to-rust-1-82 ([`4da2927`](https://github.com/GitoxideLabs/gitoxide/commit/4da2927629c7ec95b96d62a387c61097e3fc71fa)) - Update MSRV to 1.82 and replace once_cell with std equivalents ([`6cc8464`](https://github.com/GitoxideLabs/gitoxide/commit/6cc84641cb7be6f70468a90efaafcf142a6b8c4b)) - Cut or ignore ranges that exceed `max_lines` ([`9d5b033`](https://github.com/GitoxideLabs/gitoxide/commit/9d5b033cf54949994ffe95225efb49c13d5a0283)) - Fix comment ([`5f6d416`](https://github.com/GitoxideLabs/gitoxide/commit/5f6d4162258487bda5548840eb63d133bc5fd174)) - Support multiple range formats in `BlameRanges` ([`2230fde`](https://github.com/GitoxideLabs/gitoxide/commit/2230fde962a0832dd3f54d30da88eec8993f847e)) - Rename range to ranges ([`7ecbec0`](https://github.com/GitoxideLabs/gitoxide/commit/7ecbec0fa235a719df2964a883607a9a20563af9)) - Merge pull request #2202 from GitoxideLabs/dependabot/cargo/cargo-4a7155215a ([`9365cc3`](https://github.com/GitoxideLabs/gitoxide/commit/9365cc3ae8ad92ba2703170ac2f9a1e4df2ac3be)) - Bump the cargo group across 1 directory with 64 updates ([`838ff95`](https://github.com/GitoxideLabs/gitoxide/commit/838ff95cca60c453bd97bd458ce31b384d00347e)) - Merge pull request #2163 from cruessler/deprecate-in-place-methods ([`42f8db5`](https://github.com/GitoxideLabs/gitoxide/commit/42f8db5bc9096cdedba497c850c86285ecbacc69)) - Adapt to changes in `gix-ref` ([`44922d0`](https://github.com/GitoxideLabs/gitoxide/commit/44922d0a71b6cd3595dec8187fa3842097eacd5b)) - Merge pull request #2157 from cruessler/more-impl-from-for-unblamed-hunk ([`9222666`](https://github.com/GitoxideLabs/gitoxide/commit/92226667cfee38cf8b28b453c315e28700430b4f)) - Reduce noise in `gix-blame` tests ([`58cb884`](https://github.com/GitoxideLabs/gitoxide/commit/58cb884605c5e2b59fd8c83df0238bff719c7d00)) - Merge pull request #2156 from cruessler/impl-from-for-unblamed-hunk ([`c78af3c`](https://github.com/GitoxideLabs/gitoxide/commit/c78af3c4d7db642bdd1b2bbfcc58061da61ea582)) - Reduce noise in `gix-blame` tests ([`4ad2be8`](https://github.com/GitoxideLabs/gitoxide/commit/4ad2be804366ff62716ab57bd4a644131f3dc8db)) - Merge pull request #2153 from cruessler/add-blame-file-on-repository ([`bd47fb5`](https://github.com/GitoxideLabs/gitoxide/commit/bd47fb5b5dc5587550b377dc2dda003c30f5ba48)) - Fix typo, add missing slashes ([`1ad3da6`](https://github.com/GitoxideLabs/gitoxide/commit/1ad3da6196fcbf95a52a5cfea90b721b8c4e6d4f)) - Merge pull request #2113 from GitoxideLabs/release ([`dc7343c`](https://github.com/GitoxideLabs/gitoxide/commit/dc7343c25ec6a62445e52694f7f0d3f95f31edef)) - Release gix-actor v0.35.4, gix-fs v0.16.1, gix-object v0.50.2, gix-ref v0.53.1 ([`79ba9d0`](https://github.com/GitoxideLabs/gitoxide/commit/79ba9d009ca7536fadfe27b4fa56d1460327c906)) - Merge pull request #2110 from jpgrayson/fix/gix-date-parse-raw ([`651f9fa`](https://github.com/GitoxideLabs/gitoxide/commit/651f9fa560d5df7260a45068b8440f72820a6ffd)) - Release gix-date v0.10.5 ([`4289ae6`](https://github.com/GitoxideLabs/gitoxide/commit/4289ae635d94d713d247eaf6f87d0ba91a1a3826)) - Merge pull request #2100 from GitoxideLabs/release ([`202bc6d`](https://github.com/GitoxideLabs/gitoxide/commit/202bc6da79854d1fb6bb32b9c6bb2a6f882c77f5)) - Release gix-actor v0.35.3, gix-path v0.10.20, gix-features v0.43.1, gix-object v0.50.1 ([`d64f257`](https://github.com/GitoxideLabs/gitoxide/commit/d64f257951754ea70b0179b83f76de957b712211)) - Merge pull request #2097 from GitoxideLabs/fix-gix-date ([`589d63e`](https://github.com/GitoxideLabs/gitoxide/commit/589d63ed21e5f2cd53ad2cac96fc387df3ea26e9)) - Release gix-date v0.10.4 ([`007e3f6`](https://github.com/GitoxideLabs/gitoxide/commit/007e3f66246aaafc2374b85cbf77f89ec0b09512)) - Merge pull request #2075 from GitoxideLabs/improvements ([`784c046`](https://github.com/GitoxideLabs/gitoxide/commit/784c0465bf87011fe7dbf71a590d3f9e6c8696a8))
## 0.3.0 (2025-07-15) ### New Features (BREAKING) - add `debug_track_path` and `blame_path` - follow renames in blame - Add `BlameRanges` to enable multi-range blame support This update replaces single-range handling with the `BlameRanges` type, allowing multiple 1-based inclusive line ranges to be specified for blame operations. It hides some of the implementation details of the range logic, prepares for compatibility with `git` behavior, and adds tests to validate multi-range scenarios. ### Commit Statistics - 42 commits contributed to the release over the course of 79 calendar days. - 79 days passed between releases. - 3 commits were understood as [conventional](https://www.conventionalcommits.org). - 0 issues like '(#ID)' were seen in commit messages ### Thanks Clippy [Clippy](https://github.com/rust-lang/rust-clippy) helped 2 times to make code idiomatic. ### Commit Details
view details * **Uncategorized** - Release gix-date v0.10.3, gix-actor v0.35.2, gix-trace v0.1.13, gix-path v0.10.19, gix-features v0.43.0, gix-hash v0.19.0, gix-hashtable v0.9.0, gix-object v0.50.0, gix-glob v0.21.0, gix-attributes v0.27.0, gix-command v0.6.2, gix-packetline-blocking v0.19.1, gix-filter v0.20.0, gix-fs v0.16.0, gix-commitgraph v0.29.0, gix-revwalk v0.21.0, gix-traverse v0.47.0, gix-worktree-stream v0.22.0, gix-archive v0.22.0, gix-tempfile v18.0.0, gix-lock v18.0.0, gix-index v0.41.0, gix-config-value v0.15.1, gix-pathspec v0.12.0, gix-ignore v0.16.0, gix-worktree v0.42.0, gix-diff v0.53.0, gix-blame v0.3.0, gix-ref v0.53.0, gix-sec v0.12.0, gix-config v0.46.0, gix-prompt v0.11.1, gix-url v0.32.0, gix-credentials v0.30.0, gix-discover v0.41.0, gix-dir v0.15.0, gix-mailmap v0.27.2, gix-revision v0.35.0, gix-merge v0.6.0, gix-negotiate v0.21.0, gix-pack v0.60.0, gix-odb v0.70.0, gix-refspec v0.31.0, gix-shallow v0.5.0, gix-packetline v0.19.1, gix-transport v0.48.0, gix-protocol v0.51.0, gix-status v0.20.0, gix-submodule v0.20.0, gix-worktree-state v0.20.0, gix v0.73.0, gix-fsck v0.12.0, gitoxide-core v0.48.0, gitoxide v0.45.0, safety bump 43 crates ([`5a919c4`](https://github.com/GitoxideLabs/gitoxide/commit/5a919c48393020d47c7034946108577dd213b80a)) - Update changelogs prior to release ([`65037b5`](https://github.com/GitoxideLabs/gitoxide/commit/65037b56918b90ac07454a815b0ed136df2fca3b)) - Merge pull request #2070 from GitoxideLabs/dependabot/cargo/cargo-827bceb7eb ([`dab97f7`](https://github.com/GitoxideLabs/gitoxide/commit/dab97f7618f160421b6e31de8f3e2f3d11dc2ef2)) - Bump the cargo group across 1 directory with 68 updates ([`a9a8ea1`](https://github.com/GitoxideLabs/gitoxide/commit/a9a8ea1472532dde03bce4e0afdfa82924af1f96)) - Merge pull request #2066 from cruessler/add-test-for-file-added-in-two-different-branches ([`8007f1d`](https://github.com/GitoxideLabs/gitoxide/commit/8007f1d0bad357688acd1235d079bf164290cda6)) - Add test for file with two roots ([`92751b7`](https://github.com/GitoxideLabs/gitoxide/commit/92751b725e9ce9f6915577fbdf50f1fac9e8db41)) - Merge pull request #2041 from cruessler/add-blame-extraction ([`dd5f0a4`](https://github.com/GitoxideLabs/gitoxide/commit/dd5f0a4811bc738051f7af164b8d2815aaa23220)) - Refactor ([`378b1be`](https://github.com/GitoxideLabs/gitoxide/commit/378b1beb9359f9f1ef26f01065f303ec8ec9ee28)) - Thanks clippy ([`c7a2e80`](https://github.com/GitoxideLabs/gitoxide/commit/c7a2e802215ec2c2512262b9d54e580297964e8c)) - Only add entry when blame was passed ([`5d748af`](https://github.com/GitoxideLabs/gitoxide/commit/5d748af0f956ee62c7327c4bf6361c6817d04fbd)) - Add `index` to `BlamePathEntry` ([`90c2bb8`](https://github.com/GitoxideLabs/gitoxide/commit/90c2bb8701beb21a07f7dcf41401b863c638824a)) - Add `debug_track_path` and `blame_path` ([`81297cf`](https://github.com/GitoxideLabs/gitoxide/commit/81297cf2b85072ad13824f9821a0102dc6497f80)) - Merge pull request #2042 from cruessler/remove-unwrap-in-tests ([`e09825a`](https://github.com/GitoxideLabs/gitoxide/commit/e09825aed4b80a53e6317b75a4cea4e1ce9a759a)) - Remove most .unwrap()'s in gix-blame tests ([`4bf61f5`](https://github.com/GitoxideLabs/gitoxide/commit/4bf61f5671b097b82605009ad0dfc48de428ff18)) - Merge pull request #2039 from cruessler/add-test-for-rename-tracking ([`073487b`](https://github.com/GitoxideLabs/gitoxide/commit/073487b38ed40bcd7eb45dc110ae1ce84f9275a9)) - Refactor ([`8e2bc0f`](https://github.com/GitoxideLabs/gitoxide/commit/8e2bc0fb3e0d3b3a4ac58af76317e13e11b72117)) - Remove obsolete comment ([`2541378`](https://github.com/GitoxideLabs/gitoxide/commit/25413788e3c5c9059d39b125e3543b9b9301e8fe)) - Add test for source file name tracking per hunk ([`8ba513c`](https://github.com/GitoxideLabs/gitoxide/commit/8ba513c64d98463e3bf7d01a02c6d882897ebee0)) - Merge pull request #2022 from cruessler/add-rename-tracking-to-blame ([`76eddf8`](https://github.com/GitoxideLabs/gitoxide/commit/76eddf86b91afc3535f7eb0d9004652823ccda36)) - Refactor ([`3e5365c`](https://github.com/GitoxideLabs/gitoxide/commit/3e5365cb066895c787a22422964a2b9459f37ec3)) - Get current file_path from unblamed hunk ([`7435ed5`](https://github.com/GitoxideLabs/gitoxide/commit/7435ed5a9a7370a12332e12bd40fdbc757284a85)) - Follow renames in blame ([`d2e98f3`](https://github.com/GitoxideLabs/gitoxide/commit/d2e98f3cf458121da3d23933d6a7421d70309a20)) - Use `pretty_assertion::assert_equal` ([`6e6836b`](https://github.com/GitoxideLabs/gitoxide/commit/6e6836b4857fa19c20deadaacb1a079b3ef675a9)) - Merge pull request #2023 from cruessler/add-tests-for-blame-in-sub-directory ([`f606bd5`](https://github.com/GitoxideLabs/gitoxide/commit/f606bd5090f639942834c2eb2bd4d975c009a58e)) - Add test for blame in sub-directory ([`cca22e2`](https://github.com/GitoxideLabs/gitoxide/commit/cca22e205f0414a727639af97ca12e7c3cab0280)) - Merge pull request #2009 from GitoxideLabs/release-gix-index ([`c3f06ae`](https://github.com/GitoxideLabs/gitoxide/commit/c3f06ae424ab4e1918a364cabe8276297465a73a)) - Release gix-path v0.10.18, gix-date v0.10.2, gix-traverse v0.46.2, gix-index v0.40.1 ([`d2b4c44`](https://github.com/GitoxideLabs/gitoxide/commit/d2b4c44fcb2bf43e80d67532262631a5086f08de)) - Merge pull request #1983 from cruessler/make-process-changes-work-with-overlapping-ranges ([`83e1b73`](https://github.com/GitoxideLabs/gitoxide/commit/83e1b73f1db090f76d7b0d8062975f1f91346c37)) - Refactor ([`b2121bc`](https://github.com/GitoxideLabs/gitoxide/commit/b2121bcd8be3546cf708242dae070c7173a7d384)) - Thanks clippy ([`ee6f5cc`](https://github.com/GitoxideLabs/gitoxide/commit/ee6f5cc1dc08975da364836adf3a3261d20c7ded)) - Use *Blamed File* and *Source File* more consistently ([`2f6786b`](https://github.com/GitoxideLabs/gitoxide/commit/2f6786b08a0c94106b4e93f7835a708adc859fed)) - Correctly process overlapping unblamed hunks ([`6e1ea6d`](https://github.com/GitoxideLabs/gitoxide/commit/6e1ea6d85b8396b8348498c643d92eafb832987c)) - Provide more context in assertion ([`d46766a`](https://github.com/GitoxideLabs/gitoxide/commit/d46766aa29c4ac0bb198aa74fadb5b07ba82f03b)) - Merge pull request #1978 from cruessler/make-mutation-more-idiomatic ([`dc3c7c9`](https://github.com/GitoxideLabs/gitoxide/commit/dc3c7c9b461a33afe422d1785e3b0b0eb194d67a)) - Make mutation more idiomatic ([`4423cae`](https://github.com/GitoxideLabs/gitoxide/commit/4423cae45570f73a11ca34867794c5a05c342524)) - Remove obsolete comment ([`2d2365e`](https://github.com/GitoxideLabs/gitoxide/commit/2d2365e605e568e88e0c01917a12de4e7fd724f2)) - Merge pull request #1974 from cruessler/move-commit-time-to-either ([`8be3193`](https://github.com/GitoxideLabs/gitoxide/commit/8be3193eb34ac5deadb0ade60ba01cb3c97f6135)) - Make use of `gix_traverse::commit::Either::commit_time()` ([`f59a794`](https://github.com/GitoxideLabs/gitoxide/commit/f59a7946eda3c6bbdb2c5710eabf32df0b1ac63d)) - Merge pull request #1973 from holodorum/feature/blame-range-support ([`de13b16`](https://github.com/GitoxideLabs/gitoxide/commit/de13b16728f6d29452cb97b50281aa91d498eb49)) - Refactor ([`d4461e7`](https://github.com/GitoxideLabs/gitoxide/commit/d4461e700657d049a8cbc1552f328e35b27c92c3)) - Add `BlameRanges` to enable multi-range blame support ([`f189031`](https://github.com/GitoxideLabs/gitoxide/commit/f1890313c42d8f5b347feef1f48ec53f054dff08)) - Merge pull request #1971 from GitoxideLabs/new-release ([`8d4c4d1`](https://github.com/GitoxideLabs/gitoxide/commit/8d4c4d1e09f84c962c29d98a686c64228196ac13))
## 0.2.1 (2025-04-26) ### Commit Statistics - 3 commits contributed to the release. - 0 commits were understood as [conventional](https://www.conventionalcommits.org). - 0 issues like '(#ID)' were seen in commit messages ### Commit Details
view details * **Uncategorized** - Release gix-date v0.10.1, gix-utils v0.3.0, gix-actor v0.35.1, gix-validate v0.10.0, gix-path v0.10.17, gix-features v0.42.1, gix-hash v0.18.0, gix-hashtable v0.8.1, gix-object v0.49.1, gix-glob v0.20.0, gix-quote v0.6.0, gix-attributes v0.26.0, gix-command v0.6.0, gix-packetline-blocking v0.19.0, gix-filter v0.19.1, gix-fs v0.15.0, gix-commitgraph v0.28.0, gix-revwalk v0.20.1, gix-traverse v0.46.1, gix-worktree-stream v0.21.1, gix-archive v0.21.1, gix-tempfile v17.1.0, gix-lock v17.1.0, gix-index v0.40.0, gix-config-value v0.15.0, gix-pathspec v0.11.0, gix-ignore v0.15.0, gix-worktree v0.41.0, gix-diff v0.52.1, gix-blame v0.2.1, gix-ref v0.52.1, gix-sec v0.11.0, gix-config v0.45.1, gix-prompt v0.11.0, gix-url v0.31.0, gix-credentials v0.29.0, gix-discover v0.40.1, gix-dir v0.14.1, gix-mailmap v0.27.1, gix-revision v0.34.1, gix-merge v0.5.1, gix-negotiate v0.20.1, gix-pack v0.59.1, gix-odb v0.69.1, gix-refspec v0.30.1, gix-shallow v0.4.0, gix-packetline v0.19.0, gix-transport v0.47.0, gix-protocol v0.50.1, gix-status v0.19.1, gix-submodule v0.19.1, gix-worktree-state v0.19.0, gix v0.72.1, gix-fsck v0.11.1, gitoxide-core v0.47.1, gitoxide v0.44.0 ([`e104545`](https://github.com/GitoxideLabs/gitoxide/commit/e104545b78951ca882481d4a58f4425a8bc81c87)) - Bump all prior pratch levels to majors ([`5f7f805`](https://github.com/GitoxideLabs/gitoxide/commit/5f7f80570e1a5522e76ea58cccbb957249a0dffe)) - Merge pull request #1969 from GitoxideLabs/new-release ([`631f07a`](https://github.com/GitoxideLabs/gitoxide/commit/631f07ad0c1cb93d9da42cf2c8499584fe91880a))
## 0.2.0 (2025-04-25) ### Bug Fixes - Adapt to changes in gix-actor Use the committer date and author date that are now backed by bytes and interpret these bytes into a `gix_date::Time` on demand. ### Commit Statistics - 12 commits contributed to the release. - 1 commit was understood as [conventional](https://www.conventionalcommits.org). - 0 issues like '(#ID)' were seen in commit messages ### Commit Details
view details * **Uncategorized** - Release gix-path v0.10.16, gix-features v0.42.0, gix-hash v0.17.1, gix-object v0.49.0, gix-glob v0.19.1, gix-quote v0.5.1, gix-attributes v0.25.1, gix-command v0.5.1, gix-packetline-blocking v0.18.4, gix-filter v0.19.0, gix-fs v0.14.1, gix-commitgraph v0.27.1, gix-revwalk v0.20.0, gix-traverse v0.46.0, gix-worktree-stream v0.21.0, gix-archive v0.21.0, gix-tempfile v17.0.1, gix-lock v17.0.1, gix-index v0.39.1, gix-config-value v0.14.13, gix-pathspec v0.10.1, gix-ignore v0.14.1, gix-worktree v0.40.1, gix-diff v0.52.0, gix-blame v0.2.0, gix-ref v0.52.0, gix-sec v0.10.13, gix-config v0.45.0, gix-prompt v0.10.1, gix-url v0.30.1, gix-credentials v0.28.1, gix-discover v0.40.0, gix-dir v0.14.0, gix-mailmap v0.27.0, gix-revision v0.34.0, gix-merge v0.5.0, gix-negotiate v0.20.0, gix-pack v0.59.0, gix-odb v0.69.0, gix-refspec v0.30.0, gix-shallow v0.3.1, gix-packetline v0.18.5, gix-transport v0.46.1, gix-protocol v0.50.0, gix-status v0.19.0, gix-submodule v0.19.0, gix-worktree-state v0.18.1, gix v0.72.0, gix-fsck v0.11.0, gitoxide-core v0.47.0, gitoxide v0.43.0 ([`cc5b696`](https://github.com/GitoxideLabs/gitoxide/commit/cc5b696b7b73277ddcc3ef246714cf80a092cf76)) - Adjusting changelogs prior to release of gix-path v0.10.16, gix-features v0.42.0, gix-hash v0.17.1, gix-object v0.49.0, gix-glob v0.19.1, gix-quote v0.5.1, gix-attributes v0.25.1, gix-command v0.5.1, gix-packetline-blocking v0.18.4, gix-filter v0.19.0, gix-fs v0.14.1, gix-commitgraph v0.27.1, gix-revwalk v0.20.0, gix-traverse v0.46.0, gix-worktree-stream v0.21.0, gix-archive v0.21.0, gix-tempfile v17.0.1, gix-lock v17.0.1, gix-index v0.39.1, gix-config-value v0.14.13, gix-pathspec v0.10.1, gix-ignore v0.14.1, gix-worktree v0.40.1, gix-diff v0.52.0, gix-blame v0.2.0, gix-ref v0.52.0, gix-sec v0.10.13, gix-config v0.45.0, gix-prompt v0.10.1, gix-url v0.30.1, gix-credentials v0.28.1, gix-discover v0.40.0, gix-dir v0.14.0, gix-mailmap v0.27.0, gix-revision v0.34.0, gix-merge v0.5.0, gix-negotiate v0.20.0, gix-pack v0.59.0, gix-odb v0.69.0, gix-refspec v0.30.0, gix-shallow v0.3.1, gix-packetline v0.18.5, gix-transport v0.46.1, gix-protocol v0.50.0, gix-status v0.19.0, gix-submodule v0.19.0, gix-worktree-state v0.18.1, gix v0.72.0, gix-fsck v0.11.0, gitoxide-core v0.47.0, gitoxide v0.43.0, safety bump 7 crates ([`49fa9f3`](https://github.com/GitoxideLabs/gitoxide/commit/49fa9f38110ba975d68f5ac3baefeb55f0a0501b)) - Release gix-date v0.10.0, gix-utils v0.2.1, gix-actor v0.35.0, gix-validate v0.9.5, gix-path v0.10.15, gix-features v0.42.0, gix-hash v0.17.1, gix-object v0.49.0, gix-glob v0.19.1, gix-quote v0.5.1, gix-attributes v0.25.0, gix-command v0.5.1, gix-packetline-blocking v0.18.4, gix-filter v0.19.0, gix-fs v0.14.0, gix-commitgraph v0.27.1, gix-revwalk v0.20.0, gix-traverse v0.46.0, gix-worktree-stream v0.21.0, gix-archive v0.21.0, gix-tempfile v17.0.1, gix-lock v17.0.1, gix-index v0.39.0, gix-config-value v0.14.13, gix-pathspec v0.10.1, gix-ignore v0.14.1, gix-worktree v0.40.0, gix-diff v0.52.0, gix-blame v0.2.0, gix-ref v0.51.0, gix-sec v0.10.13, gix-config v0.45.0, gix-prompt v0.10.1, gix-url v0.30.1, gix-credentials v0.28.1, gix-discover v0.40.0, gix-dir v0.14.0, gix-mailmap v0.27.0, gix-revision v0.34.0, gix-merge v0.5.0, gix-negotiate v0.20.0, gix-pack v0.59.0, gix-odb v0.69.0, gix-refspec v0.30.0, gix-shallow v0.3.1, gix-packetline v0.18.5, gix-transport v0.46.0, gix-protocol v0.50.0, gix-status v0.19.0, gix-submodule v0.19.0, gix-worktree-state v0.18.0, gix v0.72.0, gix-fsck v0.11.0, gitoxide-core v0.46.0, gitoxide v0.43.0, safety bump 30 crates ([`db0b095`](https://github.com/GitoxideLabs/gitoxide/commit/db0b0957930e3ebb1b3f05ed8d7e7a557eb384a2)) - Update changelogs prior to release ([`0bf84db`](https://github.com/GitoxideLabs/gitoxide/commit/0bf84dbc041f59efba06adcf422c60b5d6e350f0)) - Merge pull request #1935 from pierrechevalier83/fix_1923 ([`3b1bef7`](https://github.com/GitoxideLabs/gitoxide/commit/3b1bef7cc40e16b61bcc117ca90ebae21df7c7b1)) - J fmt ([`c3c6504`](https://github.com/GitoxideLabs/gitoxide/commit/c3c650448f92bcb27194ce0a51f7d604ce87920d)) - Adapt to changes in gix-actor ([`b07f907`](https://github.com/GitoxideLabs/gitoxide/commit/b07f907ba2e01849744c72df35dac57b624f2f85)) - Merge pull request #1949 from GitoxideLabs/dependabot/cargo/cargo-6893e2988a ([`b5e9059`](https://github.com/GitoxideLabs/gitoxide/commit/b5e905991155ace32ef21464e69a8369a773f02b)) - Merge pull request #1945 from cruessler/replace-btreemap-by-smallvec ([`c75bc44`](https://github.com/GitoxideLabs/gitoxide/commit/c75bc44b4f9d3b1c8d48b9dfc42c94576088b8a6)) - Bump the cargo group with 21 updates ([`68e6b2e`](https://github.com/GitoxideLabs/gitoxide/commit/68e6b2e54613fe788d645ea8c942c71a39c6ede1)) - Replace BTreeMap by SmallVec ([`75b842b`](https://github.com/GitoxideLabs/gitoxide/commit/75b842b13cc4a17acfd3419263aa1520df10fb01)) - Merge pull request #1919 from GitoxideLabs/release ([`420e730`](https://github.com/GitoxideLabs/gitoxide/commit/420e730f765b91e1d17daca6bb1f99bdb2e54fda))
## v0.1.0 (2025-04-04) ### Chore - uniformize deny attributes - remove default link to cargo doc everywhere ### Bug Fixes - note that crates have been renamed from `git-*` to `gix-*`. This also means that the `git-*` prefixed crates of the `gitoxide` project are effectively unmaintained. Use the crates with the `gix-*` prefix instead. If you were using `git-repository`, then `gix` is its substitute. ### New Features (BREAKING) - upgrade edition to 2021 in most crates. MSRV for this is 1.56, and we are now at 1.60 so should be compatible. This isn't more than a patch release as it should break nobody who is adhering to the MSRV, but let's be careful and mark it breaking. Note that `git-features` and `git-pack` are still on edition 2018 as they make use of a workaround to support (safe) mutable access to non-overlapping entries in a slice which doesn't work anymore in edition 2021. - add `diff_algorithm` to `blame::file()` - add `since` to `blame::file()` - skip uninteresting commits for blame This is breaking because it takes a commitgraph cache as argument , and because it replaces the `traverse` by `suspect`. Switch to date order for traversing the commit history, as opposed to topo order. This is also what `git blame` does. Skip suspects that have no associated unblamed hunks Pass blame to parent in `process_change`. `git`’s algorithm only seems to keep the current suspect for unblamed hunks that were the direct result of splitting an existing unblamed hunk because it matched with a change. All other hunks appear to be blamed on the parent without further checks. Add assertion that lines always match. ### Commit Statistics - 20 commits contributed to the release. - 3 commits were understood as [conventional](https://www.conventionalcommits.org). - 0 issues like '(#ID)' were seen in commit messages ### Thanks Clippy [Clippy](https://github.com/rust-lang/rust-clippy) helped 1 time to make code idiomatic. ### Commit Details
view details * **Uncategorized** - Release gix-date v0.9.4, gix-utils v0.2.0, gix-actor v0.34.0, gix-features v0.41.0, gix-hash v0.17.0, gix-hashtable v0.8.0, gix-path v0.10.15, gix-validate v0.9.4, gix-object v0.48.0, gix-glob v0.19.0, gix-quote v0.5.0, gix-attributes v0.25.0, gix-command v0.5.0, gix-packetline-blocking v0.18.3, gix-filter v0.18.0, gix-fs v0.14.0, gix-commitgraph v0.27.0, gix-revwalk v0.19.0, gix-traverse v0.45.0, gix-worktree-stream v0.20.0, gix-archive v0.20.0, gix-tempfile v17.0.0, gix-lock v17.0.0, gix-index v0.39.0, gix-config-value v0.14.12, gix-pathspec v0.10.0, gix-ignore v0.14.0, gix-worktree v0.40.0, gix-diff v0.51.0, gix-blame v0.1.0, gix-ref v0.51.0, gix-config v0.44.0, gix-prompt v0.10.0, gix-url v0.30.0, gix-credentials v0.28.0, gix-discover v0.39.0, gix-dir v0.13.0, gix-mailmap v0.26.0, gix-revision v0.33.0, gix-merge v0.4.0, gix-negotiate v0.19.0, gix-pack v0.58.0, gix-odb v0.68.0, gix-refspec v0.29.0, gix-shallow v0.3.0, gix-packetline v0.18.4, gix-transport v0.46.0, gix-protocol v0.49.0, gix-status v0.18.0, gix-submodule v0.18.0, gix-worktree-state v0.18.0, gix v0.71.0, gix-fsck v0.10.0, gitoxide-core v0.46.0, gitoxide v0.42.0, safety bump 48 crates ([`b41312b`](https://github.com/GitoxideLabs/gitoxide/commit/b41312b478b0d19efb330970cf36dba45d0fbfbd)) - Update changelogs prior to release ([`38dff41`](https://github.com/GitoxideLabs/gitoxide/commit/38dff41d09b6841ff52435464e77cd012dce7645)) - Merge pull request #1910 from cruessler/add-tree-id-to-either ([`544cdaf`](https://github.com/GitoxideLabs/gitoxide/commit/544cdafbb58bb3e39bf19a19eb02d5296a7361aa)) - Make use `gix_traverse::commit::Either::tree_id()` ([`3fad860`](https://github.com/GitoxideLabs/gitoxide/commit/3fad860aaffb53fd27b6d2b959ad8a8d1ab9ac63)) - Merge pull request #1901 from cruessler/make-either-copy ([`85b060c`](https://github.com/GitoxideLabs/gitoxide/commit/85b060c777cb893c85d60168f9b748ce78c0f146)) - Derive Clone and Copy for Either ([`3c1b1df`](https://github.com/GitoxideLabs/gitoxide/commit/3c1b1df9320c11e754931e292689c6075bddbfa9)) - Merge pull request #1888 from cruessler/respect-diff-algorithm-in-blame ([`dce127e`](https://github.com/GitoxideLabs/gitoxide/commit/dce127e63f7788c5424e2da2cf4e3112f9c3b159)) - Add `diff_algorithm` to `blame::file()` ([`e9a493c`](https://github.com/GitoxideLabs/gitoxide/commit/e9a493c204979d1a155c198331277662d26aec58)) - Merge pull request #1858 from cruessler/add-git-blame-since ([`7059609`](https://github.com/GitoxideLabs/gitoxide/commit/70596096e35ff8a910dacd6fefdc31d162282b81)) - Add `since` to `blame::file()` ([`e08cf88`](https://github.com/GitoxideLabs/gitoxide/commit/e08cf8811e25c91ca410963703ce98db32be3681)) - Merge pull request #1854 from GitoxideLabs/montly-report ([`16a248b`](https://github.com/GitoxideLabs/gitoxide/commit/16a248beddbfbd21621f2bb57aaa82dca35acb19)) - Thanks clippy ([`8e96ed3`](https://github.com/GitoxideLabs/gitoxide/commit/8e96ed37db680855d194c10673ba2dab28655d95)) - Merge pull request #1824 from cruessler/replace-find-commit-by-find ([`8ab0a6b`](https://github.com/GitoxideLabs/gitoxide/commit/8ab0a6b458327d3dc057bec3d4e09bea04dee388)) - Replace `odb.find_commit` by `gix_traverse::commit::find` ([`e09ec3e`](https://github.com/GitoxideLabs/gitoxide/commit/e09ec3e438b5503f21eb784c5781b52e0b1f8a1b)) - Merge pull request #1743 from cruessler/skip-uninteresting-commits-for-blame ([`aa05ef0`](https://github.com/GitoxideLabs/gitoxide/commit/aa05ef0d143d7ca14272f6cd36a40d2ed839fe76)) - Refactor ([`4428838`](https://github.com/GitoxideLabs/gitoxide/commit/442883800bc3abe63592ec36cb03b7c7e55c0f34)) - Skip uninteresting commits for blame ([`1250df3`](https://github.com/GitoxideLabs/gitoxide/commit/1250df3f9c10f66e4b8e227809831f3088482960)) - Merge pull request #1823 from cruessler/add-test-for-differing-date-and-topo-order ([`18e163e`](https://github.com/GitoxideLabs/gitoxide/commit/18e163e5df653f698a356b26da4f7e1c31fac9ad)) - Add test for commits not ordered chronologically ([`a9de4f0`](https://github.com/GitoxideLabs/gitoxide/commit/a9de4f0898148eb45ca8a229c14e65f5dbf56906)) - Merge pull request #1778 from GitoxideLabs/new-release ([`8df0db2`](https://github.com/GitoxideLabs/gitoxide/commit/8df0db2f8fe1832a5efd86d6aba6fb12c4c855de))
## v0.0.0 (2025-01-18) ### New Features (BREAKING) - add `range` to `blame::file()` ### New Features - Add support for statistics and additional performance information. - Add `blame` plumbing crate to the top-level. For now, it doesn't come with a simplified `gix` API though. - bump `rust-version` to 1.70 That way clippy will allow to use the fantastic `Option::is_some_and()` and friends. - Update gitoxide repository URLs ### Chore - bump `rust-version` to 1.70 That way clippy will allow to use the fantastic `Option::is_some_and()` and friends. ### Other - Update gitoxide repository URLs This updates `Byron/gitoxide` URLs to `GitoxideLabs/gitoxide` in: - Markdown documentation, except changelogs and other such files where such changes should not be made. - Documentation comments (in .rs files). - Manifest (.toml) files, for the value of the `repository` key. - The comments appearing at the top of a sample hook that contains a repository URL as an example. When making these changes, I also allowed my editor to remove trailing whitespace in any lines in files already being edited (since, in this case, there was no disadvantage to allowing this). The gitoxide repository URL changed when the repository was moved into the recently created GitHub organization `GitoxideLabs`, as detailed in #1406. Please note that, although I believe updating the URLs to their new canonical values is useful, this is not needed to fix any broken links, since `Byron/gitoxide` URLs redirect (and hopefully will always redirect) to the coresponding `GitoxideLabs/gitoxide` URLs. While this change should not break any URLs, some affected URLs were already broken. This updates them, but they are still broken. They will be fixed in a subsequent commit. This also does not update `Byron/gitoxide` URLs in test fixtures or test cases, nor in the `Makefile`. (It may make sense to change some of those too, but it is not really a documentation change.) ### Commit Statistics - 47 commits contributed to the release. - 5 commits were understood as [conventional](https://www.conventionalcommits.org). - 0 issues like '(#ID)' were seen in commit messages ### Commit Details
view details * **Uncategorized** - Release gix-utils v0.1.14, gix-actor v0.33.2, gix-hash v0.16.0, gix-trace v0.1.12, gix-features v0.40.0, gix-hashtable v0.7.0, gix-path v0.10.14, gix-validate v0.9.3, gix-object v0.47.0, gix-glob v0.18.0, gix-quote v0.4.15, gix-attributes v0.24.0, gix-command v0.4.1, gix-packetline-blocking v0.18.2, gix-filter v0.17.0, gix-fs v0.13.0, gix-chunk v0.4.11, gix-commitgraph v0.26.0, gix-revwalk v0.18.0, gix-traverse v0.44.0, gix-worktree-stream v0.19.0, gix-archive v0.19.0, gix-bitmap v0.2.14, gix-tempfile v16.0.0, gix-lock v16.0.0, gix-index v0.38.0, gix-config-value v0.14.11, gix-pathspec v0.9.0, gix-ignore v0.13.0, gix-worktree v0.39.0, gix-diff v0.50.0, gix-blame v0.0.0, gix-ref v0.50.0, gix-sec v0.10.11, gix-config v0.43.0, gix-prompt v0.9.1, gix-url v0.29.0, gix-credentials v0.27.0, gix-discover v0.38.0, gix-dir v0.12.0, gix-mailmap v0.25.2, gix-revision v0.32.0, gix-merge v0.3.0, gix-negotiate v0.18.0, gix-pack v0.57.0, gix-odb v0.67.0, gix-refspec v0.28.0, gix-shallow v0.2.0, gix-packetline v0.18.3, gix-transport v0.45.0, gix-protocol v0.48.0, gix-status v0.17.0, gix-submodule v0.17.0, gix-worktree-state v0.17.0, gix v0.70.0, gix-fsck v0.9.0, gitoxide-core v0.45.0, gitoxide v0.41.0, safety bump 42 crates ([`dea106a`](https://github.com/GitoxideLabs/gitoxide/commit/dea106a8c4fecc1f0a8f891a2691ad9c63964d25)) - Don't specify version numbers in dev-dependencies ([`7570daa`](https://github.com/GitoxideLabs/gitoxide/commit/7570daa50a93a2b99e9cd5228cb274f20839865f)) - Update all changelogs prior to release ([`1f6390c`](https://github.com/GitoxideLabs/gitoxide/commit/1f6390c53ba68ce203ae59eb3545e2631dd8a106)) - Merge pull request #1766 from cruessler/add-range-to-gix-blame ([`90fef01`](https://github.com/GitoxideLabs/gitoxide/commit/90fef0148376167763a3ebeff91a1cf9c236cf8a)) - Refactor ([`1500c08`](https://github.com/GitoxideLabs/gitoxide/commit/1500c08736069153aab33842d2d877f42ad01f37)) - Add `range` to `blame::file()` ([`787cf6f`](https://github.com/GitoxideLabs/gitoxide/commit/787cf6f5a838a96da49330c99a8530ac3206de50)) - Merge pull request #1762 from GitoxideLabs/fix-1759 ([`7ec21bb`](https://github.com/GitoxideLabs/gitoxide/commit/7ec21bb96ce05b29dde74b2efdf22b6e43189aab)) - Bump `rust-version` to 1.70 ([`17835bc`](https://github.com/GitoxideLabs/gitoxide/commit/17835bccb066bbc47cc137e8ec5d9fe7d5665af0)) - Merge pull request #1756 from cruessler/extract-object-ids-in-tests ([`f18a312`](https://github.com/GitoxideLabs/gitoxide/commit/f18a3129b11c53e7922295908a6930039b8203c3)) - Extract hard-coded ObjectIds in tests ([`50ba3d6`](https://github.com/GitoxideLabs/gitoxide/commit/50ba3d6aa60a67cbacb2aa7411e3f20c3c6cf0c0)) - Merge pull request #1755 from cruessler/shortcut-tree-diffing-minor-cleanups ([`25c2646`](https://github.com/GitoxideLabs/gitoxide/commit/25c2646f2c7f0430791fc14131a7e103f3c9cac7)) - Prefix variant to disambiguate from continue ([`ec3cdf1`](https://github.com/GitoxideLabs/gitoxide/commit/ec3cdf1520837db9a94257db3b08099e34892baa)) - Merge pull request #1754 from GitoxideLabs/fix-ci ([`34096a5`](https://github.com/GitoxideLabs/gitoxide/commit/34096a5796f03f76e8ed696b886fbd62eb09d2cc)) - Fix clippy ([`6805beb`](https://github.com/GitoxideLabs/gitoxide/commit/6805beb31609bff9dad1807901d8901024ab1d3c)) - Merge pull request #1753 from GitoxideLabs/wip-changes-against-more-than-one-parent ([`a22f13b`](https://github.com/GitoxideLabs/gitoxide/commit/a22f13bec0cdd580ee92390a98d5d522eb29978d)) - Refactor ([`360bf38`](https://github.com/GitoxideLabs/gitoxide/commit/360bf383a3ebdeeda1db161d42bb057a05cdf32b)) - Rework how blame is passed to parents ([`a3d92b4`](https://github.com/GitoxideLabs/gitoxide/commit/a3d92b4d1f129b18217d789273c4991964891de0)) - Merge pull request #1747 from cruessler/shortcut-tree-diffing ([`59bd978`](https://github.com/GitoxideLabs/gitoxide/commit/59bd978ba560295ed4fcb86f1a629e3c728dd5dd)) - Update doc-string ([`9ac36bd`](https://github.com/GitoxideLabs/gitoxide/commit/9ac36bdd0af860df24c303d0d4a789b324ab2c43)) - Rename to FindChangeToPath and move to where it's used ([`f857ca8`](https://github.com/GitoxideLabs/gitoxide/commit/f857ca86f88b25dc1ce1ca7c90db05793828ddf0)) - Simplify Recorder by wrapping gix_diff::tree::Recorder ([`7d1416a`](https://github.com/GitoxideLabs/gitoxide/commit/7d1416a9124c16e757a3e7cb3fd762c9e52973bb)) - Don't ignore gix_diff::tree errors ([`f049b00`](https://github.com/GitoxideLabs/gitoxide/commit/f049b00b9d59b3eff4c9489557d9d709f96fdd67)) - Cancel tree diffing early when matching path is found ([`74565bc`](https://github.com/GitoxideLabs/gitoxide/commit/74565bc2c5ab46348a0e9182e7b9d946dfbc0dd8)) - Merge pull request #1453 from cruessler/gix-blame ([`6ed9976`](https://github.com/GitoxideLabs/gitoxide/commit/6ed9976abaa3915b50efa46c46b195f3a1fc4ff7)) - For linear histories, avoid redoing path lookup work ([`8196a43`](https://github.com/GitoxideLabs/gitoxide/commit/8196a433ed08de6b09b5cb187f8ce53fc2ab09ca)) - Don't panic when suspect isn't known when converting unblamed to blame-entry ([`667e626`](https://github.com/GitoxideLabs/gitoxide/commit/667e6262bcba1d95e32795faa79dc6b354da9a01)) - Additional pass of refactoring, focus on the algorithm itself. ([`3ac8be1`](https://github.com/GitoxideLabs/gitoxide/commit/3ac8be1557de8a66ff32abe3d1c9ea83198d4a05)) - Review and remove all TODOs where possible, update docs and comments ([`63ee0f9`](https://github.com/GitoxideLabs/gitoxide/commit/63ee0f9c34dc89ad51d5c9ab83e49cbc08e3ed69)) - Swap blamed-file and original-file variable names. ([`b7f1468`](https://github.com/GitoxideLabs/gitoxide/commit/b7f1468f0fe38a50ad3414efb5efcf3ac0d2fddb)) - Replace todos!() with assertions or remove them. ([`b736ace`](https://github.com/GitoxideLabs/gitoxide/commit/b736ace18e8996b410a597fb4f43bf28f422dfc5)) - Add `Error` type ([`845d96a`](https://github.com/GitoxideLabs/gitoxide/commit/845d96a4ffff89703a8c3815ac52adc7f2b286f6)) - Add support for statistics and additional performance information. ([`4ffe6eb`](https://github.com/GitoxideLabs/gitoxide/commit/4ffe6eb8f7921c6a03db0aa6d796cc2e3cc328e0)) - Remove duplication and unnecessary parameter ([`a158d22`](https://github.com/GitoxideLabs/gitoxide/commit/a158d22703077d37b83e0434aa229baf12c342ed)) - Unify how lines in blame results are accessed ([`f2790a9`](https://github.com/GitoxideLabs/gitoxide/commit/f2790a9db8cac3ce57003b512edf735e734383d1)) - Modularlize `gix-blame/lib.rs` ([`26bfd2d`](https://github.com/GitoxideLabs/gitoxide/commit/26bfd2d73374e134aff24410fac44857b8128244)) - First review round ([`983ec7d`](https://github.com/GitoxideLabs/gitoxide/commit/983ec7d776b459898b90927242582fc03a0e9056)) - Add `blame` plumbing crate to the top-level. ([`25efbfb`](https://github.com/GitoxideLabs/gitoxide/commit/25efbfb72e5a043ce8f7d196c1f7104ef93394df)) - Add initial implementation and tests for `gix-blame`. ([`d27adf7`](https://github.com/GitoxideLabs/gitoxide/commit/d27adf70b4e2f57d8431a0a553119322d7158f4b)) - Merge pull request #1624 from EliahKagan/update-repo-url ([`795962b`](https://github.com/GitoxideLabs/gitoxide/commit/795962b107d86f58b1f7c75006da256d19cc80ad)) - Update gitoxide repository URLs ([`64ff0a7`](https://github.com/GitoxideLabs/gitoxide/commit/64ff0a77062d35add1a2dd422bb61075647d1a36)) - Merge pull request #1589 from EliahKagan/maintenance ([`7c2af44`](https://github.com/GitoxideLabs/gitoxide/commit/7c2af442748f7245734ec1f987b6d839f2a795bd)) - Add missing executable bits ([`694ebad`](https://github.com/GitoxideLabs/gitoxide/commit/694ebadb2d11d25c5b1285c61cef5df03685701a)) - Merge branch 'global-lints' ([`37ba461`](https://github.com/GitoxideLabs/gitoxide/commit/37ba4619396974ec9cc41d1e882ac5efaf3816db)) - Workspace Clippy lint management ([`2e0ce50`](https://github.com/GitoxideLabs/gitoxide/commit/2e0ce506968c112b215ca0056bd2742e7235df48)) - Merge branch 'gix-blame' ([`e6fbea9`](https://github.com/GitoxideLabs/gitoxide/commit/e6fbea9be2ef7ab4064dc57c8233dfe81fac3bb4)) - Add sample fixture ([`6d71e0d`](https://github.com/GitoxideLabs/gitoxide/commit/6d71e0d291f2a3b11c635949712ec86cf57d7449)) - Add new `gix-blame` crate ([`f5f616d`](https://github.com/GitoxideLabs/gitoxide/commit/f5f616d8345898effc79d587c139e249f1c85ab6))
use std::borrow::Cow; use bstr::BStr; use gix_object::tree; use crate::{ index::{Change, ChangeRef}, rewrites, rewrites::tracker::ChangeKind, tree::visit::Relation, }; impl ChangeRef<'_, '_> { /// Copy everything into an owned version of this instance. pub fn into_owned(self) -> Change { match self { ChangeRef::Addition { location, index, entry_mode, id, } => ChangeRef::Addition { location: Cow::Owned(location.into_owned()), index, entry_mode, id: Cow::Owned(id.into_owned()), }, ChangeRef::Deletion { location, index, entry_mode, id, } => ChangeRef::Deletion { location: Cow::Owned(location.into_owned()), index, entry_mode, id: Cow::Owned(id.into_owned()), }, ChangeRef::Modification { location, previous_index, previous_entry_mode, previous_id, index, entry_mode, id, } => ChangeRef::Modification { location: Cow::Owned(location.into_owned()), previous_index, previous_entry_mode, previous_id: Cow::Owned(previous_id.into_owned()), index, entry_mode, id: Cow::Owned(id.into_owned()), }, ChangeRef::Rewrite { source_location, source_index, source_entry_mode, source_id, location, index, entry_mode, id, copy, } => ChangeRef::Rewrite { source_location: Cow::Owned(source_location.into_owned()), source_index, source_entry_mode, source_id: Cow::Owned(source_id.into_owned()), location: Cow::Owned(location.into_owned()), index, entry_mode, id: Cow::Owned(id.into_owned()), copy, }, } } } impl ChangeRef<'_, '_> { /// Return all shared fields among all variants: `(location, index, entry_mode, id)` /// /// In case of rewrites, the fields return to the current change. /// /// Note that there are also more specific accessors in case you only need to access to one of /// these fields individually. /// /// See [`ChangeRef::location()`], [`ChangeRef::index()`], [`ChangeRef::entry_mode()`] and /// [`ChangeRef::id()`]. pub fn fields(&self) -> (&BStr, usize, gix_index::entry::Mode, &gix_hash::oid) { match self { ChangeRef::Addition { location, index, entry_mode, id, .. } | ChangeRef::Deletion { location, index, entry_mode, id, .. } | ChangeRef::Modification { location, index, entry_mode, id, .. } | ChangeRef::Rewrite { location, index, entry_mode, id, .. } => (location.as_ref(), *index, *entry_mode, id), } } /// Return the `location`, in the case of rewrites referring to the current change. pub fn location(&self) -> &BStr { match self { ChangeRef::Addition { location, .. } | ChangeRef::Deletion { location, .. } | ChangeRef::Modification { location, .. } | ChangeRef::Rewrite { location, .. } => location.as_ref(), } } /// Return the `index`, in the case of rewrites referring to the current change. pub fn index(&self) -> usize { match self { ChangeRef::Addition { index, .. } | ChangeRef::Deletion { index, .. } | ChangeRef::Modification { index, .. } | ChangeRef::Rewrite { index, .. } => *index, } } /// Return the `entry_mode`, in the case of rewrites referring to the current change. pub fn entry_mode(&self) -> gix_index::entry::Mode { match self { ChangeRef::Addition { entry_mode, .. } | ChangeRef::Deletion { entry_mode, .. } | ChangeRef::Modification { entry_mode, .. } | ChangeRef::Rewrite { entry_mode, .. } => *entry_mode, } } /// Return the `id`, in the case of rewrites referring to the current change. pub fn id(&self) -> &gix_hash::oid { match self { ChangeRef::Addition { id, .. } | ChangeRef::Deletion { id, .. } | ChangeRef::Modification { id, .. } | ChangeRef::Rewrite { id, .. } => id, } } } impl rewrites::tracker::Change for ChangeRef<'_, '_> { fn id(&self) -> &gix_hash::oid { match self { ChangeRef::Addition { id, .. } | ChangeRef::Deletion { id, .. } | ChangeRef::Modification { id, .. } => { id.as_ref() } ChangeRef::Rewrite { .. } => { unreachable!("BUG") } } } fn relation(&self) -> Option { None } fn kind(&self) -> ChangeKind { match self { ChangeRef::Addition { .. } => ChangeKind::Addition, ChangeRef::Deletion { .. } => ChangeKind::Deletion, ChangeRef::Modification { .. } => ChangeKind::Modification, ChangeRef::Rewrite { .. } => { unreachable!("BUG: rewrites can't be determined ahead of time") } } } fn entry_mode(&self) -> tree::EntryMode { match self { ChangeRef::Addition { entry_mode, .. } | ChangeRef::Deletion { entry_mode, .. } | ChangeRef::Modification { entry_mode, .. } | ChangeRef::Rewrite { entry_mode, .. } => { entry_mode .to_tree_entry_mode() // Default is for the impossible case - just don't let it participate in rename tracking. .unwrap_or(tree::EntryKind::Tree.into()) } } } fn id_and_entry_mode(&self) -> (&gix_hash::oid, tree::EntryMode) { match self { ChangeRef::Addition { id, entry_mode, .. } | ChangeRef::Deletion { id, entry_mode, .. } | ChangeRef::Modification { id, entry_mode, .. } | ChangeRef::Rewrite { id, entry_mode, .. } => { ( id, entry_mode .to_tree_entry_mode() // Default is for the impossible case - just don't let it participate in rename tracking. .unwrap_or(tree::EntryKind::Tree.into()), ) } } } } use bstr::{BStr, BString, ByteSlice}; use crate::{ blob::{DiffLineStats, ResourceKind}, tree, }; /// Represents any possible change in order to turn one tree into another, which references data owned by its producer. #[derive(Debug, Clone, Copy, PartialEq)] pub enum ChangeRef<'a> { /// An entry was added, like the addition of a file or directory. Addition { /// The location of the file or directory. /// /// It may be empty if [file names](super::Options::location) is `None`. location: &'a BStr, /// The mode of the added entry. entry_mode: gix_object::tree::EntryMode, /// Identifies a relationship between this instance and another one, /// making it easy to reconstruct the top-level of directory changes. relation: Option, /// The object id of the added entry. id: gix_hash::ObjectId, }, /// An entry was deleted, like the deletion of a file or directory. Deletion { /// The location of the file or directory. /// /// It may be empty if [file names](super::Options::location) is `None`. /// are tracked. location: &'a BStr, /// The mode of the deleted entry. entry_mode: gix_object::tree::EntryMode, /// Identifies a relationship between this instance and another one, /// making it easy to reconstruct the top-level of directory changes. relation: Option, /// The object id of the deleted entry. id: gix_hash::ObjectId, }, /// An entry was modified, e.g. changing the contents of a file adjusts its object id and turning /// a file into a symbolic link adjusts its mode. Modification { /// The location of the file or directory. /// /// It may be empty if [file names](super::Options::location) is `None`. /// are tracked. location: &'a BStr, /// The mode of the entry before the modification. previous_entry_mode: gix_object::tree::EntryMode, /// The object id of the entry before the modification. previous_id: gix_hash::ObjectId, /// The mode of the entry after the modification. entry_mode: gix_object::tree::EntryMode, /// The object id after the modification. id: gix_hash::ObjectId, }, /// Entries are considered rewritten if they are not trees and they, according to some understanding of identity, were renamed /// or copied. /// In case of renames, this means they originally appeared as [`Deletion`](ChangeRef::Deletion) signalling their source as well as an /// [`Addition`](ChangeRef::Addition) acting as destination. /// /// In case of copies, the `copy` flag is true and typically represents a perfect copy of a source was made. /// /// This variant can only be encountered if [rewrite tracking](super::Options::rewrites) is enabled. /// /// Note that mode changes may have occurred as well, i.e. changes from executable to non-executable or vice-versa. Rewrite { /// The location of the source of the rename or copy operation. /// /// It may be empty if [file names](super::Options::location) is `None`. /// are tracked. source_location: &'a BStr, /// The mode of the entry before the rename. source_entry_mode: gix_object::tree::EntryMode, /// Identifies a relationship between the source and another source, /// making it easy to reconstruct the top-level of directory changes. source_relation: Option, /// The object id of the entry before the rename. /// /// Note that this is the same as `id` if we require the [similarity to be 100%](super::Rewrites::percentage), but may /// be different otherwise. source_id: gix_hash::ObjectId, /// Information about the diff we performed to detect similarity and match the `source_id` with the current state at `id`. /// It's `None` if `source_id` is equal to `id`, as identity made an actual diff computation unnecessary. diff: Option, /// The mode of the entry after the rename. /// It could differ but still be considered a rename as we are concerned only about content. entry_mode: gix_object::tree::EntryMode, /// The object id after the rename. id: gix_hash::ObjectId, /// The location after the rename or copy operation. /// /// It may be empty if [file names](super::Options::location) is `None`. location: &'a BStr, /// Identifies a relationship between this destination and another destination, /// making it easy to reconstruct the top-level of directory changes. relation: Option, /// If true, this rewrite is created by copy, and `source_id` is pointing to its source. Otherwise, it's a rename, and `source_id` /// points to a deleted object, as renames are tracked as deletions and additions of the same or similar content. copy: bool, }, } /// Represents any possible change in order to turn one tree into another, with fully-owned data. #[derive(Debug, Clone, PartialEq)] pub enum Change { /// An entry was added, like the addition of a file or directory. Addition { /// The location of the file or directory. /// /// It may be empty if [file names](super::Options::location) is `None`. location: BString, /// Identifies a relationship between this instance and another one, /// making it easy to reconstruct the top-level of directory changes. relation: Option, /// The mode of the added entry. entry_mode: gix_object::tree::EntryMode, /// The object id of the added entry. id: gix_hash::ObjectId, }, /// An entry was deleted, like the deletion of a file or directory. Deletion { /// The location of the file or directory. /// /// It may be empty if [file names](super::Options::location) is `None`. location: BString, /// Identifies a relationship between this instance and another one, /// making it easy to reconstruct the top-level of directory changes. relation: Option, /// The mode of the deleted entry. entry_mode: gix_object::tree::EntryMode, /// The object id of the deleted entry. id: gix_hash::ObjectId, }, /// An entry was modified, e.g. changing the contents of a file adjusts its object id and turning /// a file into a symbolic link adjusts its mode. Modification { /// The location of the file or directory. /// /// It may be empty if [file names](super::Options::location) is `None`. location: BString, /// The mode of the entry before the modification. previous_entry_mode: gix_object::tree::EntryMode, /// The object id of the entry before the modification. previous_id: gix_hash::ObjectId, /// The mode of the entry after the modification. entry_mode: gix_object::tree::EntryMode, /// The object id after the modification. id: gix_hash::ObjectId, }, /// Entries are considered rewritten if they are not trees and they, according to some understanding of identity, were renamed /// or copied. /// In case of renames, this means they originally appeared as [`Deletion`](ChangeRef::Deletion) signalling their source as well as an /// [`Addition`](ChangeRef::Addition) acting as destination. /// /// In case of copies, the `copy` flag is true and typically represents a perfect copy of a source was made. /// /// This variant can only be encountered if [rewrite tracking](super::Options::rewrites) is enabled. /// /// Note that mode changes may have occurred as well, i.e. changes from executable to non-executable or vice-versa. Rewrite { /// The location of the source of the rename operation. /// /// It may be empty if [file names](super::Options::location) is `None`. source_location: BString, /// The mode of the entry before the rename. source_entry_mode: gix_object::tree::EntryMode, /// Identifies a relationship between the source and another source, /// making it easy to reconstruct the top-level of directory changes. source_relation: Option, /// The object id of the entry before the rename. /// /// Note that this is the same as `id` if we require the [similarity to be 100%](super::Rewrites::percentage), but may /// be different otherwise. source_id: gix_hash::ObjectId, /// Information about the diff we performed to detect similarity and match the `source_id` with the current state at `id`. /// It's `None` if `source_id` is equal to `id`, as identity made an actual diff computation unnecessary. diff: Option, /// The mode of the entry after the rename. /// It could differ but still be considered a rename as we are concerned only about content. entry_mode: gix_object::tree::EntryMode, /// The object id after the rename. id: gix_hash::ObjectId, /// The location after the rename or copy operation. /// /// It may be empty if [file names](super::Options::location) is `None`. location: BString, /// Identifies a relationship between this destination and another destination, /// making it easy to reconstruct the top-level of directory changes. relation: Option, /// If true, this rewrite is created by copy, and `source_id` is pointing to its source. Otherwise, it's a rename, and `source_id` /// points to a deleted object, as renames are tracked as deletions and additions of the same or similar content. copy: bool, }, } /// Lifecycle impl ChangeRef<'_> { /// Copy this instance into a fully-owned version pub fn into_owned(self) -> Change { match self { ChangeRef::Addition { location, entry_mode, id, relation, } => Change::Addition { location: location.to_owned(), entry_mode, id, relation, }, ChangeRef::Deletion { location, entry_mode, id, relation, } => Change::Deletion { location: location.to_owned(), entry_mode, id, relation, }, ChangeRef::Modification { location, previous_entry_mode, previous_id, entry_mode, id, } => Change::Modification { location: location.to_owned(), previous_entry_mode, previous_id, entry_mode, id, }, ChangeRef::Rewrite { source_location, source_relation, source_entry_mode, source_id, diff, entry_mode, id, location, relation, copy, } => Change::Rewrite { source_location: source_location.to_owned(), source_relation, source_entry_mode, source_id, diff, entry_mode, id, location: location.to_owned(), relation, copy, }, } } } /// Lifecycle impl Change { /// Return an attached version of this instance that uses `old_repo` for previous values and `new_repo` for current values. pub fn to_ref(&self) -> ChangeRef<'_> { match self { Change::Addition { location, relation, entry_mode, id, } => ChangeRef::Addition { location: location.as_bstr(), entry_mode: *entry_mode, id: *id, relation: *relation, }, Change::Deletion { location, relation, entry_mode, id, } => ChangeRef::Deletion { location: location.as_bstr(), entry_mode: *entry_mode, id: *id, relation: *relation, }, Change::Modification { location, previous_entry_mode, previous_id, entry_mode, id, } => ChangeRef::Modification { location: location.as_bstr(), previous_entry_mode: *previous_entry_mode, previous_id: *previous_id, entry_mode: *entry_mode, id: *id, }, Change::Rewrite { source_location, source_relation, source_entry_mode, source_id, diff, entry_mode, id, location, relation, copy, } => ChangeRef::Rewrite { source_location: source_location.as_ref(), source_relation: *source_relation, source_entry_mode: *source_entry_mode, source_id: *source_id, diff: *diff, entry_mode: *entry_mode, id: *id, location: location.as_bstr(), relation: *relation, copy: *copy, }, } } } impl crate::blob::Platform { /// Set ourselves up to produces blob-diffs from `change`, so this platform can be used to produce diffs easily. /// `objects` are used to fetch object data as needed. /// /// ### Warning about Memory Consumption /// /// This instance only grows, so one should call [`crate::blob::Platform::clear_resource_cache`] occasionally. pub fn set_resource_by_change( &mut self, change: ChangeRef<'_>, objects: &impl gix_object::FindObjectOrHeader, ) -> Result<&mut Self, crate::blob::platform::set_resource::Error> { match change { ChangeRef::Addition { location, relation: _, entry_mode, id, } => { self.set_resource( id.kind().null(), entry_mode.kind(), location, ResourceKind::OldOrSource, objects, )?; self.set_resource(id, entry_mode.kind(), location, ResourceKind::NewOrDestination, objects)?; } ChangeRef::Deletion { location, relation: _, entry_mode, id, } => { self.set_resource(id, entry_mode.kind(), location, ResourceKind::OldOrSource, objects)?; self.set_resource( id.kind().null(), entry_mode.kind(), location, ResourceKind::NewOrDestination, objects, )?; } ChangeRef::Modification { location, previous_entry_mode, previous_id, entry_mode, id, } => { self.set_resource( previous_id, previous_entry_mode.kind(), location, ResourceKind::OldOrSource, objects, )?; self.set_resource(id, entry_mode.kind(), location, ResourceKind::NewOrDestination, objects)?; } ChangeRef::Rewrite { source_location, source_relation: _, source_entry_mode, source_id, entry_mode, id, location, relation: _, diff: _, copy: _, } => { self.set_resource( source_id, source_entry_mode.kind(), source_location, ResourceKind::OldOrSource, objects, )?; self.set_resource(id, entry_mode.kind(), location, ResourceKind::NewOrDestination, objects)?; } } Ok(self) } } impl<'a> ChangeRef<'a> { /// Return the relation this instance may have to other changes. pub fn relation(&self) -> Option { match self { ChangeRef::Addition { relation, .. } | ChangeRef::Deletion { relation, .. } | ChangeRef::Rewrite { relation, .. } => *relation, ChangeRef::Modification { .. } => None, } } /// Return the current mode of this instance. pub fn entry_mode(&self) -> gix_object::tree::EntryMode { match self { ChangeRef::Addition { entry_mode, .. } | ChangeRef::Deletion { entry_mode, .. } | ChangeRef::Modification { entry_mode, .. } | ChangeRef::Rewrite { entry_mode, .. } => *entry_mode, } } /// Return the current mode of this instance, along with its object id. pub fn entry_mode_and_id(&self) -> (gix_object::tree::EntryMode, &gix_hash::oid) { match self { ChangeRef::Addition { entry_mode, id, .. } | ChangeRef::Deletion { entry_mode, id, .. } | ChangeRef::Modification { entry_mode, id, .. } | ChangeRef::Rewrite { entry_mode, id, .. } => (*entry_mode, id), } } /// Return the *previous* mode and id of the resource where possible, i.e. the source of a rename or copy, or a modification. pub fn source_entry_mode_and_id(&self) -> (gix_object::tree::EntryMode, &gix_hash::oid) { match self { ChangeRef::Addition { entry_mode, id, .. } | ChangeRef::Deletion { entry_mode, id, .. } | ChangeRef::Modification { previous_entry_mode: entry_mode, previous_id: id, .. } | ChangeRef::Rewrite { source_entry_mode: entry_mode, source_id: id, .. } => (*entry_mode, id), } } /// Return the *current* location of the resource, i.e. the destination of a rename or copy, or the /// location at which an addition, deletion or modification took place. pub fn location(&self) -> &'a BStr { match self { ChangeRef::Addition { location, .. } | ChangeRef::Deletion { location, .. } | ChangeRef::Modification { location, .. } | ChangeRef::Rewrite { location, .. } => location, } } /// Return the *previous* location of the resource where possible, i.e. the source of a rename or copy, or the /// location at which an addition, deletion or modification took place. pub fn source_location(&self) -> &BStr { match self { ChangeRef::Addition { location, .. } | ChangeRef::Deletion { location, .. } | ChangeRef::Modification { location, .. } => location, ChangeRef::Rewrite { source_location, .. } => source_location, } } } impl Change { /// Return the relation this instance may have to other changes. pub fn relation(&self) -> Option { match self { Change::Addition { relation, .. } | Change::Deletion { relation, .. } | Change::Rewrite { relation, .. } => *relation, Change::Modification { .. } => None, } } /// Return the current mode of this instance. pub fn entry_mode(&self) -> gix_object::tree::EntryMode { match self { Change::Addition { entry_mode, .. } | Change::Deletion { entry_mode, .. } | Change::Modification { entry_mode, .. } | Change::Rewrite { entry_mode, .. } => *entry_mode, } } /// Return the current mode of this instance, along with its object id. pub fn entry_mode_and_id(&self) -> (gix_object::tree::EntryMode, &gix_hash::oid) { match self { Change::Addition { entry_mode, id, .. } | Change::Deletion { entry_mode, id, .. } | Change::Modification { entry_mode, id, .. } | Change::Rewrite { entry_mode, id, .. } => (*entry_mode, id), } } /// Return the *previous* mode and id of the resource where possible, i.e. the source of a rename or copy, or a modification. pub fn source_entry_mode_and_id(&self) -> (gix_object::tree::EntryMode, &gix_hash::oid) { match self { Change::Addition { entry_mode, id, .. } | Change::Deletion { entry_mode, id, .. } | Change::Modification { previous_entry_mode: entry_mode, previous_id: id, .. } | Change::Rewrite { source_entry_mode: entry_mode, source_id: id, .. } => (*entry_mode, id), } } /// Return the *current* location of the resource, i.e. the destination of a rename or copy, or the /// location at which an addition, deletion or modification took place. pub fn location(&self) -> &BStr { match self { Change::Addition { location, .. } | Change::Deletion { location, .. } | Change::Modification { location, .. } | Change::Rewrite { location, .. } => location.as_bstr(), } } /// Return the *previous* location of the resource where possible, i.e. the source of a rename or copy, or the /// location at which an addition, deletion or modification took place. pub fn source_location(&self) -> &BStr { match self { Change::Addition { location, .. } | Change::Deletion { location, .. } | Change::Modification { location, .. } => location.as_bstr(), Change::Rewrite { source_location, .. } => source_location.as_bstr(), } } } # Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## 0.22.0 (2026-02-22) ### Commit Statistics - 1 commit contributed to the release over the course of 10 calendar days. - 12 days passed between releases. - 0 commits were understood as [conventional](https://www.conventionalcommits.org). - 0 issues like '(#ID)' were seen in commit messages ### Commit Details
view details * **Uncategorized** - Merge branch 'release' ([`9327b73`](https://github.com/GitoxideLabs/gitoxide/commit/9327b73785227f1322a327cb48fbb0800e1286ae))
## 0.21.0 (2026-02-10) ### Commit Statistics - 4 commits contributed to the release over the course of 19 calendar days. - 19 days passed between releases. - 0 commits were understood as [conventional](https://www.conventionalcommits.org). - 0 issues like '(#ID)' were seen in commit messages ### Commit Details
view details * **Uncategorized** - Release gix-error v0.1.0, gix-date v0.14.0, gix-actor v0.39.0, gix-trace v0.1.18, gix-path v0.11.1, gix-features v0.46.1, gix-hash v0.22.1, gix-object v0.56.0, gix-quote v0.6.2, gix-attributes v0.30.1, gix-command v0.7.1, gix-packetline v0.21.1, gix-filter v0.26.0, gix-fs v0.19.1, gix-chunk v0.6.0, gix-commitgraph v0.33.0, gix-revwalk v0.27.0, gix-traverse v0.53.0, gix-worktree-stream v0.28.0, gix-archive v0.28.0, gix-bitmap v0.2.16, gix-tempfile v21.0.1, gix-lock v21.0.1, gix-index v0.47.0, gix-config-value v0.17.1, gix-pathspec v0.15.1, gix-worktree v0.48.0, gix-diff v0.59.0, gix-blame v0.9.0, gix-ref v0.59.0, gix-sec v0.13.1, gix-config v0.52.0, gix-prompt v0.13.1, gix-url v0.35.1, gix-credentials v0.36.0, gix-discover v0.47.0, gix-dir v0.21.0, gix-mailmap v0.31.0, gix-revision v0.41.0, gix-merge v0.12.0, gix-negotiate v0.27.0, gix-pack v0.66.0, gix-odb v0.76.0, gix-refspec v0.37.0, gix-shallow v0.8.1, gix-transport v0.54.0, gix-protocol v0.57.0, gix-status v0.26.0, gix-submodule v0.26.0, gix-worktree-state v0.26.0, gix v0.79.0, safety bump 35 crates ([`d66ac10`](https://github.com/GitoxideLabs/gitoxide/commit/d66ac1057a5b7bfb608d4e6be585c69fb692bfee)) - Merge pull request #2407 from GitoxideLabs/dependabot/cargo/cargo-fb4135702f ([`8bceefb`](https://github.com/GitoxideLabs/gitoxide/commit/8bceefbfc5f897517bfdd24744695a82cfa0d5be)) - Bump the cargo group with 59 updates ([`7ce3c55`](https://github.com/GitoxideLabs/gitoxide/commit/7ce3c5587aec1ca813039c047783b9cb2a106826)) - Merge pull request #2393 from GitoxideLabs/report ([`f7d0975`](https://github.com/GitoxideLabs/gitoxide/commit/f7d09758d245aaa89409e39bb6ba1ed6b7118ea5))
## 0.20.0 (2026-01-22) ### New Features (BREAKING) - rename `State::entry_closest_to_directory(_icase)()` to `State::entry_closest_to_directory_or_directory(_icase)()`. This also changes the meaning, allowing it to return directory entries, which makes them a perfect match. - Use `std::ops::ControlFlow` where possible ### Commit Statistics - 10 commits contributed to the release over the course of 21 calendar days. - 21 days passed between releases. - 2 commits were understood as [conventional](https://www.conventionalcommits.org). - 1 unique issue was worked on: [#2363](https://github.com/GitoxideLabs/gitoxide/issues/2363) ### Commit Details
view details * **[#2363](https://github.com/GitoxideLabs/gitoxide/issues/2363)** - Regenerate all changelogs with a more recent CSR version ([`cbbdef5`](https://github.com/GitoxideLabs/gitoxide/commit/cbbdef5095b894a944a526fb57dfebeb0f3ab5eb)) * **Uncategorized** - Release gix-error v0.0.0, gix-date v0.13.0, gix-actor v0.38.0, gix-validate v0.11.0, gix-path v0.11.0, gix-features v0.46.0, gix-hash v0.22.0, gix-hashtable v0.12.0, gix-object v0.55.0, gix-glob v0.24.0, gix-attributes v0.30.0, gix-command v0.7.0, gix-packetline v0.21.0, gix-filter v0.25.0, gix-fs v0.19.0, gix-chunk v0.5.0, gix-commitgraph v0.32.0, gix-revwalk v0.26.0, gix-traverse v0.52.0, gix-worktree-stream v0.27.0, gix-archive v0.27.0, gix-tempfile v21.0.0, gix-lock v21.0.0, gix-index v0.46.0, gix-config-value v0.17.0, gix-pathspec v0.15.0, gix-ignore v0.19.0, gix-worktree v0.47.0, gix-diff v0.58.0, gix-blame v0.8.0, gix-ref v0.58.0, gix-sec v0.13.0, gix-config v0.51.0, gix-prompt v0.13.0, gix-url v0.35.0, gix-credentials v0.35.0, gix-discover v0.46.0, gix-dir v0.20.0, gix-mailmap v0.30.0, gix-revision v0.40.0, gix-merge v0.11.0, gix-negotiate v0.26.0, gix-pack v0.65.0, gix-odb v0.75.0, gix-refspec v0.36.0, gix-shallow v0.8.0, gix-transport v0.53.0, gix-protocol v0.56.0, gix-status v0.25.0, gix-submodule v0.25.0, gix-worktree-state v0.25.0, gix v0.78.0, gix-fsck v0.17.0, gitoxide-core v0.53.0, gitoxide v0.50.0, safety bump 50 crates ([`562e684`](https://github.com/GitoxideLabs/gitoxide/commit/562e684319fa649db6a96c0a22d64bbe3c11e9e6)) - Merge pull request #2382 from GitoxideLabs/improvements ([`12924d7`](https://github.com/GitoxideLabs/gitoxide/commit/12924d75a1e17e09220890d3cff82f0bf4355df9)) - Adapt to changes in `gix-index` ([`da53014`](https://github.com/GitoxideLabs/gitoxide/commit/da53014d549cb3ec1fd222aa18dd1777067048a6)) - Rename `State::entry_closest_to_directory(_icase)()` to `State::entry_closest_to_directory_or_directory(_icase)()`. ([`95a8d2d`](https://github.com/GitoxideLabs/gitoxide/commit/95a8d2dd76f2f5e1b7d2201e8410b778c4d730f8)) - Use `std::ops::ControlFlow` where possible ([`5c1bd03`](https://github.com/GitoxideLabs/gitoxide/commit/5c1bd0387f98eee37265a42ba4b6624c783c9a71)) - Merge pull request #2364 from GitoxideLabs/changelogs ([`0a333e5`](https://github.com/GitoxideLabs/gitoxide/commit/0a333e5941a0a58727c694fcf7dc48f95d7481db)) - Merge pull request #2346 from GitoxideLabs/release ([`c663b3f`](https://github.com/GitoxideLabs/gitoxide/commit/c663b3f05791db86d2e0a683e26e149f620bf2e4)) - Release gix-trace v0.1.17, gix-features v0.45.2, gix-command v0.6.5, gix-hash v0.21.2, gix-date v0.12.1, gix-actor v0.37.1, gix-object v0.54.1, gix-filter v0.24.1, gix-fs v0.18.2, gix-tempfile v20.0.1, gix-lock v20.0.1, gix-traverse v0.51.1, gix-index v0.45.1, gix-diff v0.57.1, gix-pack v0.64.1 ([`7be8f90`](https://github.com/GitoxideLabs/gitoxide/commit/7be8f9068ab875ca4123300ba08df9d32fd63941)) - Merge pull request #2322 from GitoxideLabs/report ([`211b4fb`](https://github.com/GitoxideLabs/gitoxide/commit/211b4fb5a31792eda91191789f3656c217960986))
## 0.19.0 (2025-12-31) ### Commit Statistics - 2 commits contributed to the release over the course of 9 calendar days. - 9 days passed between releases. - 0 commits were understood as [conventional](https://www.conventionalcommits.org). - 0 issues like '(#ID)' were seen in commit messages ### Commit Details
view details * **Uncategorized** - Release gix-date v0.12.0, gix-actor v0.37.0, gix-features v0.45.1, gix-hash v0.21.1, gix-object v0.54.0, gix-filter v0.24.0, gix-fs v0.18.1, gix-revwalk v0.25.0, gix-traverse v0.51.0, gix-worktree-stream v0.26.0, gix-archive v0.26.0, gix-index v0.45.0, gix-worktree v0.46.0, gix-diff v0.57.0, gix-blame v0.7.0, gix-ref v0.57.0, gix-config v0.50.0, gix-credentials v0.34.0, gix-discover v0.45.0, gix-dir v0.19.0, gix-mailmap v0.29.0, gix-revision v0.39.0, gix-merge v0.10.0, gix-negotiate v0.25.0, gix-pack v0.64.0, gix-odb v0.74.0, gix-refspec v0.35.0, gix-transport v0.52.0, gix-protocol v0.55.0, gix-status v0.24.0, gix-submodule v0.24.0, gix-worktree-state v0.24.0, gix v0.77.0, gix-fsck v0.16.0, gitoxide-core v0.52.0, gitoxide v0.49.0, safety bump 32 crates ([`115e208`](https://github.com/GitoxideLabs/gitoxide/commit/115e208b7bc7a96024e64ea872f2731b5125a6e0)) - Merge pull request #2299 from GitoxideLabs/report ([`d6c5b9d`](https://github.com/GitoxideLabs/gitoxide/commit/d6c5b9d7843c24663ffcf20bd756ea3eb747ca0a))
## 0.18.0 (2025-12-22) ### Commit Statistics - 1 commit contributed to the release. - 29 days passed between releases. - 0 commits were understood as [conventional](https://www.conventionalcommits.org). - 0 issues like '(#ID)' were seen in commit messages ### Commit Details
view details * **Uncategorized** - Release gix-date v0.11.1, gix-actor v0.36.1, gix-trace v0.1.16, gix-features v0.45.0, gix-hash v0.21.0, gix-hashtable v0.11.0, gix-object v0.53.0, gix-glob v0.23.0, gix-attributes v0.29.0, gix-filter v0.23.0, gix-fs v0.18.0, gix-commitgraph v0.31.0, gix-revwalk v0.24.0, gix-traverse v0.50.0, gix-worktree-stream v0.25.0, gix-archive v0.25.0, gix-tempfile v20.0.0, gix-lock v20.0.0, gix-index v0.44.0, gix-config-value v0.16.0, gix-pathspec v0.14.0, gix-ignore v0.18.0, gix-worktree v0.45.0, gix-diff v0.56.0, gix-blame v0.6.0, gix-ref v0.56.0, gix-config v0.49.0, gix-prompt v0.12.0, gix-url v0.34.0, gix-credentials v0.33.0, gix-discover v0.44.0, gix-dir v0.18.0, gix-mailmap v0.28.1, gix-revision v0.38.0, gix-merge v0.9.0, gix-negotiate v0.24.0, gix-pack v0.63.0, gix-odb v0.73.0, gix-refspec v0.34.0, gix-shallow v0.7.0, gix-transport v0.51.0, gix-protocol v0.54.0, gix-status v0.23.0, gix-submodule v0.23.0, gix-worktree-state v0.23.0, gix v0.76.0, gix-fsck v0.15.0, gitoxide-core v0.51.0, gitoxide v0.48.0, safety bump 43 crates ([`21fecdf`](https://github.com/GitoxideLabs/gitoxide/commit/21fecdf928336ac5fa3dd1402f92e8200d8aff62))
## 0.17.0 (2025-11-22) ### Commit Statistics - 2 commits contributed to the release. - 0 commits were understood as [conventional](https://www.conventionalcommits.org). - 0 issues like '(#ID)' were seen in commit messages ### Commit Details
view details * **Uncategorized** - Release gix-date v0.11.0, gix-actor v0.36.0, gix-path v0.10.22, gix-object v0.52.0, gix-packetline v0.20.0, gix-filter v0.22.0, gix-revwalk v0.23.0, gix-traverse v0.49.0, gix-worktree-stream v0.24.0, gix-archive v0.24.0, gix-index v0.43.0, gix-worktree v0.44.0, gix-diff v0.55.0, gix-blame v0.5.0, gix-ref v0.55.0, gix-config v0.48.0, gix-url v0.33.2, gix-credentials v0.32.0, gix-discover v0.43.0, gix-dir v0.17.0, gix-mailmap v0.28.0, gix-revision v0.37.0, gix-merge v0.8.0, gix-negotiate v0.23.0, gix-pack v0.62.0, gix-odb v0.72.0, gix-refspec v0.33.0, gix-transport v0.50.0, gix-protocol v0.53.0, gix-status v0.22.0, gix-submodule v0.22.0, gix-worktree-state v0.22.0, gix v0.75.0, gix-fsck v0.14.0, gitoxide-core v0.50.0, gitoxide v0.47.0, safety bump 32 crates ([`82ff92f`](https://github.com/GitoxideLabs/gitoxide/commit/82ff92fa943bad88dc7d5bfa100404de477a3608)) - Merge pull request #2224 from GitoxideLabs/report ([`3313233`](https://github.com/GitoxideLabs/gitoxide/commit/3313233aa4e7009aed0ddf644f4271fd2a98e8d4))
## 0.16.0 (2025-10-22) ### Commit Statistics - 12 commits contributed to the release over the course of 99 calendar days. - 99 days passed between releases. - 0 commits were understood as [conventional](https://www.conventionalcommits.org). - 0 issues like '(#ID)' were seen in commit messages ### Commit Details
view details * **Uncategorized** - Release gix-dir v0.16.0, gix-mailmap v0.27.3, gix-revision v0.36.0, gix-merge v0.7.0, gix-negotiate v0.22.0, gix-pack v0.61.0, gix-odb v0.71.0, gix-refspec v0.32.0, gix-shallow v0.6.0, gix-packetline v0.19.2, gix-transport v0.49.0, gix-protocol v0.52.0, gix-status v0.21.0, gix-submodule v0.21.0, gix-worktree-state v0.21.0, gix v0.74.0, gix-fsck v0.13.0, gitoxide-core v0.49.0, gitoxide v0.46.0 ([`49f8d53`](https://github.com/GitoxideLabs/gitoxide/commit/49f8d5373501c82699fec76809f4d445c3327c5a)) - Release gix-date v0.10.6, gix-utils v0.3.1, gix-actor v0.35.5, gix-trace v0.1.14, gix-validate v0.10.1, gix-path v0.10.21, gix-features v0.44.0, gix-hash v0.20.0, gix-hashtable v0.10.0, gix-object v0.51.0, gix-glob v0.22.0, gix-quote v0.6.1, gix-attributes v0.28.0, gix-command v0.6.3, gix-packetline-blocking v0.19.2, gix-filter v0.21.0, gix-fs v0.17.0, gix-chunk v0.4.12, gix-commitgraph v0.30.0, gix-revwalk v0.22.0, gix-traverse v0.48.0, gix-worktree-stream v0.23.0, gix-archive v0.23.0, gix-bitmap v0.2.15, gix-tempfile v19.0.0, gix-lock v19.0.0, gix-index v0.42.0, gix-config-value v0.15.2, gix-pathspec v0.13.0, gix-ignore v0.17.0, gix-worktree v0.43.0, gix-diff v0.54.0, gix-blame v0.4.0, gix-ref v0.54.0, gix-sec v0.12.1, gix-config v0.47.0, gix-prompt v0.11.2, gix-url v0.33.0, gix-credentials v0.31.0, gix-discover v0.42.0, gix-dir v0.16.0, gix-mailmap v0.27.3, gix-revision v0.36.0, gix-merge v0.7.0, gix-negotiate v0.22.0, gix-pack v0.61.0, gix-odb v0.71.0, gix-refspec v0.32.0, gix-shallow v0.6.0, gix-packetline v0.19.2, gix-transport v0.49.0, gix-protocol v0.52.0, gix-status v0.21.0, gix-submodule v0.21.0, gix-worktree-state v0.21.0, gix v0.74.0, gix-fsck v0.13.0, gitoxide-core v0.49.0, gitoxide v0.46.0, safety bump 42 crates ([`89fb308`](https://github.com/GitoxideLabs/gitoxide/commit/89fb308f1283b404b55916304f7d161fbf13fe10)) - Merge pull request #2217 from GitoxideLabs/copilot/update-msrv-to-rust-1-82 ([`4da2927`](https://github.com/GitoxideLabs/gitoxide/commit/4da2927629c7ec95b96d62a387c61097e3fc71fa)) - Fixup Copilot commits and thank clippy ([`b188a7d`](https://github.com/GitoxideLabs/gitoxide/commit/b188a7d834979eaa940fd94ec269367cd922d16d)) - Update MSRV to 1.82 and replace once_cell with std equivalents ([`6cc8464`](https://github.com/GitoxideLabs/gitoxide/commit/6cc84641cb7be6f70468a90efaafcf142a6b8c4b)) - Merge pull request #2202 from GitoxideLabs/dependabot/cargo/cargo-4a7155215a ([`9365cc3`](https://github.com/GitoxideLabs/gitoxide/commit/9365cc3ae8ad92ba2703170ac2f9a1e4df2ac3be)) - Bump the cargo group across 1 directory with 64 updates ([`838ff95`](https://github.com/GitoxideLabs/gitoxide/commit/838ff95cca60c453bd97bd458ce31b384d00347e)) - Merge pull request #2113 from GitoxideLabs/release ([`dc7343c`](https://github.com/GitoxideLabs/gitoxide/commit/dc7343c25ec6a62445e52694f7f0d3f95f31edef)) - Release gix-actor v0.35.4, gix-fs v0.16.1, gix-object v0.50.2, gix-ref v0.53.1 ([`79ba9d0`](https://github.com/GitoxideLabs/gitoxide/commit/79ba9d009ca7536fadfe27b4fa56d1460327c906)) - Merge pull request #2100 from GitoxideLabs/release ([`202bc6d`](https://github.com/GitoxideLabs/gitoxide/commit/202bc6da79854d1fb6bb32b9c6bb2a6f882c77f5)) - Release gix-actor v0.35.3, gix-path v0.10.20, gix-features v0.43.1, gix-object v0.50.1 ([`d64f257`](https://github.com/GitoxideLabs/gitoxide/commit/d64f257951754ea70b0179b83f76de957b712211)) - Merge pull request #2075 from GitoxideLabs/improvements ([`784c046`](https://github.com/GitoxideLabs/gitoxide/commit/784c0465bf87011fe7dbf71a590d3f9e6c8696a8))
## 0.15.0 (2025-07-15) A maintenance release without user-facing changes. ### Commit Statistics - 7 commits contributed to the release over the course of 79 calendar days. - 79 days passed between releases. - 0 commits were understood as [conventional](https://www.conventionalcommits.org). - 0 issues like '(#ID)' were seen in commit messages ### Commit Details
view details * **Uncategorized** - Release gix-date v0.10.3, gix-actor v0.35.2, gix-trace v0.1.13, gix-path v0.10.19, gix-features v0.43.0, gix-hash v0.19.0, gix-hashtable v0.9.0, gix-object v0.50.0, gix-glob v0.21.0, gix-attributes v0.27.0, gix-command v0.6.2, gix-packetline-blocking v0.19.1, gix-filter v0.20.0, gix-fs v0.16.0, gix-commitgraph v0.29.0, gix-revwalk v0.21.0, gix-traverse v0.47.0, gix-worktree-stream v0.22.0, gix-archive v0.22.0, gix-tempfile v18.0.0, gix-lock v18.0.0, gix-index v0.41.0, gix-config-value v0.15.1, gix-pathspec v0.12.0, gix-ignore v0.16.0, gix-worktree v0.42.0, gix-diff v0.53.0, gix-blame v0.3.0, gix-ref v0.53.0, gix-sec v0.12.0, gix-config v0.46.0, gix-prompt v0.11.1, gix-url v0.32.0, gix-credentials v0.30.0, gix-discover v0.41.0, gix-dir v0.15.0, gix-mailmap v0.27.2, gix-revision v0.35.0, gix-merge v0.6.0, gix-negotiate v0.21.0, gix-pack v0.60.0, gix-odb v0.70.0, gix-refspec v0.31.0, gix-shallow v0.5.0, gix-packetline v0.19.1, gix-transport v0.48.0, gix-protocol v0.51.0, gix-status v0.20.0, gix-submodule v0.20.0, gix-worktree-state v0.20.0, gix v0.73.0, gix-fsck v0.12.0, gitoxide-core v0.48.0, gitoxide v0.45.0, safety bump 43 crates ([`5a919c4`](https://github.com/GitoxideLabs/gitoxide/commit/5a919c48393020d47c7034946108577dd213b80a)) - Update changelogs prior to release ([`65037b5`](https://github.com/GitoxideLabs/gitoxide/commit/65037b56918b90ac07454a815b0ed136df2fca3b)) - Merge pull request #2019 from GitoxideLabs/precious-opt-in ([`5f9de52`](https://github.com/GitoxideLabs/gitoxide/commit/5f9de52cf286163b503047b1ab3b51dfa093b4d4)) - Adapt to changes in `gix-ignore` and `gix-glob`, and more. ([`4ef7806`](https://github.com/GitoxideLabs/gitoxide/commit/4ef7806e62954d069861bddb06cb8c0baf47bb69)) - Merge pull request #2009 from GitoxideLabs/release-gix-index ([`c3f06ae`](https://github.com/GitoxideLabs/gitoxide/commit/c3f06ae424ab4e1918a364cabe8276297465a73a)) - Release gix-path v0.10.18, gix-date v0.10.2, gix-traverse v0.46.2, gix-index v0.40.1 ([`d2b4c44`](https://github.com/GitoxideLabs/gitoxide/commit/d2b4c44fcb2bf43e80d67532262631a5086f08de)) - Merge pull request #1971 from GitoxideLabs/new-release ([`8d4c4d1`](https://github.com/GitoxideLabs/gitoxide/commit/8d4c4d1e09f84c962c29d98a686c64228196ac13))
## 0.14.1 (2025-04-26) ### Commit Statistics - 3 commits contributed to the release. - 0 commits were understood as [conventional](https://www.conventionalcommits.org). - 0 issues like '(#ID)' were seen in commit messages ### Commit Details
view details * **Uncategorized** - Release gix-date v0.10.1, gix-utils v0.3.0, gix-actor v0.35.1, gix-validate v0.10.0, gix-path v0.10.17, gix-features v0.42.1, gix-hash v0.18.0, gix-hashtable v0.8.1, gix-object v0.49.1, gix-glob v0.20.0, gix-quote v0.6.0, gix-attributes v0.26.0, gix-command v0.6.0, gix-packetline-blocking v0.19.0, gix-filter v0.19.1, gix-fs v0.15.0, gix-commitgraph v0.28.0, gix-revwalk v0.20.1, gix-traverse v0.46.1, gix-worktree-stream v0.21.1, gix-archive v0.21.1, gix-tempfile v17.1.0, gix-lock v17.1.0, gix-index v0.40.0, gix-config-value v0.15.0, gix-pathspec v0.11.0, gix-ignore v0.15.0, gix-worktree v0.41.0, gix-diff v0.52.1, gix-blame v0.2.1, gix-ref v0.52.1, gix-sec v0.11.0, gix-config v0.45.1, gix-prompt v0.11.0, gix-url v0.31.0, gix-credentials v0.29.0, gix-discover v0.40.1, gix-dir v0.14.1, gix-mailmap v0.27.1, gix-revision v0.34.1, gix-merge v0.5.1, gix-negotiate v0.20.1, gix-pack v0.59.1, gix-odb v0.69.1, gix-refspec v0.30.1, gix-shallow v0.4.0, gix-packetline v0.19.0, gix-transport v0.47.0, gix-protocol v0.50.1, gix-status v0.19.1, gix-submodule v0.19.1, gix-worktree-state v0.19.0, gix v0.72.1, gix-fsck v0.11.1, gitoxide-core v0.47.1, gitoxide v0.44.0 ([`e104545`](https://github.com/GitoxideLabs/gitoxide/commit/e104545b78951ca882481d4a58f4425a8bc81c87)) - Bump all prior pratch levels to majors ([`5f7f805`](https://github.com/GitoxideLabs/gitoxide/commit/5f7f80570e1a5522e76ea58cccbb957249a0dffe)) - Merge pull request #1969 from GitoxideLabs/new-release ([`631f07a`](https://github.com/GitoxideLabs/gitoxide/commit/631f07ad0c1cb93d9da42cf2c8499584fe91880a))
## 0.14.0 (2025-04-25) A maintenance release without user-facing changes. ### Commit Statistics - 9 commits contributed to the release. - 0 commits were understood as [conventional](https://www.conventionalcommits.org). - 0 issues like '(#ID)' were seen in commit messages ### Commit Details
view details * **Uncategorized** - Release gix-path v0.10.16, gix-features v0.42.0, gix-hash v0.17.1, gix-object v0.49.0, gix-glob v0.19.1, gix-quote v0.5.1, gix-attributes v0.25.1, gix-command v0.5.1, gix-packetline-blocking v0.18.4, gix-filter v0.19.0, gix-fs v0.14.1, gix-commitgraph v0.27.1, gix-revwalk v0.20.0, gix-traverse v0.46.0, gix-worktree-stream v0.21.0, gix-archive v0.21.0, gix-tempfile v17.0.1, gix-lock v17.0.1, gix-index v0.39.1, gix-config-value v0.14.13, gix-pathspec v0.10.1, gix-ignore v0.14.1, gix-worktree v0.40.1, gix-diff v0.52.0, gix-blame v0.2.0, gix-ref v0.52.0, gix-sec v0.10.13, gix-config v0.45.0, gix-prompt v0.10.1, gix-url v0.30.1, gix-credentials v0.28.1, gix-discover v0.40.0, gix-dir v0.14.0, gix-mailmap v0.27.0, gix-revision v0.34.0, gix-merge v0.5.0, gix-negotiate v0.20.0, gix-pack v0.59.0, gix-odb v0.69.0, gix-refspec v0.30.0, gix-shallow v0.3.1, gix-packetline v0.18.5, gix-transport v0.46.1, gix-protocol v0.50.0, gix-status v0.19.0, gix-submodule v0.19.0, gix-worktree-state v0.18.1, gix v0.72.0, gix-fsck v0.11.0, gitoxide-core v0.47.0, gitoxide v0.43.0 ([`cc5b696`](https://github.com/GitoxideLabs/gitoxide/commit/cc5b696b7b73277ddcc3ef246714cf80a092cf76)) - Adjusting changelogs prior to release of gix-path v0.10.16, gix-features v0.42.0, gix-hash v0.17.1, gix-object v0.49.0, gix-glob v0.19.1, gix-quote v0.5.1, gix-attributes v0.25.1, gix-command v0.5.1, gix-packetline-blocking v0.18.4, gix-filter v0.19.0, gix-fs v0.14.1, gix-commitgraph v0.27.1, gix-revwalk v0.20.0, gix-traverse v0.46.0, gix-worktree-stream v0.21.0, gix-archive v0.21.0, gix-tempfile v17.0.1, gix-lock v17.0.1, gix-index v0.39.1, gix-config-value v0.14.13, gix-pathspec v0.10.1, gix-ignore v0.14.1, gix-worktree v0.40.1, gix-diff v0.52.0, gix-blame v0.2.0, gix-ref v0.52.0, gix-sec v0.10.13, gix-config v0.45.0, gix-prompt v0.10.1, gix-url v0.30.1, gix-credentials v0.28.1, gix-discover v0.40.0, gix-dir v0.14.0, gix-mailmap v0.27.0, gix-revision v0.34.0, gix-merge v0.5.0, gix-negotiate v0.20.0, gix-pack v0.59.0, gix-odb v0.69.0, gix-refspec v0.30.0, gix-shallow v0.3.1, gix-packetline v0.18.5, gix-transport v0.46.1, gix-protocol v0.50.0, gix-status v0.19.0, gix-submodule v0.19.0, gix-worktree-state v0.18.1, gix v0.72.0, gix-fsck v0.11.0, gitoxide-core v0.47.0, gitoxide v0.43.0, safety bump 7 crates ([`49fa9f3`](https://github.com/GitoxideLabs/gitoxide/commit/49fa9f38110ba975d68f5ac3baefeb55f0a0501b)) - Release gix-date v0.10.0, gix-utils v0.2.1, gix-actor v0.35.0, gix-validate v0.9.5, gix-path v0.10.15, gix-features v0.42.0, gix-hash v0.17.1, gix-object v0.49.0, gix-glob v0.19.1, gix-quote v0.5.1, gix-attributes v0.25.0, gix-command v0.5.1, gix-packetline-blocking v0.18.4, gix-filter v0.19.0, gix-fs v0.14.0, gix-commitgraph v0.27.1, gix-revwalk v0.20.0, gix-traverse v0.46.0, gix-worktree-stream v0.21.0, gix-archive v0.21.0, gix-tempfile v17.0.1, gix-lock v17.0.1, gix-index v0.39.0, gix-config-value v0.14.13, gix-pathspec v0.10.1, gix-ignore v0.14.1, gix-worktree v0.40.0, gix-diff v0.52.0, gix-blame v0.2.0, gix-ref v0.51.0, gix-sec v0.10.13, gix-config v0.45.0, gix-prompt v0.10.1, gix-url v0.30.1, gix-credentials v0.28.1, gix-discover v0.40.0, gix-dir v0.14.0, gix-mailmap v0.27.0, gix-revision v0.34.0, gix-merge v0.5.0, gix-negotiate v0.20.0, gix-pack v0.59.0, gix-odb v0.69.0, gix-refspec v0.30.0, gix-shallow v0.3.1, gix-packetline v0.18.5, gix-transport v0.46.0, gix-protocol v0.50.0, gix-status v0.19.0, gix-submodule v0.19.0, gix-worktree-state v0.18.0, gix v0.72.0, gix-fsck v0.11.0, gitoxide-core v0.46.0, gitoxide v0.43.0, safety bump 30 crates ([`db0b095`](https://github.com/GitoxideLabs/gitoxide/commit/db0b0957930e3ebb1b3f05ed8d7e7a557eb384a2)) - Update changelogs prior to release ([`0bf84db`](https://github.com/GitoxideLabs/gitoxide/commit/0bf84dbc041f59efba06adcf422c60b5d6e350f0)) - Merge pull request #1935 from pierrechevalier83/fix_1923 ([`3b1bef7`](https://github.com/GitoxideLabs/gitoxide/commit/3b1bef7cc40e16b61bcc117ca90ebae21df7c7b1)) - J fmt ([`c3c6504`](https://github.com/GitoxideLabs/gitoxide/commit/c3c650448f92bcb27194ce0a51f7d604ce87920d)) - Merge pull request #1949 from GitoxideLabs/dependabot/cargo/cargo-6893e2988a ([`b5e9059`](https://github.com/GitoxideLabs/gitoxide/commit/b5e905991155ace32ef21464e69a8369a773f02b)) - Bump the cargo group with 21 updates ([`68e6b2e`](https://github.com/GitoxideLabs/gitoxide/commit/68e6b2e54613fe788d645ea8c942c71a39c6ede1)) - Merge pull request #1919 from GitoxideLabs/release ([`420e730`](https://github.com/GitoxideLabs/gitoxide/commit/420e730f765b91e1d17daca6bb1f99bdb2e54fda))
## 0.13.0 (2025-04-04) A maintenance release without user-facing changes. ### Commit Statistics - 7 commits contributed to the release. - 0 commits were understood as [conventional](https://www.conventionalcommits.org). - 0 issues like '(#ID)' were seen in commit messages ### Commit Details
view details * **Uncategorized** - Release gix-dir v0.13.0, gix-mailmap v0.26.0, gix-revision v0.33.0, gix-merge v0.4.0, gix-negotiate v0.19.0, gix-pack v0.58.0, gix-odb v0.68.0, gix-refspec v0.29.0, gix-shallow v0.3.0, gix-packetline v0.18.4, gix-transport v0.46.0, gix-protocol v0.49.0, gix-status v0.18.0, gix-submodule v0.18.0, gix-worktree-state v0.18.0, gix v0.71.0, gix-fsck v0.10.0, gitoxide-core v0.46.0, gitoxide v0.42.0 ([`d248e3d`](https://github.com/GitoxideLabs/gitoxide/commit/d248e3d87d45ca3983cb9fd7c6143dacbd8301cc)) - Release gix-sec v0.10.12, gix-config v0.44.0, gix-prompt v0.10.0, gix-url v0.30.0, gix-credentials v0.28.0, gix-discover v0.39.0, gix-dir v0.13.0, gix-mailmap v0.26.0, gix-revision v0.33.0, gix-merge v0.4.0, gix-negotiate v0.19.0, gix-pack v0.58.0, gix-odb v0.68.0, gix-refspec v0.29.0, gix-shallow v0.3.0, gix-packetline v0.18.4, gix-transport v0.46.0, gix-protocol v0.49.0, gix-status v0.18.0, gix-submodule v0.18.0, gix-worktree-state v0.18.0, gix v0.71.0, gix-fsck v0.10.0, gitoxide-core v0.46.0, gitoxide v0.42.0 ([`ada5a94`](https://github.com/GitoxideLabs/gitoxide/commit/ada5a9447dc3c210afbd8866fe939c3f3a024226)) - Release gix-date v0.9.4, gix-utils v0.2.0, gix-actor v0.34.0, gix-features v0.41.0, gix-hash v0.17.0, gix-hashtable v0.8.0, gix-path v0.10.15, gix-validate v0.9.4, gix-object v0.48.0, gix-glob v0.19.0, gix-quote v0.5.0, gix-attributes v0.25.0, gix-command v0.5.0, gix-packetline-blocking v0.18.3, gix-filter v0.18.0, gix-fs v0.14.0, gix-commitgraph v0.27.0, gix-revwalk v0.19.0, gix-traverse v0.45.0, gix-worktree-stream v0.20.0, gix-archive v0.20.0, gix-tempfile v17.0.0, gix-lock v17.0.0, gix-index v0.39.0, gix-config-value v0.14.12, gix-pathspec v0.10.0, gix-ignore v0.14.0, gix-worktree v0.40.0, gix-diff v0.51.0, gix-blame v0.1.0, gix-ref v0.51.0, gix-config v0.44.0, gix-prompt v0.10.0, gix-url v0.30.0, gix-credentials v0.28.0, gix-discover v0.39.0, gix-dir v0.13.0, gix-mailmap v0.26.0, gix-revision v0.33.0, gix-merge v0.4.0, gix-negotiate v0.19.0, gix-pack v0.58.0, gix-odb v0.68.0, gix-refspec v0.29.0, gix-shallow v0.3.0, gix-packetline v0.18.4, gix-transport v0.46.0, gix-protocol v0.49.0, gix-status v0.18.0, gix-submodule v0.18.0, gix-worktree-state v0.18.0, gix v0.71.0, gix-fsck v0.10.0, gitoxide-core v0.46.0, gitoxide v0.42.0, safety bump 48 crates ([`b41312b`](https://github.com/GitoxideLabs/gitoxide/commit/b41312b478b0d19efb330970cf36dba45d0fbfbd)) - Update changelogs prior to release ([`38dff41`](https://github.com/GitoxideLabs/gitoxide/commit/38dff41d09b6841ff52435464e77cd012dce7645)) - Merge pull request #1907 from EliahKagan/run-ci/raw ([`7b17da6`](https://github.com/GitoxideLabs/gitoxide/commit/7b17da6ca1dce275de0d32d0b0d6c238621e6ee3)) - Drop trailing `,` just before `)` on same line in function calls ([`66a5ae1`](https://github.com/GitoxideLabs/gitoxide/commit/66a5ae1b586d583066402c801213a55141e2aad6)) - Merge pull request #1778 from GitoxideLabs/new-release ([`8df0db2`](https://github.com/GitoxideLabs/gitoxide/commit/8df0db2f8fe1832a5efd86d6aba6fb12c4c855de))
## 0.12.0 (2025-01-18) ### Chore - bump `rust-version` to 1.70 That way clippy will allow to use the fantastic `Option::is_some_and()` and friends. ### Commit Statistics - 7 commits contributed to the release over the course of 27 calendar days. - 27 days passed between releases. - 1 commit was understood as [conventional](https://www.conventionalcommits.org). - 0 issues like '(#ID)' were seen in commit messages ### Thanks Clippy [Clippy](https://github.com/rust-lang/rust-clippy) helped 1 time to make code idiomatic. ### Commit Details
view details * **Uncategorized** - Release gix-utils v0.1.14, gix-actor v0.33.2, gix-hash v0.16.0, gix-trace v0.1.12, gix-features v0.40.0, gix-hashtable v0.7.0, gix-path v0.10.14, gix-validate v0.9.3, gix-object v0.47.0, gix-glob v0.18.0, gix-quote v0.4.15, gix-attributes v0.24.0, gix-command v0.4.1, gix-packetline-blocking v0.18.2, gix-filter v0.17.0, gix-fs v0.13.0, gix-chunk v0.4.11, gix-commitgraph v0.26.0, gix-revwalk v0.18.0, gix-traverse v0.44.0, gix-worktree-stream v0.19.0, gix-archive v0.19.0, gix-bitmap v0.2.14, gix-tempfile v16.0.0, gix-lock v16.0.0, gix-index v0.38.0, gix-config-value v0.14.11, gix-pathspec v0.9.0, gix-ignore v0.13.0, gix-worktree v0.39.0, gix-diff v0.50.0, gix-blame v0.0.0, gix-ref v0.50.0, gix-sec v0.10.11, gix-config v0.43.0, gix-prompt v0.9.1, gix-url v0.29.0, gix-credentials v0.27.0, gix-discover v0.38.0, gix-dir v0.12.0, gix-mailmap v0.25.2, gix-revision v0.32.0, gix-merge v0.3.0, gix-negotiate v0.18.0, gix-pack v0.57.0, gix-odb v0.67.0, gix-refspec v0.28.0, gix-shallow v0.2.0, gix-packetline v0.18.3, gix-transport v0.45.0, gix-protocol v0.48.0, gix-status v0.17.0, gix-submodule v0.17.0, gix-worktree-state v0.17.0, gix v0.70.0, gix-fsck v0.9.0, gitoxide-core v0.45.0, gitoxide v0.41.0, safety bump 42 crates ([`dea106a`](https://github.com/GitoxideLabs/gitoxide/commit/dea106a8c4fecc1f0a8f891a2691ad9c63964d25)) - Update all changelogs prior to release ([`1f6390c`](https://github.com/GitoxideLabs/gitoxide/commit/1f6390c53ba68ce203ae59eb3545e2631dd8a106)) - Merge pull request #1762 from GitoxideLabs/fix-1759 ([`7ec21bb`](https://github.com/GitoxideLabs/gitoxide/commit/7ec21bb96ce05b29dde74b2efdf22b6e43189aab)) - Bump `rust-version` to 1.70 ([`17835bc`](https://github.com/GitoxideLabs/gitoxide/commit/17835bccb066bbc47cc137e8ec5d9fe7d5665af0)) - Merge pull request #1752 from GitoxideLabs/git-shell ([`1ca480a`](https://github.com/GitoxideLabs/gitoxide/commit/1ca480aa4093328a7e047e770fdffdb8cc6d8e8d)) - Thanks clippy ([`9193b05`](https://github.com/GitoxideLabs/gitoxide/commit/9193b05b2528f62d829447ccc50314bd4cffc415)) - Merge pull request #1739 from GitoxideLabs/new-release ([`d22937f`](https://github.com/GitoxideLabs/gitoxide/commit/d22937f91b8ecd0ece0930c4df9d580f3819b2fe))
## 0.11.0 (2024-12-22) ### Other - Clarify and expand descriptions of `NonFile`s Discussed in: https://github.com/GitoxideLabs/gitoxide/pull/1730#discussion_r1894381449 At least for now, they remain called `NonFile`s (and sometimes referred to as "non-files" in text), but more specifically defined. ### Bug Fixes (BREAKING) - rename `entry::Kind::NonFile` to `entry::Kind::Untrackable`. - Add `entry::Kind::NonFile`. Previously, these were misclassified as `File`, which can lead to blocking applications which get stuck reading pipes. Now the downstream is forced to deal with the possibility that the item at hand isn't a file, to do application-specific things. - assure `fifo` or non-files aren't considered files, but are pruned instead. That way, algorithms relying on dirwalking can still see them if they want to, but would have a hard time to use them (accidentally). Note that this replaces the `From` implementation with `entry::Kind::try_from_file_type()`, which makes this a breaking change.` ### Commit Statistics - 14 commits contributed to the release over the course of 28 calendar days. - 28 days passed between releases. - 4 commits were understood as [conventional](https://www.conventionalcommits.org). - 0 issues like '(#ID)' were seen in commit messages ### Commit Details
view details * **Uncategorized** - Release gix-dir v0.11.0, gix-revision v0.31.1, gix-merge v0.2.0, gix-pack v0.56.0, gix-odb v0.66.0, gix-shallow v0.1.0, gix-packetline v0.18.2, gix-transport v0.44.0, gix-protocol v0.47.0, gix-status v0.16.0, gix-worktree-state v0.16.0, gix v0.69.0, gitoxide-core v0.44.0, gitoxide v0.40.0 ([`beb0ea8`](https://github.com/GitoxideLabs/gitoxide/commit/beb0ea8c4ff94c64b7773772a9d388ccb403f3c1)) - Release gix-date v0.9.3, gix-object v0.46.1, gix-command v0.4.0, gix-filter v0.16.0, gix-fs v0.12.1, gix-traverse v0.43.1, gix-worktree-stream v0.18.0, gix-archive v0.18.0, gix-ref v0.49.1, gix-prompt v0.9.0, gix-url v0.28.2, gix-credentials v0.26.0, gix-diff v0.49.0, gix-dir v0.11.0, gix-revision v0.31.1, gix-merge v0.2.0, gix-pack v0.56.0, gix-odb v0.66.0, gix-shallow v0.1.0, gix-packetline v0.18.2, gix-transport v0.44.0, gix-protocol v0.47.0, gix-status v0.16.0, gix-worktree-state v0.16.0, gix v0.69.0, gitoxide-core v0.44.0, gitoxide v0.40.0, safety bump 16 crates ([`c1ba571`](https://github.com/GitoxideLabs/gitoxide/commit/c1ba5719132227410abefeb54e3032b015233e94)) - Update changelogs prior to release ([`7ea8582`](https://github.com/GitoxideLabs/gitoxide/commit/7ea85821c6999e3e6cf50a2a009904e9c38642a4)) - Merge pull request #1734 from EliahKagan/nonfiles ([`ad6b9b6`](https://github.com/GitoxideLabs/gitoxide/commit/ad6b9b66aa3e3561e413d04d00f6dbf832d63353)) - Reword "non-files" in documentation comments ([`154b21f`](https://github.com/GitoxideLabs/gitoxide/commit/154b21f0e9beb0e5b6615f091f5f0716df6a3f7b)) - Rename `entry::Kind::NonFile` to `entry::Kind::Untrackable`. ([`d90412b`](https://github.com/GitoxideLabs/gitoxide/commit/d90412bdf86c70ecb5a6d0a1fefae875b3eb836b)) - Clarify and expand descriptions of `NonFile`s ([`c06a57e`](https://github.com/GitoxideLabs/gitoxide/commit/c06a57e698ee21d6c6d8a35bbb37323ceef1e143)) - Merge pull request #1730 from GitoxideLabs/fix-1729 ([`6822689`](https://github.com/GitoxideLabs/gitoxide/commit/6822689fca04c15e309f9ca41d610bca9cb93e3b)) - Add `entry::Kind::NonFile`. ([`0d51771`](https://github.com/GitoxideLabs/gitoxide/commit/0d517716b81e203a131552c5163894a4fbf2863e)) - Merge pull request #1727 from GitoxideLabs/dirwalk-ignore-non-regulars ([`69ee6a3`](https://github.com/GitoxideLabs/gitoxide/commit/69ee6a32dd221a1aae7b8c3817f90feacf577598)) - Assure `fifo` or non-files aren't considered files, but are pruned instead. ([`f7ffb91`](https://github.com/GitoxideLabs/gitoxide/commit/f7ffb9183f918a9521a8f21d3cc0c70925d4b0f1)) - Add a test to show what FIFO does to the dirwalk. ([`949fe2c`](https://github.com/GitoxideLabs/gitoxide/commit/949fe2c4da0a74a0c45cfa8cf820f3ce7a808cda)) - Refactor test-structure to match the 'new style'. ([`e6199a5`](https://github.com/GitoxideLabs/gitoxide/commit/e6199a5819d2567e9549b16020d69bfc55057dc7)) - Merge pull request #1701 from GitoxideLabs/release ([`e8b3b41`](https://github.com/GitoxideLabs/gitoxide/commit/e8b3b41dd79b8f4567670b1f89dd8867b6134e9e))
## 0.10.0 (2024-11-24) A maintenance release without user-facing changes. ### Commit Statistics - 10 commits contributed to the release. - 0 commits were understood as [conventional](https://www.conventionalcommits.org). - 0 issues like '(#ID)' were seen in commit messages ### Commit Details
view details * **Uncategorized** - Release gix-glob v0.17.1, gix-command v0.3.11, gix-filter v0.15.0, gix-chunk v0.4.10, gix-commitgraph v0.25.1, gix-revwalk v0.17.0, gix-traverse v0.43.0, gix-worktree-stream v0.17.0, gix-archive v0.17.0, gix-config-value v0.14.10, gix-lock v15.0.1, gix-ref v0.49.0, gix-sec v0.10.10, gix-config v0.42.0, gix-prompt v0.8.9, gix-url v0.28.1, gix-credentials v0.25.1, gix-ignore v0.12.1, gix-bitmap v0.2.13, gix-index v0.37.0, gix-worktree v0.38.0, gix-diff v0.48.0, gix-discover v0.37.0, gix-pathspec v0.8.1, gix-dir v0.10.0, gix-mailmap v0.25.1, gix-revision v0.31.0, gix-merge v0.1.0, gix-negotiate v0.17.0, gix-pack v0.55.0, gix-odb v0.65.0, gix-packetline v0.18.1, gix-transport v0.43.1, gix-protocol v0.46.1, gix-refspec v0.27.0, gix-status v0.15.0, gix-submodule v0.16.0, gix-worktree-state v0.15.0, gix v0.68.0, gix-fsck v0.8.0, gitoxide-core v0.43.0, gitoxide v0.39.0 ([`4000197`](https://github.com/GitoxideLabs/gitoxide/commit/4000197ecc8cf1a5d79361620e4c114f86476703)) - Release gix-date v0.9.2, gix-actor v0.33.1, gix-hash v0.15.1, gix-features v0.39.1, gix-validate v0.9.2, gix-object v0.46.0, gix-path v0.10.13, gix-quote v0.4.14, gix-attributes v0.23.1, gix-packetline-blocking v0.18.1, gix-filter v0.15.0, gix-chunk v0.4.10, gix-commitgraph v0.25.1, gix-revwalk v0.17.0, gix-traverse v0.43.0, gix-worktree-stream v0.17.0, gix-archive v0.17.0, gix-config-value v0.14.10, gix-lock v15.0.1, gix-ref v0.49.0, gix-config v0.42.0, gix-prompt v0.8.9, gix-url v0.28.1, gix-credentials v0.25.1, gix-bitmap v0.2.13, gix-index v0.37.0, gix-worktree v0.38.0, gix-diff v0.48.0, gix-discover v0.37.0, gix-pathspec v0.8.1, gix-dir v0.10.0, gix-mailmap v0.25.1, gix-revision v0.31.0, gix-merge v0.1.0, gix-negotiate v0.17.0, gix-pack v0.55.0, gix-odb v0.65.0, gix-packetline v0.18.1, gix-transport v0.43.1, gix-protocol v0.46.1, gix-refspec v0.27.0, gix-status v0.15.0, gix-submodule v0.16.0, gix-worktree-state v0.15.0, gix v0.68.0, gix-fsck v0.8.0, gitoxide-core v0.43.0, gitoxide v0.39.0, safety bump 25 crates ([`8ce4912`](https://github.com/GitoxideLabs/gitoxide/commit/8ce49129a75e21346ceedf7d5f87fa3a34b024e1)) - Prepare changelogs prior to release ([`bc9d994`](https://github.com/GitoxideLabs/gitoxide/commit/bc9d9943e8499a76fc47a05b63ac5c684187d1ae)) - Merge pull request #1662 from paolobarbolini/thiserror-v2 ([`7a40648`](https://github.com/GitoxideLabs/gitoxide/commit/7a406481b072728cec089d7c05364f9dbba335a2)) - Upgrade thiserror to v2.0.0 ([`0f0e4fe`](https://github.com/GitoxideLabs/gitoxide/commit/0f0e4fe121932a8a6302cf950b3caa4c8608fb61)) - Merge pull request #1652 from EliahKagan/run-ci/chmod ([`8e99eba`](https://github.com/GitoxideLabs/gitoxide/commit/8e99eba2a284b35b5e9bcb97e47bfbbafc3df5d1)) - Enable gix-dir walk symlink tests even on Windows ([`d03971b`](https://github.com/GitoxideLabs/gitoxide/commit/d03971b27f5b4fffc009329edb05f8ac0baac1d8)) - Merge pull request #1646 from EliahKagan/run-ci/portable-rm ([`35d4d9f`](https://github.com/GitoxideLabs/gitoxide/commit/35d4d9f801fa60875ebcd6102d874522be861e18)) - Avoid `cp -v` in fixtures for portability ([`dffb694`](https://github.com/GitoxideLabs/gitoxide/commit/dffb6945508023eb87c14c79ba59bb23723193ff)) - Merge pull request #1642 from GitoxideLabs/new-release ([`db5c9cf`](https://github.com/GitoxideLabs/gitoxide/commit/db5c9cfce93713b4b3e249cff1f8cc1ef146f470))
## 0.9.0 (2024-10-22) ### Other - Update gitoxide repository URLs This updates `Byron/gitoxide` URLs to `GitoxideLabs/gitoxide` in: - Markdown documentation, except changelogs and other such files where such changes should not be made. - Documentation comments (in .rs files). - Manifest (.toml) files, for the value of the `repository` key. - The comments appearing at the top of a sample hook that contains a repository URL as an example. When making these changes, I also allowed my editor to remove trailing whitespace in any lines in files already being edited (since, in this case, there was no disadvantage to allowing this). The gitoxide repository URL changed when the repository was moved into the recently created GitHub organization `GitoxideLabs`, as detailed in #1406. Please note that, although I believe updating the URLs to their new canonical values is useful, this is not needed to fix any broken links, since `Byron/gitoxide` URLs redirect (and hopefully will always redirect) to the coresponding `GitoxideLabs/gitoxide` URLs. While this change should not break any URLs, some affected URLs were already broken. This updates them, but they are still broken. They will be fixed in a subsequent commit. This also does not update `Byron/gitoxide` URLs in test fixtures or test cases, nor in the `Makefile`. (It may make sense to change some of those too, but it is not really a documentation change.) ### Commit Statistics - 13 commits contributed to the release. - 60 days passed between releases. - 1 commit was understood as [conventional](https://www.conventionalcommits.org). - 0 issues like '(#ID)' were seen in commit messages ### Thanks Clippy [Clippy](https://github.com/rust-lang/rust-clippy) helped 1 time to make code idiomatic. ### Commit Details
view details * **Uncategorized** - Release gix-date v0.9.1, gix-utils v0.1.13, gix-actor v0.33.0, gix-hash v0.15.0, gix-trace v0.1.11, gix-features v0.39.0, gix-hashtable v0.6.0, gix-validate v0.9.1, gix-object v0.45.0, gix-path v0.10.12, gix-glob v0.17.0, gix-quote v0.4.13, gix-attributes v0.23.0, gix-command v0.3.10, gix-packetline-blocking v0.18.0, gix-filter v0.14.0, gix-fs v0.12.0, gix-chunk v0.4.9, gix-commitgraph v0.25.0, gix-revwalk v0.16.0, gix-traverse v0.42.0, gix-worktree-stream v0.16.0, gix-archive v0.16.0, gix-config-value v0.14.9, gix-tempfile v15.0.0, gix-lock v15.0.0, gix-ref v0.48.0, gix-sec v0.10.9, gix-config v0.41.0, gix-prompt v0.8.8, gix-url v0.28.0, gix-credentials v0.25.0, gix-ignore v0.12.0, gix-bitmap v0.2.12, gix-index v0.36.0, gix-worktree v0.37.0, gix-diff v0.47.0, gix-discover v0.36.0, gix-pathspec v0.8.0, gix-dir v0.9.0, gix-mailmap v0.25.0, gix-merge v0.0.0, gix-negotiate v0.16.0, gix-pack v0.54.0, gix-odb v0.64.0, gix-packetline v0.18.0, gix-transport v0.43.0, gix-protocol v0.46.0, gix-revision v0.30.0, gix-refspec v0.26.0, gix-status v0.14.0, gix-submodule v0.15.0, gix-worktree-state v0.14.0, gix v0.67.0, gix-fsck v0.7.0, gitoxide-core v0.42.0, gitoxide v0.38.0, safety bump 41 crates ([`3f7e8ee`](https://github.com/GitoxideLabs/gitoxide/commit/3f7e8ee2c5107aec009eada1a05af7941da9cb4d)) - Merge pull request #1624 from EliahKagan/update-repo-url ([`795962b`](https://github.com/GitoxideLabs/gitoxide/commit/795962b107d86f58b1f7c75006da256d19cc80ad)) - Update gitoxide repository URLs ([`64ff0a7`](https://github.com/GitoxideLabs/gitoxide/commit/64ff0a77062d35add1a2dd422bb61075647d1a36)) - Merge pull request #1612 from Byron/merge ([`37c1e4c`](https://github.com/GitoxideLabs/gitoxide/commit/37c1e4c919382c9d213bd5ca299ed659d63ab45d)) - Thanks clippy ([`af03832`](https://github.com/GitoxideLabs/gitoxide/commit/af0383254422b70d53f27572c415eea2e4154447)) - Merge pull request #1582 from Byron/gix-path-release ([`93e86f1`](https://github.com/GitoxideLabs/gitoxide/commit/93e86f12a8d0ab59ad5d885ce552d0dec9a6fba6)) - Release gix-trace v0.1.10, gix-path v0.10.11 ([`012a754`](https://github.com/GitoxideLabs/gitoxide/commit/012a75455edebc857ff13c97c1e7603ea5ea6cdc)) - Merge pull request #1557 from Byron/merge-base ([`649f588`](https://github.com/GitoxideLabs/gitoxide/commit/649f5882cbebadf1133fa5f310e09b4aab77217e)) - Allow empty-docs ([`beba720`](https://github.com/GitoxideLabs/gitoxide/commit/beba7204a50a84b30e3eb81413d968920599e226)) - Merge branch 'global-lints' ([`37ba461`](https://github.com/GitoxideLabs/gitoxide/commit/37ba4619396974ec9cc41d1e882ac5efaf3816db)) - Workspace Clippy lint management ([`2e0ce50`](https://github.com/GitoxideLabs/gitoxide/commit/2e0ce506968c112b215ca0056bd2742e7235df48)) - Merge pull request #1546 from nyurik/semilocons ([`f992fb7`](https://github.com/GitoxideLabs/gitoxide/commit/f992fb773b443454015bd14658cfaa2f3ac07997)) - Add missing semicolons ([`ec69c88`](https://github.com/GitoxideLabs/gitoxide/commit/ec69c88fc119f3aa1967a7e7f5fca30e3ce97595))
## 0.8.0 (2024-08-22) A maintenance release without user-facing changes. ### Commit Statistics - 2 commits contributed to the release. - 0 commits were understood as [conventional](https://www.conventionalcommits.org). - 0 issues like '(#ID)' were seen in commit messages ### Commit Details
view details * **Uncategorized** - Release gix-actor v0.32.0, gix-object v0.44.0, gix-filter v0.13.0, gix-revwalk v0.15.0, gix-traverse v0.41.0, gix-worktree-stream v0.15.0, gix-archive v0.15.0, gix-ref v0.47.0, gix-config v0.40.0, gix-index v0.35.0, gix-worktree v0.36.0, gix-diff v0.46.0, gix-discover v0.35.0, gix-dir v0.8.0, gix-mailmap v0.24.0, gix-negotiate v0.15.0, gix-pack v0.53.0, gix-odb v0.63.0, gix-revision v0.29.0, gix-refspec v0.25.0, gix-status v0.13.0, gix-submodule v0.14.0, gix-worktree-state v0.13.0, gix v0.66.0, gix-fsck v0.6.0, gitoxide-core v0.41.0, gitoxide v0.38.0, safety bump 26 crates ([`b3ff033`](https://github.com/GitoxideLabs/gitoxide/commit/b3ff033b602f303433f0b2e4daa2dba90b619c9e)) - Prepare changelog prior to (yet another) release ([`209b6de`](https://github.com/GitoxideLabs/gitoxide/commit/209b6de0329dbaaf61b929d32d9d54cf13fe241e))
## 0.7.0 (2024-08-22) ### Bug Fixes - Assure that worktrees in hidden directories are not deleted - assure an ignored repository clone is for deletion is recognized as repository ### New Features (BREAKING) - make it possible to consider worktrees to be 'tracked' That way it's possibel for them to be equivalent to submodules, which would never be deleted by accident due to their 'tracked' status. This works by passing repository-relative paths of worktree locations that are within this repository. ### Commit Statistics - 11 commits contributed to the release over the course of 28 calendar days. - 30 days passed between releases. - 3 commits were understood as [conventional](https://www.conventionalcommits.org). - 3 unique issues were worked on: [#1464](https://github.com/GitoxideLabs/gitoxide/issues/1464), [#1469](https://github.com/GitoxideLabs/gitoxide/issues/1469), [#1470](https://github.com/GitoxideLabs/gitoxide/issues/1470) ### Commit Details
view details * **[#1464](https://github.com/GitoxideLabs/gitoxide/issues/1464)** - Make it possible to consider worktrees to be 'tracked' ([`c9cd2d2`](https://github.com/GitoxideLabs/gitoxide/commit/c9cd2d258a46ba3dc93559abea9a95405e62f930)) - Assure an ignored repository clone is for deletion is recognized as repository ([`6c8850b`](https://github.com/GitoxideLabs/gitoxide/commit/6c8850b44e288548a81db24974779f3811433fc9)) * **[#1469](https://github.com/GitoxideLabs/gitoxide/issues/1469)** - Add a test to see what happens if worktrees are hidden in ignored directories ([`2bacc45`](https://github.com/GitoxideLabs/gitoxide/commit/2bacc45f794d300656ca770c803a63c5df8b71fc)) * **[#1470](https://github.com/GitoxideLabs/gitoxide/issues/1470)** - Assure that worktrees in hidden directories are not deleted ([`31e795a`](https://github.com/GitoxideLabs/gitoxide/commit/31e795abf27dea8fd7dd7f59996cdd5d70398601)) * **Uncategorized** - Release gix-dir v0.7.0, gix-mailmap v0.23.6, gix-negotiate v0.14.0, gix-pack v0.52.0, gix-odb v0.62.0, gix-packetline v0.17.6, gix-transport v0.42.3, gix-protocol v0.45.3, gix-revision v0.28.0, gix-refspec v0.24.0, gix-status v0.12.0, gix-submodule v0.13.0, gix-worktree-state v0.12.0, gix v0.65.0, gix-fsck v0.5.0, gitoxide-core v0.40.0, gitoxide v0.38.0 ([`4fe330e`](https://github.com/GitoxideLabs/gitoxide/commit/4fe330e68d10d51b0a7116a7ef8b9ea3b48a224c)) - Release gix-attributes v0.22.5, gix-filter v0.12.0, gix-fs v0.11.3, gix-revwalk v0.14.0, gix-traverse v0.40.0, gix-worktree-stream v0.14.0, gix-archive v0.14.0, gix-config-value v0.14.8, gix-tempfile v14.0.2, gix-ref v0.46.0, gix-sec v0.10.8, gix-config v0.39.0, gix-prompt v0.8.7, gix-url v0.27.5, gix-credentials v0.24.5, gix-ignore v0.11.4, gix-index v0.34.0, gix-worktree v0.35.0, gix-diff v0.45.0, gix-discover v0.34.0, gix-pathspec v0.7.7, gix-dir v0.7.0, gix-mailmap v0.23.6, gix-negotiate v0.14.0, gix-pack v0.52.0, gix-odb v0.62.0, gix-packetline v0.17.6, gix-transport v0.42.3, gix-protocol v0.45.3, gix-revision v0.28.0, gix-refspec v0.24.0, gix-status v0.12.0, gix-submodule v0.13.0, gix-worktree-state v0.12.0, gix v0.65.0, gix-fsck v0.5.0, gitoxide-core v0.40.0, gitoxide v0.38.0 ([`f2b522d`](https://github.com/GitoxideLabs/gitoxide/commit/f2b522df2ddad07f065f43c2dbad49aa726714dd)) - Release gix-glob v0.16.5, gix-filter v0.12.0, gix-fs v0.11.3, gix-revwalk v0.14.0, gix-traverse v0.40.0, gix-worktree-stream v0.14.0, gix-archive v0.14.0, gix-config-value v0.14.8, gix-tempfile v14.0.2, gix-ref v0.46.0, gix-sec v0.10.8, gix-config v0.39.0, gix-prompt v0.8.7, gix-url v0.27.5, gix-credentials v0.24.5, gix-ignore v0.11.4, gix-index v0.34.0, gix-worktree v0.35.0, gix-diff v0.45.0, gix-discover v0.34.0, gix-pathspec v0.7.7, gix-dir v0.7.0, gix-mailmap v0.23.6, gix-negotiate v0.14.0, gix-pack v0.52.0, gix-odb v0.62.0, gix-packetline v0.17.6, gix-transport v0.42.3, gix-protocol v0.45.3, gix-revision v0.28.0, gix-refspec v0.24.0, gix-status v0.12.0, gix-submodule v0.13.0, gix-worktree-state v0.12.0, gix v0.65.0, gix-fsck v0.5.0, gitoxide-core v0.40.0, gitoxide v0.38.0 ([`a65a17f`](https://github.com/GitoxideLabs/gitoxide/commit/a65a17fc396ef49663b0a75cf7b5502d370db269)) - Release gix-date v0.9.0, gix-actor v0.31.6, gix-validate v0.9.0, gix-object v0.43.0, gix-path v0.10.10, gix-attributes v0.22.4, gix-command v0.3.9, gix-packetline-blocking v0.17.5, gix-filter v0.12.0, gix-fs v0.11.3, gix-revwalk v0.14.0, gix-traverse v0.40.0, gix-worktree-stream v0.14.0, gix-archive v0.14.0, gix-ref v0.46.0, gix-config v0.39.0, gix-prompt v0.8.7, gix-url v0.27.5, gix-credentials v0.24.5, gix-ignore v0.11.4, gix-index v0.34.0, gix-worktree v0.35.0, gix-diff v0.45.0, gix-discover v0.34.0, gix-dir v0.7.0, gix-mailmap v0.23.6, gix-negotiate v0.14.0, gix-pack v0.52.0, gix-odb v0.62.0, gix-packetline v0.17.6, gix-transport v0.42.3, gix-protocol v0.45.3, gix-revision v0.28.0, gix-refspec v0.24.0, gix-status v0.12.0, gix-submodule v0.13.0, gix-worktree-state v0.12.0, gix v0.65.0, gix-fsck v0.5.0, gitoxide-core v0.40.0, gitoxide v0.38.0, safety bump 25 crates ([`d19af16`](https://github.com/GitoxideLabs/gitoxide/commit/d19af16e1d2031d4f0100e76b6cd410a5d252af1)) - Prepare changelogs prior to release ([`0f25841`](https://github.com/GitoxideLabs/gitoxide/commit/0f2584178ae88e425f1c629eb85b69f3b4310d9f)) - Merge branch 'fix-clean' ([`348b9bf`](https://github.com/GitoxideLabs/gitoxide/commit/348b9bf6cbf7a61b8094e5db8354376abb2e8c99)) - Merge branch 'fix-clean' ([`33eacfb`](https://github.com/GitoxideLabs/gitoxide/commit/33eacfbaace2021043e2b5d72dcb9293af6c4020))
## 0.6.0 (2024-07-23) ### Bug Fixes - assure that worktree-roots are never considered ignored. If they were, they would more easily be deleted by tooling like `gix clean`. ### Commit Statistics - 18 commits contributed to the release over the course of 55 calendar days. - 62 days passed between releases. - 1 commit was understood as [conventional](https://www.conventionalcommits.org). - 1 unique issue was worked on: [#1458](https://github.com/GitoxideLabs/gitoxide/issues/1458) ### Commit Details
view details * **[#1458](https://github.com/GitoxideLabs/gitoxide/issues/1458)** - Assure that worktree-roots are never considered ignored. ([`1e92d1e`](https://github.com/GitoxideLabs/gitoxide/commit/1e92d1ed3f23e9de84203252d64e701e2c7fb941)) - Add tests that show what happens with allow-lists and `/` in root ([`1ebd6c7`](https://github.com/GitoxideLabs/gitoxide/commit/1ebd6c71457b292cdef97c218fb3e4176d10d502)) * **Uncategorized** - Release gix-actor v0.31.5, gix-filter v0.11.3, gix-fs v0.11.2, gix-commitgraph v0.24.3, gix-revwalk v0.13.2, gix-traverse v0.39.2, gix-worktree-stream v0.13.1, gix-archive v0.13.2, gix-config-value v0.14.7, gix-tempfile v14.0.1, gix-ref v0.45.0, gix-sec v0.10.7, gix-config v0.38.0, gix-prompt v0.8.6, gix-url v0.27.4, gix-credentials v0.24.3, gix-ignore v0.11.3, gix-index v0.33.1, gix-worktree v0.34.1, gix-diff v0.44.1, gix-discover v0.33.0, gix-pathspec v0.7.6, gix-dir v0.6.0, gix-mailmap v0.23.5, gix-negotiate v0.13.2, gix-pack v0.51.1, gix-odb v0.61.1, gix-transport v0.42.2, gix-protocol v0.45.2, gix-revision v0.27.2, gix-refspec v0.23.1, gix-status v0.11.0, gix-submodule v0.12.0, gix-worktree-state v0.11.1, gix v0.64.0, gix-fsck v0.4.1, gitoxide-core v0.39.0, gitoxide v0.37.0 ([`6232824`](https://github.com/GitoxideLabs/gitoxide/commit/6232824301847a9786dea0b926796a3187493587)) - Release gix-glob v0.16.4, gix-attributes v0.22.3, gix-command v0.3.8, gix-filter v0.11.3, gix-fs v0.11.2, gix-commitgraph v0.24.3, gix-revwalk v0.13.2, gix-traverse v0.39.2, gix-worktree-stream v0.13.1, gix-archive v0.13.2, gix-config-value v0.14.7, gix-tempfile v14.0.1, gix-ref v0.45.0, gix-sec v0.10.7, gix-config v0.38.0, gix-prompt v0.8.6, gix-url v0.27.4, gix-credentials v0.24.3, gix-ignore v0.11.3, gix-index v0.33.1, gix-worktree v0.34.1, gix-diff v0.44.1, gix-discover v0.33.0, gix-pathspec v0.7.6, gix-dir v0.6.0, gix-mailmap v0.23.5, gix-negotiate v0.13.2, gix-pack v0.51.1, gix-odb v0.61.1, gix-transport v0.42.2, gix-protocol v0.45.2, gix-revision v0.27.2, gix-refspec v0.23.1, gix-status v0.11.0, gix-submodule v0.12.0, gix-worktree-state v0.11.1, gix v0.64.0, gix-fsck v0.4.1, gitoxide-core v0.39.0, gitoxide v0.37.0 ([`a1b73a6`](https://github.com/GitoxideLabs/gitoxide/commit/a1b73a67c19d9102a2c5a7f574a7a53a86d0094c)) - Update manifests (by cargo-smart-release) ([`0470df3`](https://github.com/GitoxideLabs/gitoxide/commit/0470df3b8ebb136b219f0057f1e9a7031975cce5)) - Prepare changelog prior to release ([`99c00cc`](https://github.com/GitoxideLabs/gitoxide/commit/99c00cc3ae9827555e2e1162328bc57038619d1f)) - Merge branch 'fixes' ([`b4dba1c`](https://github.com/GitoxideLabs/gitoxide/commit/b4dba1c187baba44ee927daa538783f7f424b2f2)) - Release gix-path v0.10.9 ([`15f1cf7`](https://github.com/GitoxideLabs/gitoxide/commit/15f1cf76764221d14afa66d03a6528b19b9c30c9)) - Release gix-actor v0.31.4, gix-object v0.42.3 ([`bf3d82a`](https://github.com/GitoxideLabs/gitoxide/commit/bf3d82abc7c875109f9a5d6b6713ce68153b6456)) - Merge branch 'heredocs' ([`7330844`](https://github.com/GitoxideLabs/gitoxide/commit/73308446e5ffee053af35b108e3d49c71db31e99)) - Use `<<` rather than `<<-` heredoc operator ([`2641f8b`](https://github.com/GitoxideLabs/gitoxide/commit/2641f8b36008ade04d59d76bd6d546005ad76a21)) - Release gix-path v0.10.8 ([`8d89b86`](https://github.com/GitoxideLabs/gitoxide/commit/8d89b865c84d1fb153d93343d1ce4e1d64e53541)) - Merge branch 'tar-only' ([`1dfa90d`](https://github.com/GitoxideLabs/gitoxide/commit/1dfa90d641306b4099a6ecd52e2056b231467807)) - Remove binary files in favor of `tar` files ([`dcab79a`](https://github.com/GitoxideLabs/gitoxide/commit/dcab79a6958cbf5cd69184c24497dc27c6f94961)) - Merge branch 'main' into config-key-take-2 ([`9fa1054`](https://github.com/GitoxideLabs/gitoxide/commit/9fa1054a01071180d7b08c8c2b5bd61e9d0d32da)) - Merge pull request #1361 from EliahKagan/freebsd ([`9c65d98`](https://github.com/GitoxideLabs/gitoxide/commit/9c65d9886328f53129b966aecdc91644297c54be)) - Make bash script shebangs more portable ([`68cbea8`](https://github.com/GitoxideLabs/gitoxide/commit/68cbea815aa979acb0b86943db83ab77bbc728c4)) - Release gix-fs v0.11.1, gix-glob v0.16.3 ([`2cefe77`](https://github.com/GitoxideLabs/gitoxide/commit/2cefe77203131878d0d8f5346f20f0e25b76cbea))
## 0.5.0 (2024-05-22) A maintenance release without user-facing changes. ### Commit Statistics - 9 commits contributed to the release over the course of 33 calendar days. - 33 days passed between releases. - 0 commits were understood as [conventional](https://www.conventionalcommits.org). - 0 issues like '(#ID)' were seen in commit messages ### Commit Details
view details * **Uncategorized** - Release gix-features v0.38.2, gix-actor v0.31.2, gix-validate v0.8.5, gix-object v0.42.2, gix-command v0.3.7, gix-filter v0.11.2, gix-fs v0.11.0, gix-revwalk v0.13.1, gix-traverse v0.39.1, gix-worktree-stream v0.13.0, gix-archive v0.13.0, gix-tempfile v14.0.0, gix-lock v14.0.0, gix-ref v0.44.0, gix-config v0.37.0, gix-prompt v0.8.5, gix-index v0.33.0, gix-worktree v0.34.0, gix-diff v0.44.0, gix-discover v0.32.0, gix-pathspec v0.7.5, gix-dir v0.5.0, gix-macros v0.1.5, gix-mailmap v0.23.1, gix-negotiate v0.13.1, gix-pack v0.51.0, gix-odb v0.61.0, gix-transport v0.42.1, gix-protocol v0.45.1, gix-revision v0.27.1, gix-status v0.10.0, gix-submodule v0.11.0, gix-worktree-state v0.11.0, gix v0.63.0, gitoxide-core v0.38.0, gitoxide v0.36.0, safety bump 19 crates ([`4f98e94`](https://github.com/GitoxideLabs/gitoxide/commit/4f98e94e0e8b79ed2899b35bef40f3c30b3025b0)) - Adjust changelogs prior to release ([`9511416`](https://github.com/GitoxideLabs/gitoxide/commit/9511416a6cd0c571233f958c165329c8705c2498)) - Merge branch 'various-fixes' ([`d6cd449`](https://github.com/GitoxideLabs/gitoxide/commit/d6cd44930fb204b06e2b70fc6965e7705530c47a)) - Merge pull request from GHSA-7w47-3wg8-547c ([`79dce79`](https://github.com/GitoxideLabs/gitoxide/commit/79dce79c62f6072aa2653780d590dc3993dfa401)) - Address review comments ([`fcc3b69`](https://github.com/GitoxideLabs/gitoxide/commit/fcc3b69867db1628f6a44d0e0dad8f7417f566bc)) - Adapt to changes in `gix-worktree` ([`1ca6a3c`](https://github.com/GitoxideLabs/gitoxide/commit/1ca6a3ce22887c7eb42ec3e0a19f6e1202715745)) - Merge branch 'status' ([`68fd5b3`](https://github.com/GitoxideLabs/gitoxide/commit/68fd5b34e1214d5c2cc7d00dd06e19ee86c00c66)) - Cleanup path classificaiton after fixes in `gix-pathspec` ([`44a2e00`](https://github.com/GitoxideLabs/gitoxide/commit/44a2e005ea8241d026ae542dd4a71cfb6cfd8308)) - Merge branch 'cargo-fixes' ([`977346e`](https://github.com/GitoxideLabs/gitoxide/commit/977346ee61de6207c66f3de003db6e8c722fb81c))
## 0.4.1 (2024-04-18) ### Bug Fixes - assure worktree-roots aren't pruned with pathspecs that are never meant for them. Previously, when pathspecs were defined, the classification of the worktree-root would also be using them. This means that depending on the pathspec, worktree-roots would be pruned, which in turn makes it impossible to recurse into them. Now pathspecs are disabled when classifying the worktree-root directory. ### Commit Statistics - 5 commits contributed to the release. - 5 days passed between releases. - 1 commit was understood as [conventional](https://www.conventionalcommits.org). - 0 issues like '(#ID)' were seen in commit messages ### Commit Details
view details * **Uncategorized** - Release gix-index v0.32.1, gix-pathspec v0.7.4, gix-worktree v0.33.1, gix-dir v0.4.1 ([`54ac559`](https://github.com/GitoxideLabs/gitoxide/commit/54ac55946bb04635cd74582a1ce2e4bee70f2e60)) - Prepare changelog prior to `gix-dir` patch release ([`6ca6fa6`](https://github.com/GitoxideLabs/gitoxide/commit/6ca6fa69b5c21c8d8e9e07e21558e98201504cda)) - Assure worktree-roots aren't pruned with pathspecs that are never meant for them. ([`7f2f3ff`](https://github.com/GitoxideLabs/gitoxide/commit/7f2f3ff8adbecd631c2b4513995d6c94b21742eb)) - Merge pull request #1345 from EliahKagan/shell-scripts ([`fe24c89`](https://github.com/GitoxideLabs/gitoxide/commit/fe24c89e326670deaa3aaa643276d612d866072e)) - Add missing +x bit on scripts that are run and not sourced ([`41bf65a`](https://github.com/GitoxideLabs/gitoxide/commit/41bf65adef6f7d2cdd28fede262173ec7ba10822))
## 0.4.0 (2024-04-13) A maintenance release without user-facing changes. ### Commit Statistics - 6 commits contributed to the release. - 0 commits were understood as [conventional](https://www.conventionalcommits.org). - 0 issues like '(#ID)' were seen in commit messages ### Commit Details
view details * **Uncategorized** - Release gix-trace v0.1.9, gix-utils v0.1.12, gix-packetline-blocking v0.17.4, gix-filter v0.11.1, gix-fs v0.10.2, gix-traverse v0.39.0, gix-worktree-stream v0.12.0, gix-archive v0.12.0, gix-config v0.36.1, gix-url v0.27.3, gix-index v0.32.0, gix-worktree v0.33.0, gix-diff v0.43.0, gix-pathspec v0.7.3, gix-dir v0.4.0, gix-pack v0.50.0, gix-odb v0.60.0, gix-transport v0.42.0, gix-protocol v0.45.0, gix-status v0.9.0, gix-worktree-state v0.10.0, gix v0.62.0, gix-fsck v0.4.0, gitoxide-core v0.37.0, gitoxide v0.35.0, safety bump 14 crates ([`095c673`](https://github.com/GitoxideLabs/gitoxide/commit/095c6739b2722a8b9af90776b435ef2da454c0e6)) - Prepare changelogs prior to release ([`5755271`](https://github.com/GitoxideLabs/gitoxide/commit/57552717f46f96c35ba4ddc0a64434354ef845e9)) - Merge pull request #1341 from szepeviktor/typos ([`55f379b`](https://github.com/GitoxideLabs/gitoxide/commit/55f379bc47065822d078393d83d30c0835a89782)) - Fix typos ([`f72ecce`](https://github.com/GitoxideLabs/gitoxide/commit/f72ecce45babcad2a0c9b73c79d01ff502907a57)) - Merge pull request #1334 from EliahKagan/nonstandard-worktree ([`37732fb`](https://github.com/GitoxideLabs/gitoxide/commit/37732fb13efdff5a1b8a836943e9e575196724b5)) - Let nonstandard worktree fixtures work even if Git < 2.37.2 ([`01d6be9`](https://github.com/GitoxideLabs/gitoxide/commit/01d6be997fced8695b60d0dc206f87e542037a8d))
## 0.3.0 (2024-03-18) ### Bug Fixes - allow traversals to start from a symlink that points to a directory Now symlinked repositories can be traversed as well. ### New Features (BREAKING) - allow directory walk to be interrupted with `should_interrupt` flag. That way, it can be much more responsive to interruption. - assure symlinks to directories are ignored with `dir/` declarations in `.gitignore`. Initially, symlinks appear like symlinks thanks to `lstat`, but to do exclude handling correctly these need another `stat` call. However, this is also not done in Git, but done in `libgit2` only, so a toggle was added to act like Git by default, but allow obtaining the same behaviour as git2 for compatibility. ### Commit Statistics - 6 commits contributed to the release. - 3 days passed between releases. - 3 commits were understood as [conventional](https://www.conventionalcommits.org). - 0 issues like '(#ID)' were seen in commit messages ### Commit Details
view details * **Uncategorized** - Release gix-actor v0.31.1, gix-object v0.42.1, gix-index v0.31.1, gix-pathspec v0.7.2, gix-dir v0.3.0, gix-status v0.8.0, gix v0.61.0, safety bump 2 crates ([`155cc45`](https://github.com/GitoxideLabs/gitoxide/commit/155cc45730b259e662d7c4be42a469a3af3750e1)) - Prepare changelog prior to release ([`129ba3d`](https://github.com/GitoxideLabs/gitoxide/commit/129ba3deccc9ada0dc571466458845939502763d)) - Merge branch 'improvements-for-cargo' ([`41cd53e`](https://github.com/GitoxideLabs/gitoxide/commit/41cd53e2af76e35e047aac4eca6324774df4cb50)) - Allow directory walk to be interrupted with `should_interrupt` flag. ([`35b74e7`](https://github.com/GitoxideLabs/gitoxide/commit/35b74e7992a5a732b5ae8dbdc264479a91b1d60d)) - Allow traversals to start from a symlink that points to a directory ([`e7e91cf`](https://github.com/GitoxideLabs/gitoxide/commit/e7e91cfaed6d40a773a65fc077b99d2e26bb28f5)) - Assure symlinks to directories are ignored with `dir/` declarations in `.gitignore`. ([`cd0c8af`](https://github.com/GitoxideLabs/gitoxide/commit/cd0c8af78fd7a4f06e33ec2ce06b094b5a490877))
## 0.2.0 (2024-03-14) ### Bug Fixes - make it possible to use a submodule root for a full walk. Previously, it would not allow to enter the repository, making a walk impossible. ### Commit Statistics - 6 commits contributed to the release over the course of 4 calendar days. - 18 days passed between releases. - 1 commit was understood as [conventional](https://www.conventionalcommits.org). - 0 issues like '(#ID)' were seen in commit messages ### Commit Details
view details * **Uncategorized** - Release gix-date v0.8.5, gix-hash v0.14.2, gix-trace v0.1.8, gix-utils v0.1.11, gix-features v0.38.1, gix-actor v0.31.0, gix-validate v0.8.4, gix-object v0.42.0, gix-path v0.10.7, gix-glob v0.16.2, gix-quote v0.4.12, gix-attributes v0.22.2, gix-command v0.3.6, gix-filter v0.11.0, gix-fs v0.10.1, gix-chunk v0.4.8, gix-commitgraph v0.24.2, gix-hashtable v0.5.2, gix-revwalk v0.13.0, gix-traverse v0.38.0, gix-worktree-stream v0.11.0, gix-archive v0.11.0, gix-config-value v0.14.6, gix-tempfile v13.1.1, gix-lock v13.1.1, gix-ref v0.43.0, gix-sec v0.10.6, gix-config v0.36.0, gix-prompt v0.8.4, gix-url v0.27.2, gix-credentials v0.24.2, gix-ignore v0.11.2, gix-bitmap v0.2.11, gix-index v0.31.0, gix-worktree v0.32.0, gix-diff v0.42.0, gix-discover v0.31.0, gix-pathspec v0.7.1, gix-dir v0.2.0, gix-macros v0.1.4, gix-mailmap v0.23.0, gix-negotiate v0.13.0, gix-pack v0.49.0, gix-odb v0.59.0, gix-packetline v0.17.4, gix-transport v0.41.2, gix-protocol v0.44.2, gix-revision v0.27.0, gix-refspec v0.23.0, gix-status v0.7.0, gix-submodule v0.10.0, gix-worktree-state v0.9.0, gix v0.60.0, safety bump 26 crates ([`b050327`](https://github.com/GitoxideLabs/gitoxide/commit/b050327e76f234b19be921b78b7b28e034319fdb)) - Prepare changelogs prior to release ([`52c3bbd`](https://github.com/GitoxideLabs/gitoxide/commit/52c3bbd36b9e94a0f3a78b4ada84d0c08eba27f6)) - Merge branch 'status' ([`3e5c974`](https://github.com/GitoxideLabs/gitoxide/commit/3e5c974dd62ac134711c6c2f5a5490187a6ea55e)) - Keep lower-bound of `thiserror` low in `gix-dir` ([`917634f`](https://github.com/GitoxideLabs/gitoxide/commit/917634fa694a1e91d37f6407e57ae96b3b0aec4b)) - Fix lints for nightly, and clippy ([`f8ce3d0`](https://github.com/GitoxideLabs/gitoxide/commit/f8ce3d0721b6a53713a9392f2451874f520bc44c)) - Make it possible to use a submodule root for a full walk. ([`434f543`](https://github.com/GitoxideLabs/gitoxide/commit/434f5434d7242f7f3d6b595f767195c51a3acd86))
## 0.1.0 (2024-02-25) ### Bug Fixes - pathspec prefixes still allows directory collapsing. - proper submodule handling Previously it was possible for `.git` files in directories to not trigger repository detection. - assure `Action::Cancel` doesn't run into unreachable code. ### New Features (BREAKING) - Represent `DotGit` as `ExtendedKind` This cleans up the model despite also making it harder to detect whether something is a DotGit. - simplify `walk()` signature to compute `root` with pathspec directory. This makes the overall handling more unified, while assuring it's always in the worktree. And as a pathspec directory isn't exactly the same as a user-specified root, it's also possible to override this automation. - allow to emit all collapsed entries. This is useful for rename tracking as it allows to see all files that may take part in a rename (i.e. when a directory is renamed). ### Commit Statistics - 19 commits contributed to the release over the course of 57 calendar days. - 6 commits were understood as [conventional](https://www.conventionalcommits.org). - 0 issues like '(#ID)' were seen in commit messages ### Commit Details
view details * **Uncategorized** - Release gix-date v0.8.4, gix-utils v0.1.10, gix-actor v0.30.1, gix-object v0.41.1, gix-path v0.10.6, gix-glob v0.16.1, gix-quote v0.4.11, gix-attributes v0.22.1, gix-command v0.3.5, gix-filter v0.10.0, gix-commitgraph v0.24.1, gix-worktree-stream v0.10.0, gix-archive v0.10.0, gix-config-value v0.14.5, gix-ref v0.42.0, gix-sec v0.10.5, gix-config v0.35.0, gix-prompt v0.8.3, gix-url v0.27.1, gix-credentials v0.24.1, gix-ignore v0.11.1, gix-index v0.30.0, gix-worktree v0.31.0, gix-diff v0.41.0, gix-discover v0.30.0, gix-pathspec v0.7.0, gix-dir v0.1.0, gix-pack v0.48.0, gix-odb v0.58.0, gix-transport v0.41.1, gix-protocol v0.44.1, gix-revision v0.26.1, gix-refspec v0.22.1, gix-status v0.6.0, gix-submodule v0.9.0, gix-worktree-state v0.8.0, gix v0.59.0, gix-fsck v0.3.0, gitoxide-core v0.36.0, gitoxide v0.34.0, safety bump 10 crates ([`45b4470`](https://github.com/GitoxideLabs/gitoxide/commit/45b447045bc826f252129c300c531acde2652c64)) - Prepare changelogs prior to release ([`f2e111f`](https://github.com/GitoxideLabs/gitoxide/commit/f2e111f768fc1bc6182355261c20b63610cffec7)) - Merge branch 'status' ([`d53504a`](https://github.com/GitoxideLabs/gitoxide/commit/d53504a1fad41cec7b6ca2a4abb7f185d8941e3f)) - Make it even harder to remove your own CWD ([`4d5767c`](https://github.com/GitoxideLabs/gitoxide/commit/4d5767cd394d755104aa7f0c1ed5b8e01bf74b12)) - Assure that we don't artificially make non-recursable directories visible ([`1a26732`](https://github.com/GitoxideLabs/gitoxide/commit/1a26732fe897161f9bfa397efdb07aa57f3c7341)) - Represent `DotGit` as `ExtendedKind` ([`bd5f449`](https://github.com/GitoxideLabs/gitoxide/commit/bd5f44925306aa342b2b1c547779799b72372212)) - Pathspec prefixes still allows directory collapsing. ([`95d10ee`](https://github.com/GitoxideLabs/gitoxide/commit/95d10ee9371196cbcb8e599d28d9d05fa8b68221)) - Merge branch 'status' ([`bb48c4c`](https://github.com/GitoxideLabs/gitoxide/commit/bb48c4ce22650b8c76af3b147e252ebe7cedb205)) - More natural top-level handling ([`44ccc67`](https://github.com/GitoxideLabs/gitoxide/commit/44ccc67a5b4a481f769399c41f0d3fc956fd8ec8)) - Simplify `walk()` signature to compute `root` with pathspec directory. ([`b6ea37a`](https://github.com/GitoxideLabs/gitoxide/commit/b6ea37a4d20e008c0b447090992c6aade0191265)) - Allow to emit all collapsed entries. ([`4567dbb`](https://github.com/GitoxideLabs/gitoxide/commit/4567dbb2abf3d05bebe2206afafc40002a376d26)) - Proper submodule handling ([`dc200bf`](https://github.com/GitoxideLabs/gitoxide/commit/dc200bf6f2cb10b6f0e45dd83bf9f82173cbb04f)) - Assure `Action::Cancel` doesn't run into unreachable code. ([`c04954a`](https://github.com/GitoxideLabs/gitoxide/commit/c04954a89dfdd8c230050b6175e2a132c73bdbfa)) - Merge branch 'status' ([`b8def77`](https://github.com/GitoxideLabs/gitoxide/commit/b8def77e91ddc82a39ec342b89f558702a8f1d8c)) - Make sure that `*foo*` prefixes don't end up matching any directory. ([`482d6f3`](https://github.com/GitoxideLabs/gitoxide/commit/482d6f3f773fd74ddcea4be0b36ebea89017397a)) - Merge branch 'dirwalk' ([`face359`](https://github.com/GitoxideLabs/gitoxide/commit/face359443ba33e8985ec1525d5ec38b743ea7a9)) - Implementation of the Git-style directory walk. ([`3252cfd`](https://github.com/GitoxideLabs/gitoxide/commit/3252cfd570b0c0897c51939e1a8c45b35c861c53)) - Merge branch 'gix-status' ([`c3983c6`](https://github.com/GitoxideLabs/gitoxide/commit/c3983c6b8d63d85ec713ae8d661723f9cf0bd55b)) - Initial version of the `gix-dir` crate ([`22acf0d`](https://github.com/GitoxideLabs/gitoxide/commit/22acf0def5c62563300aa8eaef01cb94bcd15645))
# Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## 0.12.0 (2026-02-10) ### Commit Statistics - 3 commits contributed to the release over the course of 18 calendar days. - 18 days passed between releases. - 0 commits were understood as [conventional](https://www.conventionalcommits.org). - 0 issues like '(#ID)' were seen in commit messages ### Commit Details
view details * **Uncategorized** - Merge pull request #2407 from GitoxideLabs/dependabot/cargo/cargo-fb4135702f ([`8bceefb`](https://github.com/GitoxideLabs/gitoxide/commit/8bceefbfc5f897517bfdd24744695a82cfa0d5be)) - Bump the cargo group with 59 updates ([`7ce3c55`](https://github.com/GitoxideLabs/gitoxide/commit/7ce3c5587aec1ca813039c047783b9cb2a106826)) - Merge pull request #2393 from GitoxideLabs/report ([`f7d0975`](https://github.com/GitoxideLabs/gitoxide/commit/f7d09758d245aaa89409e39bb6ba1ed6b7118ea5))
## 0.11.0 (2026-01-22) ### New Features (BREAKING) - Use `std::ops::ControlFlow` where possible ### Commit Statistics - 9 commits contributed to the release over the course of 21 calendar days. - 21 days passed between releases. - 1 commit was understood as [conventional](https://www.conventionalcommits.org). - 1 unique issue was worked on: [#2363](https://github.com/GitoxideLabs/gitoxide/issues/2363) ### Commit Details
view details * **[#2363](https://github.com/GitoxideLabs/gitoxide/issues/2363)** - Regenerate all changelogs with a more recent CSR version ([`cbbdef5`](https://github.com/GitoxideLabs/gitoxide/commit/cbbdef5095b894a944a526fb57dfebeb0f3ab5eb)) * **Uncategorized** - Release gix-error v0.0.0, gix-date v0.13.0, gix-actor v0.38.0, gix-validate v0.11.0, gix-path v0.11.0, gix-features v0.46.0, gix-hash v0.22.0, gix-hashtable v0.12.0, gix-object v0.55.0, gix-glob v0.24.0, gix-attributes v0.30.0, gix-command v0.7.0, gix-packetline v0.21.0, gix-filter v0.25.0, gix-fs v0.19.0, gix-chunk v0.5.0, gix-commitgraph v0.32.0, gix-revwalk v0.26.0, gix-traverse v0.52.0, gix-worktree-stream v0.27.0, gix-archive v0.27.0, gix-tempfile v21.0.0, gix-lock v21.0.0, gix-index v0.46.0, gix-config-value v0.17.0, gix-pathspec v0.15.0, gix-ignore v0.19.0, gix-worktree v0.47.0, gix-diff v0.58.0, gix-blame v0.8.0, gix-ref v0.58.0, gix-sec v0.13.0, gix-config v0.51.0, gix-prompt v0.13.0, gix-url v0.35.0, gix-credentials v0.35.0, gix-discover v0.46.0, gix-dir v0.20.0, gix-mailmap v0.30.0, gix-revision v0.40.0, gix-merge v0.11.0, gix-negotiate v0.26.0, gix-pack v0.65.0, gix-odb v0.75.0, gix-refspec v0.36.0, gix-shallow v0.8.0, gix-transport v0.53.0, gix-protocol v0.56.0, gix-status v0.25.0, gix-submodule v0.25.0, gix-worktree-state v0.25.0, gix v0.78.0, gix-fsck v0.17.0, gitoxide-core v0.53.0, gitoxide v0.50.0, safety bump 50 crates ([`562e684`](https://github.com/GitoxideLabs/gitoxide/commit/562e684319fa649db6a96c0a22d64bbe3c11e9e6)) - Use `std::ops::ControlFlow` where possible ([`5c1bd03`](https://github.com/GitoxideLabs/gitoxide/commit/5c1bd0387f98eee37265a42ba4b6624c783c9a71)) - Merge pull request #2364 from GitoxideLabs/changelogs ([`0a333e5`](https://github.com/GitoxideLabs/gitoxide/commit/0a333e5941a0a58727c694fcf7dc48f95d7481db)) - Merge pull request #2346 from GitoxideLabs/release ([`c663b3f`](https://github.com/GitoxideLabs/gitoxide/commit/c663b3f05791db86d2e0a683e26e149f620bf2e4)) - Release gix-trace v0.1.17, gix-features v0.45.2, gix-command v0.6.5, gix-hash v0.21.2, gix-date v0.12.1, gix-actor v0.37.1, gix-object v0.54.1, gix-filter v0.24.1, gix-fs v0.18.2, gix-tempfile v20.0.1, gix-lock v20.0.1, gix-traverse v0.51.1, gix-index v0.45.1, gix-diff v0.57.1, gix-pack v0.64.1 ([`7be8f90`](https://github.com/GitoxideLabs/gitoxide/commit/7be8f9068ab875ca4123300ba08df9d32fd63941)) - Merge pull request #2333 from GitoxideLabs/improvements ([`9e1ba5e`](https://github.com/GitoxideLabs/gitoxide/commit/9e1ba5ee6b7e0e032f682097d48664a68891762d)) - Release gix-command v0.6.4, gix-credentials v0.34.1, gix-transport v0.52.1 ([`3bc0c47`](https://github.com/GitoxideLabs/gitoxide/commit/3bc0c472a8395e9634dd602839e208501f841c11)) - Merge pull request #2322 from GitoxideLabs/report ([`211b4fb`](https://github.com/GitoxideLabs/gitoxide/commit/211b4fb5a31792eda91191789f3656c217960986))
## 0.10.0 (2025-12-31) ### Commit Statistics - 2 commits contributed to the release over the course of 9 calendar days. - 9 days passed between releases. - 0 commits were understood as [conventional](https://www.conventionalcommits.org). - 0 issues like '(#ID)' were seen in commit messages ### Commit Details
view details * **Uncategorized** - Release gix-date v0.12.0, gix-actor v0.37.0, gix-features v0.45.1, gix-hash v0.21.1, gix-object v0.54.0, gix-filter v0.24.0, gix-fs v0.18.1, gix-revwalk v0.25.0, gix-traverse v0.51.0, gix-worktree-stream v0.26.0, gix-archive v0.26.0, gix-index v0.45.0, gix-worktree v0.46.0, gix-diff v0.57.0, gix-blame v0.7.0, gix-ref v0.57.0, gix-config v0.50.0, gix-credentials v0.34.0, gix-discover v0.45.0, gix-dir v0.19.0, gix-mailmap v0.29.0, gix-revision v0.39.0, gix-merge v0.10.0, gix-negotiate v0.25.0, gix-pack v0.64.0, gix-odb v0.74.0, gix-refspec v0.35.0, gix-transport v0.52.0, gix-protocol v0.55.0, gix-status v0.24.0, gix-submodule v0.24.0, gix-worktree-state v0.24.0, gix v0.77.0, gix-fsck v0.16.0, gitoxide-core v0.52.0, gitoxide v0.49.0, safety bump 32 crates ([`115e208`](https://github.com/GitoxideLabs/gitoxide/commit/115e208b7bc7a96024e64ea872f2731b5125a6e0)) - Merge pull request #2299 from GitoxideLabs/report ([`d6c5b9d`](https://github.com/GitoxideLabs/gitoxide/commit/d6c5b9d7843c24663ffcf20bd756ea3eb747ca0a))
## 0.9.0 (2025-12-22) ### Bug Fixes (BREAKING) - expose raw commit/tag actor headers for round-tripping. Note that this means you have to call `CommitRef::commiter|author()?` and `TagRef::tagger()?` instead of assuming pre-parsed fields. This PR makes signature handling truly lossless for "creative" emails and other info. We now stash the raw name slice on IdentityRef/SignatureRef and fall back to it when rewriting, so even commits with embedded angle brackets round-trip cleanly (might want to expand to other malformed characters before merging? Parsing and serialization honor that flag but still keep strict validation for normal input. I also added regression coverage for these scenarios. ### Commit Statistics - 4 commits contributed to the release over the course of 21 calendar days. - 29 days passed between releases. - 1 commit was understood as [conventional](https://www.conventionalcommits.org). - 0 issues like '(#ID)' were seen in commit messages ### Commit Details
view details * **Uncategorized** - Release gix-date v0.11.1, gix-actor v0.36.1, gix-trace v0.1.16, gix-features v0.45.0, gix-hash v0.21.0, gix-hashtable v0.11.0, gix-object v0.53.0, gix-glob v0.23.0, gix-attributes v0.29.0, gix-filter v0.23.0, gix-fs v0.18.0, gix-commitgraph v0.31.0, gix-revwalk v0.24.0, gix-traverse v0.50.0, gix-worktree-stream v0.25.0, gix-archive v0.25.0, gix-tempfile v20.0.0, gix-lock v20.0.0, gix-index v0.44.0, gix-config-value v0.16.0, gix-pathspec v0.14.0, gix-ignore v0.18.0, gix-worktree v0.45.0, gix-diff v0.56.0, gix-blame v0.6.0, gix-ref v0.56.0, gix-config v0.49.0, gix-prompt v0.12.0, gix-url v0.34.0, gix-credentials v0.33.0, gix-discover v0.44.0, gix-dir v0.18.0, gix-mailmap v0.28.1, gix-revision v0.38.0, gix-merge v0.9.0, gix-negotiate v0.24.0, gix-pack v0.63.0, gix-odb v0.73.0, gix-refspec v0.34.0, gix-shallow v0.7.0, gix-transport v0.51.0, gix-protocol v0.54.0, gix-status v0.23.0, gix-submodule v0.23.0, gix-worktree-state v0.23.0, gix v0.76.0, gix-fsck v0.15.0, gitoxide-core v0.51.0, gitoxide v0.48.0, safety bump 43 crates ([`21fecdf`](https://github.com/GitoxideLabs/gitoxide/commit/21fecdf928336ac5fa3dd1402f92e8200d8aff62)) - Merge pull request #2253 from Pingasmaster/raw-email-attempt-fix ([`f471ac5`](https://github.com/GitoxideLabs/gitoxide/commit/f471ac5fece0baf3766d80482400f6b37db8edd0)) - Refactor ([`6f7b23a`](https://github.com/GitoxideLabs/gitoxide/commit/6f7b23a4b85eb7b8c922753aa86849893d2a089d)) - Expose raw commit/tag actor headers for round-tripping. ([`1955b5b`](https://github.com/GitoxideLabs/gitoxide/commit/1955b5b1a436518c036cfc9bf642170f9c7b6540))
## 0.8.0 (2025-11-22) ### Commit Statistics - 2 commits contributed to the release. - 0 commits were understood as [conventional](https://www.conventionalcommits.org). - 0 issues like '(#ID)' were seen in commit messages ### Commit Details
view details * **Uncategorized** - Release gix-date v0.11.0, gix-actor v0.36.0, gix-path v0.10.22, gix-object v0.52.0, gix-packetline v0.20.0, gix-filter v0.22.0, gix-revwalk v0.23.0, gix-traverse v0.49.0, gix-worktree-stream v0.24.0, gix-archive v0.24.0, gix-index v0.43.0, gix-worktree v0.44.0, gix-diff v0.55.0, gix-blame v0.5.0, gix-ref v0.55.0, gix-config v0.48.0, gix-url v0.33.2, gix-credentials v0.32.0, gix-discover v0.43.0, gix-dir v0.17.0, gix-mailmap v0.28.0, gix-revision v0.37.0, gix-merge v0.8.0, gix-negotiate v0.23.0, gix-pack v0.62.0, gix-odb v0.72.0, gix-refspec v0.33.0, gix-transport v0.50.0, gix-protocol v0.53.0, gix-status v0.22.0, gix-submodule v0.22.0, gix-worktree-state v0.22.0, gix v0.75.0, gix-fsck v0.14.0, gitoxide-core v0.50.0, gitoxide v0.47.0, safety bump 32 crates ([`82ff92f`](https://github.com/GitoxideLabs/gitoxide/commit/82ff92fa943bad88dc7d5bfa100404de477a3608)) - Merge pull request #2224 from GitoxideLabs/report ([`3313233`](https://github.com/GitoxideLabs/gitoxide/commit/3313233aa4e7009aed0ddf644f4271fd2a98e8d4))
## 0.7.0 (2025-10-22) ### Bug Fixes - assure that blob merges recognize conflicts in cojunction with empty bases. Previously, there were special cases that would cause it to auto-merge conflicts even though it shouldn't. This is now fixed just by removing the special case entirely, which seems unexpected in any of the test-suite. - run merge-filters in the worktree dir or the git dir. That way, we emulate what Git actually does as it will set the CWD of the process to either of these. ### Commit Statistics - 15 commits contributed to the release over the course of 99 calendar days. - 99 days passed between releases. - 2 commits were understood as [conventional](https://www.conventionalcommits.org). - 0 issues like '(#ID)' were seen in commit messages ### Commit Details
view details * **Uncategorized** - Release gix-date v0.10.6, gix-utils v0.3.1, gix-actor v0.35.5, gix-trace v0.1.14, gix-validate v0.10.1, gix-path v0.10.21, gix-features v0.44.0, gix-hash v0.20.0, gix-hashtable v0.10.0, gix-object v0.51.0, gix-glob v0.22.0, gix-quote v0.6.1, gix-attributes v0.28.0, gix-command v0.6.3, gix-packetline-blocking v0.19.2, gix-filter v0.21.0, gix-fs v0.17.0, gix-chunk v0.4.12, gix-commitgraph v0.30.0, gix-revwalk v0.22.0, gix-traverse v0.48.0, gix-worktree-stream v0.23.0, gix-archive v0.23.0, gix-bitmap v0.2.15, gix-tempfile v19.0.0, gix-lock v19.0.0, gix-index v0.42.0, gix-config-value v0.15.2, gix-pathspec v0.13.0, gix-ignore v0.17.0, gix-worktree v0.43.0, gix-diff v0.54.0, gix-blame v0.4.0, gix-ref v0.54.0, gix-sec v0.12.1, gix-config v0.47.0, gix-prompt v0.11.2, gix-url v0.33.0, gix-credentials v0.31.0, gix-discover v0.42.0, gix-dir v0.16.0, gix-mailmap v0.27.3, gix-revision v0.36.0, gix-merge v0.7.0, gix-negotiate v0.22.0, gix-pack v0.61.0, gix-odb v0.71.0, gix-refspec v0.32.0, gix-shallow v0.6.0, gix-packetline v0.19.2, gix-transport v0.49.0, gix-protocol v0.52.0, gix-status v0.21.0, gix-submodule v0.21.0, gix-worktree-state v0.21.0, gix v0.74.0, gix-fsck v0.13.0, gitoxide-core v0.49.0, gitoxide v0.46.0, safety bump 42 crates ([`89fb308`](https://github.com/GitoxideLabs/gitoxide/commit/89fb308f1283b404b55916304f7d161fbf13fe10)) - Merge pull request #2217 from GitoxideLabs/copilot/update-msrv-to-rust-1-82 ([`4da2927`](https://github.com/GitoxideLabs/gitoxide/commit/4da2927629c7ec95b96d62a387c61097e3fc71fa)) - Fixup Copilot commits and thank clippy ([`b188a7d`](https://github.com/GitoxideLabs/gitoxide/commit/b188a7d834979eaa940fd94ec269367cd922d16d)) - Update MSRV to 1.82 and replace once_cell with std equivalents ([`6cc8464`](https://github.com/GitoxideLabs/gitoxide/commit/6cc84641cb7be6f70468a90efaafcf142a6b8c4b)) - Merge pull request #2207 from GitoxideLabs/improvements ([`fcb4448`](https://github.com/GitoxideLabs/gitoxide/commit/fcb4448382e6edaca8dec2a1fe23052163fd0ee2)) - Assure that blob merges recognize conflicts in cojunction with empty bases. ([`a929e9c`](https://github.com/GitoxideLabs/gitoxide/commit/a929e9cbd00e8d6e43ccc31bf4d406548bede431)) - Merge pull request #2203 from GitoxideLabs/improvements ([`c295db0`](https://github.com/GitoxideLabs/gitoxide/commit/c295db098db9576e12318e7c73864cf270297b1d)) - Run merge-filters in the worktree dir or the git dir. ([`5761441`](https://github.com/GitoxideLabs/gitoxide/commit/57614410a7b10c88b7bbab3e4a7ed1497568e29b)) - Merge pull request #2202 from GitoxideLabs/dependabot/cargo/cargo-4a7155215a ([`9365cc3`](https://github.com/GitoxideLabs/gitoxide/commit/9365cc3ae8ad92ba2703170ac2f9a1e4df2ac3be)) - Bump the cargo group across 1 directory with 64 updates ([`838ff95`](https://github.com/GitoxideLabs/gitoxide/commit/838ff95cca60c453bd97bd458ce31b384d00347e)) - Merge pull request #2113 from GitoxideLabs/release ([`dc7343c`](https://github.com/GitoxideLabs/gitoxide/commit/dc7343c25ec6a62445e52694f7f0d3f95f31edef)) - Release gix-actor v0.35.4, gix-fs v0.16.1, gix-object v0.50.2, gix-ref v0.53.1 ([`79ba9d0`](https://github.com/GitoxideLabs/gitoxide/commit/79ba9d009ca7536fadfe27b4fa56d1460327c906)) - Merge pull request #2100 from GitoxideLabs/release ([`202bc6d`](https://github.com/GitoxideLabs/gitoxide/commit/202bc6da79854d1fb6bb32b9c6bb2a6f882c77f5)) - Release gix-actor v0.35.3, gix-path v0.10.20, gix-features v0.43.1, gix-object v0.50.1 ([`d64f257`](https://github.com/GitoxideLabs/gitoxide/commit/d64f257951754ea70b0179b83f76de957b712211)) - Merge pull request #2075 from GitoxideLabs/improvements ([`784c046`](https://github.com/GitoxideLabs/gitoxide/commit/784c0465bf87011fe7dbf71a590d3f9e6c8696a8))
## 0.6.0 (2025-07-15) A maintenance release without user-facing changes. ### Commit Statistics - 9 commits contributed to the release over the course of 79 calendar days. - 79 days passed between releases. - 0 commits were understood as [conventional](https://www.conventionalcommits.org). - 0 issues like '(#ID)' were seen in commit messages ### Commit Details
view details * **Uncategorized** - Release gix-date v0.10.3, gix-actor v0.35.2, gix-trace v0.1.13, gix-path v0.10.19, gix-features v0.43.0, gix-hash v0.19.0, gix-hashtable v0.9.0, gix-object v0.50.0, gix-glob v0.21.0, gix-attributes v0.27.0, gix-command v0.6.2, gix-packetline-blocking v0.19.1, gix-filter v0.20.0, gix-fs v0.16.0, gix-commitgraph v0.29.0, gix-revwalk v0.21.0, gix-traverse v0.47.0, gix-worktree-stream v0.22.0, gix-archive v0.22.0, gix-tempfile v18.0.0, gix-lock v18.0.0, gix-index v0.41.0, gix-config-value v0.15.1, gix-pathspec v0.12.0, gix-ignore v0.16.0, gix-worktree v0.42.0, gix-diff v0.53.0, gix-blame v0.3.0, gix-ref v0.53.0, gix-sec v0.12.0, gix-config v0.46.0, gix-prompt v0.11.1, gix-url v0.32.0, gix-credentials v0.30.0, gix-discover v0.41.0, gix-dir v0.15.0, gix-mailmap v0.27.2, gix-revision v0.35.0, gix-merge v0.6.0, gix-negotiate v0.21.0, gix-pack v0.60.0, gix-odb v0.70.0, gix-refspec v0.31.0, gix-shallow v0.5.0, gix-packetline v0.19.1, gix-transport v0.48.0, gix-protocol v0.51.0, gix-status v0.20.0, gix-submodule v0.20.0, gix-worktree-state v0.20.0, gix v0.73.0, gix-fsck v0.12.0, gitoxide-core v0.48.0, gitoxide v0.45.0, safety bump 43 crates ([`5a919c4`](https://github.com/GitoxideLabs/gitoxide/commit/5a919c48393020d47c7034946108577dd213b80a)) - Update changelogs prior to release ([`65037b5`](https://github.com/GitoxideLabs/gitoxide/commit/65037b56918b90ac07454a815b0ed136df2fca3b)) - Merge pull request #2011 from blinxen/main ([`fd49eee`](https://github.com/GitoxideLabs/gitoxide/commit/fd49eeeb850ea3c3956ca15be2bf4e04a3d319ad)) - Update `imara-diff` to the latest version. ([`732adb8`](https://github.com/GitoxideLabs/gitoxide/commit/732adb87c90283bd8f8fce6d633eacc25e10b353)) - Merge pull request #2014 from GitoxideLabs/zip ([`648022b`](https://github.com/GitoxideLabs/gitoxide/commit/648022b44e12f597cae55cc45830d0a19b87eb4c)) - Release gix-glob v0.20.1, gix-attributes v0.26.1, gix-command v0.6.1, gix-filter v0.19.2, gix-worktree-stream v0.21.2, gix-archive v0.21.2 ([`f0ed2cc`](https://github.com/GitoxideLabs/gitoxide/commit/f0ed2cc0046f866e67944bff9aef0579c12d5852)) - Merge pull request #2009 from GitoxideLabs/release-gix-index ([`c3f06ae`](https://github.com/GitoxideLabs/gitoxide/commit/c3f06ae424ab4e1918a364cabe8276297465a73a)) - Release gix-path v0.10.18, gix-date v0.10.2, gix-traverse v0.46.2, gix-index v0.40.1 ([`d2b4c44`](https://github.com/GitoxideLabs/gitoxide/commit/d2b4c44fcb2bf43e80d67532262631a5086f08de)) - Merge pull request #1971 from GitoxideLabs/new-release ([`8d4c4d1`](https://github.com/GitoxideLabs/gitoxide/commit/8d4c4d1e09f84c962c29d98a686c64228196ac13))
## 0.5.1 (2025-04-26) ### Commit Statistics - 3 commits contributed to the release. - 0 commits were understood as [conventional](https://www.conventionalcommits.org). - 0 issues like '(#ID)' were seen in commit messages ### Commit Details
view details * **Uncategorized** - Release gix-date v0.10.1, gix-utils v0.3.0, gix-actor v0.35.1, gix-validate v0.10.0, gix-path v0.10.17, gix-features v0.42.1, gix-hash v0.18.0, gix-hashtable v0.8.1, gix-object v0.49.1, gix-glob v0.20.0, gix-quote v0.6.0, gix-attributes v0.26.0, gix-command v0.6.0, gix-packetline-blocking v0.19.0, gix-filter v0.19.1, gix-fs v0.15.0, gix-commitgraph v0.28.0, gix-revwalk v0.20.1, gix-traverse v0.46.1, gix-worktree-stream v0.21.1, gix-archive v0.21.1, gix-tempfile v17.1.0, gix-lock v17.1.0, gix-index v0.40.0, gix-config-value v0.15.0, gix-pathspec v0.11.0, gix-ignore v0.15.0, gix-worktree v0.41.0, gix-diff v0.52.1, gix-blame v0.2.1, gix-ref v0.52.1, gix-sec v0.11.0, gix-config v0.45.1, gix-prompt v0.11.0, gix-url v0.31.0, gix-credentials v0.29.0, gix-discover v0.40.1, gix-dir v0.14.1, gix-mailmap v0.27.1, gix-revision v0.34.1, gix-merge v0.5.1, gix-negotiate v0.20.1, gix-pack v0.59.1, gix-odb v0.69.1, gix-refspec v0.30.1, gix-shallow v0.4.0, gix-packetline v0.19.0, gix-transport v0.47.0, gix-protocol v0.50.1, gix-status v0.19.1, gix-submodule v0.19.1, gix-worktree-state v0.19.0, gix v0.72.1, gix-fsck v0.11.1, gitoxide-core v0.47.1, gitoxide v0.44.0 ([`e104545`](https://github.com/GitoxideLabs/gitoxide/commit/e104545b78951ca882481d4a58f4425a8bc81c87)) - Bump all prior pratch levels to majors ([`5f7f805`](https://github.com/GitoxideLabs/gitoxide/commit/5f7f80570e1a5522e76ea58cccbb957249a0dffe)) - Merge pull request #1969 from GitoxideLabs/new-release ([`631f07a`](https://github.com/GitoxideLabs/gitoxide/commit/631f07ad0c1cb93d9da42cf2c8499584fe91880a))
## 0.5.0 (2025-04-25) A maintenance release without user-facing changes. ### Commit Statistics - 11 commits contributed to the release. - 0 commits were understood as [conventional](https://www.conventionalcommits.org). - 0 issues like '(#ID)' were seen in commit messages ### Commit Details
view details * **Uncategorized** - Release gix-path v0.10.16, gix-features v0.42.0, gix-hash v0.17.1, gix-object v0.49.0, gix-glob v0.19.1, gix-quote v0.5.1, gix-attributes v0.25.1, gix-command v0.5.1, gix-packetline-blocking v0.18.4, gix-filter v0.19.0, gix-fs v0.14.1, gix-commitgraph v0.27.1, gix-revwalk v0.20.0, gix-traverse v0.46.0, gix-worktree-stream v0.21.0, gix-archive v0.21.0, gix-tempfile v17.0.1, gix-lock v17.0.1, gix-index v0.39.1, gix-config-value v0.14.13, gix-pathspec v0.10.1, gix-ignore v0.14.1, gix-worktree v0.40.1, gix-diff v0.52.0, gix-blame v0.2.0, gix-ref v0.52.0, gix-sec v0.10.13, gix-config v0.45.0, gix-prompt v0.10.1, gix-url v0.30.1, gix-credentials v0.28.1, gix-discover v0.40.0, gix-dir v0.14.0, gix-mailmap v0.27.0, gix-revision v0.34.0, gix-merge v0.5.0, gix-negotiate v0.20.0, gix-pack v0.59.0, gix-odb v0.69.0, gix-refspec v0.30.0, gix-shallow v0.3.1, gix-packetline v0.18.5, gix-transport v0.46.1, gix-protocol v0.50.0, gix-status v0.19.0, gix-submodule v0.19.0, gix-worktree-state v0.18.1, gix v0.72.0, gix-fsck v0.11.0, gitoxide-core v0.47.0, gitoxide v0.43.0 ([`cc5b696`](https://github.com/GitoxideLabs/gitoxide/commit/cc5b696b7b73277ddcc3ef246714cf80a092cf76)) - Adjusting changelogs prior to release of gix-path v0.10.16, gix-features v0.42.0, gix-hash v0.17.1, gix-object v0.49.0, gix-glob v0.19.1, gix-quote v0.5.1, gix-attributes v0.25.1, gix-command v0.5.1, gix-packetline-blocking v0.18.4, gix-filter v0.19.0, gix-fs v0.14.1, gix-commitgraph v0.27.1, gix-revwalk v0.20.0, gix-traverse v0.46.0, gix-worktree-stream v0.21.0, gix-archive v0.21.0, gix-tempfile v17.0.1, gix-lock v17.0.1, gix-index v0.39.1, gix-config-value v0.14.13, gix-pathspec v0.10.1, gix-ignore v0.14.1, gix-worktree v0.40.1, gix-diff v0.52.0, gix-blame v0.2.0, gix-ref v0.52.0, gix-sec v0.10.13, gix-config v0.45.0, gix-prompt v0.10.1, gix-url v0.30.1, gix-credentials v0.28.1, gix-discover v0.40.0, gix-dir v0.14.0, gix-mailmap v0.27.0, gix-revision v0.34.0, gix-merge v0.5.0, gix-negotiate v0.20.0, gix-pack v0.59.0, gix-odb v0.69.0, gix-refspec v0.30.0, gix-shallow v0.3.1, gix-packetline v0.18.5, gix-transport v0.46.1, gix-protocol v0.50.0, gix-status v0.19.0, gix-submodule v0.19.0, gix-worktree-state v0.18.1, gix v0.72.0, gix-fsck v0.11.0, gitoxide-core v0.47.0, gitoxide v0.43.0, safety bump 7 crates ([`49fa9f3`](https://github.com/GitoxideLabs/gitoxide/commit/49fa9f38110ba975d68f5ac3baefeb55f0a0501b)) - Release gix-date v0.10.0, gix-utils v0.2.1, gix-actor v0.35.0, gix-validate v0.9.5, gix-path v0.10.15, gix-features v0.42.0, gix-hash v0.17.1, gix-object v0.49.0, gix-glob v0.19.1, gix-quote v0.5.1, gix-attributes v0.25.0, gix-command v0.5.1, gix-packetline-blocking v0.18.4, gix-filter v0.19.0, gix-fs v0.14.0, gix-commitgraph v0.27.1, gix-revwalk v0.20.0, gix-traverse v0.46.0, gix-worktree-stream v0.21.0, gix-archive v0.21.0, gix-tempfile v17.0.1, gix-lock v17.0.1, gix-index v0.39.0, gix-config-value v0.14.13, gix-pathspec v0.10.1, gix-ignore v0.14.1, gix-worktree v0.40.0, gix-diff v0.52.0, gix-blame v0.2.0, gix-ref v0.51.0, gix-sec v0.10.13, gix-config v0.45.0, gix-prompt v0.10.1, gix-url v0.30.1, gix-credentials v0.28.1, gix-discover v0.40.0, gix-dir v0.14.0, gix-mailmap v0.27.0, gix-revision v0.34.0, gix-merge v0.5.0, gix-negotiate v0.20.0, gix-pack v0.59.0, gix-odb v0.69.0, gix-refspec v0.30.0, gix-shallow v0.3.1, gix-packetline v0.18.5, gix-transport v0.46.0, gix-protocol v0.50.0, gix-status v0.19.0, gix-submodule v0.19.0, gix-worktree-state v0.18.0, gix v0.72.0, gix-fsck v0.11.0, gitoxide-core v0.46.0, gitoxide v0.43.0, safety bump 30 crates ([`db0b095`](https://github.com/GitoxideLabs/gitoxide/commit/db0b0957930e3ebb1b3f05ed8d7e7a557eb384a2)) - Update changelogs prior to release ([`0bf84db`](https://github.com/GitoxideLabs/gitoxide/commit/0bf84dbc041f59efba06adcf422c60b5d6e350f0)) - Merge pull request #1935 from pierrechevalier83/fix_1923 ([`3b1bef7`](https://github.com/GitoxideLabs/gitoxide/commit/3b1bef7cc40e16b61bcc117ca90ebae21df7c7b1)) - J fmt ([`c3c6504`](https://github.com/GitoxideLabs/gitoxide/commit/c3c650448f92bcb27194ce0a51f7d604ce87920d)) - Merge pull request #1949 from GitoxideLabs/dependabot/cargo/cargo-6893e2988a ([`b5e9059`](https://github.com/GitoxideLabs/gitoxide/commit/b5e905991155ace32ef21464e69a8369a773f02b)) - Bump the cargo group with 21 updates ([`68e6b2e`](https://github.com/GitoxideLabs/gitoxide/commit/68e6b2e54613fe788d645ea8c942c71a39c6ede1)) - Merge pull request #1917 from pierrechevalier83/issue_1887 ([`6307f57`](https://github.com/GitoxideLabs/gitoxide/commit/6307f571f969eb7ff2490e4c68dc7994fb2fecac)) - Adapt to changes in gix-object ([`8969245`](https://github.com/GitoxideLabs/gitoxide/commit/8969245a6b5874d8524f508569ae1266e48d100e)) - Merge pull request #1919 from GitoxideLabs/release ([`420e730`](https://github.com/GitoxideLabs/gitoxide/commit/420e730f765b91e1d17daca6bb1f99bdb2e54fda))
## 0.4.0 (2025-04-04) A maintenance release without user-facing changes. ### Commit Statistics - 14 commits contributed to the release. - 0 commits were understood as [conventional](https://www.conventionalcommits.org). - 0 issues like '(#ID)' were seen in commit messages ### Thanks Clippy [Clippy](https://github.com/rust-lang/rust-clippy) helped 1 time to make code idiomatic. ### Commit Details
view details * **Uncategorized** - Release gix-dir v0.13.0, gix-mailmap v0.26.0, gix-revision v0.33.0, gix-merge v0.4.0, gix-negotiate v0.19.0, gix-pack v0.58.0, gix-odb v0.68.0, gix-refspec v0.29.0, gix-shallow v0.3.0, gix-packetline v0.18.4, gix-transport v0.46.0, gix-protocol v0.49.0, gix-status v0.18.0, gix-submodule v0.18.0, gix-worktree-state v0.18.0, gix v0.71.0, gix-fsck v0.10.0, gitoxide-core v0.46.0, gitoxide v0.42.0 ([`d248e3d`](https://github.com/GitoxideLabs/gitoxide/commit/d248e3d87d45ca3983cb9fd7c6143dacbd8301cc)) - Release gix-sec v0.10.12, gix-config v0.44.0, gix-prompt v0.10.0, gix-url v0.30.0, gix-credentials v0.28.0, gix-discover v0.39.0, gix-dir v0.13.0, gix-mailmap v0.26.0, gix-revision v0.33.0, gix-merge v0.4.0, gix-negotiate v0.19.0, gix-pack v0.58.0, gix-odb v0.68.0, gix-refspec v0.29.0, gix-shallow v0.3.0, gix-packetline v0.18.4, gix-transport v0.46.0, gix-protocol v0.49.0, gix-status v0.18.0, gix-submodule v0.18.0, gix-worktree-state v0.18.0, gix v0.71.0, gix-fsck v0.10.0, gitoxide-core v0.46.0, gitoxide v0.42.0 ([`ada5a94`](https://github.com/GitoxideLabs/gitoxide/commit/ada5a9447dc3c210afbd8866fe939c3f3a024226)) - Release gix-date v0.9.4, gix-utils v0.2.0, gix-actor v0.34.0, gix-features v0.41.0, gix-hash v0.17.0, gix-hashtable v0.8.0, gix-path v0.10.15, gix-validate v0.9.4, gix-object v0.48.0, gix-glob v0.19.0, gix-quote v0.5.0, gix-attributes v0.25.0, gix-command v0.5.0, gix-packetline-blocking v0.18.3, gix-filter v0.18.0, gix-fs v0.14.0, gix-commitgraph v0.27.0, gix-revwalk v0.19.0, gix-traverse v0.45.0, gix-worktree-stream v0.20.0, gix-archive v0.20.0, gix-tempfile v17.0.0, gix-lock v17.0.0, gix-index v0.39.0, gix-config-value v0.14.12, gix-pathspec v0.10.0, gix-ignore v0.14.0, gix-worktree v0.40.0, gix-diff v0.51.0, gix-blame v0.1.0, gix-ref v0.51.0, gix-config v0.44.0, gix-prompt v0.10.0, gix-url v0.30.0, gix-credentials v0.28.0, gix-discover v0.39.0, gix-dir v0.13.0, gix-mailmap v0.26.0, gix-revision v0.33.0, gix-merge v0.4.0, gix-negotiate v0.19.0, gix-pack v0.58.0, gix-odb v0.68.0, gix-refspec v0.29.0, gix-shallow v0.3.0, gix-packetline v0.18.4, gix-transport v0.46.0, gix-protocol v0.49.0, gix-status v0.18.0, gix-submodule v0.18.0, gix-worktree-state v0.18.0, gix v0.71.0, gix-fsck v0.10.0, gitoxide-core v0.46.0, gitoxide v0.42.0, safety bump 48 crates ([`b41312b`](https://github.com/GitoxideLabs/gitoxide/commit/b41312b478b0d19efb330970cf36dba45d0fbfbd)) - Update changelogs prior to release ([`38dff41`](https://github.com/GitoxideLabs/gitoxide/commit/38dff41d09b6841ff52435464e77cd012dce7645)) - Merge pull request #1915 from emilazy/push-qvyqmopsoltr ([`4660f7a`](https://github.com/GitoxideLabs/gitoxide/commit/4660f7a6f71873311f68f170b0f1f6659a02829d)) - Migrate `gix_object::{try_ =>}compute_hash` users ([`3d7e379`](https://github.com/GitoxideLabs/gitoxide/commit/3d7e379f26cbe53ddb430427b8e88ce0966be456)) - Migrate hashing API users to fallible versions ([`fbf6cc8`](https://github.com/GitoxideLabs/gitoxide/commit/fbf6cc897cfeff5ed2a2d5946c060e0cebbd1afd)) - Merge pull request #1907 from EliahKagan/run-ci/raw ([`7b17da6`](https://github.com/GitoxideLabs/gitoxide/commit/7b17da6ca1dce275de0d32d0b0d6c238621e6ee3)) - Drop trailing `,` just before `)` on same line in function calls ([`66a5ae1`](https://github.com/GitoxideLabs/gitoxide/commit/66a5ae1b586d583066402c801213a55141e2aad6)) - Merge pull request #1854 from GitoxideLabs/montly-report ([`16a248b`](https://github.com/GitoxideLabs/gitoxide/commit/16a248beddbfbd21621f2bb57aaa82dca35acb19)) - Thanks clippy ([`8e96ed3`](https://github.com/GitoxideLabs/gitoxide/commit/8e96ed37db680855d194c10673ba2dab28655d95)) - Merge pull request #1800 from GitoxideLabs/improvements ([`cc7b614`](https://github.com/GitoxideLabs/gitoxide/commit/cc7b614e541aa4a485f470f36516589619e2de5e)) - Adapt to changes in `gix-command` ([`28f712e`](https://github.com/GitoxideLabs/gitoxide/commit/28f712e97ebd805cbcffe184203c9089248b0ca8)) - Merge pull request #1778 from GitoxideLabs/new-release ([`8df0db2`](https://github.com/GitoxideLabs/gitoxide/commit/8df0db2f8fe1832a5efd86d6aba6fb12c4c855de))
## 0.3.0 (2025-01-18) ### Chore - bump `rust-version` to 1.70 That way clippy will allow to use the fantastic `Option::is_some_and()` and friends. ### Commit Statistics - 6 commits contributed to the release over the course of 27 calendar days. - 27 days passed between releases. - 1 commit was understood as [conventional](https://www.conventionalcommits.org). - 0 issues like '(#ID)' were seen in commit messages ### Commit Details
view details * **Uncategorized** - Release gix-utils v0.1.14, gix-actor v0.33.2, gix-hash v0.16.0, gix-trace v0.1.12, gix-features v0.40.0, gix-hashtable v0.7.0, gix-path v0.10.14, gix-validate v0.9.3, gix-object v0.47.0, gix-glob v0.18.0, gix-quote v0.4.15, gix-attributes v0.24.0, gix-command v0.4.1, gix-packetline-blocking v0.18.2, gix-filter v0.17.0, gix-fs v0.13.0, gix-chunk v0.4.11, gix-commitgraph v0.26.0, gix-revwalk v0.18.0, gix-traverse v0.44.0, gix-worktree-stream v0.19.0, gix-archive v0.19.0, gix-bitmap v0.2.14, gix-tempfile v16.0.0, gix-lock v16.0.0, gix-index v0.38.0, gix-config-value v0.14.11, gix-pathspec v0.9.0, gix-ignore v0.13.0, gix-worktree v0.39.0, gix-diff v0.50.0, gix-blame v0.0.0, gix-ref v0.50.0, gix-sec v0.10.11, gix-config v0.43.0, gix-prompt v0.9.1, gix-url v0.29.0, gix-credentials v0.27.0, gix-discover v0.38.0, gix-dir v0.12.0, gix-mailmap v0.25.2, gix-revision v0.32.0, gix-merge v0.3.0, gix-negotiate v0.18.0, gix-pack v0.57.0, gix-odb v0.67.0, gix-refspec v0.28.0, gix-shallow v0.2.0, gix-packetline v0.18.3, gix-transport v0.45.0, gix-protocol v0.48.0, gix-status v0.17.0, gix-submodule v0.17.0, gix-worktree-state v0.17.0, gix v0.70.0, gix-fsck v0.9.0, gitoxide-core v0.45.0, gitoxide v0.41.0, safety bump 42 crates ([`dea106a`](https://github.com/GitoxideLabs/gitoxide/commit/dea106a8c4fecc1f0a8f891a2691ad9c63964d25)) - Don't specify version numbers in dev-dependencies ([`7570daa`](https://github.com/GitoxideLabs/gitoxide/commit/7570daa50a93a2b99e9cd5228cb274f20839865f)) - Update all changelogs prior to release ([`1f6390c`](https://github.com/GitoxideLabs/gitoxide/commit/1f6390c53ba68ce203ae59eb3545e2631dd8a106)) - Merge pull request #1762 from GitoxideLabs/fix-1759 ([`7ec21bb`](https://github.com/GitoxideLabs/gitoxide/commit/7ec21bb96ce05b29dde74b2efdf22b6e43189aab)) - Bump `rust-version` to 1.70 ([`17835bc`](https://github.com/GitoxideLabs/gitoxide/commit/17835bccb066bbc47cc137e8ec5d9fe7d5665af0)) - Merge pull request #1739 from GitoxideLabs/new-release ([`d22937f`](https://github.com/GitoxideLabs/gitoxide/commit/d22937f91b8ecd0ece0930c4df9d580f3819b2fe))
## 0.2.0 (2024-12-22) ### Bug Fixes - don't incorrectly mark as auto-resolved conflict if there was none. Previously it was possible to mark perfectly working content merges as conflicting if we would choose 'our' or 'their' resolution. - when binary merges are performed, adjust the returned resolution to indicate auto-resolution. Previously it wasn't possible to detect auto-resolution, even though it can be assumed if a resolution mode was provided. ### New Features (BREAKING) - replace `tree::Options::allow_lossy_resolution` with `*::tree_conflicts`. That way it's possible to steer how to resolve tree-related conflicts while making it possible to detect that a conflict happened. ### Bug Fixes (BREAKING) - assure that `tree::apply_index_entries()` cannot unknowingly leave unconflicted *and* conflicted entries. This is a massive footgun currently where incorrect usage is very likely while causing all kinds of mistakes. ### Commit Statistics - 13 commits contributed to the release over the course of 28 calendar days. - 28 days passed between releases. - 4 commits were understood as [conventional](https://www.conventionalcommits.org). - 0 issues like '(#ID)' were seen in commit messages ### Commit Details
view details * **Uncategorized** - Release gix-dir v0.11.0, gix-revision v0.31.1, gix-merge v0.2.0, gix-pack v0.56.0, gix-odb v0.66.0, gix-shallow v0.1.0, gix-packetline v0.18.2, gix-transport v0.44.0, gix-protocol v0.47.0, gix-status v0.16.0, gix-worktree-state v0.16.0, gix v0.69.0, gitoxide-core v0.44.0, gitoxide v0.40.0 ([`beb0ea8`](https://github.com/GitoxideLabs/gitoxide/commit/beb0ea8c4ff94c64b7773772a9d388ccb403f3c1)) - Release gix-date v0.9.3, gix-object v0.46.1, gix-command v0.4.0, gix-filter v0.16.0, gix-fs v0.12.1, gix-traverse v0.43.1, gix-worktree-stream v0.18.0, gix-archive v0.18.0, gix-ref v0.49.1, gix-prompt v0.9.0, gix-url v0.28.2, gix-credentials v0.26.0, gix-diff v0.49.0, gix-dir v0.11.0, gix-revision v0.31.1, gix-merge v0.2.0, gix-pack v0.56.0, gix-odb v0.66.0, gix-shallow v0.1.0, gix-packetline v0.18.2, gix-transport v0.44.0, gix-protocol v0.47.0, gix-status v0.16.0, gix-worktree-state v0.16.0, gix v0.69.0, gitoxide-core v0.44.0, gitoxide v0.40.0, safety bump 16 crates ([`c1ba571`](https://github.com/GitoxideLabs/gitoxide/commit/c1ba5719132227410abefeb54e3032b015233e94)) - Update changelogs prior to release ([`7ea8582`](https://github.com/GitoxideLabs/gitoxide/commit/7ea85821c6999e3e6cf50a2a009904e9c38642a4)) - Merge pull request #1705 from GitoxideLabs/merge ([`520c832`](https://github.com/GitoxideLabs/gitoxide/commit/520c832cfcfb34eb7617be55ebe2719ab35595fd)) - Adapt to changes in `gix-diff` related to not tracking empty blobs anymore. ([`f53cec5`](https://github.com/GitoxideLabs/gitoxide/commit/f53cec5b2ce8aa6eeb4a3016511bbb1ac25fa2f7)) - Don't incorrectly mark as auto-resolved conflict if there was none. ([`da585db`](https://github.com/GitoxideLabs/gitoxide/commit/da585db16bae9f44e6300f31b0f784c356d5bd3f)) - Assure that `tree::apply_index_entries()` cannot unknowingly leave unconflicted *and* conflicted entries. ([`3e94b58`](https://github.com/GitoxideLabs/gitoxide/commit/3e94b58f00334392da89fb2772034efe06d3a741)) - Implement support for resolving irreconcilable tree conflicts with 'ours' or 'ancestor' ([`e487cca`](https://github.com/GitoxideLabs/gitoxide/commit/e487cca78d8e6c5b51d2614daf05c98e1469ee69)) - Merge pull request #1708 from EliahKagan/run-ci/mode ([`34efe03`](https://github.com/GitoxideLabs/gitoxide/commit/34efe03fdab97bbf5603a7ea605f37096ff1736a)) - Add missing executable bits on fixture scripts ([`ed757ea`](https://github.com/GitoxideLabs/gitoxide/commit/ed757ea0f4f80968d80c5d9d75ba49f031ee77fc)) - Replace `tree::Options::allow_lossy_resolution` with `*::tree_conflicts`. ([`1c3ba81`](https://github.com/GitoxideLabs/gitoxide/commit/1c3ba812bd3df5991a457b68a962aa1fd87fa915)) - When binary merges are performed, adjust the returned resolution to indicate auto-resolution. ([`a57192c`](https://github.com/GitoxideLabs/gitoxide/commit/a57192c0418aab2e3cd2ddb7b7a951cd3aaeb58f)) - Merge pull request #1701 from GitoxideLabs/release ([`e8b3b41`](https://github.com/GitoxideLabs/gitoxide/commit/e8b3b41dd79b8f4567670b1f89dd8867b6134e9e))
## 0.1.0 (2024-11-24) ### New Features - provide a way to record and apply index changes. These changes will then be applicable to an index that is created from the written tree editor. - when blob-merging, clarify if something would have conflicted. - add `Conflict::is_unresolved()` as utility to see if multiple of them are considered unresolved. - respect the `conflict-marker-size` attribute as well. - add `tree()` and `commit()` merge support, en par with `merge-ORT` as far as tests go. Note that this judgement of quality is based on a limited amount of partially complex test, but it's likely that in practice there will be deviations of sorts. Also, given the complexity of the implementation it is definitely under-tested, but with that it's mostly en par with Git, unfortunatly. On the bright side, some of the tests are very taxing and I'd hope this means something for real-world quality. - add `blob::PlatformRef::id_by_pick()` to more efficiently pick merge results. This works by either selecting a possibly unchanged and not even loaded resource, instead of always loading it to provide a buffer, in case the user doesn't actually want a buffer. Note that this also alters `buffer_by_pick()` to enforce handling of the 'buffer-too-large' option. ### Other - Fix code fences in gix-merge `ConflictStyle` and `Driver` They are not Rust code (they are text with conflict markers and a shell command, respectively) and they are not intended as doctests, but the absence of anything on the opening line caused them to be taken as doctests, so `cargo test --workspace --doc` would fail with parsing errors. (Doctests for all crates have not always been run automatically on CI, so this was not caught when these documentation comments were introduced in #1585.) ### New Features (BREAKING) - Add more modes for checking for unresolved conflicts. They aim at making it possible to know if a conflict happened that was automatically resolved. - add `commit::virtual_merge_base()` to produce the single merge-base to use. This allows more flexibility in conjunction with tree-merging, as commits as input aren't required. This is breaking as it changes the return value of `commit()`. - `Repository::merge_trees()` now has a fully-wrapped outcome. That way, more attached types are used for greater convenience. - Don't fail on big files during blob-merge, but turn them into binary merges. Binary merges are mere choices of which side to pick, which works well for big files as well. Git doesn't define this well during its own merges, so there is some room here. ### Bug Fixes (BREAKING) - Adjust blob-merge baseline to also test the reverse of each operation This also fixes an issue with blob merge computations. It's breaking because the marker-size was reduced to `u8`. - prefer to receive borrowed `gix_command::Context` when it's just passed on. That way, the clone occours only when needed, without forcing the caller to pre-emptively clone each time it's called. ### Commit Statistics - 29 commits contributed to the release. - 13 commits were understood as [conventional](https://www.conventionalcommits.org). - 0 issues like '(#ID)' were seen in commit messages ### Commit Details
view details * **Uncategorized** - Release gix-glob v0.17.1, gix-command v0.3.11, gix-filter v0.15.0, gix-chunk v0.4.10, gix-commitgraph v0.25.1, gix-revwalk v0.17.0, gix-traverse v0.43.0, gix-worktree-stream v0.17.0, gix-archive v0.17.0, gix-config-value v0.14.10, gix-lock v15.0.1, gix-ref v0.49.0, gix-sec v0.10.10, gix-config v0.42.0, gix-prompt v0.8.9, gix-url v0.28.1, gix-credentials v0.25.1, gix-ignore v0.12.1, gix-bitmap v0.2.13, gix-index v0.37.0, gix-worktree v0.38.0, gix-diff v0.48.0, gix-discover v0.37.0, gix-pathspec v0.8.1, gix-dir v0.10.0, gix-mailmap v0.25.1, gix-revision v0.31.0, gix-merge v0.1.0, gix-negotiate v0.17.0, gix-pack v0.55.0, gix-odb v0.65.0, gix-packetline v0.18.1, gix-transport v0.43.1, gix-protocol v0.46.1, gix-refspec v0.27.0, gix-status v0.15.0, gix-submodule v0.16.0, gix-worktree-state v0.15.0, gix v0.68.0, gix-fsck v0.8.0, gitoxide-core v0.43.0, gitoxide v0.39.0 ([`4000197`](https://github.com/GitoxideLabs/gitoxide/commit/4000197ecc8cf1a5d79361620e4c114f86476703)) - Release gix-date v0.9.2, gix-actor v0.33.1, gix-hash v0.15.1, gix-features v0.39.1, gix-validate v0.9.2, gix-object v0.46.0, gix-path v0.10.13, gix-quote v0.4.14, gix-attributes v0.23.1, gix-packetline-blocking v0.18.1, gix-filter v0.15.0, gix-chunk v0.4.10, gix-commitgraph v0.25.1, gix-revwalk v0.17.0, gix-traverse v0.43.0, gix-worktree-stream v0.17.0, gix-archive v0.17.0, gix-config-value v0.14.10, gix-lock v15.0.1, gix-ref v0.49.0, gix-config v0.42.0, gix-prompt v0.8.9, gix-url v0.28.1, gix-credentials v0.25.1, gix-bitmap v0.2.13, gix-index v0.37.0, gix-worktree v0.38.0, gix-diff v0.48.0, gix-discover v0.37.0, gix-pathspec v0.8.1, gix-dir v0.10.0, gix-mailmap v0.25.1, gix-revision v0.31.0, gix-merge v0.1.0, gix-negotiate v0.17.0, gix-pack v0.55.0, gix-odb v0.65.0, gix-packetline v0.18.1, gix-transport v0.43.1, gix-protocol v0.46.1, gix-refspec v0.27.0, gix-status v0.15.0, gix-submodule v0.16.0, gix-worktree-state v0.15.0, gix v0.68.0, gix-fsck v0.8.0, gitoxide-core v0.43.0, gitoxide v0.39.0, safety bump 25 crates ([`8ce4912`](https://github.com/GitoxideLabs/gitoxide/commit/8ce49129a75e21346ceedf7d5f87fa3a34b024e1)) - Prepare changelogs prior to release ([`bc9d994`](https://github.com/GitoxideLabs/gitoxide/commit/bc9d9943e8499a76fc47a05b63ac5c684187d1ae)) - Merge pull request #1661 from GitoxideLabs/merge ([`0b7abfb`](https://github.com/GitoxideLabs/gitoxide/commit/0b7abfbdebe8c5ab30b89499a70dd7727de41184)) - Provide a way to record and apply index changes. ([`3ee8b62`](https://github.com/GitoxideLabs/gitoxide/commit/3ee8b62dd025d6fdb0d9929dec7a561fa576f545)) - Add more modes for checking for unresolved conflicts. ([`aff76f2`](https://github.com/GitoxideLabs/gitoxide/commit/aff76f291a52fc6806944d72d249a8bd1b804c39)) - When blob-merging, clarify if something would have conflicted. ([`09213bc`](https://github.com/GitoxideLabs/gitoxide/commit/09213bc1b2aa725af1571dff040415772e844c3a)) - Merge pull request #1662 from paolobarbolini/thiserror-v2 ([`7a40648`](https://github.com/GitoxideLabs/gitoxide/commit/7a406481b072728cec089d7c05364f9dbba335a2)) - Upgrade thiserror to v2.0.0 ([`0f0e4fe`](https://github.com/GitoxideLabs/gitoxide/commit/0f0e4fe121932a8a6302cf950b3caa4c8608fb61)) - Merge pull request #1658 from GitoxideLabs/merge ([`905e5b4`](https://github.com/GitoxideLabs/gitoxide/commit/905e5b42a6163f92edef8fab82d97aeb6f17cf06)) - Add `commit::virtual_merge_base()` to produce the single merge-base to use. ([`9d43b75`](https://github.com/GitoxideLabs/gitoxide/commit/9d43b753a225482645b22e4151bf7dc192c8c082)) - Merge pull request #1654 from EliahKagan/doctest-workspace ([`1411289`](https://github.com/GitoxideLabs/gitoxide/commit/141128942c26bd63fc6855e5137b98f8da814446)) - Fix code fences in gix-merge `ConflictStyle` and `Driver` ([`2fdbcfe`](https://github.com/GitoxideLabs/gitoxide/commit/2fdbcfe17cdcc480e320582d7c6b48f8b615bf3b)) - Merge pull request #1651 from GitoxideLabs/merge ([`a876533`](https://github.com/GitoxideLabs/gitoxide/commit/a8765330fc16997dee275866b18a128dec1c5d55)) - `Repository::merge_trees()` now has a fully-wrapped outcome. ([`1d2262f`](https://github.com/GitoxideLabs/gitoxide/commit/1d2262f2ca416e3c22f9601e7eab11f3372b2128)) - Add `Conflict::is_unresolved()` as utility to see if multiple of them are considered unresolved. ([`9e106c4`](https://github.com/GitoxideLabs/gitoxide/commit/9e106c4ab7ceea091cd8baef99a480739bd53c9d)) - Remove a TODO that turned out to be unnecessary. ([`5b428a9`](https://github.com/GitoxideLabs/gitoxide/commit/5b428a9e931b19622ae76c25bfb1fe882744cd1f)) - Merge pull request #1652 from EliahKagan/run-ci/chmod ([`8e99eba`](https://github.com/GitoxideLabs/gitoxide/commit/8e99eba2a284b35b5e9bcb97e47bfbbafc3df5d1)) - Update tree-baseline archive ([`ab45415`](https://github.com/GitoxideLabs/gitoxide/commit/ab45415a0119cbdcbd2fcbe8c7b6e2580432f705)) - Set +x in index in added-file-changed-content-and-mode ([`6faf11a`](https://github.com/GitoxideLabs/gitoxide/commit/6faf11a0e0916fdf03e4532d28e40674c369bf9b)) - Set +x in index in same-rename-different-mode baseline ([`041bdde`](https://github.com/GitoxideLabs/gitoxide/commit/041bddecacb23b4925bcd9bcdc4a86aec2ea719d)) - Merge pull request #1618 from GitoxideLabs/merge ([`3fb989b`](https://github.com/GitoxideLabs/gitoxide/commit/3fb989be21c739bbfeac93953c1685e7c6cd2106)) - Respect the `conflict-marker-size` attribute as well. ([`bd91d6a`](https://github.com/GitoxideLabs/gitoxide/commit/bd91d6ae97d1981a2366136040407590f64fdad4)) - Add `tree()` and `commit()` merge support, en par with `merge-ORT` as far as tests go. ([`4b1764c`](https://github.com/GitoxideLabs/gitoxide/commit/4b1764ca9148e08ae9f11bca68e0689b12bc8c80)) - Adjust blob-merge baseline to also test the reverse of each operation ([`de1cfb6`](https://github.com/GitoxideLabs/gitoxide/commit/de1cfb6a9caf5ac086c6411824835c75e888e2d7)) - Add `blob::PlatformRef::id_by_pick()` to more efficiently pick merge results. ([`dd99991`](https://github.com/GitoxideLabs/gitoxide/commit/dd99991ec2bfb07ef571769abc32f1b35122d5ca)) - Don't fail on big files during blob-merge, but turn them into binary merges. ([`c1cf08c`](https://github.com/GitoxideLabs/gitoxide/commit/c1cf08cc47f98abda017544b1791ab3b4463cc77)) - Prefer to receive borrowed `gix_command::Context` when it's just passed on. ([`78a5355`](https://github.com/GitoxideLabs/gitoxide/commit/78a535572643a0657348aea3c2fed0123505f7fe)) - Merge pull request #1642 from GitoxideLabs/new-release ([`db5c9cf`](https://github.com/GitoxideLabs/gitoxide/commit/db5c9cfce93713b4b3e249cff1f8cc1ef146f470))
## v0.0.0 (2024-10-22) ### Other - Update gitoxide repository URLs This updates `Byron/gitoxide` URLs to `GitoxideLabs/gitoxide` in: - Markdown documentation, except changelogs and other such files where such changes should not be made. - Documentation comments (in .rs files). - Manifest (.toml) files, for the value of the `repository` key. - The comments appearing at the top of a sample hook that contains a repository URL as an example. When making these changes, I also allowed my editor to remove trailing whitespace in any lines in files already being edited (since, in this case, there was no disadvantage to allowing this). The gitoxide repository URL changed when the repository was moved into the recently created GitHub organization `GitoxideLabs`, as detailed in #1406. Please note that, although I believe updating the URLs to their new canonical values is useful, this is not needed to fix any broken links, since `Byron/gitoxide` URLs redirect (and hopefully will always redirect) to the coresponding `GitoxideLabs/gitoxide` URLs. While this change should not break any URLs, some affected URLs were already broken. This updates them, but they are still broken. They will be fixed in a subsequent commit. This also does not update `Byron/gitoxide` URLs in test fixtures or test cases, nor in the `Makefile`. (It may make sense to change some of those too, but it is not really a documentation change.) ### Commit Statistics - 15 commits contributed to the release over the course of 26 calendar days. - 1 commit was understood as [conventional](https://www.conventionalcommits.org). - 0 issues like '(#ID)' were seen in commit messages ### Commit Details
view details * **Uncategorized** - Release gix-merge v0.0.0, gix-negotiate v0.16.0, gix-pack v0.54.0, gix-odb v0.64.0, gix-packetline v0.18.0, gix-transport v0.43.0, gix-protocol v0.46.0, gix-revision v0.30.0, gix-refspec v0.26.0, gix-status v0.14.0, gix-submodule v0.15.0, gix-worktree-state v0.14.0, gix v0.67.0, gix-fsck v0.7.0, gitoxide-core v0.42.0, gitoxide v0.38.0 ([`f1364dc`](https://github.com/GitoxideLabs/gitoxide/commit/f1364dcb8aa66e3d8730e38445b045c5b63c56e6)) - Add new changelog for gix-merge ([`fa3e260`](https://github.com/GitoxideLabs/gitoxide/commit/fa3e2600d7e39011f1d7f410249ebd0426a348a8)) - Release gix-date v0.9.1, gix-utils v0.1.13, gix-actor v0.33.0, gix-hash v0.15.0, gix-trace v0.1.11, gix-features v0.39.0, gix-hashtable v0.6.0, gix-validate v0.9.1, gix-object v0.45.0, gix-path v0.10.12, gix-glob v0.17.0, gix-quote v0.4.13, gix-attributes v0.23.0, gix-command v0.3.10, gix-packetline-blocking v0.18.0, gix-filter v0.14.0, gix-fs v0.12.0, gix-chunk v0.4.9, gix-commitgraph v0.25.0, gix-revwalk v0.16.0, gix-traverse v0.42.0, gix-worktree-stream v0.16.0, gix-archive v0.16.0, gix-config-value v0.14.9, gix-tempfile v15.0.0, gix-lock v15.0.0, gix-ref v0.48.0, gix-sec v0.10.9, gix-config v0.41.0, gix-prompt v0.8.8, gix-url v0.28.0, gix-credentials v0.25.0, gix-ignore v0.12.0, gix-bitmap v0.2.12, gix-index v0.36.0, gix-worktree v0.37.0, gix-diff v0.47.0, gix-discover v0.36.0, gix-pathspec v0.8.0, gix-dir v0.9.0, gix-mailmap v0.25.0, gix-merge v0.0.0, gix-negotiate v0.16.0, gix-pack v0.54.0, gix-odb v0.64.0, gix-packetline v0.18.0, gix-transport v0.43.0, gix-protocol v0.46.0, gix-revision v0.30.0, gix-refspec v0.26.0, gix-status v0.14.0, gix-submodule v0.15.0, gix-worktree-state v0.14.0, gix v0.67.0, gix-fsck v0.7.0, gitoxide-core v0.42.0, gitoxide v0.38.0, safety bump 41 crates ([`3f7e8ee`](https://github.com/GitoxideLabs/gitoxide/commit/3f7e8ee2c5107aec009eada1a05af7941da9cb4d)) - Merge pull request #1624 from EliahKagan/update-repo-url ([`795962b`](https://github.com/GitoxideLabs/gitoxide/commit/795962b107d86f58b1f7c75006da256d19cc80ad)) - Update gitoxide repository URLs ([`64ff0a7`](https://github.com/GitoxideLabs/gitoxide/commit/64ff0a77062d35add1a2dd422bb61075647d1a36)) - Merge pull request #1612 from Byron/merge ([`37c1e4c`](https://github.com/GitoxideLabs/gitoxide/commit/37c1e4c919382c9d213bd5ca299ed659d63ab45d)) - Add some performance traces for blob-merges ([`b25fe4d`](https://github.com/GitoxideLabs/gitoxide/commit/b25fe4d052250ddace9a118b2247537b2a7fa09e)) - Merge pull request #1611 from Byron/merge ([`5ffccd2`](https://github.com/GitoxideLabs/gitoxide/commit/5ffccd2f08d70576347e3ae17a66ca5a60f1d81c)) - Make `blob::Platform::filter_mode` public. ([`b26eb26`](https://github.com/GitoxideLabs/gitoxide/commit/b26eb2618c1764f699530e251ddef4e6cf456ddd)) - Merge pull request #1585 from Byron/merge ([`2261de4`](https://github.com/GitoxideLabs/gitoxide/commit/2261de470aeb77be080f9e423e1513bde85d9cc0)) - Add platform tests and implementation ([`eb37dc3`](https://github.com/GitoxideLabs/gitoxide/commit/eb37dc36d8c42f5a7714c641244ce4a13111b0a1)) - Add all relevant tests for the merge processing pipeline ([`a6f3e30`](https://github.com/GitoxideLabs/gitoxide/commit/a6f3e30017343c01ba61c49fe74ffc69e443a33c)) - Implement `text` and `binary` merge algorithms, also with baseline tests for correctness. ([`0762846`](https://github.com/GitoxideLabs/gitoxide/commit/07628465a0a3f047ec809d287c9a4567b4acd607)) - Sketch the entire API surface to capture all parts of blob-merges ([`9efa09f`](https://github.com/GitoxideLabs/gitoxide/commit/9efa09f10d042dc4d5db4edf4589594450a30b31)) - Add the `gix-merge` crate for capturing merge algorithms ([`65efcb7`](https://github.com/GitoxideLabs/gitoxide/commit/65efcb7624031ae478056fbb49a07ef176f0c96b))
# Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] ## [0.17.0](https://github.com/rust-lang/hashbrown/compare/v0.16.1...v0.17.0) - 2026-04-06 ### Added - Added `hash_table::OccupiedEntry::replace_entry_with` (#669) - Added `hash_map::{OccupiedEntry::into_entry, VacantEntryRef::insert_entry_with_key}` (#670) - Added `hash_table::UnsafeIter` (#667) - Added `iter` methods to various `HashTable` iterators (#667) - Added `HashMap::{replace_key,replace_key_unchecked,insert_with_key_unchecked}` (#681) - Added `into_map` methods to all `HashMap` entry types (#686) - Added `into_table` methods to all `HashTable` entry types (#686) - Added `#[must_use]` to constructors (#697) - `TryReserveError` now implements `Error` (#698) ### Changed - Changed `EntryRef` to use `ToOwned` (#670) - Bumped MSRV to 1.85 (2024 edition) (#676) ### Fixed - `HashTable:clone_from` now forwards to `RawTable::clone_from` instead of using the default implementation (#668) - Fixed potential UB in `RawTableInner::fallible_with_capacity` (#692) - Fixed incorrect length if a hasher panics during rehash (#710) ## [0.16.1](https://github.com/rust-lang/hashbrown/compare/v0.16.0...v0.16.1) - 2025-11-20 ### Added - Added `HashTable` methods related to the raw bucket index (#657) - Added `VacantEntryRef::insert_with_key` (#579) ### Changed - Removed specialization for `Copy` types (#662) - The `get_many_mut` family of methods have been renamed to `get_disjoint_mut` to match the standard library. The old names are still present for now, but deprecated. (#648) - Recognize and use over-sized allocations when using custom allocators. (#523) - Depend on `serde_core` instead of `serde`. (#649) - Optimized `collect` on rayon parallel iterators. (#652) ## [0.16.0](https://github.com/rust-lang/hashbrown/compare/v0.15.5...v0.16.0) - 2025-08-28 ### Changed - Bump foldhash, the default hasher, to 0.2.0. - Replaced `DefaultHashBuilder` with a newtype wrapper around `foldhash` instead of re-exporting it directly. ## [0.15.5](https://github.com/rust-lang/hashbrown/compare/v0.15.4...v0.15.5) - 2025-08-07 ### Added - Added `Entry::or_default_entry` and `Entry::or_insert_entry`. ### Changed - Re-implemented likely/unlikely with `#[cold]` ## [0.15.4](https://github.com/rust-lang/hashbrown/compare/v0.15.3...v0.15.4) - 2025-06-05 ### Changed - Removed optional dependency on compiler-builtins. This only affects building as part of `std`. ## [0.15.3](https://github.com/rust-lang/hashbrown/compare/v0.15.2...v0.15.3) - 2025-04-29 ### Added - SIMD implementation for LoongArch (#592, requires nightly) ### Changed - Optimized insertion path by avoiding an unnecessary `match_empty` (#607) - Increased minimum table size for small types (#615) - Dropped FnMut trait bounds from `ExtractIf` data structures (#616) - Relaxed constraint in `hash_map::EntryRef` insertion methods `K: From<&Q>` to &Q: `Into` (#611) - Added allocator template argument for `rustc_iter` (#605) - The `allocator-api2/nightly` feature is no longer enabled by `hashbrown/nightly` (#606) ## [v0.15.2] - 2024-11-14 ### Added - Marked `const fn` constructors as `rustc_const_stable_indirect` when built as part of the standard library. (#586) ## [v0.15.1] - 2024-11-03 This release removes the `borsh` feature introduced in 0.15.0 because it was found to be incorrectly implemented. Users should use the `hashbrown` feature of the `borsh` crate instead which provides the same trait implementations. ## ~~[v0.15.0] - 2024-10-01~~ This release was _yanked_ due to a broken implementation of the `borsh` feature. This update contains breaking changes that remove the `raw` API with the hope of centralising on the `HashTable` API in the future. You can follow the discussion and progress in #545 to discuss features you think should be added to this API that were previously only possible on the `raw` API. ### Added - Added `borsh` feature with `BorshSerialize` and `BorshDeserialize` impls. (#525) - Added `Assign` impls for `HashSet` operators. (#529) - Added `Default` impls for iterator types. (#542) - Added `HashTable::iter_hash{,_mut}` methods. (#549) - Added `Hash{Table,Map,Set}::allocation_size` methods. (#553) - Implemented `Debug` and `FusedIterator` for all `HashTable` iterators. (#561) - Specialized `Iterator::fold` for all `HashTable` iterators. (#561) ### Changed - Changed `hash_set::VacantEntry::insert` to return `OccupiedEntry`. (#495) - Improved`hash_set::Difference::size_hint` lower-bound. (#530) - Improved `HashSet::is_disjoint` performance. (#531) - `equivalent` feature is now enabled by default. (#532) - `HashSet` operators now return a set with the same allocator. (#529) - Changed the default hasher to foldhash. (#563) - `ahash` feature has been renamed to `default-hasher`. (#533) - Entry API has been reworked and several methods have been renamed. (#535) - `Hash{Map,Set}::insert_unique_unchecked` is now unsafe. (#556) - The signature of `get_many_mut` and related methods was changed. (#562) ### Fixed * Fixed typos, stray backticks in docs. (#558, #560) ### Removed - Raw entry API is now under `raw-entry` feature, to be eventually removed. (#534, #555) - Raw table API has been made private and the `raw` feature is removed; in the future, all code should be using the `HashTable` API instead. (#531, #546) - `rykv` feature was removed; this is now provided by the `rykv` crate instead. (#554) - `HashSet::get_or_insert_owned` was removed in favor of `get_or_insert_with`. (#555) ## [v0.14.5] - 2024-04-28 ### Fixed - Fixed index calculation in panic guard of `clone_from_impl`. (#511) ## ~~[v0.14.4] - 2024-03-19~~ This release was _yanked_ due to a breaking change. ## [v0.14.3] - 2023-11-26 ### Added - Specialized `fold` implementation of iterators. (#480) ### Fixed - Avoid using unstable `ptr::invalid_mut` on nightly. (#481) ## [v0.14.2] - 2023-10-19 ### Added - `HashTable` type which provides a low-level but safe API with explicit hashing. (#466) ### Fixed - Disabled the use of NEON instructions on big-endian ARM. (#475) - Disabled the use of NEON instructions on Miri. (#476) ## [v0.14.1] - 2023-09-28 ### Added - Allow serializing `HashMap`s that use a custom allocator. (#449) ### Changed - Use the `Equivalent` trait from the `equivalent` crate. (#442) - Slightly improved performance of table resizing. (#451) - Relaxed MSRV to 1.63.0. (#457) - Removed `Clone` requirement from custom allocators. (#468) ### Fixed - Fixed custom allocators being leaked in some situations. (#439, #465) ## [v0.14.0] - 2023-06-01 ### Added - Support for `allocator-api2` crate for interfacing with custom allocators on stable. (#417) - Optimized implementation for ARM using NEON instructions. (#430) - Support for rkyv serialization. (#432) - `Equivalent` trait to look up values without `Borrow`. (#345) - `Hash{Map,Set}::raw_table_mut` is added which returns a mutable reference. (#404) - Fast path for `clear` on empty tables. (#428) ### Changed - Optimized insertion to only perform a single lookup. (#277) - `DrainFilter` (`drain_filter`) has been renamed to `ExtractIf` and no longer drops remaining elements when the iterator is dropped. #(374) - Bumped MSRV to 1.64.0. (#431) - `{Map,Set}::raw_table` now returns an immutable reference. (#404) - `VacantEntry` and `OccupiedEntry` now use the default hasher if none is specified in generics. (#389) - `RawTable::data_start` now returns a `NonNull` to match `RawTable::data_end`. (#387) - `RawIter::{reflect_insert, reflect_remove}` are now unsafe. (#429) - `RawTable::find_potential` is renamed to `find_or_find_insert_slot` and returns an `InsertSlot`. (#429) - `RawTable::remove` now also returns an `InsertSlot`. (#429) - `InsertSlot` can be used to insert an element with `RawTable::insert_in_slot`. (#429) - `RawIterHash` no longer has a lifetime tied to that of the `RawTable`. (#427) - The trait bounds of `HashSet::raw_table` have been relaxed to not require `Eq + Hash`. (#423) - `EntryRef::and_replace_entry_with` and `OccupiedEntryRef::replace_entry_with` were changed to give a `&K` instead of a `&Q` to the closure. ### Removed - Support for `bumpalo` as an allocator with custom wrapper. Use `allocator-api2` feature in `bumpalo` to use it as an allocator for `hashbrown` collections. (#417) ## [v0.13.2] - 2023-01-12 ### Fixed - Added `#[inline(always)]` to `find_inner`. (#375) - Fixed `RawTable::allocation_info` for empty tables. (#376) ## [v0.13.1] - 2022-11-10 ### Added - Added `Equivalent` trait to customize key lookups. (#350) - Added support for 16-bit targets. (#368) - Added `RawTable::allocation_info` which provides information about the memory usage of a table. (#371) ### Changed - Bumped MSRV to 1.61.0. - Upgraded to `ahash` 0.8. (#357) - Make `with_hasher_in` const. (#355) - The following methods have been removed from the `RawTable` API in favor of safer alternatives: - `RawTable::erase_no_drop` => Use `RawTable::erase` or `RawTable::remove` instead. - `Bucket::read` => Use `RawTable::remove` instead. - `Bucket::drop` => Use `RawTable::erase` instead. - `Bucket::write` => Use `Bucket::as_mut` instead. ### Fixed - Ensure that `HashMap` allocations don't exceed `isize::MAX`. (#362) - Fixed issue with field retagging in scopeguard. (#359) ## [v0.12.3] - 2022-07-17 ### Fixed - Fixed double-drop in `RawTable::clone_from`. (#348) ## [v0.12.2] - 2022-07-09 ### Added - Added `Entry` API for `HashSet`. (#342) - Added `Extend<&'a (K, V)> for HashMap`. (#340) - Added length-based short-circuiting for hash table iteration. (#338) - Added a function to access the `RawTable` of a `HashMap`. (#335) ### Changed - Edited `do_alloc` to reduce LLVM IR generated. (#341) ## [v0.12.1] - 2022-05-02 ### Fixed - Fixed underflow in `RawIterRange::size_hint`. (#325) - Fixed the implementation of `Debug` for `ValuesMut` and `IntoValues`. (#325) ## [v0.12.0] - 2022-01-17 ### Added - Added `From<[T; N]>` and `From<[(K, V); N]>` for `HashSet` and `HashMap` respectively. (#297) - Added an `allocator()` getter to HashMap and HashSet. (#257) - Added `insert_unique_unchecked` to `HashMap` and `HashSet`. (#293) - Added `into_keys` and `into_values` to HashMap. (#295) - Implement `From` on `HashSet` and `HashMap`. (#298) - Added `entry_ref` API to `HashMap`. (#201) ### Changed - Bumped minimum Rust version to 1.56.1 and edition to 2021. - Use u64 for the GroupWord on WebAssembly. (#271) - Optimized `find`. (#279) - Made rehashing and resizing less generic to reduce compilation time. (#282) - Inlined small functions. (#283) - Use `BuildHasher::hash_one` when `feature = "nightly"` is enabled. (#292) - Relaxed the bounds on `Debug` for `HashSet`. (#296) - Rename `get_each_mut` to `get_many_mut` and align API with the stdlib. (#291) - Don't hash the key when searching in an empty table. (#305) ### Fixed - Guard against allocations exceeding isize::MAX. (#268) - Made `RawTable::insert_no_grow` unsafe. (#254) - Inline `static_empty`. (#280) - Fixed trait bounds on Send/Sync impls. (#303) ## [v0.11.2] - 2021-03-25 ### Fixed - Added missing allocator type parameter to `HashMap`'s and `HashSet`'s `Clone` impls. (#252) ## [v0.11.1] - 2021-03-20 ### Fixed - Added missing `pub` modifier to `BumpWrapper`. (#251) ## [v0.11.0] - 2021-03-14 ### Added - Added safe `try_insert_no_grow` method to `RawTable`. (#229) - Added support for `bumpalo` as an allocator without the `nightly` feature. (#231) - Implemented `Default` for `RawTable`. (#237) - Added new safe methods `RawTable::get_each_mut`, `HashMap::get_each_mut`, and `HashMap::get_each_key_value_mut`. (#239) - Added `From>` for `HashSet`. (#235) - Added `try_insert` method to `HashMap`. (#247) ### Changed - The minimum Rust version has been bumped to 1.49.0. (#230) - Significantly improved compilation times by reducing the amount of generated IR. (#205) ### Removed - We no longer re-export the unstable allocator items from the standard library, nor the stable shims approximating the same. (#227) - Removed hasher specialization support from `aHash`, which was resulting in inconsistent hashes being generated for a key. (#248) ### Fixed - Fixed union length comparison. (#228) ## ~~[v0.10.0] - 2021-01-16~~ This release was _yanked_ due to inconsistent hashes being generated with the `nightly` feature. (#248) ### Changed - Parametrized `RawTable`, `HashSet` and `HashMap` over an allocator. (#133) - Improved branch prediction hints on stable. (#209) - Optimized hashing of primitive types with AHash using specialization. (#207) - Only instantiate `RawTable`'s reserve functions once per key-value. (#204) ## [v0.9.1] - 2020-09-28 ### Added - Added safe methods to `RawTable` (#202): - `get`: `find` and `as_ref` - `get_mut`: `find` and `as_mut` - `insert_entry`: `insert` and `as_mut` - `remove_entry`: `find` and `remove` - `erase_entry`: `find` and `erase` ### Changed - Removed `from_key_hashed_nocheck`'s `Q: Hash`. (#200) - Made `RawTable::drain` safe. (#201) ## [v0.9.0] - 2020-09-03 ### Fixed - `drain_filter` now removes and yields items that do match the predicate, rather than items that don't. This is a **breaking change** to match the behavior of the `drain_filter` methods in `std`. (#187) ### Added - Added `replace_entry_with` to `OccupiedEntry`, and `and_replace_entry_with` to `Entry`. (#190) - Implemented `FusedIterator` and `size_hint` for `DrainFilter`. (#188) ### Changed - The minimum Rust version has been bumped to 1.36 (due to `crossbeam` dependency). (#193) - Updated `ahash` dependency to 0.4. (#198) - `HashMap::with_hasher` and `HashSet::with_hasher` are now `const fn`. (#195) - Removed `T: Hash + Eq` and `S: BuildHasher` bounds on `HashSet::new`, `with_capacity`, `with_hasher`, and `with_capacity_and_hasher`. (#185) ## [v0.8.2] - 2020-08-08 ### Changed - Avoid closures to improve compile times. (#183) - Do not iterate to drop if empty. (#182) ## [v0.8.1] - 2020-07-16 ### Added - Added `erase` and `remove` to `RawTable`. (#171) - Added `try_with_capacity` to `RawTable`. (#174) - Added methods that allow re-using a `RawIter` for `RawDrain`, `RawIntoIter`, and `RawParIter`. (#175) - Added `reflect_remove` and `reflect_insert` to `RawIter`. (#175) - Added a `drain_filter` function to `HashSet`. (#179) ### Changed - Deprecated `RawTable::erase_no_drop` in favor of `erase` and `remove`. (#176) - `insert_no_grow` is now exposed under the `"raw"` feature. (#180) ## [v0.8.0] - 2020-06-18 ### Fixed - Marked `RawTable::par_iter` as `unsafe`. (#157) ### Changed - Reduced the size of `HashMap`. (#159) - No longer create tables with a capacity of 1 element. (#162) - Removed `K: Eq + Hash` bounds on `retain`. (#163) - Pulled in `HashMap` changes from rust-lang/rust (#164): - `extend_one` support on nightly. - `CollectionAllocErr` renamed to `TryReserveError`. - Added `HashSet::get_or_insert_owned`. - `Default` for `HashSet` no longer requires `T: Eq + Hash` and `S: BuildHasher`. ## [v0.7.2] - 2020-04-27 ### Added - Added `or_insert_with_key` to `Entry`. (#152) ### Fixed - Partially reverted `Clone` optimization which was unsound. (#154) ### Changed - Disabled use of `const-random` by default, which prevented reproducible builds. (#155) - Optimized `repeat` function. (#150) - Use `NonNull` for buckets, which improves codegen for iterators. (#148) ## [v0.7.1] - 2020-03-16 ### Added - Added `HashMap::get_key_value_mut`. (#145) ### Changed - Optimized `Clone` implementation. (#146) ## [v0.7.0] - 2020-01-31 ### Added - Added a `drain_filter` function to `HashMap`. (#135) ### Changed - Updated `ahash` dependency to 0.3. (#141) - Optimized set union and intersection. (#130) - `raw_entry` can now be used without requiring `S: BuildHasher`. (#123) - `RawTable::bucket_index` can now be used under the `raw` feature. (#128) ## [v0.6.3] - 2019-10-31 ### Added - Added an `ahash-compile-time-rng` feature (enabled by default) which allows disabling the `compile-time-rng` feature in `ahash` to work around a Cargo bug. (#125) ## [v0.6.2] - 2019-10-23 ### Added - Added an `inline-more` feature (enabled by default) which allows choosing a tradeoff between runtime performance and compilation time. (#119) ## [v0.6.1] - 2019-10-04 ### Added - Added `Entry::insert` and `RawEntryMut::insert`. (#118) ### Changed - `Group::static_empty` was changed from a `const` to a `static` (#116). ## [v0.6.0] - 2019-08-13 ### Fixed - Fixed AHash accidentally depending on `std`. (#110) ### Changed - The minimum Rust version has been bumped to 1.32 (due to `rand` dependency). ## ~~[v0.5.1] - 2019-08-04~~ This release was _yanked_ due to a breaking change for users of `no-default-features`. ### Added - The experimental and unsafe `RawTable` API is available under the "raw" feature. (#108) - Added entry-like methods for `HashSet`. (#98) ### Changed - Changed the default hasher from FxHash to AHash. (#97) - `hashbrown` is now fully `no_std` on recent Rust versions (1.36+). (#96) ### Fixed - We now avoid growing the table during insertions when it wasn't necessary. (#106) - `RawOccupiedEntryMut` now properly implements `Send` and `Sync`. (#100) - Relaxed `lazy_static` version. (#92) ## [v0.5.0] - 2019-06-12 ### Fixed - Resize with a more conservative amount of space after deletions. (#86) ### Changed - Exposed the Layout of the failed allocation in CollectionAllocErr::AllocErr. (#89) ## [v0.4.0] - 2019-05-30 ### Fixed - Fixed `Send` trait bounds on `IterMut` not matching the libstd one. (#82) ## [v0.3.1] - 2019-05-30 ### Fixed - Fixed incorrect use of slice in unsafe code. (#80) ## [v0.3.0] - 2019-04-23 ### Changed - Changed shrink_to to not panic if min_capacity < capacity. (#67) ### Fixed - Worked around emscripten bug emscripten-core/emscripten-fastcomp#258. (#66) ## [v0.2.2] - 2019-04-16 ### Fixed - Inlined non-nightly lowest_set_bit_nonzero. (#64) - Fixed build on latest nightly. (#65) ## [v0.2.1] - 2019-04-14 ### Changed - Use for_each in map Extend and FromIterator. (#58) - Improved worst-case performance of HashSet.is_subset. (#61) ### Fixed - Removed incorrect debug_assert. (#60) ## [v0.2.0] - 2019-03-31 ### Changed - The code has been updated to Rust 2018 edition. This means that the minimum Rust version has been bumped to 1.31 (2018 edition). ### Added - Added `insert_with_hasher` to the raw_entry API to allow `K: !(Hash + Eq)`. (#54) - Added support for using hashbrown as the hash table implementation in libstd. (#46) ### Fixed - Fixed cargo build with minimal-versions. (#45) - Fixed `#[may_dangle]` attributes to match the libstd `HashMap`. (#46) - ZST keys and values are now handled properly. (#46) ## [v0.1.8] - 2019-01-14 ### Added - Rayon parallel iterator support (#37) - `raw_entry` support (#31) - `#[may_dangle]` on nightly (#31) - `try_reserve` support (#31) ### Fixed - Fixed variance on `IterMut`. (#31) ## [v0.1.7] - 2018-12-05 ### Fixed - Fixed non-SSE version of convert_special_to_empty_and_full_to_deleted. (#32) - Fixed overflow in rehash_in_place. (#33) ## [v0.1.6] - 2018-11-17 ### Fixed - Fixed compile error on nightly. (#29) ## [v0.1.5] - 2018-11-08 ### Fixed - Fixed subtraction overflow in generic::Group::match_byte. (#28) ## [v0.1.4] - 2018-11-04 ### Fixed - Fixed a bug in the `erase_no_drop` implementation. (#26) ## [v0.1.3] - 2018-11-01 ### Added - Serde support. (#14) ### Fixed - Make the compiler inline functions more aggressively. (#20) ## [v0.1.2] - 2018-10-31 ### Fixed - `clear` segfaults when called on an empty table. (#13) ## [v0.1.1] - 2018-10-30 ### Fixed - `erase_no_drop` optimization not triggering in the SSE2 implementation. (#3) - Missing `Send` and `Sync` for hash map and iterator types. (#7) - Bug when inserting into a table smaller than the group width. (#5) ## v0.1.0 - 2018-10-29 - Initial release [Unreleased]: https://github.com/rust-lang/hashbrown/compare/v0.15.2...HEAD [v0.15.2]: https://github.com/rust-lang/hashbrown/compare/v0.15.1...v0.15.2 [v0.15.1]: https://github.com/rust-lang/hashbrown/compare/v0.15.0...v0.15.1 [v0.15.0]: https://github.com/rust-lang/hashbrown/compare/v0.14.5...v0.15.0 [v0.14.5]: https://github.com/rust-lang/hashbrown/compare/v0.14.4...v0.14.5 [v0.14.4]: https://github.com/rust-lang/hashbrown/compare/v0.14.3...v0.14.4 [v0.14.3]: https://github.com/rust-lang/hashbrown/compare/v0.14.2...v0.14.3 [v0.14.2]: https://github.com/rust-lang/hashbrown/compare/v0.14.1...v0.14.2 [v0.14.1]: https://github.com/rust-lang/hashbrown/compare/v0.14.0...v0.14.1 [v0.14.0]: https://github.com/rust-lang/hashbrown/compare/v0.13.2...v0.14.0 [v0.13.2]: https://github.com/rust-lang/hashbrown/compare/v0.13.1...v0.13.2 [v0.13.1]: https://github.com/rust-lang/hashbrown/compare/v0.12.3...v0.13.1 [v0.12.3]: https://github.com/rust-lang/hashbrown/compare/v0.12.2...v0.12.3 [v0.12.2]: https://github.com/rust-lang/hashbrown/compare/v0.12.1...v0.12.2 [v0.12.1]: https://github.com/rust-lang/hashbrown/compare/v0.12.0...v0.12.1 [v0.12.0]: https://github.com/rust-lang/hashbrown/compare/v0.11.2...v0.12.0 [v0.11.2]: https://github.com/rust-lang/hashbrown/compare/v0.11.1...v0.11.2 [v0.11.1]: https://github.com/rust-lang/hashbrown/compare/v0.11.0...v0.11.1 [v0.11.0]: https://github.com/rust-lang/hashbrown/compare/v0.10.0...v0.11.0 [v0.10.0]: https://github.com/rust-lang/hashbrown/compare/v0.9.1...v0.10.0 [v0.9.1]: https://github.com/rust-lang/hashbrown/compare/v0.9.0...v0.9.1 [v0.9.0]: https://github.com/rust-lang/hashbrown/compare/v0.8.2...v0.9.0 [v0.8.2]: https://github.com/rust-lang/hashbrown/compare/v0.8.1...v0.8.2 [v0.8.1]: https://github.com/rust-lang/hashbrown/compare/v0.8.0...v0.8.1 [v0.8.0]: https://github.com/rust-lang/hashbrown/compare/v0.7.2...v0.8.0 [v0.7.2]: https://github.com/rust-lang/hashbrown/compare/v0.7.1...v0.7.2 [v0.7.1]: https://github.com/rust-lang/hashbrown/compare/v0.7.0...v0.7.1 [v0.7.0]: https://github.com/rust-lang/hashbrown/compare/v0.6.3...v0.7.0 [v0.6.3]: https://github.com/rust-lang/hashbrown/compare/v0.6.2...v0.6.3 [v0.6.2]: https://github.com/rust-lang/hashbrown/compare/v0.6.1...v0.6.2 [v0.6.1]: https://github.com/rust-lang/hashbrown/compare/v0.6.0...v0.6.1 [v0.6.0]: https://github.com/rust-lang/hashbrown/compare/v0.5.1...v0.6.0 [v0.5.1]: https://github.com/rust-lang/hashbrown/compare/v0.5.0...v0.5.1 [v0.5.0]: https://github.com/rust-lang/hashbrown/compare/v0.4.0...v0.5.0 [v0.4.0]: https://github.com/rust-lang/hashbrown/compare/v0.3.1...v0.4.0 [v0.3.1]: https://github.com/rust-lang/hashbrown/compare/v0.3.0...v0.3.1 [v0.3.0]: https://github.com/rust-lang/hashbrown/compare/v0.2.2...v0.3.0 [v0.2.2]: https://github.com/rust-lang/hashbrown/compare/v0.2.1...v0.2.2 [v0.2.1]: https://github.com/rust-lang/hashbrown/compare/v0.2.0...v0.2.1 [v0.2.0]: https://github.com/rust-lang/hashbrown/compare/v0.1.8...v0.2.0 [v0.1.8]: https://github.com/rust-lang/hashbrown/compare/v0.1.7...v0.1.8 [v0.1.7]: https://github.com/rust-lang/hashbrown/compare/v0.1.6...v0.1.7 [v0.1.6]: https://github.com/rust-lang/hashbrown/compare/v0.1.5...v0.1.6 [v0.1.5]: https://github.com/rust-lang/hashbrown/compare/v0.1.4...v0.1.5 [v0.1.4]: https://github.com/rust-lang/hashbrown/compare/v0.1.3...v0.1.4 [v0.1.3]: https://github.com/rust-lang/hashbrown/compare/v0.1.2...v0.1.3 [v0.1.2]: https://github.com/rust-lang/hashbrown/compare/v0.1.1...v0.1.2 [v0.1.1]: https://github.com/rust-lang/hashbrown/compare/v0.1.0...v0.1.1 # Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] ## [0.17.1](https://github.com/rust-lang/hashbrown/compare/v0.17.0...v0.17.1) - 2026-04-20 ### Added - Added `HashMap::rustc_try_insert` (#722) ## [0.17.0](https://github.com/rust-lang/hashbrown/compare/v0.16.1...v0.17.0) - 2026-04-06 ### Added - Added `hash_table::OccupiedEntry::replace_entry_with` (#669) - Added `hash_map::{OccupiedEntry::into_entry, VacantEntryRef::insert_entry_with_key}` (#670) - Added `hash_table::UnsafeIter` (#667) - Added `iter` methods to various `HashTable` iterators (#667) - Added `HashMap::{replace_key,replace_key_unchecked,insert_with_key_unchecked}` (#681) - Added `into_map` methods to all `HashMap` entry types (#686) - Added `into_table` methods to all `HashTable` entry types (#686) - Added `#[must_use]` to constructors (#697) - `TryReserveError` now implements `Error` (#698) ### Changed - Changed `EntryRef` to use `ToOwned` (#670) - Bumped MSRV to 1.85 (2024 edition) (#676) ### Fixed - `HashTable:clone_from` now forwards to `RawTable::clone_from` instead of using the default implementation (#668) - Fixed potential UB in `RawTableInner::fallible_with_capacity` (#692) - Fixed incorrect length if a hasher panics during rehash (#710) ## [0.16.1](https://github.com/rust-lang/hashbrown/compare/v0.16.0...v0.16.1) - 2025-11-20 ### Added - Added `HashTable` methods related to the raw bucket index (#657) - Added `VacantEntryRef::insert_with_key` (#579) ### Changed - Removed specialization for `Copy` types (#662) - The `get_many_mut` family of methods have been renamed to `get_disjoint_mut` to match the standard library. The old names are still present for now, but deprecated. (#648) - Recognize and use over-sized allocations when using custom allocators. (#523) - Depend on `serde_core` instead of `serde`. (#649) - Optimized `collect` on rayon parallel iterators. (#652) ## [0.16.0](https://github.com/rust-lang/hashbrown/compare/v0.15.5...v0.16.0) - 2025-08-28 ### Changed - Bump foldhash, the default hasher, to 0.2.0. - Replaced `DefaultHashBuilder` with a newtype wrapper around `foldhash` instead of re-exporting it directly. ## [0.15.5](https://github.com/rust-lang/hashbrown/compare/v0.15.4...v0.15.5) - 2025-08-07 ### Added - Added `Entry::or_default_entry` and `Entry::or_insert_entry`. ### Changed - Re-implemented likely/unlikely with `#[cold]` ## [0.15.4](https://github.com/rust-lang/hashbrown/compare/v0.15.3...v0.15.4) - 2025-06-05 ### Changed - Removed optional dependency on compiler-builtins. This only affects building as part of `std`. ## [0.15.3](https://github.com/rust-lang/hashbrown/compare/v0.15.2...v0.15.3) - 2025-04-29 ### Added - SIMD implementation for LoongArch (#592, requires nightly) ### Changed - Optimized insertion path by avoiding an unnecessary `match_empty` (#607) - Increased minimum table size for small types (#615) - Dropped FnMut trait bounds from `ExtractIf` data structures (#616) - Relaxed constraint in `hash_map::EntryRef` insertion methods `K: From<&Q>` to &Q: `Into` (#611) - Added allocator template argument for `rustc_iter` (#605) - The `allocator-api2/nightly` feature is no longer enabled by `hashbrown/nightly` (#606) ## [v0.15.2] - 2024-11-14 ### Added - Marked `const fn` constructors as `rustc_const_stable_indirect` when built as part of the standard library. (#586) ## [v0.15.1] - 2024-11-03 This release removes the `borsh` feature introduced in 0.15.0 because it was found to be incorrectly implemented. Users should use the `hashbrown` feature of the `borsh` crate instead which provides the same trait implementations. ## ~~[v0.15.0] - 2024-10-01~~ This release was _yanked_ due to a broken implementation of the `borsh` feature. This update contains breaking changes that remove the `raw` API with the hope of centralising on the `HashTable` API in the future. You can follow the discussion and progress in #545 to discuss features you think should be added to this API that were previously only possible on the `raw` API. ### Added - Added `borsh` feature with `BorshSerialize` and `BorshDeserialize` impls. (#525) - Added `Assign` impls for `HashSet` operators. (#529) - Added `Default` impls for iterator types. (#542) - Added `HashTable::iter_hash{,_mut}` methods. (#549) - Added `Hash{Table,Map,Set}::allocation_size` methods. (#553) - Implemented `Debug` and `FusedIterator` for all `HashTable` iterators. (#561) - Specialized `Iterator::fold` for all `HashTable` iterators. (#561) ### Changed - Changed `hash_set::VacantEntry::insert` to return `OccupiedEntry`. (#495) - Improved`hash_set::Difference::size_hint` lower-bound. (#530) - Improved `HashSet::is_disjoint` performance. (#531) - `equivalent` feature is now enabled by default. (#532) - `HashSet` operators now return a set with the same allocator. (#529) - Changed the default hasher to foldhash. (#563) - `ahash` feature has been renamed to `default-hasher`. (#533) - Entry API has been reworked and several methods have been renamed. (#535) - `Hash{Map,Set}::insert_unique_unchecked` is now unsafe. (#556) - The signature of `get_many_mut` and related methods was changed. (#562) ### Fixed * Fixed typos, stray backticks in docs. (#558, #560) ### Removed - Raw entry API is now under `raw-entry` feature, to be eventually removed. (#534, #555) - Raw table API has been made private and the `raw` feature is removed; in the future, all code should be using the `HashTable` API instead. (#531, #546) - `rykv` feature was removed; this is now provided by the `rykv` crate instead. (#554) - `HashSet::get_or_insert_owned` was removed in favor of `get_or_insert_with`. (#555) ## [v0.14.5] - 2024-04-28 ### Fixed - Fixed index calculation in panic guard of `clone_from_impl`. (#511) ## ~~[v0.14.4] - 2024-03-19~~ This release was _yanked_ due to a breaking change. ## [v0.14.3] - 2023-11-26 ### Added - Specialized `fold` implementation of iterators. (#480) ### Fixed - Avoid using unstable `ptr::invalid_mut` on nightly. (#481) ## [v0.14.2] - 2023-10-19 ### Added - `HashTable` type which provides a low-level but safe API with explicit hashing. (#466) ### Fixed - Disabled the use of NEON instructions on big-endian ARM. (#475) - Disabled the use of NEON instructions on Miri. (#476) ## [v0.14.1] - 2023-09-28 ### Added - Allow serializing `HashMap`s that use a custom allocator. (#449) ### Changed - Use the `Equivalent` trait from the `equivalent` crate. (#442) - Slightly improved performance of table resizing. (#451) - Relaxed MSRV to 1.63.0. (#457) - Removed `Clone` requirement from custom allocators. (#468) ### Fixed - Fixed custom allocators being leaked in some situations. (#439, #465) ## [v0.14.0] - 2023-06-01 ### Added - Support for `allocator-api2` crate for interfacing with custom allocators on stable. (#417) - Optimized implementation for ARM using NEON instructions. (#430) - Support for rkyv serialization. (#432) - `Equivalent` trait to look up values without `Borrow`. (#345) - `Hash{Map,Set}::raw_table_mut` is added which returns a mutable reference. (#404) - Fast path for `clear` on empty tables. (#428) ### Changed - Optimized insertion to only perform a single lookup. (#277) - `DrainFilter` (`drain_filter`) has been renamed to `ExtractIf` and no longer drops remaining elements when the iterator is dropped. #(374) - Bumped MSRV to 1.64.0. (#431) - `{Map,Set}::raw_table` now returns an immutable reference. (#404) - `VacantEntry` and `OccupiedEntry` now use the default hasher if none is specified in generics. (#389) - `RawTable::data_start` now returns a `NonNull` to match `RawTable::data_end`. (#387) - `RawIter::{reflect_insert, reflect_remove}` are now unsafe. (#429) - `RawTable::find_potential` is renamed to `find_or_find_insert_slot` and returns an `InsertSlot`. (#429) - `RawTable::remove` now also returns an `InsertSlot`. (#429) - `InsertSlot` can be used to insert an element with `RawTable::insert_in_slot`. (#429) - `RawIterHash` no longer has a lifetime tied to that of the `RawTable`. (#427) - The trait bounds of `HashSet::raw_table` have been relaxed to not require `Eq + Hash`. (#423) - `EntryRef::and_replace_entry_with` and `OccupiedEntryRef::replace_entry_with` were changed to give a `&K` instead of a `&Q` to the closure. ### Removed - Support for `bumpalo` as an allocator with custom wrapper. Use `allocator-api2` feature in `bumpalo` to use it as an allocator for `hashbrown` collections. (#417) ## [v0.13.2] - 2023-01-12 ### Fixed - Added `#[inline(always)]` to `find_inner`. (#375) - Fixed `RawTable::allocation_info` for empty tables. (#376) ## [v0.13.1] - 2022-11-10 ### Added - Added `Equivalent` trait to customize key lookups. (#350) - Added support for 16-bit targets. (#368) - Added `RawTable::allocation_info` which provides information about the memory usage of a table. (#371) ### Changed - Bumped MSRV to 1.61.0. - Upgraded to `ahash` 0.8. (#357) - Make `with_hasher_in` const. (#355) - The following methods have been removed from the `RawTable` API in favor of safer alternatives: - `RawTable::erase_no_drop` => Use `RawTable::erase` or `RawTable::remove` instead. - `Bucket::read` => Use `RawTable::remove` instead. - `Bucket::drop` => Use `RawTable::erase` instead. - `Bucket::write` => Use `Bucket::as_mut` instead. ### Fixed - Ensure that `HashMap` allocations don't exceed `isize::MAX`. (#362) - Fixed issue with field retagging in scopeguard. (#359) ## [v0.12.3] - 2022-07-17 ### Fixed - Fixed double-drop in `RawTable::clone_from`. (#348) ## [v0.12.2] - 2022-07-09 ### Added - Added `Entry` API for `HashSet`. (#342) - Added `Extend<&'a (K, V)> for HashMap`. (#340) - Added length-based short-circuiting for hash table iteration. (#338) - Added a function to access the `RawTable` of a `HashMap`. (#335) ### Changed - Edited `do_alloc` to reduce LLVM IR generated. (#341) ## [v0.12.1] - 2022-05-02 ### Fixed - Fixed underflow in `RawIterRange::size_hint`. (#325) - Fixed the implementation of `Debug` for `ValuesMut` and `IntoValues`. (#325) ## [v0.12.0] - 2022-01-17 ### Added - Added `From<[T; N]>` and `From<[(K, V); N]>` for `HashSet` and `HashMap` respectively. (#297) - Added an `allocator()` getter to HashMap and HashSet. (#257) - Added `insert_unique_unchecked` to `HashMap` and `HashSet`. (#293) - Added `into_keys` and `into_values` to HashMap. (#295) - Implement `From` on `HashSet` and `HashMap`. (#298) - Added `entry_ref` API to `HashMap`. (#201) ### Changed - Bumped minimum Rust version to 1.56.1 and edition to 2021. - Use u64 for the GroupWord on WebAssembly. (#271) - Optimized `find`. (#279) - Made rehashing and resizing less generic to reduce compilation time. (#282) - Inlined small functions. (#283) - Use `BuildHasher::hash_one` when `feature = "nightly"` is enabled. (#292) - Relaxed the bounds on `Debug` for `HashSet`. (#296) - Rename `get_each_mut` to `get_many_mut` and align API with the stdlib. (#291) - Don't hash the key when searching in an empty table. (#305) ### Fixed - Guard against allocations exceeding isize::MAX. (#268) - Made `RawTable::insert_no_grow` unsafe. (#254) - Inline `static_empty`. (#280) - Fixed trait bounds on Send/Sync impls. (#303) ## [v0.11.2] - 2021-03-25 ### Fixed - Added missing allocator type parameter to `HashMap`'s and `HashSet`'s `Clone` impls. (#252) ## [v0.11.1] - 2021-03-20 ### Fixed - Added missing `pub` modifier to `BumpWrapper`. (#251) ## [v0.11.0] - 2021-03-14 ### Added - Added safe `try_insert_no_grow` method to `RawTable`. (#229) - Added support for `bumpalo` as an allocator without the `nightly` feature. (#231) - Implemented `Default` for `RawTable`. (#237) - Added new safe methods `RawTable::get_each_mut`, `HashMap::get_each_mut`, and `HashMap::get_each_key_value_mut`. (#239) - Added `From>` for `HashSet`. (#235) - Added `try_insert` method to `HashMap`. (#247) ### Changed - The minimum Rust version has been bumped to 1.49.0. (#230) - Significantly improved compilation times by reducing the amount of generated IR. (#205) ### Removed - We no longer re-export the unstable allocator items from the standard library, nor the stable shims approximating the same. (#227) - Removed hasher specialization support from `aHash`, which was resulting in inconsistent hashes being generated for a key. (#248) ### Fixed - Fixed union length comparison. (#228) ## ~~[v0.10.0] - 2021-01-16~~ This release was _yanked_ due to inconsistent hashes being generated with the `nightly` feature. (#248) ### Changed - Parametrized `RawTable`, `HashSet` and `HashMap` over an allocator. (#133) - Improved branch prediction hints on stable. (#209) - Optimized hashing of primitive types with AHash using specialization. (#207) - Only instantiate `RawTable`'s reserve functions once per key-value. (#204) ## [v0.9.1] - 2020-09-28 ### Added - Added safe methods to `RawTable` (#202): - `get`: `find` and `as_ref` - `get_mut`: `find` and `as_mut` - `insert_entry`: `insert` and `as_mut` - `remove_entry`: `find` and `remove` - `erase_entry`: `find` and `erase` ### Changed - Removed `from_key_hashed_nocheck`'s `Q: Hash`. (#200) - Made `RawTable::drain` safe. (#201) ## [v0.9.0] - 2020-09-03 ### Fixed - `drain_filter` now removes and yields items that do match the predicate, rather than items that don't. This is a **breaking change** to match the behavior of the `drain_filter` methods in `std`. (#187) ### Added - Added `replace_entry_with` to `OccupiedEntry`, and `and_replace_entry_with` to `Entry`. (#190) - Implemented `FusedIterator` and `size_hint` for `DrainFilter`. (#188) ### Changed - The minimum Rust version has been bumped to 1.36 (due to `crossbeam` dependency). (#193) - Updated `ahash` dependency to 0.4. (#198) - `HashMap::with_hasher` and `HashSet::with_hasher` are now `const fn`. (#195) - Removed `T: Hash + Eq` and `S: BuildHasher` bounds on `HashSet::new`, `with_capacity`, `with_hasher`, and `with_capacity_and_hasher`. (#185) ## [v0.8.2] - 2020-08-08 ### Changed - Avoid closures to improve compile times. (#183) - Do not iterate to drop if empty. (#182) ## [v0.8.1] - 2020-07-16 ### Added - Added `erase` and `remove` to `RawTable`. (#171) - Added `try_with_capacity` to `RawTable`. (#174) - Added methods that allow re-using a `RawIter` for `RawDrain`, `RawIntoIter`, and `RawParIter`. (#175) - Added `reflect_remove` and `reflect_insert` to `RawIter`. (#175) - Added a `drain_filter` function to `HashSet`. (#179) ### Changed - Deprecated `RawTable::erase_no_drop` in favor of `erase` and `remove`. (#176) - `insert_no_grow` is now exposed under the `"raw"` feature. (#180) ## [v0.8.0] - 2020-06-18 ### Fixed - Marked `RawTable::par_iter` as `unsafe`. (#157) ### Changed - Reduced the size of `HashMap`. (#159) - No longer create tables with a capacity of 1 element. (#162) - Removed `K: Eq + Hash` bounds on `retain`. (#163) - Pulled in `HashMap` changes from rust-lang/rust (#164): - `extend_one` support on nightly. - `CollectionAllocErr` renamed to `TryReserveError`. - Added `HashSet::get_or_insert_owned`. - `Default` for `HashSet` no longer requires `T: Eq + Hash` and `S: BuildHasher`. ## [v0.7.2] - 2020-04-27 ### Added - Added `or_insert_with_key` to `Entry`. (#152) ### Fixed - Partially reverted `Clone` optimization which was unsound. (#154) ### Changed - Disabled use of `const-random` by default, which prevented reproducible builds. (#155) - Optimized `repeat` function. (#150) - Use `NonNull` for buckets, which improves codegen for iterators. (#148) ## [v0.7.1] - 2020-03-16 ### Added - Added `HashMap::get_key_value_mut`. (#145) ### Changed - Optimized `Clone` implementation. (#146) ## [v0.7.0] - 2020-01-31 ### Added - Added a `drain_filter` function to `HashMap`. (#135) ### Changed - Updated `ahash` dependency to 0.3. (#141) - Optimized set union and intersection. (#130) - `raw_entry` can now be used without requiring `S: BuildHasher`. (#123) - `RawTable::bucket_index` can now be used under the `raw` feature. (#128) ## [v0.6.3] - 2019-10-31 ### Added - Added an `ahash-compile-time-rng` feature (enabled by default) which allows disabling the `compile-time-rng` feature in `ahash` to work around a Cargo bug. (#125) ## [v0.6.2] - 2019-10-23 ### Added - Added an `inline-more` feature (enabled by default) which allows choosing a tradeoff between runtime performance and compilation time. (#119) ## [v0.6.1] - 2019-10-04 ### Added - Added `Entry::insert` and `RawEntryMut::insert`. (#118) ### Changed - `Group::static_empty` was changed from a `const` to a `static` (#116). ## [v0.6.0] - 2019-08-13 ### Fixed - Fixed AHash accidentally depending on `std`. (#110) ### Changed - The minimum Rust version has been bumped to 1.32 (due to `rand` dependency). ## ~~[v0.5.1] - 2019-08-04~~ This release was _yanked_ due to a breaking change for users of `no-default-features`. ### Added - The experimental and unsafe `RawTable` API is available under the "raw" feature. (#108) - Added entry-like methods for `HashSet`. (#98) ### Changed - Changed the default hasher from FxHash to AHash. (#97) - `hashbrown` is now fully `no_std` on recent Rust versions (1.36+). (#96) ### Fixed - We now avoid growing the table during insertions when it wasn't necessary. (#106) - `RawOccupiedEntryMut` now properly implements `Send` and `Sync`. (#100) - Relaxed `lazy_static` version. (#92) ## [v0.5.0] - 2019-06-12 ### Fixed - Resize with a more conservative amount of space after deletions. (#86) ### Changed - Exposed the Layout of the failed allocation in CollectionAllocErr::AllocErr. (#89) ## [v0.4.0] - 2019-05-30 ### Fixed - Fixed `Send` trait bounds on `IterMut` not matching the libstd one. (#82) ## [v0.3.1] - 2019-05-30 ### Fixed - Fixed incorrect use of slice in unsafe code. (#80) ## [v0.3.0] - 2019-04-23 ### Changed - Changed shrink_to to not panic if min_capacity < capacity. (#67) ### Fixed - Worked around emscripten bug emscripten-core/emscripten-fastcomp#258. (#66) ## [v0.2.2] - 2019-04-16 ### Fixed - Inlined non-nightly lowest_set_bit_nonzero. (#64) - Fixed build on latest nightly. (#65) ## [v0.2.1] - 2019-04-14 ### Changed - Use for_each in map Extend and FromIterator. (#58) - Improved worst-case performance of HashSet.is_subset. (#61) ### Fixed - Removed incorrect debug_assert. (#60) ## [v0.2.0] - 2019-03-31 ### Changed - The code has been updated to Rust 2018 edition. This means that the minimum Rust version has been bumped to 1.31 (2018 edition). ### Added - Added `insert_with_hasher` to the raw_entry API to allow `K: !(Hash + Eq)`. (#54) - Added support for using hashbrown as the hash table implementation in libstd. (#46) ### Fixed - Fixed cargo build with minimal-versions. (#45) - Fixed `#[may_dangle]` attributes to match the libstd `HashMap`. (#46) - ZST keys and values are now handled properly. (#46) ## [v0.1.8] - 2019-01-14 ### Added - Rayon parallel iterator support (#37) - `raw_entry` support (#31) - `#[may_dangle]` on nightly (#31) - `try_reserve` support (#31) ### Fixed - Fixed variance on `IterMut`. (#31) ## [v0.1.7] - 2018-12-05 ### Fixed - Fixed non-SSE version of convert_special_to_empty_and_full_to_deleted. (#32) - Fixed overflow in rehash_in_place. (#33) ## [v0.1.6] - 2018-11-17 ### Fixed - Fixed compile error on nightly. (#29) ## [v0.1.5] - 2018-11-08 ### Fixed - Fixed subtraction overflow in generic::Group::match_byte. (#28) ## [v0.1.4] - 2018-11-04 ### Fixed - Fixed a bug in the `erase_no_drop` implementation. (#26) ## [v0.1.3] - 2018-11-01 ### Added - Serde support. (#14) ### Fixed - Make the compiler inline functions more aggressively. (#20) ## [v0.1.2] - 2018-10-31 ### Fixed - `clear` segfaults when called on an empty table. (#13) ## [v0.1.1] - 2018-10-30 ### Fixed - `erase_no_drop` optimization not triggering in the SSE2 implementation. (#3) - Missing `Send` and `Sync` for hash map and iterator types. (#7) - Bug when inserting into a table smaller than the group width. (#5) ## v0.1.0 - 2018-10-29 - Initial release [Unreleased]: https://github.com/rust-lang/hashbrown/compare/v0.15.2...HEAD [v0.15.2]: https://github.com/rust-lang/hashbrown/compare/v0.15.1...v0.15.2 [v0.15.1]: https://github.com/rust-lang/hashbrown/compare/v0.15.0...v0.15.1 [v0.15.0]: https://github.com/rust-lang/hashbrown/compare/v0.14.5...v0.15.0 [v0.14.5]: https://github.com/rust-lang/hashbrown/compare/v0.14.4...v0.14.5 [v0.14.4]: https://github.com/rust-lang/hashbrown/compare/v0.14.3...v0.14.4 [v0.14.3]: https://github.com/rust-lang/hashbrown/compare/v0.14.2...v0.14.3 [v0.14.2]: https://github.com/rust-lang/hashbrown/compare/v0.14.1...v0.14.2 [v0.14.1]: https://github.com/rust-lang/hashbrown/compare/v0.14.0...v0.14.1 [v0.14.0]: https://github.com/rust-lang/hashbrown/compare/v0.13.2...v0.14.0 [v0.13.2]: https://github.com/rust-lang/hashbrown/compare/v0.13.1...v0.13.2 [v0.13.1]: https://github.com/rust-lang/hashbrown/compare/v0.12.3...v0.13.1 [v0.12.3]: https://github.com/rust-lang/hashbrown/compare/v0.12.2...v0.12.3 [v0.12.2]: https://github.com/rust-lang/hashbrown/compare/v0.12.1...v0.12.2 [v0.12.1]: https://github.com/rust-lang/hashbrown/compare/v0.12.0...v0.12.1 [v0.12.0]: https://github.com/rust-lang/hashbrown/compare/v0.11.2...v0.12.0 [v0.11.2]: https://github.com/rust-lang/hashbrown/compare/v0.11.1...v0.11.2 [v0.11.1]: https://github.com/rust-lang/hashbrown/compare/v0.11.0...v0.11.1 [v0.11.0]: https://github.com/rust-lang/hashbrown/compare/v0.10.0...v0.11.0 [v0.10.0]: https://github.com/rust-lang/hashbrown/compare/v0.9.1...v0.10.0 [v0.9.1]: https://github.com/rust-lang/hashbrown/compare/v0.9.0...v0.9.1 [v0.9.0]: https://github.com/rust-lang/hashbrown/compare/v0.8.2...v0.9.0 [v0.8.2]: https://github.com/rust-lang/hashbrown/compare/v0.8.1...v0.8.2 [v0.8.1]: https://github.com/rust-lang/hashbrown/compare/v0.8.0...v0.8.1 [v0.8.0]: https://github.com/rust-lang/hashbrown/compare/v0.7.2...v0.8.0 [v0.7.2]: https://github.com/rust-lang/hashbrown/compare/v0.7.1...v0.7.2 [v0.7.1]: https://github.com/rust-lang/hashbrown/compare/v0.7.0...v0.7.1 [v0.7.0]: https://github.com/rust-lang/hashbrown/compare/v0.6.3...v0.7.0 [v0.6.3]: https://github.com/rust-lang/hashbrown/compare/v0.6.2...v0.6.3 [v0.6.2]: https://github.com/rust-lang/hashbrown/compare/v0.6.1...v0.6.2 [v0.6.1]: https://github.com/rust-lang/hashbrown/compare/v0.6.0...v0.6.1 [v0.6.0]: https://github.com/rust-lang/hashbrown/compare/v0.5.1...v0.6.0 [v0.5.1]: https://github.com/rust-lang/hashbrown/compare/v0.5.0...v0.5.1 [v0.5.0]: https://github.com/rust-lang/hashbrown/compare/v0.4.0...v0.5.0 [v0.4.0]: https://github.com/rust-lang/hashbrown/compare/v0.3.1...v0.4.0 [v0.3.1]: https://github.com/rust-lang/hashbrown/compare/v0.3.0...v0.3.1 [v0.3.0]: https://github.com/rust-lang/hashbrown/compare/v0.2.2...v0.3.0 [v0.2.2]: https://github.com/rust-lang/hashbrown/compare/v0.2.1...v0.2.2 [v0.2.1]: https://github.com/rust-lang/hashbrown/compare/v0.2.0...v0.2.1 [v0.2.0]: https://github.com/rust-lang/hashbrown/compare/v0.1.8...v0.2.0 [v0.1.8]: https://github.com/rust-lang/hashbrown/compare/v0.1.7...v0.1.8 [v0.1.7]: https://github.com/rust-lang/hashbrown/compare/v0.1.6...v0.1.7 [v0.1.6]: https://github.com/rust-lang/hashbrown/compare/v0.1.5...v0.1.6 [v0.1.5]: https://github.com/rust-lang/hashbrown/compare/v0.1.4...v0.1.5 [v0.1.4]: https://github.com/rust-lang/hashbrown/compare/v0.1.3...v0.1.4 [v0.1.3]: https://github.com/rust-lang/hashbrown/compare/v0.1.2...v0.1.3 [v0.1.2]: https://github.com/rust-lang/hashbrown/compare/v0.1.1...v0.1.2 [v0.1.1]: https://github.com/rust-lang/hashbrown/compare/v0.1.0...v0.1.1 # Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## 0.4.10 (2026-03-31) ### Added - `AsMut>` impl for `Array` ([#193]) - HQC KEM sizes ([#195]) [#193]: https://github.com/RustCrypto/hybrid-array/pull/193 [#195]: https://github.com/RustCrypto/hybrid-array/pull/195 ## 0.4.9 (2026-03-30) ### Added - Functions for casting from core references ([#181]) - `Array::cast_from_core`: `const fn` equivalent of `From<[T; N]>` - `Array::cast_from_core_mut`: `mut` equivalent of the above - `Array::from_ref`: cast `&T` to `&Array` - `Array::from_mut`: `mut` equivalent of the above [#181]: https://github.com/RustCrypto/hybrid-array/pull/181 ## 0.4.8 (2026-03-08) ### Added - `ctutils` support ([#177]) [#177]: https://github.com/RustCrypto/hybrid-array/pull/177 ## 0.4.7 (2026-02-03) ### Added - `Flatten` and `Unflatten` traits ([#170]) - `Array::slice_as_(mut_)array` ([#171]) - `SliceExt` ([#172]) [#170]: https://github.com/RustCrypto/hybrid-array/pull/170 [#171]: https://github.com/RustCrypto/hybrid-array/pull/171 [#172]: https://github.com/RustCrypto/hybrid-array/pull/172 ## 0.4.6 (2026-01-22) ### Added - Optional dependency on `zerocopy` with impls for `Array` ([#162]) - `Debug` bound to `ArraySize` ([#165]) [#162]: https://github.com/RustCrypto/hybrid-array/pull/162 [#165]: https://github.com/RustCrypto/hybrid-array/pull/165 ## 0.4.5 (2025-09-29) ### Added - Impl `arbitrary::Arbitrary` for `Array` ([#153]) ### Changed - Switch from `doc_auto_cfg` to `doc_cfg` ([#154]) [#153]: https://github.com/RustCrypto/hybrid-array/pull/153 [#154]: https://github.com/RustCrypto/hybrid-array/pull/154 ## 0.4.4 (2025-09-24) ### Added - Enable the `subtle/const-generics` feature ([#149]) [#149]: https://github.com/RustCrypto/hybrid-array/pull/149 ## 0.4.3 (2025-09-23) ### Added - `Array::as_(mut_)ptr` ([#147]) ### Changed - Remove bounds on `Array::slice_as_flattened(_mut)`; make `const fn` ([#144]) - Make `Array::as_(mut_)slice` a `const fn` ([#147]) - Make `Array::::as_flattened(_mut)` a `const fn` ([#147]) [#144]: https://github.com/RustCrypto/hybrid-array/pull/144 [#147]: https://github.com/RustCrypto/hybrid-array/pull/147 ## 0.4.2 (2025-09-21) [YANKED] ### Added - `Array::slice_as_flattened(_mut)` ([#142]) [#142]: https://github.com/RustCrypto/hybrid-array/pull/142 ## 0.4.1 (2025-09-10) ### Changed - Make slice conversions `const fn` ([#140]) [#140]: https://github.com/RustCrypto/hybrid-array/pull/140 ## 0.4.0 (2025-09-01) ### Added - `ArraySize` impls for `U536` and `U568` ([#128]) - `AsArrayRef`/`AsArrayMut` traits with impls on `[T; N]` and `Array` ([#135]) - `alloc` feature with `Box`/`Vec` conversions to/from `Array` ([#136], [#138]) ### Removed - `AsRef`/`AsMut` impls on `[T; N]` ([#133]) [#128]: https://github.com/RustCrypto/hybrid-array/pull/128 [#133]: https://github.com/RustCrypto/hybrid-array/pull/133 [#135]: https://github.com/RustCrypto/hybrid-array/pull/135 [#136]: https://github.com/RustCrypto/hybrid-array/pull/136 [#138]: https://github.com/RustCrypto/hybrid-array/pull/138 ## 0.3.1 (2025-03-30) ### Added - `subtle` feature ([#126]) [#126]: https://github.com/RustCrypto/hybrid-array/pull/126 ## 0.3.0 (2025-02-21) ### Changed - Bump edition to 2024; MSRV 1.85 ([#116]) ### Removed - `U3293` as an unused ML-DSA size ([#117]) [#116]: https://github.com/RustCrypto/hybrid-array/pull/116 [#117]: https://github.com/RustCrypto/hybrid-array/pull/117 ## 0.2.3 (2024-12-07) ### Added - Additional ML-DSA sizes ([#108]) [#108]: https://github.com/RustCrypto/hybrid-array/pull/108 ## 0.2.2 (2024-11-11) ### Added - FrodoKEM sizes ([#104]) [#104]: https://github.com/RustCrypto/hybrid-array/pull/104 ## 0.2.1 (2024-10-20) ### Fixed - MSRV badge ([9d47c798](https://github.com/RustCrypto/hybrid-array/commit/9d47c79861057b3a04bb19cb2dfaa1f75cbf9ddd)) ## 0.2.0 (2024-10-19) ### Added - Reference conversion support from core arrays ([utils#904]) - Impl `Default` for `Array` ([utils#905]) - `Deref`/`DerefMut` impls for `Array` ([utils#908], [utils#913]) - Impl `From>` for `[T; N]` ([utils#945]) - Impl `IntoIterator` for all `ArraySize`s ([utils#956]) - Impl `IntoIterator` for references to all `ArraySize`s ([utils#957]) - Concat and split methods ([utils#958]) - `slice_as_chunks(_mut)` methods ([utils#974]) - Impl `Zeroize`/`ZeroizeOnDrop` for `Array` ([utils#984]) - `AssocArraySize` trait ([utils#1006], [#40]) - `sizes` submodule ([utils#1014], [#68]) - `ArrayN` type alias ([utils#1017]) - Impl `FromIterator` ([utils#1039]) - `Array::try_from_iter` ([#4]) - Helper functions for `Array, U>` ([#8]) - `Send` and `Sync` impls for `Array` ([#15]) - `Array::map` ([#61]) - Support all array sizes up to `U512` ([#67]) - `Array>::as_flattened{_mut}()` ([#86]) - `serde` support ([#88]) - `bytemuck` support ([#99]) ### Changed - Use GATs for `ArraySize` ([utils#893]) - Make `ArraySize` an `unsafe trait` ([utils#914]) - MSRV 1.81 ([#85]) ### Removed - `ByteArray` type alias ([utils#995]) - `ArrayOps` trait ([#30]) - `std` feature ([#85]) [utils#893]: https://github.com/RustCrypto/utils/pull/893 [utils#904]: https://github.com/RustCrypto/utils/pull/904 [utils#905]: https://github.com/RustCrypto/utils/pull/905 [utils#908]: https://github.com/RustCrypto/utils/pull/908 [utils#913]: https://github.com/RustCrypto/utils/pull/913 [utils#914]: https://github.com/RustCrypto/utils/pull/914 [utils#945]: https://github.com/RustCrypto/utils/pull/945 [utils#956]: https://github.com/RustCrypto/utils/pull/956 [utils#957]: https://github.com/RustCrypto/utils/pull/957 [utils#958]: https://github.com/RustCrypto/utils/pull/958 [utils#974]: https://github.com/RustCrypto/utils/pull/974 [utils#984]: https://github.com/RustCrypto/utils/pull/984 [utils#995]: https://github.com/RustCrypto/utils/pull/995 [utils#1006]: https://github.com/RustCrypto/utils/pull/1006 [utils#1014]: https://github.com/RustCrypto/utils/pull/1014 [utils#1017]: https://github.com/RustCrypto/utils/pull/1017 [utils#1039]: https://github.com/RustCrypto/utils/pull/1039 [#4]: https://github.com/RustCrypto/hybrid-array/pull/4 [#8]: https://github.com/RustCrypto/hybrid-array/pull/8 [#15]: https://github.com/RustCrypto/hybrid-array/pull/15 [#30]: https://github.com/RustCrypto/hybrid-array/pull/30 [#40]: https://github.com/RustCrypto/hybrid-array/pull/40 [#61]: https://github.com/RustCrypto/hybrid-array/pull/61 [#67]: https://github.com/RustCrypto/hybrid-array/pull/67 [#68]: https://github.com/RustCrypto/hybrid-array/pull/68 [#85]: https://github.com/RustCrypto/hybrid-array/pull/85 [#86]: https://github.com/RustCrypto/hybrid-array/pull/86 [#88]: https://github.com/RustCrypto/hybrid-array/pull/88 [#99]: https://github.com/RustCrypto/hybrid-array/pull/99 ## 0.1.0 (2022-05-07) - Initial release # Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## 0.4.11 (2026-04-24) ### Added - HPKE Hybrid KEM sizes ([#218]) ### Removed - `Clone` bounds on `Box`/`Vec` conversions ([#209]) [#209]: https://github.com/RustCrypto/hybrid-array/pull/209 [#218]: https://github.com/RustCrypto/hybrid-array/pull/218 ## 0.4.10 (2026-03-31) ### Added - `AsMut>` impl for `Array` ([#193]) - HQC KEM sizes ([#195]) [#193]: https://github.com/RustCrypto/hybrid-array/pull/193 [#195]: https://github.com/RustCrypto/hybrid-array/pull/195 ## 0.4.9 (2026-03-30) ### Added - Functions for casting from core references ([#181]) - `Array::cast_from_core`: `const fn` equivalent of `From<[T; N]>` - `Array::cast_from_core_mut`: `mut` equivalent of the above - `Array::from_ref`: cast `&T` to `&Array` - `Array::from_mut`: `mut` equivalent of the above [#181]: https://github.com/RustCrypto/hybrid-array/pull/181 ## 0.4.8 (2026-03-08) ### Added - `ctutils` support ([#177]) [#177]: https://github.com/RustCrypto/hybrid-array/pull/177 ## 0.4.7 (2026-02-03) ### Added - `Flatten` and `Unflatten` traits ([#170]) - `Array::slice_as_(mut_)array` ([#171]) - `SliceExt` ([#172]) [#170]: https://github.com/RustCrypto/hybrid-array/pull/170 [#171]: https://github.com/RustCrypto/hybrid-array/pull/171 [#172]: https://github.com/RustCrypto/hybrid-array/pull/172 ## 0.4.6 (2026-01-22) ### Added - Optional dependency on `zerocopy` with impls for `Array` ([#162]) - `Debug` bound to `ArraySize` ([#165]) [#162]: https://github.com/RustCrypto/hybrid-array/pull/162 [#165]: https://github.com/RustCrypto/hybrid-array/pull/165 ## 0.4.5 (2025-09-29) ### Added - Impl `arbitrary::Arbitrary` for `Array` ([#153]) ### Changed - Switch from `doc_auto_cfg` to `doc_cfg` ([#154]) [#153]: https://github.com/RustCrypto/hybrid-array/pull/153 [#154]: https://github.com/RustCrypto/hybrid-array/pull/154 ## 0.4.4 (2025-09-24) ### Added - Enable the `subtle/const-generics` feature ([#149]) [#149]: https://github.com/RustCrypto/hybrid-array/pull/149 ## 0.4.3 (2025-09-23) ### Added - `Array::as_(mut_)ptr` ([#147]) ### Changed - Remove bounds on `Array::slice_as_flattened(_mut)`; make `const fn` ([#144]) - Make `Array::as_(mut_)slice` a `const fn` ([#147]) - Make `Array::::as_flattened(_mut)` a `const fn` ([#147]) [#144]: https://github.com/RustCrypto/hybrid-array/pull/144 [#147]: https://github.com/RustCrypto/hybrid-array/pull/147 ## 0.4.2 (2025-09-21) [YANKED] ### Added - `Array::slice_as_flattened(_mut)` ([#142]) [#142]: https://github.com/RustCrypto/hybrid-array/pull/142 ## 0.4.1 (2025-09-10) ### Changed - Make slice conversions `const fn` ([#140]) [#140]: https://github.com/RustCrypto/hybrid-array/pull/140 ## 0.4.0 (2025-09-01) ### Added - `ArraySize` impls for `U536` and `U568` ([#128]) - `AsArrayRef`/`AsArrayMut` traits with impls on `[T; N]` and `Array` ([#135]) - `alloc` feature with `Box`/`Vec` conversions to/from `Array` ([#136], [#138]) ### Removed - `AsRef`/`AsMut` impls on `[T; N]` ([#133]) [#128]: https://github.com/RustCrypto/hybrid-array/pull/128 [#133]: https://github.com/RustCrypto/hybrid-array/pull/133 [#135]: https://github.com/RustCrypto/hybrid-array/pull/135 [#136]: https://github.com/RustCrypto/hybrid-array/pull/136 [#138]: https://github.com/RustCrypto/hybrid-array/pull/138 ## 0.3.1 (2025-03-30) ### Added - `subtle` feature ([#126]) [#126]: https://github.com/RustCrypto/hybrid-array/pull/126 ## 0.3.0 (2025-02-21) ### Changed - Bump edition to 2024; MSRV 1.85 ([#116]) ### Removed - `U3293` as an unused ML-DSA size ([#117]) [#116]: https://github.com/RustCrypto/hybrid-array/pull/116 [#117]: https://github.com/RustCrypto/hybrid-array/pull/117 ## 0.2.3 (2024-12-07) ### Added - Additional ML-DSA sizes ([#108]) [#108]: https://github.com/RustCrypto/hybrid-array/pull/108 ## 0.2.2 (2024-11-11) ### Added - FrodoKEM sizes ([#104]) [#104]: https://github.com/RustCrypto/hybrid-array/pull/104 ## 0.2.1 (2024-10-20) ### Fixed - MSRV badge ([9d47c798](https://github.com/RustCrypto/hybrid-array/commit/9d47c79861057b3a04bb19cb2dfaa1f75cbf9ddd)) ## 0.2.0 (2024-10-19) ### Added - Reference conversion support from core arrays ([utils#904]) - Impl `Default` for `Array` ([utils#905]) - `Deref`/`DerefMut` impls for `Array` ([utils#908], [utils#913]) - Impl `From>` for `[T; N]` ([utils#945]) - Impl `IntoIterator` for all `ArraySize`s ([utils#956]) - Impl `IntoIterator` for references to all `ArraySize`s ([utils#957]) - Concat and split methods ([utils#958]) - `slice_as_chunks(_mut)` methods ([utils#974]) - Impl `Zeroize`/`ZeroizeOnDrop` for `Array` ([utils#984]) - `AssocArraySize` trait ([utils#1006], [#40]) - `sizes` submodule ([utils#1014], [#68]) - `ArrayN` type alias ([utils#1017]) - Impl `FromIterator` ([utils#1039]) - `Array::try_from_iter` ([#4]) - Helper functions for `Array, U>` ([#8]) - `Send` and `Sync` impls for `Array` ([#15]) - `Array::map` ([#61]) - Support all array sizes up to `U512` ([#67]) - `Array>::as_flattened{_mut}()` ([#86]) - `serde` support ([#88]) - `bytemuck` support ([#99]) ### Changed - Use GATs for `ArraySize` ([utils#893]) - Make `ArraySize` an `unsafe trait` ([utils#914]) - MSRV 1.81 ([#85]) ### Removed - `ByteArray` type alias ([utils#995]) - `ArrayOps` trait ([#30]) - `std` feature ([#85]) [utils#893]: https://github.com/RustCrypto/utils/pull/893 [utils#904]: https://github.com/RustCrypto/utils/pull/904 [utils#905]: https://github.com/RustCrypto/utils/pull/905 [utils#908]: https://github.com/RustCrypto/utils/pull/908 [utils#913]: https://github.com/RustCrypto/utils/pull/913 [utils#914]: https://github.com/RustCrypto/utils/pull/914 [utils#945]: https://github.com/RustCrypto/utils/pull/945 [utils#956]: https://github.com/RustCrypto/utils/pull/956 [utils#957]: https://github.com/RustCrypto/utils/pull/957 [utils#958]: https://github.com/RustCrypto/utils/pull/958 [utils#974]: https://github.com/RustCrypto/utils/pull/974 [utils#984]: https://github.com/RustCrypto/utils/pull/984 [utils#995]: https://github.com/RustCrypto/utils/pull/995 [utils#1006]: https://github.com/RustCrypto/utils/pull/1006 [utils#1014]: https://github.com/RustCrypto/utils/pull/1014 [utils#1017]: https://github.com/RustCrypto/utils/pull/1017 [utils#1039]: https://github.com/RustCrypto/utils/pull/1039 [#4]: https://github.com/RustCrypto/hybrid-array/pull/4 [#8]: https://github.com/RustCrypto/hybrid-array/pull/8 [#15]: https://github.com/RustCrypto/hybrid-array/pull/15 [#30]: https://github.com/RustCrypto/hybrid-array/pull/30 [#40]: https://github.com/RustCrypto/hybrid-array/pull/40 [#61]: https://github.com/RustCrypto/hybrid-array/pull/61 [#67]: https://github.com/RustCrypto/hybrid-array/pull/67 [#68]: https://github.com/RustCrypto/hybrid-array/pull/68 [#85]: https://github.com/RustCrypto/hybrid-array/pull/85 [#86]: https://github.com/RustCrypto/hybrid-array/pull/86 [#88]: https://github.com/RustCrypto/hybrid-array/pull/88 [#99]: https://github.com/RustCrypto/hybrid-array/pull/99 ## 0.1.0 (2022-05-07) - Initial release # Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## 0.4.12 (2026-05-09) ### Added - `ArraySize` impls for Classic McEliece ([#220]) [#220]: https://github.com/RustCrypto/hybrid-array/pull/220 ## 0.4.11 (2026-04-24) ### Added - HPKE Hybrid KEM sizes ([#218]) ### Removed - `Clone` bounds on `Box`/`Vec` conversions ([#209]) [#209]: https://github.com/RustCrypto/hybrid-array/pull/209 [#218]: https://github.com/RustCrypto/hybrid-array/pull/218 ## 0.4.10 (2026-03-31) ### Added - `AsMut>` impl for `Array` ([#193]) - HQC KEM sizes ([#195]) [#193]: https://github.com/RustCrypto/hybrid-array/pull/193 [#195]: https://github.com/RustCrypto/hybrid-array/pull/195 ## 0.4.9 (2026-03-30) ### Added - Functions for casting from core references ([#181]) - `Array::cast_from_core`: `const fn` equivalent of `From<[T; N]>` - `Array::cast_from_core_mut`: `mut` equivalent of the above - `Array::from_ref`: cast `&T` to `&Array` - `Array::from_mut`: `mut` equivalent of the above [#181]: https://github.com/RustCrypto/hybrid-array/pull/181 ## 0.4.8 (2026-03-08) ### Added - `ctutils` support ([#177]) [#177]: https://github.com/RustCrypto/hybrid-array/pull/177 ## 0.4.7 (2026-02-03) ### Added - `Flatten` and `Unflatten` traits ([#170]) - `Array::slice_as_(mut_)array` ([#171]) - `SliceExt` ([#172]) [#170]: https://github.com/RustCrypto/hybrid-array/pull/170 [#171]: https://github.com/RustCrypto/hybrid-array/pull/171 [#172]: https://github.com/RustCrypto/hybrid-array/pull/172 ## 0.4.6 (2026-01-22) ### Added - Optional dependency on `zerocopy` with impls for `Array` ([#162]) - `Debug` bound to `ArraySize` ([#165]) [#162]: https://github.com/RustCrypto/hybrid-array/pull/162 [#165]: https://github.com/RustCrypto/hybrid-array/pull/165 ## 0.4.5 (2025-09-29) ### Added - Impl `arbitrary::Arbitrary` for `Array` ([#153]) ### Changed - Switch from `doc_auto_cfg` to `doc_cfg` ([#154]) [#153]: https://github.com/RustCrypto/hybrid-array/pull/153 [#154]: https://github.com/RustCrypto/hybrid-array/pull/154 ## 0.4.4 (2025-09-24) ### Added - Enable the `subtle/const-generics` feature ([#149]) [#149]: https://github.com/RustCrypto/hybrid-array/pull/149 ## 0.4.3 (2025-09-23) ### Added - `Array::as_(mut_)ptr` ([#147]) ### Changed - Remove bounds on `Array::slice_as_flattened(_mut)`; make `const fn` ([#144]) - Make `Array::as_(mut_)slice` a `const fn` ([#147]) - Make `Array::::as_flattened(_mut)` a `const fn` ([#147]) [#144]: https://github.com/RustCrypto/hybrid-array/pull/144 [#147]: https://github.com/RustCrypto/hybrid-array/pull/147 ## 0.4.2 (2025-09-21) [YANKED] ### Added - `Array::slice_as_flattened(_mut)` ([#142]) [#142]: https://github.com/RustCrypto/hybrid-array/pull/142 ## 0.4.1 (2025-09-10) ### Changed - Make slice conversions `const fn` ([#140]) [#140]: https://github.com/RustCrypto/hybrid-array/pull/140 ## 0.4.0 (2025-09-01) ### Added - `ArraySize` impls for `U536` and `U568` ([#128]) - `AsArrayRef`/`AsArrayMut` traits with impls on `[T; N]` and `Array` ([#135]) - `alloc` feature with `Box`/`Vec` conversions to/from `Array` ([#136], [#138]) ### Removed - `AsRef`/`AsMut` impls on `[T; N]` ([#133]) [#128]: https://github.com/RustCrypto/hybrid-array/pull/128 [#133]: https://github.com/RustCrypto/hybrid-array/pull/133 [#135]: https://github.com/RustCrypto/hybrid-array/pull/135 [#136]: https://github.com/RustCrypto/hybrid-array/pull/136 [#138]: https://github.com/RustCrypto/hybrid-array/pull/138 ## 0.3.1 (2025-03-30) ### Added - `subtle` feature ([#126]) [#126]: https://github.com/RustCrypto/hybrid-array/pull/126 ## 0.3.0 (2025-02-21) ### Changed - Bump edition to 2024; MSRV 1.85 ([#116]) ### Removed - `U3293` as an unused ML-DSA size ([#117]) [#116]: https://github.com/RustCrypto/hybrid-array/pull/116 [#117]: https://github.com/RustCrypto/hybrid-array/pull/117 ## 0.2.3 (2024-12-07) ### Added - Additional ML-DSA sizes ([#108]) [#108]: https://github.com/RustCrypto/hybrid-array/pull/108 ## 0.2.2 (2024-11-11) ### Added - FrodoKEM sizes ([#104]) [#104]: https://github.com/RustCrypto/hybrid-array/pull/104 ## 0.2.1 (2024-10-20) ### Fixed - MSRV badge ([9d47c798](https://github.com/RustCrypto/hybrid-array/commit/9d47c79861057b3a04bb19cb2dfaa1f75cbf9ddd)) ## 0.2.0 (2024-10-19) ### Added - Reference conversion support from core arrays ([utils#904]) - Impl `Default` for `Array` ([utils#905]) - `Deref`/`DerefMut` impls for `Array` ([utils#908], [utils#913]) - Impl `From>` for `[T; N]` ([utils#945]) - Impl `IntoIterator` for all `ArraySize`s ([utils#956]) - Impl `IntoIterator` for references to all `ArraySize`s ([utils#957]) - Concat and split methods ([utils#958]) - `slice_as_chunks(_mut)` methods ([utils#974]) - Impl `Zeroize`/`ZeroizeOnDrop` for `Array` ([utils#984]) - `AssocArraySize` trait ([utils#1006], [#40]) - `sizes` submodule ([utils#1014], [#68]) - `ArrayN` type alias ([utils#1017]) - Impl `FromIterator` ([utils#1039]) - `Array::try_from_iter` ([#4]) - Helper functions for `Array, U>` ([#8]) - `Send` and `Sync` impls for `Array` ([#15]) - `Array::map` ([#61]) - Support all array sizes up to `U512` ([#67]) - `Array>::as_flattened{_mut}()` ([#86]) - `serde` support ([#88]) - `bytemuck` support ([#99]) ### Changed - Use GATs for `ArraySize` ([utils#893]) - Make `ArraySize` an `unsafe trait` ([utils#914]) - MSRV 1.81 ([#85]) ### Removed - `ByteArray` type alias ([utils#995]) - `ArrayOps` trait ([#30]) - `std` feature ([#85]) [utils#893]: https://github.com/RustCrypto/utils/pull/893 [utils#904]: https://github.com/RustCrypto/utils/pull/904 [utils#905]: https://github.com/RustCrypto/utils/pull/905 [utils#908]: https://github.com/RustCrypto/utils/pull/908 [utils#913]: https://github.com/RustCrypto/utils/pull/913 [utils#914]: https://github.com/RustCrypto/utils/pull/914 [utils#945]: https://github.com/RustCrypto/utils/pull/945 [utils#956]: https://github.com/RustCrypto/utils/pull/956 [utils#957]: https://github.com/RustCrypto/utils/pull/957 [utils#958]: https://github.com/RustCrypto/utils/pull/958 [utils#974]: https://github.com/RustCrypto/utils/pull/974 [utils#984]: https://github.com/RustCrypto/utils/pull/984 [utils#995]: https://github.com/RustCrypto/utils/pull/995 [utils#1006]: https://github.com/RustCrypto/utils/pull/1006 [utils#1014]: https://github.com/RustCrypto/utils/pull/1014 [utils#1017]: https://github.com/RustCrypto/utils/pull/1017 [utils#1039]: https://github.com/RustCrypto/utils/pull/1039 [#4]: https://github.com/RustCrypto/hybrid-array/pull/4 [#8]: https://github.com/RustCrypto/hybrid-array/pull/8 [#15]: https://github.com/RustCrypto/hybrid-array/pull/15 [#30]: https://github.com/RustCrypto/hybrid-array/pull/30 [#40]: https://github.com/RustCrypto/hybrid-array/pull/40 [#61]: https://github.com/RustCrypto/hybrid-array/pull/61 [#67]: https://github.com/RustCrypto/hybrid-array/pull/67 [#68]: https://github.com/RustCrypto/hybrid-array/pull/68 [#85]: https://github.com/RustCrypto/hybrid-array/pull/85 [#86]: https://github.com/RustCrypto/hybrid-array/pull/86 [#88]: https://github.com/RustCrypto/hybrid-array/pull/88 [#99]: https://github.com/RustCrypto/hybrid-array/pull/99 ## 0.1.0 (2022-05-07) - Initial release # Making a hyper-rustls release This is a checklist for steps to make before/after making a rustls release. 1. Attend to the README.md: this appears on crates.io for the release, and can't be edited after the fact. - Ensure the version has a good set of release notes. Move old release notes to OLDCHANGES.md if this is getting excessively long. - Write the version and date of the release. 2. Run `cargo update` followed by `cargo outdated`, to check if we have any dependency updates which are not already automatically taken by their semver specs. - If we do, take them if possible with separate commits (but there should've been dependabot PRs submitted for these already.) 3. Now run `cargo test --all-features` to ensure our tests continue to pass with the updated dependencies. 4. Update `Cargo.toml` to set the correct version. 5. Make a commit with the above changes, something like 'Prepare $VERSION'. This should not contain functional changes: just versions numbers, and markdown changes. 6. Do a dry run: check `cargo publish --dry-run` 7. Push the above commit. Wait for CI to confirm it as green. - Any red _should_ naturally block the release. - If rustc nightly is broken, this _may_ be acceptable if the reason is understood and does not point to a defect. 8. Tag the released version: `git tag -m '0.20.0' v/0.20.0` 9. Push the tag: `git push --tags` 10. Do the release: `cargo publish`. // @generated /// Implement `DataProvider` on the given struct using the data /// hardcoded in this file. This allows the struct to be used with /// `icu`'s `_unstable` constructors. /// /// Using this implementation will embed the following data in the binary's data segment: /// * 3812B[^1] for the singleton data struct /// /// [^1]: these numbers can be smaller in practice due to linker deduplication /// /// This macro requires the following crates: /// * `icu` /// * `icu_provider` /// * `zerovec` #[doc(hidden)] #[macro_export] macro_rules! __impl_property_binary_changes_when_casefolded_v1 { ($ provider : ty) => { #[clippy::msrv = "1.83"] const _: () = <$provider>::MUST_USE_MAKE_PROVIDER_MACRO; #[clippy::msrv = "1.83"] impl $provider { #[doc(hidden)] pub const SINGLETON_PROPERTY_BINARY_CHANGES_WHEN_CASEFOLDED_V1: &'static ::DataStruct = &icu::properties::provider::PropertyCodePointSet::InversionList(unsafe { #[allow(unused_unsafe)] icu::collections::codepointinvlist::CodePointInversionList::from_parts_unchecked(unsafe { zerovec::ZeroVec::from_bytes_unchecked(b"A\0\0[\0\0\xB5\0\0\xB6\0\0\xC0\0\0\xD7\0\0\xD8\0\0\xE0\0\0\0\x01\0\x01\x01\0\x02\x01\0\x03\x01\0\x04\x01\0\x05\x01\0\x06\x01\0\x07\x01\0\x08\x01\0\t\x01\0\n\x01\0\x0B\x01\0\x0C\x01\0\r\x01\0\x0E\x01\0\x0F\x01\0\x10\x01\0\x11\x01\0\x12\x01\0\x13\x01\0\x14\x01\0\x15\x01\0\x16\x01\0\x17\x01\0\x18\x01\0\x19\x01\0\x1A\x01\0\x1B\x01\0\x1C\x01\0\x1D\x01\0\x1E\x01\0\x1F\x01\0 \x01\0!\x01\0\"\x01\0#\x01\0$\x01\0%\x01\0&\x01\0'\x01\0(\x01\0)\x01\0*\x01\0+\x01\0,\x01\0-\x01\0.\x01\0/\x01\x000\x01\x001\x01\x002\x01\x003\x01\x004\x01\x005\x01\x006\x01\x007\x01\09\x01\0:\x01\0;\x01\0<\x01\0=\x01\0>\x01\0?\x01\0@\x01\0A\x01\0B\x01\0C\x01\0D\x01\0E\x01\0F\x01\0G\x01\0H\x01\0I\x01\0K\x01\0L\x01\0M\x01\0N\x01\0O\x01\0P\x01\0Q\x01\0R\x01\0S\x01\0T\x01\0U\x01\0V\x01\0W\x01\0X\x01\0Y\x01\0Z\x01\0[\x01\0\\\x01\0]\x01\0^\x01\0_\x01\0`\x01\0a\x01\0b\x01\0c\x01\0d\x01\0e\x01\0f\x01\0g\x01\0h\x01\0i\x01\0j\x01\0k\x01\0l\x01\0m\x01\0n\x01\0o\x01\0p\x01\0q\x01\0r\x01\0s\x01\0t\x01\0u\x01\0v\x01\0w\x01\0x\x01\0z\x01\0{\x01\0|\x01\0}\x01\0~\x01\0\x7F\x01\0\x80\x01\0\x81\x01\0\x83\x01\0\x84\x01\0\x85\x01\0\x86\x01\0\x88\x01\0\x89\x01\0\x8C\x01\0\x8E\x01\0\x92\x01\0\x93\x01\0\x95\x01\0\x96\x01\0\x99\x01\0\x9C\x01\0\x9E\x01\0\x9F\x01\0\xA1\x01\0\xA2\x01\0\xA3\x01\0\xA4\x01\0\xA5\x01\0\xA6\x01\0\xA8\x01\0\xA9\x01\0\xAA\x01\0\xAC\x01\0\xAD\x01\0\xAE\x01\0\xB0\x01\0\xB1\x01\0\xB4\x01\0\xB5\x01\0\xB6\x01\0\xB7\x01\0\xB9\x01\0\xBC\x01\0\xBD\x01\0\xC4\x01\0\xC6\x01\0\xC7\x01\0\xC9\x01\0\xCA\x01\0\xCC\x01\0\xCD\x01\0\xCE\x01\0\xCF\x01\0\xD0\x01\0\xD1\x01\0\xD2\x01\0\xD3\x01\0\xD4\x01\0\xD5\x01\0\xD6\x01\0\xD7\x01\0\xD8\x01\0\xD9\x01\0\xDA\x01\0\xDB\x01\0\xDC\x01\0\xDE\x01\0\xDF\x01\0\xE0\x01\0\xE1\x01\0\xE2\x01\0\xE3\x01\0\xE4\x01\0\xE5\x01\0\xE6\x01\0\xE7\x01\0\xE8\x01\0\xE9\x01\0\xEA\x01\0\xEB\x01\0\xEC\x01\0\xED\x01\0\xEE\x01\0\xEF\x01\0\xF1\x01\0\xF3\x01\0\xF4\x01\0\xF5\x01\0\xF6\x01\0\xF9\x01\0\xFA\x01\0\xFB\x01\0\xFC\x01\0\xFD\x01\0\xFE\x01\0\xFF\x01\0\0\x02\0\x01\x02\0\x02\x02\0\x03\x02\0\x04\x02\0\x05\x02\0\x06\x02\0\x07\x02\0\x08\x02\0\t\x02\0\n\x02\0\x0B\x02\0\x0C\x02\0\r\x02\0\x0E\x02\0\x0F\x02\0\x10\x02\0\x11\x02\0\x12\x02\0\x13\x02\0\x14\x02\0\x15\x02\0\x16\x02\0\x17\x02\0\x18\x02\0\x19\x02\0\x1A\x02\0\x1B\x02\0\x1C\x02\0\x1D\x02\0\x1E\x02\0\x1F\x02\0 \x02\0!\x02\0\"\x02\0#\x02\0$\x02\0%\x02\0&\x02\0'\x02\0(\x02\0)\x02\0*\x02\0+\x02\0,\x02\0-\x02\0.\x02\0/\x02\x000\x02\x001\x02\x002\x02\x003\x02\0:\x02\0<\x02\0=\x02\0?\x02\0A\x02\0B\x02\0C\x02\0G\x02\0H\x02\0I\x02\0J\x02\0K\x02\0L\x02\0M\x02\0N\x02\0O\x02\0E\x03\0F\x03\0p\x03\0q\x03\0r\x03\0s\x03\0v\x03\0w\x03\0\x7F\x03\0\x80\x03\0\x86\x03\0\x87\x03\0\x88\x03\0\x8B\x03\0\x8C\x03\0\x8D\x03\0\x8E\x03\0\x90\x03\0\x91\x03\0\xA2\x03\0\xA3\x03\0\xAC\x03\0\xC2\x03\0\xC3\x03\0\xCF\x03\0\xD2\x03\0\xD5\x03\0\xD7\x03\0\xD8\x03\0\xD9\x03\0\xDA\x03\0\xDB\x03\0\xDC\x03\0\xDD\x03\0\xDE\x03\0\xDF\x03\0\xE0\x03\0\xE1\x03\0\xE2\x03\0\xE3\x03\0\xE4\x03\0\xE5\x03\0\xE6\x03\0\xE7\x03\0\xE8\x03\0\xE9\x03\0\xEA\x03\0\xEB\x03\0\xEC\x03\0\xED\x03\0\xEE\x03\0\xEF\x03\0\xF0\x03\0\xF2\x03\0\xF4\x03\0\xF6\x03\0\xF7\x03\0\xF8\x03\0\xF9\x03\0\xFB\x03\0\xFD\x03\x000\x04\0`\x04\0a\x04\0b\x04\0c\x04\0d\x04\0e\x04\0f\x04\0g\x04\0h\x04\0i\x04\0j\x04\0k\x04\0l\x04\0m\x04\0n\x04\0o\x04\0p\x04\0q\x04\0r\x04\0s\x04\0t\x04\0u\x04\0v\x04\0w\x04\0x\x04\0y\x04\0z\x04\0{\x04\0|\x04\0}\x04\0~\x04\0\x7F\x04\0\x80\x04\0\x81\x04\0\x8A\x04\0\x8B\x04\0\x8C\x04\0\x8D\x04\0\x8E\x04\0\x8F\x04\0\x90\x04\0\x91\x04\0\x92\x04\0\x93\x04\0\x94\x04\0\x95\x04\0\x96\x04\0\x97\x04\0\x98\x04\0\x99\x04\0\x9A\x04\0\x9B\x04\0\x9C\x04\0\x9D\x04\0\x9E\x04\0\x9F\x04\0\xA0\x04\0\xA1\x04\0\xA2\x04\0\xA3\x04\0\xA4\x04\0\xA5\x04\0\xA6\x04\0\xA7\x04\0\xA8\x04\0\xA9\x04\0\xAA\x04\0\xAB\x04\0\xAC\x04\0\xAD\x04\0\xAE\x04\0\xAF\x04\0\xB0\x04\0\xB1\x04\0\xB2\x04\0\xB3\x04\0\xB4\x04\0\xB5\x04\0\xB6\x04\0\xB7\x04\0\xB8\x04\0\xB9\x04\0\xBA\x04\0\xBB\x04\0\xBC\x04\0\xBD\x04\0\xBE\x04\0\xBF\x04\0\xC0\x04\0\xC2\x04\0\xC3\x04\0\xC4\x04\0\xC5\x04\0\xC6\x04\0\xC7\x04\0\xC8\x04\0\xC9\x04\0\xCA\x04\0\xCB\x04\0\xCC\x04\0\xCD\x04\0\xCE\x04\0\xD0\x04\0\xD1\x04\0\xD2\x04\0\xD3\x04\0\xD4\x04\0\xD5\x04\0\xD6\x04\0\xD7\x04\0\xD8\x04\0\xD9\x04\0\xDA\x04\0\xDB\x04\0\xDC\x04\0\xDD\x04\0\xDE\x04\0\xDF\x04\0\xE0\x04\0\xE1\x04\0\xE2\x04\0\xE3\x04\0\xE4\x04\0\xE5\x04\0\xE6\x04\0\xE7\x04\0\xE8\x04\0\xE9\x04\0\xEA\x04\0\xEB\x04\0\xEC\x04\0\xED\x04\0\xEE\x04\0\xEF\x04\0\xF0\x04\0\xF1\x04\0\xF2\x04\0\xF3\x04\0\xF4\x04\0\xF5\x04\0\xF6\x04\0\xF7\x04\0\xF8\x04\0\xF9\x04\0\xFA\x04\0\xFB\x04\0\xFC\x04\0\xFD\x04\0\xFE\x04\0\xFF\x04\0\0\x05\0\x01\x05\0\x02\x05\0\x03\x05\0\x04\x05\0\x05\x05\0\x06\x05\0\x07\x05\0\x08\x05\0\t\x05\0\n\x05\0\x0B\x05\0\x0C\x05\0\r\x05\0\x0E\x05\0\x0F\x05\0\x10\x05\0\x11\x05\0\x12\x05\0\x13\x05\0\x14\x05\0\x15\x05\0\x16\x05\0\x17\x05\0\x18\x05\0\x19\x05\0\x1A\x05\0\x1B\x05\0\x1C\x05\0\x1D\x05\0\x1E\x05\0\x1F\x05\0 \x05\0!\x05\0\"\x05\0#\x05\0$\x05\0%\x05\0&\x05\0'\x05\0(\x05\0)\x05\0*\x05\0+\x05\0,\x05\0-\x05\0.\x05\0/\x05\x001\x05\0W\x05\0\x87\x05\0\x88\x05\0\xA0\x10\0\xC6\x10\0\xC7\x10\0\xC8\x10\0\xCD\x10\0\xCE\x10\0\xF8\x13\0\xFE\x13\0\x80\x1C\0\x8A\x1C\0\x90\x1C\0\xBB\x1C\0\xBD\x1C\0\xC0\x1C\0\0\x1E\0\x01\x1E\0\x02\x1E\0\x03\x1E\0\x04\x1E\0\x05\x1E\0\x06\x1E\0\x07\x1E\0\x08\x1E\0\t\x1E\0\n\x1E\0\x0B\x1E\0\x0C\x1E\0\r\x1E\0\x0E\x1E\0\x0F\x1E\0\x10\x1E\0\x11\x1E\0\x12\x1E\0\x13\x1E\0\x14\x1E\0\x15\x1E\0\x16\x1E\0\x17\x1E\0\x18\x1E\0\x19\x1E\0\x1A\x1E\0\x1B\x1E\0\x1C\x1E\0\x1D\x1E\0\x1E\x1E\0\x1F\x1E\0 \x1E\0!\x1E\0\"\x1E\0#\x1E\0$\x1E\0%\x1E\0&\x1E\0'\x1E\0(\x1E\0)\x1E\0*\x1E\0+\x1E\0,\x1E\0-\x1E\0.\x1E\0/\x1E\x000\x1E\x001\x1E\x002\x1E\x003\x1E\x004\x1E\x005\x1E\x006\x1E\x007\x1E\08\x1E\09\x1E\0:\x1E\0;\x1E\0<\x1E\0=\x1E\0>\x1E\0?\x1E\0@\x1E\0A\x1E\0B\x1E\0C\x1E\0D\x1E\0E\x1E\0F\x1E\0G\x1E\0H\x1E\0I\x1E\0J\x1E\0K\x1E\0L\x1E\0M\x1E\0N\x1E\0O\x1E\0P\x1E\0Q\x1E\0R\x1E\0S\x1E\0T\x1E\0U\x1E\0V\x1E\0W\x1E\0X\x1E\0Y\x1E\0Z\x1E\0[\x1E\0\\\x1E\0]\x1E\0^\x1E\0_\x1E\0`\x1E\0a\x1E\0b\x1E\0c\x1E\0d\x1E\0e\x1E\0f\x1E\0g\x1E\0h\x1E\0i\x1E\0j\x1E\0k\x1E\0l\x1E\0m\x1E\0n\x1E\0o\x1E\0p\x1E\0q\x1E\0r\x1E\0s\x1E\0t\x1E\0u\x1E\0v\x1E\0w\x1E\0x\x1E\0y\x1E\0z\x1E\0{\x1E\0|\x1E\0}\x1E\0~\x1E\0\x7F\x1E\0\x80\x1E\0\x81\x1E\0\x82\x1E\0\x83\x1E\0\x84\x1E\0\x85\x1E\0\x86\x1E\0\x87\x1E\0\x88\x1E\0\x89\x1E\0\x8A\x1E\0\x8B\x1E\0\x8C\x1E\0\x8D\x1E\0\x8E\x1E\0\x8F\x1E\0\x90\x1E\0\x91\x1E\0\x92\x1E\0\x93\x1E\0\x94\x1E\0\x95\x1E\0\x9A\x1E\0\x9C\x1E\0\x9E\x1E\0\x9F\x1E\0\xA0\x1E\0\xA1\x1E\0\xA2\x1E\0\xA3\x1E\0\xA4\x1E\0\xA5\x1E\0\xA6\x1E\0\xA7\x1E\0\xA8\x1E\0\xA9\x1E\0\xAA\x1E\0\xAB\x1E\0\xAC\x1E\0\xAD\x1E\0\xAE\x1E\0\xAF\x1E\0\xB0\x1E\0\xB1\x1E\0\xB2\x1E\0\xB3\x1E\0\xB4\x1E\0\xB5\x1E\0\xB6\x1E\0\xB7\x1E\0\xB8\x1E\0\xB9\x1E\0\xBA\x1E\0\xBB\x1E\0\xBC\x1E\0\xBD\x1E\0\xBE\x1E\0\xBF\x1E\0\xC0\x1E\0\xC1\x1E\0\xC2\x1E\0\xC3\x1E\0\xC4\x1E\0\xC5\x1E\0\xC6\x1E\0\xC7\x1E\0\xC8\x1E\0\xC9\x1E\0\xCA\x1E\0\xCB\x1E\0\xCC\x1E\0\xCD\x1E\0\xCE\x1E\0\xCF\x1E\0\xD0\x1E\0\xD1\x1E\0\xD2\x1E\0\xD3\x1E\0\xD4\x1E\0\xD5\x1E\0\xD6\x1E\0\xD7\x1E\0\xD8\x1E\0\xD9\x1E\0\xDA\x1E\0\xDB\x1E\0\xDC\x1E\0\xDD\x1E\0\xDE\x1E\0\xDF\x1E\0\xE0\x1E\0\xE1\x1E\0\xE2\x1E\0\xE3\x1E\0\xE4\x1E\0\xE5\x1E\0\xE6\x1E\0\xE7\x1E\0\xE8\x1E\0\xE9\x1E\0\xEA\x1E\0\xEB\x1E\0\xEC\x1E\0\xED\x1E\0\xEE\x1E\0\xEF\x1E\0\xF0\x1E\0\xF1\x1E\0\xF2\x1E\0\xF3\x1E\0\xF4\x1E\0\xF5\x1E\0\xF6\x1E\0\xF7\x1E\0\xF8\x1E\0\xF9\x1E\0\xFA\x1E\0\xFB\x1E\0\xFC\x1E\0\xFD\x1E\0\xFE\x1E\0\xFF\x1E\0\x08\x1F\0\x10\x1F\0\x18\x1F\0\x1E\x1F\0(\x1F\x000\x1F\08\x1F\0@\x1F\0H\x1F\0N\x1F\0Y\x1F\0Z\x1F\0[\x1F\0\\\x1F\0]\x1F\0^\x1F\0_\x1F\0`\x1F\0h\x1F\0p\x1F\0\x80\x1F\0\xB0\x1F\0\xB2\x1F\0\xB5\x1F\0\xB7\x1F\0\xBD\x1F\0\xC2\x1F\0\xC5\x1F\0\xC7\x1F\0\xCD\x1F\0\xD8\x1F\0\xDC\x1F\0\xE8\x1F\0\xED\x1F\0\xF2\x1F\0\xF5\x1F\0\xF7\x1F\0\xFD\x1F\0&!\0'!\0*!\0,!\x002!\x003!\0`!\0p!\0\x83!\0\x84!\0\xB6$\0\xD0$\0\0,\x000,\0`,\0a,\0b,\0e,\0g,\0h,\0i,\0j,\0k,\0l,\0m,\0q,\0r,\0s,\0u,\0v,\0~,\0\x81,\0\x82,\0\x83,\0\x84,\0\x85,\0\x86,\0\x87,\0\x88,\0\x89,\0\x8A,\0\x8B,\0\x8C,\0\x8D,\0\x8E,\0\x8F,\0\x90,\0\x91,\0\x92,\0\x93,\0\x94,\0\x95,\0\x96,\0\x97,\0\x98,\0\x99,\0\x9A,\0\x9B,\0\x9C,\0\x9D,\0\x9E,\0\x9F,\0\xA0,\0\xA1,\0\xA2,\0\xA3,\0\xA4,\0\xA5,\0\xA6,\0\xA7,\0\xA8,\0\xA9,\0\xAA,\0\xAB,\0\xAC,\0\xAD,\0\xAE,\0\xAF,\0\xB0,\0\xB1,\0\xB2,\0\xB3,\0\xB4,\0\xB5,\0\xB6,\0\xB7,\0\xB8,\0\xB9,\0\xBA,\0\xBB,\0\xBC,\0\xBD,\0\xBE,\0\xBF,\0\xC0,\0\xC1,\0\xC2,\0\xC3,\0\xC4,\0\xC5,\0\xC6,\0\xC7,\0\xC8,\0\xC9,\0\xCA,\0\xCB,\0\xCC,\0\xCD,\0\xCE,\0\xCF,\0\xD0,\0\xD1,\0\xD2,\0\xD3,\0\xD4,\0\xD5,\0\xD6,\0\xD7,\0\xD8,\0\xD9,\0\xDA,\0\xDB,\0\xDC,\0\xDD,\0\xDE,\0\xDF,\0\xE0,\0\xE1,\0\xE2,\0\xE3,\0\xEB,\0\xEC,\0\xED,\0\xEE,\0\xF2,\0\xF3,\0@\xA6\0A\xA6\0B\xA6\0C\xA6\0D\xA6\0E\xA6\0F\xA6\0G\xA6\0H\xA6\0I\xA6\0J\xA6\0K\xA6\0L\xA6\0M\xA6\0N\xA6\0O\xA6\0P\xA6\0Q\xA6\0R\xA6\0S\xA6\0T\xA6\0U\xA6\0V\xA6\0W\xA6\0X\xA6\0Y\xA6\0Z\xA6\0[\xA6\0\\\xA6\0]\xA6\0^\xA6\0_\xA6\0`\xA6\0a\xA6\0b\xA6\0c\xA6\0d\xA6\0e\xA6\0f\xA6\0g\xA6\0h\xA6\0i\xA6\0j\xA6\0k\xA6\0l\xA6\0m\xA6\0\x80\xA6\0\x81\xA6\0\x82\xA6\0\x83\xA6\0\x84\xA6\0\x85\xA6\0\x86\xA6\0\x87\xA6\0\x88\xA6\0\x89\xA6\0\x8A\xA6\0\x8B\xA6\0\x8C\xA6\0\x8D\xA6\0\x8E\xA6\0\x8F\xA6\0\x90\xA6\0\x91\xA6\0\x92\xA6\0\x93\xA6\0\x94\xA6\0\x95\xA6\0\x96\xA6\0\x97\xA6\0\x98\xA6\0\x99\xA6\0\x9A\xA6\0\x9B\xA6\0\"\xA7\0#\xA7\0$\xA7\0%\xA7\0&\xA7\0'\xA7\0(\xA7\0)\xA7\0*\xA7\0+\xA7\0,\xA7\0-\xA7\0.\xA7\0/\xA7\x002\xA7\x003\xA7\x004\xA7\x005\xA7\x006\xA7\x007\xA7\08\xA7\09\xA7\0:\xA7\0;\xA7\0<\xA7\0=\xA7\0>\xA7\0?\xA7\0@\xA7\0A\xA7\0B\xA7\0C\xA7\0D\xA7\0E\xA7\0F\xA7\0G\xA7\0H\xA7\0I\xA7\0J\xA7\0K\xA7\0L\xA7\0M\xA7\0N\xA7\0O\xA7\0P\xA7\0Q\xA7\0R\xA7\0S\xA7\0T\xA7\0U\xA7\0V\xA7\0W\xA7\0X\xA7\0Y\xA7\0Z\xA7\0[\xA7\0\\\xA7\0]\xA7\0^\xA7\0_\xA7\0`\xA7\0a\xA7\0b\xA7\0c\xA7\0d\xA7\0e\xA7\0f\xA7\0g\xA7\0h\xA7\0i\xA7\0j\xA7\0k\xA7\0l\xA7\0m\xA7\0n\xA7\0o\xA7\0y\xA7\0z\xA7\0{\xA7\0|\xA7\0}\xA7\0\x7F\xA7\0\x80\xA7\0\x81\xA7\0\x82\xA7\0\x83\xA7\0\x84\xA7\0\x85\xA7\0\x86\xA7\0\x87\xA7\0\x8B\xA7\0\x8C\xA7\0\x8D\xA7\0\x8E\xA7\0\x90\xA7\0\x91\xA7\0\x92\xA7\0\x93\xA7\0\x96\xA7\0\x97\xA7\0\x98\xA7\0\x99\xA7\0\x9A\xA7\0\x9B\xA7\0\x9C\xA7\0\x9D\xA7\0\x9E\xA7\0\x9F\xA7\0\xA0\xA7\0\xA1\xA7\0\xA2\xA7\0\xA3\xA7\0\xA4\xA7\0\xA5\xA7\0\xA6\xA7\0\xA7\xA7\0\xA8\xA7\0\xA9\xA7\0\xAA\xA7\0\xAF\xA7\0\xB0\xA7\0\xB5\xA7\0\xB6\xA7\0\xB7\xA7\0\xB8\xA7\0\xB9\xA7\0\xBA\xA7\0\xBB\xA7\0\xBC\xA7\0\xBD\xA7\0\xBE\xA7\0\xBF\xA7\0\xC0\xA7\0\xC1\xA7\0\xC2\xA7\0\xC3\xA7\0\xC4\xA7\0\xC8\xA7\0\xC9\xA7\0\xCA\xA7\0\xCB\xA7\0\xCD\xA7\0\xCE\xA7\0\xCF\xA7\0\xD0\xA7\0\xD1\xA7\0\xD2\xA7\0\xD3\xA7\0\xD4\xA7\0\xD5\xA7\0\xD6\xA7\0\xD7\xA7\0\xD8\xA7\0\xD9\xA7\0\xDA\xA7\0\xDB\xA7\0\xDC\xA7\0\xDD\xA7\0\xF5\xA7\0\xF6\xA7\0p\xAB\0\xC0\xAB\0\0\xFB\0\x07\xFB\0\x13\xFB\0\x18\xFB\0!\xFF\0;\xFF\0\0\x04\x01(\x04\x01\xB0\x04\x01\xD4\x04\x01p\x05\x01{\x05\x01|\x05\x01\x8B\x05\x01\x8C\x05\x01\x93\x05\x01\x94\x05\x01\x96\x05\x01\x80\x0C\x01\xB3\x0C\x01P\r\x01f\r\x01\xA0\x18\x01\xC0\x18\x01@n\x01`n\x01\xA0n\x01\xB9n\x01\0\xE9\x01\"\xE9\x01") }, 1561u32) }); } #[clippy::msrv = "1.83"] impl icu_provider::DataProvider for $provider { fn load(&self, req: icu_provider::DataRequest) -> Result, icu_provider::DataError> { if req.id.locale.is_unknown() { Ok(icu_provider::DataResponse { payload: icu_provider::DataPayload::from_static_ref(Self::SINGLETON_PROPERTY_BINARY_CHANGES_WHEN_CASEFOLDED_V1), metadata: icu_provider::DataResponseMetadata::default() }) } else { Err(icu_provider::DataErrorKind::InvalidRequest.with_req(::INFO, req)) } } } }; ($ provider : ty , ITER) => { __impl_property_binary_changes_when_casefolded_v1!($provider); #[clippy::msrv = "1.83"] impl icu_provider::IterableDataProvider for $provider { fn iter_ids(&self) -> Result>, icu_provider::DataError> { Ok([Default::default()].into_iter().collect()) } } }; ($ provider : ty , DRY) => { __impl_property_binary_changes_when_casefolded_v1!($provider); #[clippy::msrv = "1.83"] impl icu_provider::DryDataProvider for $provider { fn dry_load(&self, req: icu_provider::DataRequest) -> Result { if req.id.locale.is_unknown() { Ok(icu_provider::DataResponseMetadata::default()) } else { Err(icu_provider::DataErrorKind::InvalidRequest.with_req(::INFO, req)) } } } }; ($ provider : ty , DRY , ITER) => { __impl_property_binary_changes_when_casefolded_v1!($provider); #[clippy::msrv = "1.83"] impl icu_provider::DryDataProvider for $provider { fn dry_load(&self, req: icu_provider::DataRequest) -> Result { if req.id.locale.is_unknown() { Ok(icu_provider::DataResponseMetadata::default()) } else { Err(icu_provider::DataErrorKind::InvalidRequest.with_req(::INFO, req)) } } } #[clippy::msrv = "1.83"] impl icu_provider::IterableDataProvider for $provider { fn iter_ids(&self) -> Result>, icu_provider::DataError> { Ok([Default::default()].into_iter().collect()) } } }; } #[doc(inline)] pub use __impl_property_binary_changes_when_casefolded_v1 as impl_property_binary_changes_when_casefolded_v1; // @generated /// Implement `DataProvider` on the given struct using the data /// hardcoded in this file. This allows the struct to be used with /// `icu`'s `_unstable` constructors. /// /// Using this implementation will embed the following data in the binary's data segment: /// * 818B[^1] for the singleton data struct /// /// [^1]: these numbers can be smaller in practice due to linker deduplication /// /// This macro requires the following crates: /// * `icu` /// * `icu_provider` /// * `zerovec` #[doc(hidden)] #[macro_export] macro_rules! __impl_property_binary_changes_when_casemapped_v1 { ($ provider : ty) => { #[clippy::msrv = "1.83"] const _: () = <$provider>::MUST_USE_MAKE_PROVIDER_MACRO; #[clippy::msrv = "1.83"] impl $provider { #[doc(hidden)] pub const SINGLETON_PROPERTY_BINARY_CHANGES_WHEN_CASEMAPPED_V1: &'static ::DataStruct = &icu::properties::provider::PropertyCodePointSet::InversionList(unsafe { #[allow(unused_unsafe)] icu::collections::codepointinvlist::CodePointInversionList::from_parts_unchecked(unsafe { zerovec::ZeroVec::from_bytes_unchecked(b"A\0\0[\0\0a\0\0{\0\0\xB5\0\0\xB6\0\0\xC0\0\0\xD7\0\0\xD8\0\0\xF7\0\0\xF8\0\08\x01\09\x01\0\x8D\x01\0\x8E\x01\0\xAA\x01\0\xAC\x01\0\xBA\x01\0\xBC\x01\0\xBE\x01\0\xBF\x01\0\xC0\x01\0\xC4\x01\0!\x02\0\"\x02\x004\x02\0:\x02\0U\x02\0V\x02\0X\x02\0Y\x02\0Z\x02\0[\x02\0]\x02\0`\x02\0b\x02\0c\x02\0g\x02\0h\x02\0m\x02\0o\x02\0p\x02\0q\x02\0s\x02\0u\x02\0v\x02\0}\x02\0~\x02\0\x80\x02\0\x81\x02\0\x82\x02\0\x84\x02\0\x87\x02\0\x8D\x02\0\x92\x02\0\x93\x02\0\x9D\x02\0\x9F\x02\0E\x03\0F\x03\0p\x03\0t\x03\0v\x03\0x\x03\0{\x03\0~\x03\0\x7F\x03\0\x80\x03\0\x86\x03\0\x87\x03\0\x88\x03\0\x8B\x03\0\x8C\x03\0\x8D\x03\0\x8E\x03\0\xA2\x03\0\xA3\x03\0\xD2\x03\0\xD5\x03\0\xF6\x03\0\xF7\x03\0\xFC\x03\0\xFD\x03\0\x82\x04\0\x8A\x04\x000\x05\x001\x05\0W\x05\0a\x05\0\x88\x05\0\xA0\x10\0\xC6\x10\0\xC7\x10\0\xC8\x10\0\xCD\x10\0\xCE\x10\0\xD0\x10\0\xFB\x10\0\xFD\x10\0\0\x11\0\xA0\x13\0\xF6\x13\0\xF8\x13\0\xFE\x13\0\x80\x1C\0\x8B\x1C\0\x90\x1C\0\xBB\x1C\0\xBD\x1C\0\xC0\x1C\0y\x1D\0z\x1D\0}\x1D\0~\x1D\0\x8E\x1D\0\x8F\x1D\0\0\x1E\0\x9C\x1E\0\x9E\x1E\0\x9F\x1E\0\xA0\x1E\0\x16\x1F\0\x18\x1F\0\x1E\x1F\0 \x1F\0F\x1F\0H\x1F\0N\x1F\0P\x1F\0X\x1F\0Y\x1F\0Z\x1F\0[\x1F\0\\\x1F\0]\x1F\0^\x1F\0_\x1F\0~\x1F\0\x80\x1F\0\xB5\x1F\0\xB6\x1F\0\xBD\x1F\0\xBE\x1F\0\xBF\x1F\0\xC2\x1F\0\xC5\x1F\0\xC6\x1F\0\xCD\x1F\0\xD0\x1F\0\xD4\x1F\0\xD6\x1F\0\xDC\x1F\0\xE0\x1F\0\xED\x1F\0\xF2\x1F\0\xF5\x1F\0\xF6\x1F\0\xFD\x1F\0&!\0'!\0*!\0,!\x002!\x003!\0N!\0O!\0`!\0\x80!\0\x83!\0\x85!\0\xB6$\0\xEA$\0\0,\0q,\0r,\0t,\0u,\0w,\0~,\0\xE4,\0\xEB,\0\xEF,\0\xF2,\0\xF4,\0\0-\0&-\0'-\0(-\0--\0.-\0@\xA6\0n\xA6\0\x80\xA6\0\x9C\xA6\0\"\xA7\x000\xA7\x002\xA7\0p\xA7\0y\xA7\0\x88\xA7\0\x8B\xA7\0\x8E\xA7\0\x90\xA7\0\x95\xA7\0\x96\xA7\0\xAF\xA7\0\xB0\xA7\0\xDD\xA7\0\xF5\xA7\0\xF7\xA7\0S\xAB\0T\xAB\0p\xAB\0\xC0\xAB\0\0\xFB\0\x07\xFB\0\x13\xFB\0\x18\xFB\0!\xFF\0;\xFF\0A\xFF\0[\xFF\0\0\x04\x01P\x04\x01\xB0\x04\x01\xD4\x04\x01\xD8\x04\x01\xFC\x04\x01p\x05\x01{\x05\x01|\x05\x01\x8B\x05\x01\x8C\x05\x01\x93\x05\x01\x94\x05\x01\x96\x05\x01\x97\x05\x01\xA2\x05\x01\xA3\x05\x01\xB2\x05\x01\xB3\x05\x01\xBA\x05\x01\xBB\x05\x01\xBD\x05\x01\x80\x0C\x01\xB3\x0C\x01\xC0\x0C\x01\xF3\x0C\x01P\r\x01f\r\x01p\r\x01\x86\r\x01\xA0\x18\x01\xE0\x18\x01@n\x01\x80n\x01\xA0n\x01\xB9n\x01\xBBn\x01\xD4n\x01\0\xE9\x01D\xE9\x01") }, 3037u32) }); } #[clippy::msrv = "1.83"] impl icu_provider::DataProvider for $provider { fn load(&self, req: icu_provider::DataRequest) -> Result, icu_provider::DataError> { if req.id.locale.is_unknown() { Ok(icu_provider::DataResponse { payload: icu_provider::DataPayload::from_static_ref(Self::SINGLETON_PROPERTY_BINARY_CHANGES_WHEN_CASEMAPPED_V1), metadata: icu_provider::DataResponseMetadata::default() }) } else { Err(icu_provider::DataErrorKind::InvalidRequest.with_req(::INFO, req)) } } } }; ($ provider : ty , ITER) => { __impl_property_binary_changes_when_casemapped_v1!($provider); #[clippy::msrv = "1.83"] impl icu_provider::IterableDataProvider for $provider { fn iter_ids(&self) -> Result>, icu_provider::DataError> { Ok([Default::default()].into_iter().collect()) } } }; ($ provider : ty , DRY) => { __impl_property_binary_changes_when_casemapped_v1!($provider); #[clippy::msrv = "1.83"] impl icu_provider::DryDataProvider for $provider { fn dry_load(&self, req: icu_provider::DataRequest) -> Result { if req.id.locale.is_unknown() { Ok(icu_provider::DataResponseMetadata::default()) } else { Err(icu_provider::DataErrorKind::InvalidRequest.with_req(::INFO, req)) } } } }; ($ provider : ty , DRY , ITER) => { __impl_property_binary_changes_when_casemapped_v1!($provider); #[clippy::msrv = "1.83"] impl icu_provider::DryDataProvider for $provider { fn dry_load(&self, req: icu_provider::DataRequest) -> Result { if req.id.locale.is_unknown() { Ok(icu_provider::DataResponseMetadata::default()) } else { Err(icu_provider::DataErrorKind::InvalidRequest.with_req(::INFO, req)) } } } #[clippy::msrv = "1.83"] impl icu_provider::IterableDataProvider for $provider { fn iter_ids(&self) -> Result>, icu_provider::DataError> { Ok([Default::default()].into_iter().collect()) } } }; } #[doc(inline)] pub use __impl_property_binary_changes_when_casemapped_v1 as impl_property_binary_changes_when_casemapped_v1; // @generated /// Implement `DataProvider` on the given struct using the data /// hardcoded in this file. This allows the struct to be used with /// `icu`'s `_unstable` constructors. /// /// Using this implementation will embed the following data in the binary's data segment: /// * 3740B[^1] for the singleton data struct /// /// [^1]: these numbers can be smaller in practice due to linker deduplication /// /// This macro requires the following crates: /// * `icu` /// * `icu_provider` /// * `zerovec` #[doc(hidden)] #[macro_export] macro_rules! __impl_property_binary_changes_when_lowercased_v1 { ($ provider : ty) => { #[clippy::msrv = "1.83"] const _: () = <$provider>::MUST_USE_MAKE_PROVIDER_MACRO; #[clippy::msrv = "1.83"] impl $provider { #[doc(hidden)] pub const SINGLETON_PROPERTY_BINARY_CHANGES_WHEN_LOWERCASED_V1: &'static ::DataStruct = &icu::properties::provider::PropertyCodePointSet::InversionList(unsafe { #[allow(unused_unsafe)] icu::collections::codepointinvlist::CodePointInversionList::from_parts_unchecked(unsafe { zerovec::ZeroVec::from_bytes_unchecked(b"A\0\0[\0\0\xC0\0\0\xD7\0\0\xD8\0\0\xDF\0\0\0\x01\0\x01\x01\0\x02\x01\0\x03\x01\0\x04\x01\0\x05\x01\0\x06\x01\0\x07\x01\0\x08\x01\0\t\x01\0\n\x01\0\x0B\x01\0\x0C\x01\0\r\x01\0\x0E\x01\0\x0F\x01\0\x10\x01\0\x11\x01\0\x12\x01\0\x13\x01\0\x14\x01\0\x15\x01\0\x16\x01\0\x17\x01\0\x18\x01\0\x19\x01\0\x1A\x01\0\x1B\x01\0\x1C\x01\0\x1D\x01\0\x1E\x01\0\x1F\x01\0 \x01\0!\x01\0\"\x01\0#\x01\0$\x01\0%\x01\0&\x01\0'\x01\0(\x01\0)\x01\0*\x01\0+\x01\0,\x01\0-\x01\0.\x01\0/\x01\x000\x01\x001\x01\x002\x01\x003\x01\x004\x01\x005\x01\x006\x01\x007\x01\09\x01\0:\x01\0;\x01\0<\x01\0=\x01\0>\x01\0?\x01\0@\x01\0A\x01\0B\x01\0C\x01\0D\x01\0E\x01\0F\x01\0G\x01\0H\x01\0J\x01\0K\x01\0L\x01\0M\x01\0N\x01\0O\x01\0P\x01\0Q\x01\0R\x01\0S\x01\0T\x01\0U\x01\0V\x01\0W\x01\0X\x01\0Y\x01\0Z\x01\0[\x01\0\\\x01\0]\x01\0^\x01\0_\x01\0`\x01\0a\x01\0b\x01\0c\x01\0d\x01\0e\x01\0f\x01\0g\x01\0h\x01\0i\x01\0j\x01\0k\x01\0l\x01\0m\x01\0n\x01\0o\x01\0p\x01\0q\x01\0r\x01\0s\x01\0t\x01\0u\x01\0v\x01\0w\x01\0x\x01\0z\x01\0{\x01\0|\x01\0}\x01\0~\x01\0\x81\x01\0\x83\x01\0\x84\x01\0\x85\x01\0\x86\x01\0\x88\x01\0\x89\x01\0\x8C\x01\0\x8E\x01\0\x92\x01\0\x93\x01\0\x95\x01\0\x96\x01\0\x99\x01\0\x9C\x01\0\x9E\x01\0\x9F\x01\0\xA1\x01\0\xA2\x01\0\xA3\x01\0\xA4\x01\0\xA5\x01\0\xA6\x01\0\xA8\x01\0\xA9\x01\0\xAA\x01\0\xAC\x01\0\xAD\x01\0\xAE\x01\0\xB0\x01\0\xB1\x01\0\xB4\x01\0\xB5\x01\0\xB6\x01\0\xB7\x01\0\xB9\x01\0\xBC\x01\0\xBD\x01\0\xC4\x01\0\xC6\x01\0\xC7\x01\0\xC9\x01\0\xCA\x01\0\xCC\x01\0\xCD\x01\0\xCE\x01\0\xCF\x01\0\xD0\x01\0\xD1\x01\0\xD2\x01\0\xD3\x01\0\xD4\x01\0\xD5\x01\0\xD6\x01\0\xD7\x01\0\xD8\x01\0\xD9\x01\0\xDA\x01\0\xDB\x01\0\xDC\x01\0\xDE\x01\0\xDF\x01\0\xE0\x01\0\xE1\x01\0\xE2\x01\0\xE3\x01\0\xE4\x01\0\xE5\x01\0\xE6\x01\0\xE7\x01\0\xE8\x01\0\xE9\x01\0\xEA\x01\0\xEB\x01\0\xEC\x01\0\xED\x01\0\xEE\x01\0\xEF\x01\0\xF1\x01\0\xF3\x01\0\xF4\x01\0\xF5\x01\0\xF6\x01\0\xF9\x01\0\xFA\x01\0\xFB\x01\0\xFC\x01\0\xFD\x01\0\xFE\x01\0\xFF\x01\0\0\x02\0\x01\x02\0\x02\x02\0\x03\x02\0\x04\x02\0\x05\x02\0\x06\x02\0\x07\x02\0\x08\x02\0\t\x02\0\n\x02\0\x0B\x02\0\x0C\x02\0\r\x02\0\x0E\x02\0\x0F\x02\0\x10\x02\0\x11\x02\0\x12\x02\0\x13\x02\0\x14\x02\0\x15\x02\0\x16\x02\0\x17\x02\0\x18\x02\0\x19\x02\0\x1A\x02\0\x1B\x02\0\x1C\x02\0\x1D\x02\0\x1E\x02\0\x1F\x02\0 \x02\0!\x02\0\"\x02\0#\x02\0$\x02\0%\x02\0&\x02\0'\x02\0(\x02\0)\x02\0*\x02\0+\x02\0,\x02\0-\x02\0.\x02\0/\x02\x000\x02\x001\x02\x002\x02\x003\x02\0:\x02\0<\x02\0=\x02\0?\x02\0A\x02\0B\x02\0C\x02\0G\x02\0H\x02\0I\x02\0J\x02\0K\x02\0L\x02\0M\x02\0N\x02\0O\x02\0p\x03\0q\x03\0r\x03\0s\x03\0v\x03\0w\x03\0\x7F\x03\0\x80\x03\0\x86\x03\0\x87\x03\0\x88\x03\0\x8B\x03\0\x8C\x03\0\x8D\x03\0\x8E\x03\0\x90\x03\0\x91\x03\0\xA2\x03\0\xA3\x03\0\xAC\x03\0\xCF\x03\0\xD0\x03\0\xD8\x03\0\xD9\x03\0\xDA\x03\0\xDB\x03\0\xDC\x03\0\xDD\x03\0\xDE\x03\0\xDF\x03\0\xE0\x03\0\xE1\x03\0\xE2\x03\0\xE3\x03\0\xE4\x03\0\xE5\x03\0\xE6\x03\0\xE7\x03\0\xE8\x03\0\xE9\x03\0\xEA\x03\0\xEB\x03\0\xEC\x03\0\xED\x03\0\xEE\x03\0\xEF\x03\0\xF4\x03\0\xF5\x03\0\xF7\x03\0\xF8\x03\0\xF9\x03\0\xFB\x03\0\xFD\x03\x000\x04\0`\x04\0a\x04\0b\x04\0c\x04\0d\x04\0e\x04\0f\x04\0g\x04\0h\x04\0i\x04\0j\x04\0k\x04\0l\x04\0m\x04\0n\x04\0o\x04\0p\x04\0q\x04\0r\x04\0s\x04\0t\x04\0u\x04\0v\x04\0w\x04\0x\x04\0y\x04\0z\x04\0{\x04\0|\x04\0}\x04\0~\x04\0\x7F\x04\0\x80\x04\0\x81\x04\0\x8A\x04\0\x8B\x04\0\x8C\x04\0\x8D\x04\0\x8E\x04\0\x8F\x04\0\x90\x04\0\x91\x04\0\x92\x04\0\x93\x04\0\x94\x04\0\x95\x04\0\x96\x04\0\x97\x04\0\x98\x04\0\x99\x04\0\x9A\x04\0\x9B\x04\0\x9C\x04\0\x9D\x04\0\x9E\x04\0\x9F\x04\0\xA0\x04\0\xA1\x04\0\xA2\x04\0\xA3\x04\0\xA4\x04\0\xA5\x04\0\xA6\x04\0\xA7\x04\0\xA8\x04\0\xA9\x04\0\xAA\x04\0\xAB\x04\0\xAC\x04\0\xAD\x04\0\xAE\x04\0\xAF\x04\0\xB0\x04\0\xB1\x04\0\xB2\x04\0\xB3\x04\0\xB4\x04\0\xB5\x04\0\xB6\x04\0\xB7\x04\0\xB8\x04\0\xB9\x04\0\xBA\x04\0\xBB\x04\0\xBC\x04\0\xBD\x04\0\xBE\x04\0\xBF\x04\0\xC0\x04\0\xC2\x04\0\xC3\x04\0\xC4\x04\0\xC5\x04\0\xC6\x04\0\xC7\x04\0\xC8\x04\0\xC9\x04\0\xCA\x04\0\xCB\x04\0\xCC\x04\0\xCD\x04\0\xCE\x04\0\xD0\x04\0\xD1\x04\0\xD2\x04\0\xD3\x04\0\xD4\x04\0\xD5\x04\0\xD6\x04\0\xD7\x04\0\xD8\x04\0\xD9\x04\0\xDA\x04\0\xDB\x04\0\xDC\x04\0\xDD\x04\0\xDE\x04\0\xDF\x04\0\xE0\x04\0\xE1\x04\0\xE2\x04\0\xE3\x04\0\xE4\x04\0\xE5\x04\0\xE6\x04\0\xE7\x04\0\xE8\x04\0\xE9\x04\0\xEA\x04\0\xEB\x04\0\xEC\x04\0\xED\x04\0\xEE\x04\0\xEF\x04\0\xF0\x04\0\xF1\x04\0\xF2\x04\0\xF3\x04\0\xF4\x04\0\xF5\x04\0\xF6\x04\0\xF7\x04\0\xF8\x04\0\xF9\x04\0\xFA\x04\0\xFB\x04\0\xFC\x04\0\xFD\x04\0\xFE\x04\0\xFF\x04\0\0\x05\0\x01\x05\0\x02\x05\0\x03\x05\0\x04\x05\0\x05\x05\0\x06\x05\0\x07\x05\0\x08\x05\0\t\x05\0\n\x05\0\x0B\x05\0\x0C\x05\0\r\x05\0\x0E\x05\0\x0F\x05\0\x10\x05\0\x11\x05\0\x12\x05\0\x13\x05\0\x14\x05\0\x15\x05\0\x16\x05\0\x17\x05\0\x18\x05\0\x19\x05\0\x1A\x05\0\x1B\x05\0\x1C\x05\0\x1D\x05\0\x1E\x05\0\x1F\x05\0 \x05\0!\x05\0\"\x05\0#\x05\0$\x05\0%\x05\0&\x05\0'\x05\0(\x05\0)\x05\0*\x05\0+\x05\0,\x05\0-\x05\0.\x05\0/\x05\x001\x05\0W\x05\0\xA0\x10\0\xC6\x10\0\xC7\x10\0\xC8\x10\0\xCD\x10\0\xCE\x10\0\xA0\x13\0\xF6\x13\0\x89\x1C\0\x8A\x1C\0\x90\x1C\0\xBB\x1C\0\xBD\x1C\0\xC0\x1C\0\0\x1E\0\x01\x1E\0\x02\x1E\0\x03\x1E\0\x04\x1E\0\x05\x1E\0\x06\x1E\0\x07\x1E\0\x08\x1E\0\t\x1E\0\n\x1E\0\x0B\x1E\0\x0C\x1E\0\r\x1E\0\x0E\x1E\0\x0F\x1E\0\x10\x1E\0\x11\x1E\0\x12\x1E\0\x13\x1E\0\x14\x1E\0\x15\x1E\0\x16\x1E\0\x17\x1E\0\x18\x1E\0\x19\x1E\0\x1A\x1E\0\x1B\x1E\0\x1C\x1E\0\x1D\x1E\0\x1E\x1E\0\x1F\x1E\0 \x1E\0!\x1E\0\"\x1E\0#\x1E\0$\x1E\0%\x1E\0&\x1E\0'\x1E\0(\x1E\0)\x1E\0*\x1E\0+\x1E\0,\x1E\0-\x1E\0.\x1E\0/\x1E\x000\x1E\x001\x1E\x002\x1E\x003\x1E\x004\x1E\x005\x1E\x006\x1E\x007\x1E\08\x1E\09\x1E\0:\x1E\0;\x1E\0<\x1E\0=\x1E\0>\x1E\0?\x1E\0@\x1E\0A\x1E\0B\x1E\0C\x1E\0D\x1E\0E\x1E\0F\x1E\0G\x1E\0H\x1E\0I\x1E\0J\x1E\0K\x1E\0L\x1E\0M\x1E\0N\x1E\0O\x1E\0P\x1E\0Q\x1E\0R\x1E\0S\x1E\0T\x1E\0U\x1E\0V\x1E\0W\x1E\0X\x1E\0Y\x1E\0Z\x1E\0[\x1E\0\\\x1E\0]\x1E\0^\x1E\0_\x1E\0`\x1E\0a\x1E\0b\x1E\0c\x1E\0d\x1E\0e\x1E\0f\x1E\0g\x1E\0h\x1E\0i\x1E\0j\x1E\0k\x1E\0l\x1E\0m\x1E\0n\x1E\0o\x1E\0p\x1E\0q\x1E\0r\x1E\0s\x1E\0t\x1E\0u\x1E\0v\x1E\0w\x1E\0x\x1E\0y\x1E\0z\x1E\0{\x1E\0|\x1E\0}\x1E\0~\x1E\0\x7F\x1E\0\x80\x1E\0\x81\x1E\0\x82\x1E\0\x83\x1E\0\x84\x1E\0\x85\x1E\0\x86\x1E\0\x87\x1E\0\x88\x1E\0\x89\x1E\0\x8A\x1E\0\x8B\x1E\0\x8C\x1E\0\x8D\x1E\0\x8E\x1E\0\x8F\x1E\0\x90\x1E\0\x91\x1E\0\x92\x1E\0\x93\x1E\0\x94\x1E\0\x95\x1E\0\x9E\x1E\0\x9F\x1E\0\xA0\x1E\0\xA1\x1E\0\xA2\x1E\0\xA3\x1E\0\xA4\x1E\0\xA5\x1E\0\xA6\x1E\0\xA7\x1E\0\xA8\x1E\0\xA9\x1E\0\xAA\x1E\0\xAB\x1E\0\xAC\x1E\0\xAD\x1E\0\xAE\x1E\0\xAF\x1E\0\xB0\x1E\0\xB1\x1E\0\xB2\x1E\0\xB3\x1E\0\xB4\x1E\0\xB5\x1E\0\xB6\x1E\0\xB7\x1E\0\xB8\x1E\0\xB9\x1E\0\xBA\x1E\0\xBB\x1E\0\xBC\x1E\0\xBD\x1E\0\xBE\x1E\0\xBF\x1E\0\xC0\x1E\0\xC1\x1E\0\xC2\x1E\0\xC3\x1E\0\xC4\x1E\0\xC5\x1E\0\xC6\x1E\0\xC7\x1E\0\xC8\x1E\0\xC9\x1E\0\xCA\x1E\0\xCB\x1E\0\xCC\x1E\0\xCD\x1E\0\xCE\x1E\0\xCF\x1E\0\xD0\x1E\0\xD1\x1E\0\xD2\x1E\0\xD3\x1E\0\xD4\x1E\0\xD5\x1E\0\xD6\x1E\0\xD7\x1E\0\xD8\x1E\0\xD9\x1E\0\xDA\x1E\0\xDB\x1E\0\xDC\x1E\0\xDD\x1E\0\xDE\x1E\0\xDF\x1E\0\xE0\x1E\0\xE1\x1E\0\xE2\x1E\0\xE3\x1E\0\xE4\x1E\0\xE5\x1E\0\xE6\x1E\0\xE7\x1E\0\xE8\x1E\0\xE9\x1E\0\xEA\x1E\0\xEB\x1E\0\xEC\x1E\0\xED\x1E\0\xEE\x1E\0\xEF\x1E\0\xF0\x1E\0\xF1\x1E\0\xF2\x1E\0\xF3\x1E\0\xF4\x1E\0\xF5\x1E\0\xF6\x1E\0\xF7\x1E\0\xF8\x1E\0\xF9\x1E\0\xFA\x1E\0\xFB\x1E\0\xFC\x1E\0\xFD\x1E\0\xFE\x1E\0\xFF\x1E\0\x08\x1F\0\x10\x1F\0\x18\x1F\0\x1E\x1F\0(\x1F\x000\x1F\08\x1F\0@\x1F\0H\x1F\0N\x1F\0Y\x1F\0Z\x1F\0[\x1F\0\\\x1F\0]\x1F\0^\x1F\0_\x1F\0`\x1F\0h\x1F\0p\x1F\0\x88\x1F\0\x90\x1F\0\x98\x1F\0\xA0\x1F\0\xA8\x1F\0\xB0\x1F\0\xB8\x1F\0\xBD\x1F\0\xC8\x1F\0\xCD\x1F\0\xD8\x1F\0\xDC\x1F\0\xE8\x1F\0\xED\x1F\0\xF8\x1F\0\xFD\x1F\0&!\0'!\0*!\0,!\x002!\x003!\0`!\0p!\0\x83!\0\x84!\0\xB6$\0\xD0$\0\0,\x000,\0`,\0a,\0b,\0e,\0g,\0h,\0i,\0j,\0k,\0l,\0m,\0q,\0r,\0s,\0u,\0v,\0~,\0\x81,\0\x82,\0\x83,\0\x84,\0\x85,\0\x86,\0\x87,\0\x88,\0\x89,\0\x8A,\0\x8B,\0\x8C,\0\x8D,\0\x8E,\0\x8F,\0\x90,\0\x91,\0\x92,\0\x93,\0\x94,\0\x95,\0\x96,\0\x97,\0\x98,\0\x99,\0\x9A,\0\x9B,\0\x9C,\0\x9D,\0\x9E,\0\x9F,\0\xA0,\0\xA1,\0\xA2,\0\xA3,\0\xA4,\0\xA5,\0\xA6,\0\xA7,\0\xA8,\0\xA9,\0\xAA,\0\xAB,\0\xAC,\0\xAD,\0\xAE,\0\xAF,\0\xB0,\0\xB1,\0\xB2,\0\xB3,\0\xB4,\0\xB5,\0\xB6,\0\xB7,\0\xB8,\0\xB9,\0\xBA,\0\xBB,\0\xBC,\0\xBD,\0\xBE,\0\xBF,\0\xC0,\0\xC1,\0\xC2,\0\xC3,\0\xC4,\0\xC5,\0\xC6,\0\xC7,\0\xC8,\0\xC9,\0\xCA,\0\xCB,\0\xCC,\0\xCD,\0\xCE,\0\xCF,\0\xD0,\0\xD1,\0\xD2,\0\xD3,\0\xD4,\0\xD5,\0\xD6,\0\xD7,\0\xD8,\0\xD9,\0\xDA,\0\xDB,\0\xDC,\0\xDD,\0\xDE,\0\xDF,\0\xE0,\0\xE1,\0\xE2,\0\xE3,\0\xEB,\0\xEC,\0\xED,\0\xEE,\0\xF2,\0\xF3,\0@\xA6\0A\xA6\0B\xA6\0C\xA6\0D\xA6\0E\xA6\0F\xA6\0G\xA6\0H\xA6\0I\xA6\0J\xA6\0K\xA6\0L\xA6\0M\xA6\0N\xA6\0O\xA6\0P\xA6\0Q\xA6\0R\xA6\0S\xA6\0T\xA6\0U\xA6\0V\xA6\0W\xA6\0X\xA6\0Y\xA6\0Z\xA6\0[\xA6\0\\\xA6\0]\xA6\0^\xA6\0_\xA6\0`\xA6\0a\xA6\0b\xA6\0c\xA6\0d\xA6\0e\xA6\0f\xA6\0g\xA6\0h\xA6\0i\xA6\0j\xA6\0k\xA6\0l\xA6\0m\xA6\0\x80\xA6\0\x81\xA6\0\x82\xA6\0\x83\xA6\0\x84\xA6\0\x85\xA6\0\x86\xA6\0\x87\xA6\0\x88\xA6\0\x89\xA6\0\x8A\xA6\0\x8B\xA6\0\x8C\xA6\0\x8D\xA6\0\x8E\xA6\0\x8F\xA6\0\x90\xA6\0\x91\xA6\0\x92\xA6\0\x93\xA6\0\x94\xA6\0\x95\xA6\0\x96\xA6\0\x97\xA6\0\x98\xA6\0\x99\xA6\0\x9A\xA6\0\x9B\xA6\0\"\xA7\0#\xA7\0$\xA7\0%\xA7\0&\xA7\0'\xA7\0(\xA7\0)\xA7\0*\xA7\0+\xA7\0,\xA7\0-\xA7\0.\xA7\0/\xA7\x002\xA7\x003\xA7\x004\xA7\x005\xA7\x006\xA7\x007\xA7\08\xA7\09\xA7\0:\xA7\0;\xA7\0<\xA7\0=\xA7\0>\xA7\0?\xA7\0@\xA7\0A\xA7\0B\xA7\0C\xA7\0D\xA7\0E\xA7\0F\xA7\0G\xA7\0H\xA7\0I\xA7\0J\xA7\0K\xA7\0L\xA7\0M\xA7\0N\xA7\0O\xA7\0P\xA7\0Q\xA7\0R\xA7\0S\xA7\0T\xA7\0U\xA7\0V\xA7\0W\xA7\0X\xA7\0Y\xA7\0Z\xA7\0[\xA7\0\\\xA7\0]\xA7\0^\xA7\0_\xA7\0`\xA7\0a\xA7\0b\xA7\0c\xA7\0d\xA7\0e\xA7\0f\xA7\0g\xA7\0h\xA7\0i\xA7\0j\xA7\0k\xA7\0l\xA7\0m\xA7\0n\xA7\0o\xA7\0y\xA7\0z\xA7\0{\xA7\0|\xA7\0}\xA7\0\x7F\xA7\0\x80\xA7\0\x81\xA7\0\x82\xA7\0\x83\xA7\0\x84\xA7\0\x85\xA7\0\x86\xA7\0\x87\xA7\0\x8B\xA7\0\x8C\xA7\0\x8D\xA7\0\x8E\xA7\0\x90\xA7\0\x91\xA7\0\x92\xA7\0\x93\xA7\0\x96\xA7\0\x97\xA7\0\x98\xA7\0\x99\xA7\0\x9A\xA7\0\x9B\xA7\0\x9C\xA7\0\x9D\xA7\0\x9E\xA7\0\x9F\xA7\0\xA0\xA7\0\xA1\xA7\0\xA2\xA7\0\xA3\xA7\0\xA4\xA7\0\xA5\xA7\0\xA6\xA7\0\xA7\xA7\0\xA8\xA7\0\xA9\xA7\0\xAA\xA7\0\xAF\xA7\0\xB0\xA7\0\xB5\xA7\0\xB6\xA7\0\xB7\xA7\0\xB8\xA7\0\xB9\xA7\0\xBA\xA7\0\xBB\xA7\0\xBC\xA7\0\xBD\xA7\0\xBE\xA7\0\xBF\xA7\0\xC0\xA7\0\xC1\xA7\0\xC2\xA7\0\xC3\xA7\0\xC4\xA7\0\xC8\xA7\0\xC9\xA7\0\xCA\xA7\0\xCB\xA7\0\xCD\xA7\0\xCE\xA7\0\xCF\xA7\0\xD0\xA7\0\xD1\xA7\0\xD2\xA7\0\xD3\xA7\0\xD4\xA7\0\xD5\xA7\0\xD6\xA7\0\xD7\xA7\0\xD8\xA7\0\xD9\xA7\0\xDA\xA7\0\xDB\xA7\0\xDC\xA7\0\xDD\xA7\0\xF5\xA7\0\xF6\xA7\0!\xFF\0;\xFF\0\0\x04\x01(\x04\x01\xB0\x04\x01\xD4\x04\x01p\x05\x01{\x05\x01|\x05\x01\x8B\x05\x01\x8C\x05\x01\x93\x05\x01\x94\x05\x01\x96\x05\x01\x80\x0C\x01\xB3\x0C\x01P\r\x01f\r\x01\xA0\x18\x01\xC0\x18\x01@n\x01`n\x01\xA0n\x01\xB9n\x01\0\xE9\x01\"\xE9\x01") }, 1488u32) }); } #[clippy::msrv = "1.83"] impl icu_provider::DataProvider for $provider { fn load(&self, req: icu_provider::DataRequest) -> Result, icu_provider::DataError> { if req.id.locale.is_unknown() { Ok(icu_provider::DataResponse { payload: icu_provider::DataPayload::from_static_ref(Self::SINGLETON_PROPERTY_BINARY_CHANGES_WHEN_LOWERCASED_V1), metadata: icu_provider::DataResponseMetadata::default() }) } else { Err(icu_provider::DataErrorKind::InvalidRequest.with_req(::INFO, req)) } } } }; ($ provider : ty , ITER) => { __impl_property_binary_changes_when_lowercased_v1!($provider); #[clippy::msrv = "1.83"] impl icu_provider::IterableDataProvider for $provider { fn iter_ids(&self) -> Result>, icu_provider::DataError> { Ok([Default::default()].into_iter().collect()) } } }; ($ provider : ty , DRY) => { __impl_property_binary_changes_when_lowercased_v1!($provider); #[clippy::msrv = "1.83"] impl icu_provider::DryDataProvider for $provider { fn dry_load(&self, req: icu_provider::DataRequest) -> Result { if req.id.locale.is_unknown() { Ok(icu_provider::DataResponseMetadata::default()) } else { Err(icu_provider::DataErrorKind::InvalidRequest.with_req(::INFO, req)) } } } }; ($ provider : ty , DRY , ITER) => { __impl_property_binary_changes_when_lowercased_v1!($provider); #[clippy::msrv = "1.83"] impl icu_provider::DryDataProvider for $provider { fn dry_load(&self, req: icu_provider::DataRequest) -> Result { if req.id.locale.is_unknown() { Ok(icu_provider::DataResponseMetadata::default()) } else { Err(icu_provider::DataErrorKind::InvalidRequest.with_req(::INFO, req)) } } } #[clippy::msrv = "1.83"] impl icu_provider::IterableDataProvider for $provider { fn iter_ids(&self) -> Result>, icu_provider::DataError> { Ok([Default::default()].into_iter().collect()) } } }; } #[doc(inline)] pub use __impl_property_binary_changes_when_lowercased_v1 as impl_property_binary_changes_when_lowercased_v1; // @generated /// Implement `DataProvider` on the given struct using the data /// hardcoded in this file. This allows the struct to be used with /// `icu`'s `_unstable` constructors. /// /// Using this implementation will embed the following data in the binary's data segment: /// * 5120B[^1] for the singleton data struct /// /// [^1]: these numbers can be smaller in practice due to linker deduplication /// /// This macro requires the following crates: /// * `icu` /// * `icu_provider` /// * `zerovec` #[doc(hidden)] #[macro_export] macro_rules! __impl_property_binary_changes_when_nfkc_casefolded_v1 { ($ provider : ty) => { #[clippy::msrv = "1.83"] const _: () = <$provider>::MUST_USE_MAKE_PROVIDER_MACRO; #[clippy::msrv = "1.83"] impl $provider { #[doc(hidden)] pub const SINGLETON_PROPERTY_BINARY_CHANGES_WHEN_NFKC_CASEFOLDED_V1: &'static ::DataStruct = &icu::properties::provider::PropertyCodePointSet::InversionList(unsafe { #[allow(unused_unsafe)] icu::collections::codepointinvlist::CodePointInversionList::from_parts_unchecked(unsafe { zerovec::ZeroVec::from_bytes_unchecked(b"A\0\0[\0\0\xA0\0\0\xA1\0\0\xA8\0\0\xA9\0\0\xAA\0\0\xAB\0\0\xAD\0\0\xAE\0\0\xAF\0\0\xB0\0\0\xB2\0\0\xB6\0\0\xB8\0\0\xBB\0\0\xBC\0\0\xBF\0\0\xC0\0\0\xD7\0\0\xD8\0\0\xE0\0\0\0\x01\0\x01\x01\0\x02\x01\0\x03\x01\0\x04\x01\0\x05\x01\0\x06\x01\0\x07\x01\0\x08\x01\0\t\x01\0\n\x01\0\x0B\x01\0\x0C\x01\0\r\x01\0\x0E\x01\0\x0F\x01\0\x10\x01\0\x11\x01\0\x12\x01\0\x13\x01\0\x14\x01\0\x15\x01\0\x16\x01\0\x17\x01\0\x18\x01\0\x19\x01\0\x1A\x01\0\x1B\x01\0\x1C\x01\0\x1D\x01\0\x1E\x01\0\x1F\x01\0 \x01\0!\x01\0\"\x01\0#\x01\0$\x01\0%\x01\0&\x01\0'\x01\0(\x01\0)\x01\0*\x01\0+\x01\0,\x01\0-\x01\0.\x01\0/\x01\x000\x01\x001\x01\x002\x01\x005\x01\x006\x01\x007\x01\09\x01\0:\x01\0;\x01\0<\x01\0=\x01\0>\x01\0?\x01\0B\x01\0C\x01\0D\x01\0E\x01\0F\x01\0G\x01\0H\x01\0I\x01\0K\x01\0L\x01\0M\x01\0N\x01\0O\x01\0P\x01\0Q\x01\0R\x01\0S\x01\0T\x01\0U\x01\0V\x01\0W\x01\0X\x01\0Y\x01\0Z\x01\0[\x01\0\\\x01\0]\x01\0^\x01\0_\x01\0`\x01\0a\x01\0b\x01\0c\x01\0d\x01\0e\x01\0f\x01\0g\x01\0h\x01\0i\x01\0j\x01\0k\x01\0l\x01\0m\x01\0n\x01\0o\x01\0p\x01\0q\x01\0r\x01\0s\x01\0t\x01\0u\x01\0v\x01\0w\x01\0x\x01\0z\x01\0{\x01\0|\x01\0}\x01\0~\x01\0\x7F\x01\0\x80\x01\0\x81\x01\0\x83\x01\0\x84\x01\0\x85\x01\0\x86\x01\0\x88\x01\0\x89\x01\0\x8C\x01\0\x8E\x01\0\x92\x01\0\x93\x01\0\x95\x01\0\x96\x01\0\x99\x01\0\x9C\x01\0\x9E\x01\0\x9F\x01\0\xA1\x01\0\xA2\x01\0\xA3\x01\0\xA4\x01\0\xA5\x01\0\xA6\x01\0\xA8\x01\0\xA9\x01\0\xAA\x01\0\xAC\x01\0\xAD\x01\0\xAE\x01\0\xB0\x01\0\xB1\x01\0\xB4\x01\0\xB5\x01\0\xB6\x01\0\xB7\x01\0\xB9\x01\0\xBC\x01\0\xBD\x01\0\xC4\x01\0\xCE\x01\0\xCF\x01\0\xD0\x01\0\xD1\x01\0\xD2\x01\0\xD3\x01\0\xD4\x01\0\xD5\x01\0\xD6\x01\0\xD7\x01\0\xD8\x01\0\xD9\x01\0\xDA\x01\0\xDB\x01\0\xDC\x01\0\xDE\x01\0\xDF\x01\0\xE0\x01\0\xE1\x01\0\xE2\x01\0\xE3\x01\0\xE4\x01\0\xE5\x01\0\xE6\x01\0\xE7\x01\0\xE8\x01\0\xE9\x01\0\xEA\x01\0\xEB\x01\0\xEC\x01\0\xED\x01\0\xEE\x01\0\xEF\x01\0\xF1\x01\0\xF5\x01\0\xF6\x01\0\xF9\x01\0\xFA\x01\0\xFB\x01\0\xFC\x01\0\xFD\x01\0\xFE\x01\0\xFF\x01\0\0\x02\0\x01\x02\0\x02\x02\0\x03\x02\0\x04\x02\0\x05\x02\0\x06\x02\0\x07\x02\0\x08\x02\0\t\x02\0\n\x02\0\x0B\x02\0\x0C\x02\0\r\x02\0\x0E\x02\0\x0F\x02\0\x10\x02\0\x11\x02\0\x12\x02\0\x13\x02\0\x14\x02\0\x15\x02\0\x16\x02\0\x17\x02\0\x18\x02\0\x19\x02\0\x1A\x02\0\x1B\x02\0\x1C\x02\0\x1D\x02\0\x1E\x02\0\x1F\x02\0 \x02\0!\x02\0\"\x02\0#\x02\0$\x02\0%\x02\0&\x02\0'\x02\0(\x02\0)\x02\0*\x02\0+\x02\0,\x02\0-\x02\0.\x02\0/\x02\x000\x02\x001\x02\x002\x02\x003\x02\0:\x02\0<\x02\0=\x02\0?\x02\0A\x02\0B\x02\0C\x02\0G\x02\0H\x02\0I\x02\0J\x02\0K\x02\0L\x02\0M\x02\0N\x02\0O\x02\0\xB0\x02\0\xB9\x02\0\xD8\x02\0\xDE\x02\0\xE0\x02\0\xE5\x02\0@\x03\0B\x03\0C\x03\0F\x03\0O\x03\0P\x03\0p\x03\0q\x03\0r\x03\0s\x03\0t\x03\0u\x03\0v\x03\0w\x03\0z\x03\0{\x03\0~\x03\0\x80\x03\0\x84\x03\0\x8B\x03\0\x8C\x03\0\x8D\x03\0\x8E\x03\0\x90\x03\0\x91\x03\0\xA2\x03\0\xA3\x03\0\xAC\x03\0\xC2\x03\0\xC3\x03\0\xCF\x03\0\xD7\x03\0\xD8\x03\0\xD9\x03\0\xDA\x03\0\xDB\x03\0\xDC\x03\0\xDD\x03\0\xDE\x03\0\xDF\x03\0\xE0\x03\0\xE1\x03\0\xE2\x03\0\xE3\x03\0\xE4\x03\0\xE5\x03\0\xE6\x03\0\xE7\x03\0\xE8\x03\0\xE9\x03\0\xEA\x03\0\xEB\x03\0\xEC\x03\0\xED\x03\0\xEE\x03\0\xEF\x03\0\xF0\x03\0\xF3\x03\0\xF4\x03\0\xF6\x03\0\xF7\x03\0\xF8\x03\0\xF9\x03\0\xFB\x03\0\xFD\x03\x000\x04\0`\x04\0a\x04\0b\x04\0c\x04\0d\x04\0e\x04\0f\x04\0g\x04\0h\x04\0i\x04\0j\x04\0k\x04\0l\x04\0m\x04\0n\x04\0o\x04\0p\x04\0q\x04\0r\x04\0s\x04\0t\x04\0u\x04\0v\x04\0w\x04\0x\x04\0y\x04\0z\x04\0{\x04\0|\x04\0}\x04\0~\x04\0\x7F\x04\0\x80\x04\0\x81\x04\0\x8A\x04\0\x8B\x04\0\x8C\x04\0\x8D\x04\0\x8E\x04\0\x8F\x04\0\x90\x04\0\x91\x04\0\x92\x04\0\x93\x04\0\x94\x04\0\x95\x04\0\x96\x04\0\x97\x04\0\x98\x04\0\x99\x04\0\x9A\x04\0\x9B\x04\0\x9C\x04\0\x9D\x04\0\x9E\x04\0\x9F\x04\0\xA0\x04\0\xA1\x04\0\xA2\x04\0\xA3\x04\0\xA4\x04\0\xA5\x04\0\xA6\x04\0\xA7\x04\0\xA8\x04\0\xA9\x04\0\xAA\x04\0\xAB\x04\0\xAC\x04\0\xAD\x04\0\xAE\x04\0\xAF\x04\0\xB0\x04\0\xB1\x04\0\xB2\x04\0\xB3\x04\0\xB4\x04\0\xB5\x04\0\xB6\x04\0\xB7\x04\0\xB8\x04\0\xB9\x04\0\xBA\x04\0\xBB\x04\0\xBC\x04\0\xBD\x04\0\xBE\x04\0\xBF\x04\0\xC0\x04\0\xC2\x04\0\xC3\x04\0\xC4\x04\0\xC5\x04\0\xC6\x04\0\xC7\x04\0\xC8\x04\0\xC9\x04\0\xCA\x04\0\xCB\x04\0\xCC\x04\0\xCD\x04\0\xCE\x04\0\xD0\x04\0\xD1\x04\0\xD2\x04\0\xD3\x04\0\xD4\x04\0\xD5\x04\0\xD6\x04\0\xD7\x04\0\xD8\x04\0\xD9\x04\0\xDA\x04\0\xDB\x04\0\xDC\x04\0\xDD\x04\0\xDE\x04\0\xDF\x04\0\xE0\x04\0\xE1\x04\0\xE2\x04\0\xE3\x04\0\xE4\x04\0\xE5\x04\0\xE6\x04\0\xE7\x04\0\xE8\x04\0\xE9\x04\0\xEA\x04\0\xEB\x04\0\xEC\x04\0\xED\x04\0\xEE\x04\0\xEF\x04\0\xF0\x04\0\xF1\x04\0\xF2\x04\0\xF3\x04\0\xF4\x04\0\xF5\x04\0\xF6\x04\0\xF7\x04\0\xF8\x04\0\xF9\x04\0\xFA\x04\0\xFB\x04\0\xFC\x04\0\xFD\x04\0\xFE\x04\0\xFF\x04\0\0\x05\0\x01\x05\0\x02\x05\0\x03\x05\0\x04\x05\0\x05\x05\0\x06\x05\0\x07\x05\0\x08\x05\0\t\x05\0\n\x05\0\x0B\x05\0\x0C\x05\0\r\x05\0\x0E\x05\0\x0F\x05\0\x10\x05\0\x11\x05\0\x12\x05\0\x13\x05\0\x14\x05\0\x15\x05\0\x16\x05\0\x17\x05\0\x18\x05\0\x19\x05\0\x1A\x05\0\x1B\x05\0\x1C\x05\0\x1D\x05\0\x1E\x05\0\x1F\x05\0 \x05\0!\x05\0\"\x05\0#\x05\0$\x05\0%\x05\0&\x05\0'\x05\0(\x05\0)\x05\0*\x05\0+\x05\0,\x05\0-\x05\0.\x05\0/\x05\x001\x05\0W\x05\0\x87\x05\0\x88\x05\0\x1C\x06\0\x1D\x06\0u\x06\0y\x06\0X\t\0`\t\0\xDC\t\0\xDE\t\0\xDF\t\0\xE0\t\x003\n\x004\n\x006\n\x007\n\0Y\n\0\\\n\0^\n\0_\n\0\\\x0B\0^\x0B\x003\x0E\x004\x0E\0\xB3\x0E\0\xB4\x0E\0\xDC\x0E\0\xDE\x0E\0\x0C\x0F\0\r\x0F\0C\x0F\0D\x0F\0M\x0F\0N\x0F\0R\x0F\0S\x0F\0W\x0F\0X\x0F\0\\\x0F\0]\x0F\0i\x0F\0j\x0F\0s\x0F\0t\x0F\0u\x0F\0z\x0F\0\x81\x0F\0\x82\x0F\0\x93\x0F\0\x94\x0F\0\x9D\x0F\0\x9E\x0F\0\xA2\x0F\0\xA3\x0F\0\xA7\x0F\0\xA8\x0F\0\xAC\x0F\0\xAD\x0F\0\xB9\x0F\0\xBA\x0F\0\xA0\x10\0\xC6\x10\0\xC7\x10\0\xC8\x10\0\xCD\x10\0\xCE\x10\0\xFC\x10\0\xFD\x10\0_\x11\0a\x11\0\xF8\x13\0\xFE\x13\0\xB4\x17\0\xB6\x17\0\x0B\x18\0\x10\x18\0\x80\x1C\0\x8A\x1C\0\x90\x1C\0\xBB\x1C\0\xBD\x1C\0\xC0\x1C\0,\x1D\0/\x1D\x000\x1D\0;\x1D\0<\x1D\0N\x1D\0O\x1D\0k\x1D\0x\x1D\0y\x1D\0\x9B\x1D\0\xC0\x1D\0\0\x1E\0\x01\x1E\0\x02\x1E\0\x03\x1E\0\x04\x1E\0\x05\x1E\0\x06\x1E\0\x07\x1E\0\x08\x1E\0\t\x1E\0\n\x1E\0\x0B\x1E\0\x0C\x1E\0\r\x1E\0\x0E\x1E\0\x0F\x1E\0\x10\x1E\0\x11\x1E\0\x12\x1E\0\x13\x1E\0\x14\x1E\0\x15\x1E\0\x16\x1E\0\x17\x1E\0\x18\x1E\0\x19\x1E\0\x1A\x1E\0\x1B\x1E\0\x1C\x1E\0\x1D\x1E\0\x1E\x1E\0\x1F\x1E\0 \x1E\0!\x1E\0\"\x1E\0#\x1E\0$\x1E\0%\x1E\0&\x1E\0'\x1E\0(\x1E\0)\x1E\0*\x1E\0+\x1E\0,\x1E\0-\x1E\0.\x1E\0/\x1E\x000\x1E\x001\x1E\x002\x1E\x003\x1E\x004\x1E\x005\x1E\x006\x1E\x007\x1E\08\x1E\09\x1E\0:\x1E\0;\x1E\0<\x1E\0=\x1E\0>\x1E\0?\x1E\0@\x1E\0A\x1E\0B\x1E\0C\x1E\0D\x1E\0E\x1E\0F\x1E\0G\x1E\0H\x1E\0I\x1E\0J\x1E\0K\x1E\0L\x1E\0M\x1E\0N\x1E\0O\x1E\0P\x1E\0Q\x1E\0R\x1E\0S\x1E\0T\x1E\0U\x1E\0V\x1E\0W\x1E\0X\x1E\0Y\x1E\0Z\x1E\0[\x1E\0\\\x1E\0]\x1E\0^\x1E\0_\x1E\0`\x1E\0a\x1E\0b\x1E\0c\x1E\0d\x1E\0e\x1E\0f\x1E\0g\x1E\0h\x1E\0i\x1E\0j\x1E\0k\x1E\0l\x1E\0m\x1E\0n\x1E\0o\x1E\0p\x1E\0q\x1E\0r\x1E\0s\x1E\0t\x1E\0u\x1E\0v\x1E\0w\x1E\0x\x1E\0y\x1E\0z\x1E\0{\x1E\0|\x1E\0}\x1E\0~\x1E\0\x7F\x1E\0\x80\x1E\0\x81\x1E\0\x82\x1E\0\x83\x1E\0\x84\x1E\0\x85\x1E\0\x86\x1E\0\x87\x1E\0\x88\x1E\0\x89\x1E\0\x8A\x1E\0\x8B\x1E\0\x8C\x1E\0\x8D\x1E\0\x8E\x1E\0\x8F\x1E\0\x90\x1E\0\x91\x1E\0\x92\x1E\0\x93\x1E\0\x94\x1E\0\x95\x1E\0\x9A\x1E\0\x9C\x1E\0\x9E\x1E\0\x9F\x1E\0\xA0\x1E\0\xA1\x1E\0\xA2\x1E\0\xA3\x1E\0\xA4\x1E\0\xA5\x1E\0\xA6\x1E\0\xA7\x1E\0\xA8\x1E\0\xA9\x1E\0\xAA\x1E\0\xAB\x1E\0\xAC\x1E\0\xAD\x1E\0\xAE\x1E\0\xAF\x1E\0\xB0\x1E\0\xB1\x1E\0\xB2\x1E\0\xB3\x1E\0\xB4\x1E\0\xB5\x1E\0\xB6\x1E\0\xB7\x1E\0\xB8\x1E\0\xB9\x1E\0\xBA\x1E\0\xBB\x1E\0\xBC\x1E\0\xBD\x1E\0\xBE\x1E\0\xBF\x1E\0\xC0\x1E\0\xC1\x1E\0\xC2\x1E\0\xC3\x1E\0\xC4\x1E\0\xC5\x1E\0\xC6\x1E\0\xC7\x1E\0\xC8\x1E\0\xC9\x1E\0\xCA\x1E\0\xCB\x1E\0\xCC\x1E\0\xCD\x1E\0\xCE\x1E\0\xCF\x1E\0\xD0\x1E\0\xD1\x1E\0\xD2\x1E\0\xD3\x1E\0\xD4\x1E\0\xD5\x1E\0\xD6\x1E\0\xD7\x1E\0\xD8\x1E\0\xD9\x1E\0\xDA\x1E\0\xDB\x1E\0\xDC\x1E\0\xDD\x1E\0\xDE\x1E\0\xDF\x1E\0\xE0\x1E\0\xE1\x1E\0\xE2\x1E\0\xE3\x1E\0\xE4\x1E\0\xE5\x1E\0\xE6\x1E\0\xE7\x1E\0\xE8\x1E\0\xE9\x1E\0\xEA\x1E\0\xEB\x1E\0\xEC\x1E\0\xED\x1E\0\xEE\x1E\0\xEF\x1E\0\xF0\x1E\0\xF1\x1E\0\xF2\x1E\0\xF3\x1E\0\xF4\x1E\0\xF5\x1E\0\xF6\x1E\0\xF7\x1E\0\xF8\x1E\0\xF9\x1E\0\xFA\x1E\0\xFB\x1E\0\xFC\x1E\0\xFD\x1E\0\xFE\x1E\0\xFF\x1E\0\x08\x1F\0\x10\x1F\0\x18\x1F\0\x1E\x1F\0(\x1F\x000\x1F\08\x1F\0@\x1F\0H\x1F\0N\x1F\0Y\x1F\0Z\x1F\0[\x1F\0\\\x1F\0]\x1F\0^\x1F\0_\x1F\0`\x1F\0h\x1F\0p\x1F\0q\x1F\0r\x1F\0s\x1F\0t\x1F\0u\x1F\0v\x1F\0w\x1F\0x\x1F\0y\x1F\0z\x1F\0{\x1F\0|\x1F\0}\x1F\0~\x1F\0\x80\x1F\0\xB0\x1F\0\xB2\x1F\0\xB5\x1F\0\xB7\x1F\0\xC5\x1F\0\xC7\x1F\0\xD0\x1F\0\xD3\x1F\0\xD4\x1F\0\xD8\x1F\0\xDC\x1F\0\xDD\x1F\0\xE0\x1F\0\xE3\x1F\0\xE4\x1F\0\xE8\x1F\0\xF0\x1F\0\xF2\x1F\0\xF5\x1F\0\xF7\x1F\0\xFF\x1F\0\0 \0\x10 \0\x11 \0\x12 \0\x17 \0\x18 \0$ \0' \0* \x000 \x003 \x005 \x006 \08 \0< \0= \0> \0? \0G \0J \0W \0X \0_ \0r \0t \0\x8F \0\x90 \0\x9D \0\xA8 \0\xA9 \0\0!\0\x04!\0\x05!\0\x08!\0\t!\0\x14!\0\x15!\0\x17!\0\x19!\0\x1E!\0 !\0#!\0$!\0%!\0&!\0'!\0(!\0)!\0*!\0.!\0/!\0:!\0;!\0A!\0E!\0J!\0P!\0\x80!\0\x83!\0\x84!\0\x89!\0\x8A!\0,\"\0.\"\0/\"\x001\"\0)#\0+#\0`$\0\xEB$\0\x0C*\0\r*\0t*\0w*\0\xDC*\0\xDD*\0\0,\x000,\0`,\0a,\0b,\0e,\0g,\0h,\0i,\0j,\0k,\0l,\0m,\0q,\0r,\0s,\0u,\0v,\0|,\0\x81,\0\x82,\0\x83,\0\x84,\0\x85,\0\x86,\0\x87,\0\x88,\0\x89,\0\x8A,\0\x8B,\0\x8C,\0\x8D,\0\x8E,\0\x8F,\0\x90,\0\x91,\0\x92,\0\x93,\0\x94,\0\x95,\0\x96,\0\x97,\0\x98,\0\x99,\0\x9A,\0\x9B,\0\x9C,\0\x9D,\0\x9E,\0\x9F,\0\xA0,\0\xA1,\0\xA2,\0\xA3,\0\xA4,\0\xA5,\0\xA6,\0\xA7,\0\xA8,\0\xA9,\0\xAA,\0\xAB,\0\xAC,\0\xAD,\0\xAE,\0\xAF,\0\xB0,\0\xB1,\0\xB2,\0\xB3,\0\xB4,\0\xB5,\0\xB6,\0\xB7,\0\xB8,\0\xB9,\0\xBA,\0\xBB,\0\xBC,\0\xBD,\0\xBE,\0\xBF,\0\xC0,\0\xC1,\0\xC2,\0\xC3,\0\xC4,\0\xC5,\0\xC6,\0\xC7,\0\xC8,\0\xC9,\0\xCA,\0\xCB,\0\xCC,\0\xCD,\0\xCE,\0\xCF,\0\xD0,\0\xD1,\0\xD2,\0\xD3,\0\xD4,\0\xD5,\0\xD6,\0\xD7,\0\xD8,\0\xD9,\0\xDA,\0\xDB,\0\xDC,\0\xDD,\0\xDE,\0\xDF,\0\xE0,\0\xE1,\0\xE2,\0\xE3,\0\xEB,\0\xEC,\0\xED,\0\xEE,\0\xF2,\0\xF3,\0o-\0p-\0\x9F.\0\xA0.\0\xF3.\0\xF4.\0\0/\0\xD6/\0\x000\0\x010\x0060\x0070\080\0;0\0\x9B0\0\x9D0\0\x9F0\0\xA00\0\xFF0\0\x001\x0011\0\x8F1\0\x921\0\xA01\0\x002\0\x1F2\0 2\0H2\0P2\0\x7F2\0\x802\0\x004\0@\xA6\0A\xA6\0B\xA6\0C\xA6\0D\xA6\0E\xA6\0F\xA6\0G\xA6\0H\xA6\0I\xA6\0J\xA6\0K\xA6\0L\xA6\0M\xA6\0N\xA6\0O\xA6\0P\xA6\0Q\xA6\0R\xA6\0S\xA6\0T\xA6\0U\xA6\0V\xA6\0W\xA6\0X\xA6\0Y\xA6\0Z\xA6\0[\xA6\0\\\xA6\0]\xA6\0^\xA6\0_\xA6\0`\xA6\0a\xA6\0b\xA6\0c\xA6\0d\xA6\0e\xA6\0f\xA6\0g\xA6\0h\xA6\0i\xA6\0j\xA6\0k\xA6\0l\xA6\0m\xA6\0\x80\xA6\0\x81\xA6\0\x82\xA6\0\x83\xA6\0\x84\xA6\0\x85\xA6\0\x86\xA6\0\x87\xA6\0\x88\xA6\0\x89\xA6\0\x8A\xA6\0\x8B\xA6\0\x8C\xA6\0\x8D\xA6\0\x8E\xA6\0\x8F\xA6\0\x90\xA6\0\x91\xA6\0\x92\xA6\0\x93\xA6\0\x94\xA6\0\x95\xA6\0\x96\xA6\0\x97\xA6\0\x98\xA6\0\x99\xA6\0\x9A\xA6\0\x9B\xA6\0\x9C\xA6\0\x9E\xA6\0\"\xA7\0#\xA7\0$\xA7\0%\xA7\0&\xA7\0'\xA7\0(\xA7\0)\xA7\0*\xA7\0+\xA7\0,\xA7\0-\xA7\0.\xA7\0/\xA7\x002\xA7\x003\xA7\x004\xA7\x005\xA7\x006\xA7\x007\xA7\08\xA7\09\xA7\0:\xA7\0;\xA7\0<\xA7\0=\xA7\0>\xA7\0?\xA7\0@\xA7\0A\xA7\0B\xA7\0C\xA7\0D\xA7\0E\xA7\0F\xA7\0G\xA7\0H\xA7\0I\xA7\0J\xA7\0K\xA7\0L\xA7\0M\xA7\0N\xA7\0O\xA7\0P\xA7\0Q\xA7\0R\xA7\0S\xA7\0T\xA7\0U\xA7\0V\xA7\0W\xA7\0X\xA7\0Y\xA7\0Z\xA7\0[\xA7\0\\\xA7\0]\xA7\0^\xA7\0_\xA7\0`\xA7\0a\xA7\0b\xA7\0c\xA7\0d\xA7\0e\xA7\0f\xA7\0g\xA7\0h\xA7\0i\xA7\0j\xA7\0k\xA7\0l\xA7\0m\xA7\0n\xA7\0o\xA7\0p\xA7\0q\xA7\0y\xA7\0z\xA7\0{\xA7\0|\xA7\0}\xA7\0\x7F\xA7\0\x80\xA7\0\x81\xA7\0\x82\xA7\0\x83\xA7\0\x84\xA7\0\x85\xA7\0\x86\xA7\0\x87\xA7\0\x8B\xA7\0\x8C\xA7\0\x8D\xA7\0\x8E\xA7\0\x90\xA7\0\x91\xA7\0\x92\xA7\0\x93\xA7\0\x96\xA7\0\x97\xA7\0\x98\xA7\0\x99\xA7\0\x9A\xA7\0\x9B\xA7\0\x9C\xA7\0\x9D\xA7\0\x9E\xA7\0\x9F\xA7\0\xA0\xA7\0\xA1\xA7\0\xA2\xA7\0\xA3\xA7\0\xA4\xA7\0\xA5\xA7\0\xA6\xA7\0\xA7\xA7\0\xA8\xA7\0\xA9\xA7\0\xAA\xA7\0\xAF\xA7\0\xB0\xA7\0\xB5\xA7\0\xB6\xA7\0\xB7\xA7\0\xB8\xA7\0\xB9\xA7\0\xBA\xA7\0\xBB\xA7\0\xBC\xA7\0\xBD\xA7\0\xBE\xA7\0\xBF\xA7\0\xC0\xA7\0\xC1\xA7\0\xC2\xA7\0\xC3\xA7\0\xC4\xA7\0\xC8\xA7\0\xC9\xA7\0\xCA\xA7\0\xCB\xA7\0\xCD\xA7\0\xCE\xA7\0\xCF\xA7\0\xD0\xA7\0\xD1\xA7\0\xD2\xA7\0\xD3\xA7\0\xD4\xA7\0\xD5\xA7\0\xD6\xA7\0\xD7\xA7\0\xD8\xA7\0\xD9\xA7\0\xDA\xA7\0\xDB\xA7\0\xDC\xA7\0\xDD\xA7\0\xF1\xA7\0\xF6\xA7\0\xF8\xA7\0\xFA\xA7\0\\\xAB\0`\xAB\0i\xAB\0j\xAB\0p\xAB\0\xC0\xAB\0\0\xF9\0\x0E\xFA\0\x10\xFA\0\x11\xFA\0\x12\xFA\0\x13\xFA\0\x15\xFA\0\x1F\xFA\0 \xFA\0!\xFA\0\"\xFA\0#\xFA\0%\xFA\0'\xFA\0*\xFA\0n\xFA\0p\xFA\0\xDA\xFA\0\0\xFB\0\x07\xFB\0\x13\xFB\0\x18\xFB\0\x1D\xFB\0\x1E\xFB\0\x1F\xFB\x007\xFB\08\xFB\0=\xFB\0>\xFB\0?\xFB\0@\xFB\0B\xFB\0C\xFB\0E\xFB\0F\xFB\0\xB2\xFB\0\xD3\xFB\0>\xFD\0P\xFD\0\x90\xFD\0\x92\xFD\0\xC8\xFD\0\xF0\xFD\0\xFD\xFD\0\0\xFE\0\x1A\xFE\x000\xFE\0E\xFE\0G\xFE\0S\xFE\0T\xFE\0g\xFE\0h\xFE\0l\xFE\0p\xFE\0s\xFE\0t\xFE\0u\xFE\0v\xFE\0\xFD\xFE\0\xFF\xFE\0\0\xFF\0\x01\xFF\0\xBF\xFF\0\xC2\xFF\0\xC8\xFF\0\xCA\xFF\0\xD0\xFF\0\xD2\xFF\0\xD8\xFF\0\xDA\xFF\0\xDD\xFF\0\xE0\xFF\0\xE7\xFF\0\xE8\xFF\0\xEF\xFF\0\xF0\xFF\0\xF9\xFF\0\0\x04\x01(\x04\x01\xB0\x04\x01\xD4\x04\x01p\x05\x01{\x05\x01|\x05\x01\x8B\x05\x01\x8C\x05\x01\x93\x05\x01\x94\x05\x01\x96\x05\x01\x81\x07\x01\x86\x07\x01\x87\x07\x01\xB1\x07\x01\xB2\x07\x01\xBB\x07\x01\x80\x0C\x01\xB3\x0C\x01P\r\x01f\r\x01\xA0\x18\x01\xC0\x18\x01@n\x01`n\x01\xA0n\x01\xB9n\x01\xA0\xBC\x01\xA4\xBC\x01\xD6\xCC\x01\xFA\xCC\x01^\xD1\x01e\xD1\x01s\xD1\x01{\xD1\x01\xBB\xD1\x01\xC1\xD1\x01\0\xD4\x01U\xD4\x01V\xD4\x01\x9D\xD4\x01\x9E\xD4\x01\xA0\xD4\x01\xA2\xD4\x01\xA3\xD4\x01\xA5\xD4\x01\xA7\xD4\x01\xA9\xD4\x01\xAD\xD4\x01\xAE\xD4\x01\xBA\xD4\x01\xBB\xD4\x01\xBC\xD4\x01\xBD\xD4\x01\xC4\xD4\x01\xC5\xD4\x01\x06\xD5\x01\x07\xD5\x01\x0B\xD5\x01\r\xD5\x01\x15\xD5\x01\x16\xD5\x01\x1D\xD5\x01\x1E\xD5\x01:\xD5\x01;\xD5\x01?\xD5\x01@\xD5\x01E\xD5\x01F\xD5\x01G\xD5\x01J\xD5\x01Q\xD5\x01R\xD5\x01\xA6\xD6\x01\xA8\xD6\x01\xCC\xD7\x01\xCE\xD7\x01\0\xD8\x010\xE0\x01n\xE0\x01\0\xE9\x01\"\xE9\x01\0\xEE\x01\x04\xEE\x01\x05\xEE\x01 \xEE\x01!\xEE\x01#\xEE\x01$\xEE\x01%\xEE\x01'\xEE\x01(\xEE\x01)\xEE\x013\xEE\x014\xEE\x018\xEE\x019\xEE\x01:\xEE\x01;\xEE\x01<\xEE\x01B\xEE\x01C\xEE\x01G\xEE\x01H\xEE\x01I\xEE\x01J\xEE\x01K\xEE\x01L\xEE\x01M\xEE\x01P\xEE\x01Q\xEE\x01S\xEE\x01T\xEE\x01U\xEE\x01W\xEE\x01X\xEE\x01Y\xEE\x01Z\xEE\x01[\xEE\x01\\\xEE\x01]\xEE\x01^\xEE\x01_\xEE\x01`\xEE\x01a\xEE\x01c\xEE\x01d\xEE\x01e\xEE\x01g\xEE\x01k\xEE\x01l\xEE\x01s\xEE\x01t\xEE\x01x\xEE\x01y\xEE\x01}\xEE\x01~\xEE\x01\x7F\xEE\x01\x80\xEE\x01\x8A\xEE\x01\x8B\xEE\x01\x9C\xEE\x01\xA1\xEE\x01\xA4\xEE\x01\xA5\xEE\x01\xAA\xEE\x01\xAB\xEE\x01\xBC\xEE\x01\0\xF1\x01\x0B\xF1\x01\x10\xF1\x01/\xF1\x010\xF1\x01P\xF1\x01j\xF1\x01m\xF1\x01\x90\xF1\x01\x91\xF1\x01\0\xF2\x01\x03\xF2\x01\x10\xF2\x01<\xF2\x01@\xF2\x01I\xF2\x01P\xF2\x01R\xF2\x01\xF0\xFB\x01\xFA\xFB\x01\0\xF8\x02\x1E\xFA\x02\0\0\x0E\0\x10\x0E") }, 10583u32) }); } #[clippy::msrv = "1.83"] impl icu_provider::DataProvider for $provider { fn load(&self, req: icu_provider::DataRequest) -> Result, icu_provider::DataError> { if req.id.locale.is_unknown() { Ok(icu_provider::DataResponse { payload: icu_provider::DataPayload::from_static_ref(Self::SINGLETON_PROPERTY_BINARY_CHANGES_WHEN_NFKC_CASEFOLDED_V1), metadata: icu_provider::DataResponseMetadata::default() }) } else { Err(icu_provider::DataErrorKind::InvalidRequest.with_req(::INFO, req)) } } } }; ($ provider : ty , ITER) => { __impl_property_binary_changes_when_nfkc_casefolded_v1!($provider); #[clippy::msrv = "1.83"] impl icu_provider::IterableDataProvider for $provider { fn iter_ids(&self) -> Result>, icu_provider::DataError> { Ok([Default::default()].into_iter().collect()) } } }; ($ provider : ty , DRY) => { __impl_property_binary_changes_when_nfkc_casefolded_v1!($provider); #[clippy::msrv = "1.83"] impl icu_provider::DryDataProvider for $provider { fn dry_load(&self, req: icu_provider::DataRequest) -> Result { if req.id.locale.is_unknown() { Ok(icu_provider::DataResponseMetadata::default()) } else { Err(icu_provider::DataErrorKind::InvalidRequest.with_req(::INFO, req)) } } } }; ($ provider : ty , DRY , ITER) => { __impl_property_binary_changes_when_nfkc_casefolded_v1!($provider); #[clippy::msrv = "1.83"] impl icu_provider::DryDataProvider for $provider { fn dry_load(&self, req: icu_provider::DataRequest) -> Result { if req.id.locale.is_unknown() { Ok(icu_provider::DataResponseMetadata::default()) } else { Err(icu_provider::DataErrorKind::InvalidRequest.with_req(::INFO, req)) } } } #[clippy::msrv = "1.83"] impl icu_provider::IterableDataProvider for $provider { fn iter_ids(&self) -> Result>, icu_provider::DataError> { Ok([Default::default()].into_iter().collect()) } } }; } #[doc(inline)] pub use __impl_property_binary_changes_when_nfkc_casefolded_v1 as impl_property_binary_changes_when_nfkc_casefolded_v1; // @generated /// Implement `DataProvider` on the given struct using the data /// hardcoded in this file. This allows the struct to be used with /// `icu`'s `_unstable` constructors. /// /// Using this implementation will embed the following data in the binary's data segment: /// * 3830B[^1] for the singleton data struct /// /// [^1]: these numbers can be smaller in practice due to linker deduplication /// /// This macro requires the following crates: /// * `icu` /// * `icu_provider` /// * `zerovec` #[doc(hidden)] #[macro_export] macro_rules! __impl_property_binary_changes_when_titlecased_v1 { ($ provider : ty) => { #[clippy::msrv = "1.83"] const _: () = <$provider>::MUST_USE_MAKE_PROVIDER_MACRO; #[clippy::msrv = "1.83"] impl $provider { #[doc(hidden)] pub const SINGLETON_PROPERTY_BINARY_CHANGES_WHEN_TITLECASED_V1: &'static ::DataStruct = &icu::properties::provider::PropertyCodePointSet::InversionList(unsafe { #[allow(unused_unsafe)] icu::collections::codepointinvlist::CodePointInversionList::from_parts_unchecked(unsafe { zerovec::ZeroVec::from_bytes_unchecked(b"a\0\0{\0\0\xB5\0\0\xB6\0\0\xDF\0\0\xF7\0\0\xF8\0\0\0\x01\0\x01\x01\0\x02\x01\0\x03\x01\0\x04\x01\0\x05\x01\0\x06\x01\0\x07\x01\0\x08\x01\0\t\x01\0\n\x01\0\x0B\x01\0\x0C\x01\0\r\x01\0\x0E\x01\0\x0F\x01\0\x10\x01\0\x11\x01\0\x12\x01\0\x13\x01\0\x14\x01\0\x15\x01\0\x16\x01\0\x17\x01\0\x18\x01\0\x19\x01\0\x1A\x01\0\x1B\x01\0\x1C\x01\0\x1D\x01\0\x1E\x01\0\x1F\x01\0 \x01\0!\x01\0\"\x01\0#\x01\0$\x01\0%\x01\0&\x01\0'\x01\0(\x01\0)\x01\0*\x01\0+\x01\0,\x01\0-\x01\0.\x01\0/\x01\x000\x01\x001\x01\x002\x01\x003\x01\x004\x01\x005\x01\x006\x01\x007\x01\08\x01\0:\x01\0;\x01\0<\x01\0=\x01\0>\x01\0?\x01\0@\x01\0A\x01\0B\x01\0C\x01\0D\x01\0E\x01\0F\x01\0G\x01\0H\x01\0J\x01\0K\x01\0L\x01\0M\x01\0N\x01\0O\x01\0P\x01\0Q\x01\0R\x01\0S\x01\0T\x01\0U\x01\0V\x01\0W\x01\0X\x01\0Y\x01\0Z\x01\0[\x01\0\\\x01\0]\x01\0^\x01\0_\x01\0`\x01\0a\x01\0b\x01\0c\x01\0d\x01\0e\x01\0f\x01\0g\x01\0h\x01\0i\x01\0j\x01\0k\x01\0l\x01\0m\x01\0n\x01\0o\x01\0p\x01\0q\x01\0r\x01\0s\x01\0t\x01\0u\x01\0v\x01\0w\x01\0x\x01\0z\x01\0{\x01\0|\x01\0}\x01\0~\x01\0\x81\x01\0\x83\x01\0\x84\x01\0\x85\x01\0\x86\x01\0\x88\x01\0\x89\x01\0\x8C\x01\0\x8D\x01\0\x92\x01\0\x93\x01\0\x95\x01\0\x96\x01\0\x99\x01\0\x9C\x01\0\x9E\x01\0\x9F\x01\0\xA1\x01\0\xA2\x01\0\xA3\x01\0\xA4\x01\0\xA5\x01\0\xA6\x01\0\xA8\x01\0\xA9\x01\0\xAD\x01\0\xAE\x01\0\xB0\x01\0\xB1\x01\0\xB4\x01\0\xB5\x01\0\xB6\x01\0\xB7\x01\0\xB9\x01\0\xBA\x01\0\xBD\x01\0\xBE\x01\0\xBF\x01\0\xC0\x01\0\xC4\x01\0\xC5\x01\0\xC6\x01\0\xC8\x01\0\xC9\x01\0\xCB\x01\0\xCC\x01\0\xCD\x01\0\xCE\x01\0\xCF\x01\0\xD0\x01\0\xD1\x01\0\xD2\x01\0\xD3\x01\0\xD4\x01\0\xD5\x01\0\xD6\x01\0\xD7\x01\0\xD8\x01\0\xD9\x01\0\xDA\x01\0\xDB\x01\0\xDC\x01\0\xDE\x01\0\xDF\x01\0\xE0\x01\0\xE1\x01\0\xE2\x01\0\xE3\x01\0\xE4\x01\0\xE5\x01\0\xE6\x01\0\xE7\x01\0\xE8\x01\0\xE9\x01\0\xEA\x01\0\xEB\x01\0\xEC\x01\0\xED\x01\0\xEE\x01\0\xEF\x01\0\xF2\x01\0\xF3\x01\0\xF4\x01\0\xF5\x01\0\xF6\x01\0\xF9\x01\0\xFA\x01\0\xFB\x01\0\xFC\x01\0\xFD\x01\0\xFE\x01\0\xFF\x01\0\0\x02\0\x01\x02\0\x02\x02\0\x03\x02\0\x04\x02\0\x05\x02\0\x06\x02\0\x07\x02\0\x08\x02\0\t\x02\0\n\x02\0\x0B\x02\0\x0C\x02\0\r\x02\0\x0E\x02\0\x0F\x02\0\x10\x02\0\x11\x02\0\x12\x02\0\x13\x02\0\x14\x02\0\x15\x02\0\x16\x02\0\x17\x02\0\x18\x02\0\x19\x02\0\x1A\x02\0\x1B\x02\0\x1C\x02\0\x1D\x02\0\x1E\x02\0\x1F\x02\0 \x02\0#\x02\0$\x02\0%\x02\0&\x02\0'\x02\0(\x02\0)\x02\0*\x02\0+\x02\0,\x02\0-\x02\0.\x02\0/\x02\x000\x02\x001\x02\x002\x02\x003\x02\x004\x02\0<\x02\0=\x02\0?\x02\0A\x02\0B\x02\0C\x02\0G\x02\0H\x02\0I\x02\0J\x02\0K\x02\0L\x02\0M\x02\0N\x02\0O\x02\0U\x02\0V\x02\0X\x02\0Y\x02\0Z\x02\0[\x02\0]\x02\0`\x02\0b\x02\0c\x02\0g\x02\0h\x02\0m\x02\0o\x02\0p\x02\0q\x02\0s\x02\0u\x02\0v\x02\0}\x02\0~\x02\0\x80\x02\0\x81\x02\0\x82\x02\0\x84\x02\0\x87\x02\0\x8D\x02\0\x92\x02\0\x93\x02\0\x9D\x02\0\x9F\x02\0E\x03\0F\x03\0q\x03\0r\x03\0s\x03\0t\x03\0w\x03\0x\x03\0{\x03\0~\x03\0\x90\x03\0\x91\x03\0\xAC\x03\0\xCF\x03\0\xD0\x03\0\xD2\x03\0\xD5\x03\0\xD8\x03\0\xD9\x03\0\xDA\x03\0\xDB\x03\0\xDC\x03\0\xDD\x03\0\xDE\x03\0\xDF\x03\0\xE0\x03\0\xE1\x03\0\xE2\x03\0\xE3\x03\0\xE4\x03\0\xE5\x03\0\xE6\x03\0\xE7\x03\0\xE8\x03\0\xE9\x03\0\xEA\x03\0\xEB\x03\0\xEC\x03\0\xED\x03\0\xEE\x03\0\xEF\x03\0\xF4\x03\0\xF5\x03\0\xF6\x03\0\xF8\x03\0\xF9\x03\0\xFB\x03\0\xFC\x03\x000\x04\0`\x04\0a\x04\0b\x04\0c\x04\0d\x04\0e\x04\0f\x04\0g\x04\0h\x04\0i\x04\0j\x04\0k\x04\0l\x04\0m\x04\0n\x04\0o\x04\0p\x04\0q\x04\0r\x04\0s\x04\0t\x04\0u\x04\0v\x04\0w\x04\0x\x04\0y\x04\0z\x04\0{\x04\0|\x04\0}\x04\0~\x04\0\x7F\x04\0\x80\x04\0\x81\x04\0\x82\x04\0\x8B\x04\0\x8C\x04\0\x8D\x04\0\x8E\x04\0\x8F\x04\0\x90\x04\0\x91\x04\0\x92\x04\0\x93\x04\0\x94\x04\0\x95\x04\0\x96\x04\0\x97\x04\0\x98\x04\0\x99\x04\0\x9A\x04\0\x9B\x04\0\x9C\x04\0\x9D\x04\0\x9E\x04\0\x9F\x04\0\xA0\x04\0\xA1\x04\0\xA2\x04\0\xA3\x04\0\xA4\x04\0\xA5\x04\0\xA6\x04\0\xA7\x04\0\xA8\x04\0\xA9\x04\0\xAA\x04\0\xAB\x04\0\xAC\x04\0\xAD\x04\0\xAE\x04\0\xAF\x04\0\xB0\x04\0\xB1\x04\0\xB2\x04\0\xB3\x04\0\xB4\x04\0\xB5\x04\0\xB6\x04\0\xB7\x04\0\xB8\x04\0\xB9\x04\0\xBA\x04\0\xBB\x04\0\xBC\x04\0\xBD\x04\0\xBE\x04\0\xBF\x04\0\xC0\x04\0\xC2\x04\0\xC3\x04\0\xC4\x04\0\xC5\x04\0\xC6\x04\0\xC7\x04\0\xC8\x04\0\xC9\x04\0\xCA\x04\0\xCB\x04\0\xCC\x04\0\xCD\x04\0\xCE\x04\0\xD0\x04\0\xD1\x04\0\xD2\x04\0\xD3\x04\0\xD4\x04\0\xD5\x04\0\xD6\x04\0\xD7\x04\0\xD8\x04\0\xD9\x04\0\xDA\x04\0\xDB\x04\0\xDC\x04\0\xDD\x04\0\xDE\x04\0\xDF\x04\0\xE0\x04\0\xE1\x04\0\xE2\x04\0\xE3\x04\0\xE4\x04\0\xE5\x04\0\xE6\x04\0\xE7\x04\0\xE8\x04\0\xE9\x04\0\xEA\x04\0\xEB\x04\0\xEC\x04\0\xED\x04\0\xEE\x04\0\xEF\x04\0\xF0\x04\0\xF1\x04\0\xF2\x04\0\xF3\x04\0\xF4\x04\0\xF5\x04\0\xF6\x04\0\xF7\x04\0\xF8\x04\0\xF9\x04\0\xFA\x04\0\xFB\x04\0\xFC\x04\0\xFD\x04\0\xFE\x04\0\xFF\x04\0\0\x05\0\x01\x05\0\x02\x05\0\x03\x05\0\x04\x05\0\x05\x05\0\x06\x05\0\x07\x05\0\x08\x05\0\t\x05\0\n\x05\0\x0B\x05\0\x0C\x05\0\r\x05\0\x0E\x05\0\x0F\x05\0\x10\x05\0\x11\x05\0\x12\x05\0\x13\x05\0\x14\x05\0\x15\x05\0\x16\x05\0\x17\x05\0\x18\x05\0\x19\x05\0\x1A\x05\0\x1B\x05\0\x1C\x05\0\x1D\x05\0\x1E\x05\0\x1F\x05\0 \x05\0!\x05\0\"\x05\0#\x05\0$\x05\0%\x05\0&\x05\0'\x05\0(\x05\0)\x05\0*\x05\0+\x05\0,\x05\0-\x05\0.\x05\0/\x05\x000\x05\0a\x05\0\x88\x05\0\xF8\x13\0\xFE\x13\0\x80\x1C\0\x89\x1C\0\x8A\x1C\0\x8B\x1C\0y\x1D\0z\x1D\0}\x1D\0~\x1D\0\x8E\x1D\0\x8F\x1D\0\x01\x1E\0\x02\x1E\0\x03\x1E\0\x04\x1E\0\x05\x1E\0\x06\x1E\0\x07\x1E\0\x08\x1E\0\t\x1E\0\n\x1E\0\x0B\x1E\0\x0C\x1E\0\r\x1E\0\x0E\x1E\0\x0F\x1E\0\x10\x1E\0\x11\x1E\0\x12\x1E\0\x13\x1E\0\x14\x1E\0\x15\x1E\0\x16\x1E\0\x17\x1E\0\x18\x1E\0\x19\x1E\0\x1A\x1E\0\x1B\x1E\0\x1C\x1E\0\x1D\x1E\0\x1E\x1E\0\x1F\x1E\0 \x1E\0!\x1E\0\"\x1E\0#\x1E\0$\x1E\0%\x1E\0&\x1E\0'\x1E\0(\x1E\0)\x1E\0*\x1E\0+\x1E\0,\x1E\0-\x1E\0.\x1E\0/\x1E\x000\x1E\x001\x1E\x002\x1E\x003\x1E\x004\x1E\x005\x1E\x006\x1E\x007\x1E\08\x1E\09\x1E\0:\x1E\0;\x1E\0<\x1E\0=\x1E\0>\x1E\0?\x1E\0@\x1E\0A\x1E\0B\x1E\0C\x1E\0D\x1E\0E\x1E\0F\x1E\0G\x1E\0H\x1E\0I\x1E\0J\x1E\0K\x1E\0L\x1E\0M\x1E\0N\x1E\0O\x1E\0P\x1E\0Q\x1E\0R\x1E\0S\x1E\0T\x1E\0U\x1E\0V\x1E\0W\x1E\0X\x1E\0Y\x1E\0Z\x1E\0[\x1E\0\\\x1E\0]\x1E\0^\x1E\0_\x1E\0`\x1E\0a\x1E\0b\x1E\0c\x1E\0d\x1E\0e\x1E\0f\x1E\0g\x1E\0h\x1E\0i\x1E\0j\x1E\0k\x1E\0l\x1E\0m\x1E\0n\x1E\0o\x1E\0p\x1E\0q\x1E\0r\x1E\0s\x1E\0t\x1E\0u\x1E\0v\x1E\0w\x1E\0x\x1E\0y\x1E\0z\x1E\0{\x1E\0|\x1E\0}\x1E\0~\x1E\0\x7F\x1E\0\x80\x1E\0\x81\x1E\0\x82\x1E\0\x83\x1E\0\x84\x1E\0\x85\x1E\0\x86\x1E\0\x87\x1E\0\x88\x1E\0\x89\x1E\0\x8A\x1E\0\x8B\x1E\0\x8C\x1E\0\x8D\x1E\0\x8E\x1E\0\x8F\x1E\0\x90\x1E\0\x91\x1E\0\x92\x1E\0\x93\x1E\0\x94\x1E\0\x95\x1E\0\x9C\x1E\0\xA1\x1E\0\xA2\x1E\0\xA3\x1E\0\xA4\x1E\0\xA5\x1E\0\xA6\x1E\0\xA7\x1E\0\xA8\x1E\0\xA9\x1E\0\xAA\x1E\0\xAB\x1E\0\xAC\x1E\0\xAD\x1E\0\xAE\x1E\0\xAF\x1E\0\xB0\x1E\0\xB1\x1E\0\xB2\x1E\0\xB3\x1E\0\xB4\x1E\0\xB5\x1E\0\xB6\x1E\0\xB7\x1E\0\xB8\x1E\0\xB9\x1E\0\xBA\x1E\0\xBB\x1E\0\xBC\x1E\0\xBD\x1E\0\xBE\x1E\0\xBF\x1E\0\xC0\x1E\0\xC1\x1E\0\xC2\x1E\0\xC3\x1E\0\xC4\x1E\0\xC5\x1E\0\xC6\x1E\0\xC7\x1E\0\xC8\x1E\0\xC9\x1E\0\xCA\x1E\0\xCB\x1E\0\xCC\x1E\0\xCD\x1E\0\xCE\x1E\0\xCF\x1E\0\xD0\x1E\0\xD1\x1E\0\xD2\x1E\0\xD3\x1E\0\xD4\x1E\0\xD5\x1E\0\xD6\x1E\0\xD7\x1E\0\xD8\x1E\0\xD9\x1E\0\xDA\x1E\0\xDB\x1E\0\xDC\x1E\0\xDD\x1E\0\xDE\x1E\0\xDF\x1E\0\xE0\x1E\0\xE1\x1E\0\xE2\x1E\0\xE3\x1E\0\xE4\x1E\0\xE5\x1E\0\xE6\x1E\0\xE7\x1E\0\xE8\x1E\0\xE9\x1E\0\xEA\x1E\0\xEB\x1E\0\xEC\x1E\0\xED\x1E\0\xEE\x1E\0\xEF\x1E\0\xF0\x1E\0\xF1\x1E\0\xF2\x1E\0\xF3\x1E\0\xF4\x1E\0\xF5\x1E\0\xF6\x1E\0\xF7\x1E\0\xF8\x1E\0\xF9\x1E\0\xFA\x1E\0\xFB\x1E\0\xFC\x1E\0\xFD\x1E\0\xFE\x1E\0\xFF\x1E\0\x08\x1F\0\x10\x1F\0\x16\x1F\0 \x1F\0(\x1F\x000\x1F\08\x1F\0@\x1F\0F\x1F\0P\x1F\0X\x1F\0`\x1F\0h\x1F\0p\x1F\0~\x1F\0\x80\x1F\0\x88\x1F\0\x90\x1F\0\x98\x1F\0\xA0\x1F\0\xA8\x1F\0\xB0\x1F\0\xB5\x1F\0\xB6\x1F\0\xB8\x1F\0\xBE\x1F\0\xBF\x1F\0\xC2\x1F\0\xC5\x1F\0\xC6\x1F\0\xC8\x1F\0\xD0\x1F\0\xD4\x1F\0\xD6\x1F\0\xD8\x1F\0\xE0\x1F\0\xE8\x1F\0\xF2\x1F\0\xF5\x1F\0\xF6\x1F\0\xF8\x1F\0N!\0O!\0p!\0\x80!\0\x84!\0\x85!\0\xD0$\0\xEA$\x000,\0`,\0a,\0b,\0e,\0g,\0h,\0i,\0j,\0k,\0l,\0m,\0s,\0t,\0v,\0w,\0\x81,\0\x82,\0\x83,\0\x84,\0\x85,\0\x86,\0\x87,\0\x88,\0\x89,\0\x8A,\0\x8B,\0\x8C,\0\x8D,\0\x8E,\0\x8F,\0\x90,\0\x91,\0\x92,\0\x93,\0\x94,\0\x95,\0\x96,\0\x97,\0\x98,\0\x99,\0\x9A,\0\x9B,\0\x9C,\0\x9D,\0\x9E,\0\x9F,\0\xA0,\0\xA1,\0\xA2,\0\xA3,\0\xA4,\0\xA5,\0\xA6,\0\xA7,\0\xA8,\0\xA9,\0\xAA,\0\xAB,\0\xAC,\0\xAD,\0\xAE,\0\xAF,\0\xB0,\0\xB1,\0\xB2,\0\xB3,\0\xB4,\0\xB5,\0\xB6,\0\xB7,\0\xB8,\0\xB9,\0\xBA,\0\xBB,\0\xBC,\0\xBD,\0\xBE,\0\xBF,\0\xC0,\0\xC1,\0\xC2,\0\xC3,\0\xC4,\0\xC5,\0\xC6,\0\xC7,\0\xC8,\0\xC9,\0\xCA,\0\xCB,\0\xCC,\0\xCD,\0\xCE,\0\xCF,\0\xD0,\0\xD1,\0\xD2,\0\xD3,\0\xD4,\0\xD5,\0\xD6,\0\xD7,\0\xD8,\0\xD9,\0\xDA,\0\xDB,\0\xDC,\0\xDD,\0\xDE,\0\xDF,\0\xE0,\0\xE1,\0\xE2,\0\xE3,\0\xE4,\0\xEC,\0\xED,\0\xEE,\0\xEF,\0\xF3,\0\xF4,\0\0-\0&-\0'-\0(-\0--\0.-\0A\xA6\0B\xA6\0C\xA6\0D\xA6\0E\xA6\0F\xA6\0G\xA6\0H\xA6\0I\xA6\0J\xA6\0K\xA6\0L\xA6\0M\xA6\0N\xA6\0O\xA6\0P\xA6\0Q\xA6\0R\xA6\0S\xA6\0T\xA6\0U\xA6\0V\xA6\0W\xA6\0X\xA6\0Y\xA6\0Z\xA6\0[\xA6\0\\\xA6\0]\xA6\0^\xA6\0_\xA6\0`\xA6\0a\xA6\0b\xA6\0c\xA6\0d\xA6\0e\xA6\0f\xA6\0g\xA6\0h\xA6\0i\xA6\0j\xA6\0k\xA6\0l\xA6\0m\xA6\0n\xA6\0\x81\xA6\0\x82\xA6\0\x83\xA6\0\x84\xA6\0\x85\xA6\0\x86\xA6\0\x87\xA6\0\x88\xA6\0\x89\xA6\0\x8A\xA6\0\x8B\xA6\0\x8C\xA6\0\x8D\xA6\0\x8E\xA6\0\x8F\xA6\0\x90\xA6\0\x91\xA6\0\x92\xA6\0\x93\xA6\0\x94\xA6\0\x95\xA6\0\x96\xA6\0\x97\xA6\0\x98\xA6\0\x99\xA6\0\x9A\xA6\0\x9B\xA6\0\x9C\xA6\0#\xA7\0$\xA7\0%\xA7\0&\xA7\0'\xA7\0(\xA7\0)\xA7\0*\xA7\0+\xA7\0,\xA7\0-\xA7\0.\xA7\0/\xA7\x000\xA7\x003\xA7\x004\xA7\x005\xA7\x006\xA7\x007\xA7\08\xA7\09\xA7\0:\xA7\0;\xA7\0<\xA7\0=\xA7\0>\xA7\0?\xA7\0@\xA7\0A\xA7\0B\xA7\0C\xA7\0D\xA7\0E\xA7\0F\xA7\0G\xA7\0H\xA7\0I\xA7\0J\xA7\0K\xA7\0L\xA7\0M\xA7\0N\xA7\0O\xA7\0P\xA7\0Q\xA7\0R\xA7\0S\xA7\0T\xA7\0U\xA7\0V\xA7\0W\xA7\0X\xA7\0Y\xA7\0Z\xA7\0[\xA7\0\\\xA7\0]\xA7\0^\xA7\0_\xA7\0`\xA7\0a\xA7\0b\xA7\0c\xA7\0d\xA7\0e\xA7\0f\xA7\0g\xA7\0h\xA7\0i\xA7\0j\xA7\0k\xA7\0l\xA7\0m\xA7\0n\xA7\0o\xA7\0p\xA7\0z\xA7\0{\xA7\0|\xA7\0}\xA7\0\x7F\xA7\0\x80\xA7\0\x81\xA7\0\x82\xA7\0\x83\xA7\0\x84\xA7\0\x85\xA7\0\x86\xA7\0\x87\xA7\0\x88\xA7\0\x8C\xA7\0\x8D\xA7\0\x91\xA7\0\x92\xA7\0\x93\xA7\0\x95\xA7\0\x97\xA7\0\x98\xA7\0\x99\xA7\0\x9A\xA7\0\x9B\xA7\0\x9C\xA7\0\x9D\xA7\0\x9E\xA7\0\x9F\xA7\0\xA0\xA7\0\xA1\xA7\0\xA2\xA7\0\xA3\xA7\0\xA4\xA7\0\xA5\xA7\0\xA6\xA7\0\xA7\xA7\0\xA8\xA7\0\xA9\xA7\0\xAA\xA7\0\xB5\xA7\0\xB6\xA7\0\xB7\xA7\0\xB8\xA7\0\xB9\xA7\0\xBA\xA7\0\xBB\xA7\0\xBC\xA7\0\xBD\xA7\0\xBE\xA7\0\xBF\xA7\0\xC0\xA7\0\xC1\xA7\0\xC2\xA7\0\xC3\xA7\0\xC4\xA7\0\xC8\xA7\0\xC9\xA7\0\xCA\xA7\0\xCB\xA7\0\xCD\xA7\0\xCE\xA7\0\xCF\xA7\0\xD0\xA7\0\xD1\xA7\0\xD2\xA7\0\xD3\xA7\0\xD4\xA7\0\xD5\xA7\0\xD6\xA7\0\xD7\xA7\0\xD8\xA7\0\xD9\xA7\0\xDA\xA7\0\xDB\xA7\0\xDC\xA7\0\xF6\xA7\0\xF7\xA7\0S\xAB\0T\xAB\0p\xAB\0\xC0\xAB\0\0\xFB\0\x07\xFB\0\x13\xFB\0\x18\xFB\0A\xFF\0[\xFF\0(\x04\x01P\x04\x01\xD8\x04\x01\xFC\x04\x01\x97\x05\x01\xA2\x05\x01\xA3\x05\x01\xB2\x05\x01\xB3\x05\x01\xBA\x05\x01\xBB\x05\x01\xBD\x05\x01\xC0\x0C\x01\xF3\x0C\x01p\r\x01\x86\r\x01\xC0\x18\x01\xE0\x18\x01`n\x01\x80n\x01\xBBn\x01\xD4n\x01\"\xE9\x01D\xE9\x01") }, 1507u32) }); } #[clippy::msrv = "1.83"] impl icu_provider::DataProvider for $provider { fn load(&self, req: icu_provider::DataRequest) -> Result, icu_provider::DataError> { if req.id.locale.is_unknown() { Ok(icu_provider::DataResponse { payload: icu_provider::DataPayload::from_static_ref(Self::SINGLETON_PROPERTY_BINARY_CHANGES_WHEN_TITLECASED_V1), metadata: icu_provider::DataResponseMetadata::default() }) } else { Err(icu_provider::DataErrorKind::InvalidRequest.with_req(::INFO, req)) } } } }; ($ provider : ty , ITER) => { __impl_property_binary_changes_when_titlecased_v1!($provider); #[clippy::msrv = "1.83"] impl icu_provider::IterableDataProvider for $provider { fn iter_ids(&self) -> Result>, icu_provider::DataError> { Ok([Default::default()].into_iter().collect()) } } }; ($ provider : ty , DRY) => { __impl_property_binary_changes_when_titlecased_v1!($provider); #[clippy::msrv = "1.83"] impl icu_provider::DryDataProvider for $provider { fn dry_load(&self, req: icu_provider::DataRequest) -> Result { if req.id.locale.is_unknown() { Ok(icu_provider::DataResponseMetadata::default()) } else { Err(icu_provider::DataErrorKind::InvalidRequest.with_req(::INFO, req)) } } } }; ($ provider : ty , DRY , ITER) => { __impl_property_binary_changes_when_titlecased_v1!($provider); #[clippy::msrv = "1.83"] impl icu_provider::DryDataProvider for $provider { fn dry_load(&self, req: icu_provider::DataRequest) -> Result { if req.id.locale.is_unknown() { Ok(icu_provider::DataResponseMetadata::default()) } else { Err(icu_provider::DataErrorKind::InvalidRequest.with_req(::INFO, req)) } } } #[clippy::msrv = "1.83"] impl icu_provider::IterableDataProvider for $provider { fn iter_ids(&self) -> Result>, icu_provider::DataError> { Ok([Default::default()].into_iter().collect()) } } }; } #[doc(inline)] pub use __impl_property_binary_changes_when_titlecased_v1 as impl_property_binary_changes_when_titlecased_v1; // @generated /// Implement `DataProvider` on the given struct using the data /// hardcoded in this file. This allows the struct to be used with /// `icu`'s `_unstable` constructors. /// /// Using this implementation will embed the following data in the binary's data segment: /// * 3836B[^1] for the singleton data struct /// /// [^1]: these numbers can be smaller in practice due to linker deduplication /// /// This macro requires the following crates: /// * `icu` /// * `icu_provider` /// * `zerovec` #[doc(hidden)] #[macro_export] macro_rules! __impl_property_binary_changes_when_uppercased_v1 { ($ provider : ty) => { #[clippy::msrv = "1.83"] const _: () = <$provider>::MUST_USE_MAKE_PROVIDER_MACRO; #[clippy::msrv = "1.83"] impl $provider { #[doc(hidden)] pub const SINGLETON_PROPERTY_BINARY_CHANGES_WHEN_UPPERCASED_V1: &'static ::DataStruct = &icu::properties::provider::PropertyCodePointSet::InversionList(unsafe { #[allow(unused_unsafe)] icu::collections::codepointinvlist::CodePointInversionList::from_parts_unchecked(unsafe { zerovec::ZeroVec::from_bytes_unchecked(b"a\0\0{\0\0\xB5\0\0\xB6\0\0\xDF\0\0\xF7\0\0\xF8\0\0\0\x01\0\x01\x01\0\x02\x01\0\x03\x01\0\x04\x01\0\x05\x01\0\x06\x01\0\x07\x01\0\x08\x01\0\t\x01\0\n\x01\0\x0B\x01\0\x0C\x01\0\r\x01\0\x0E\x01\0\x0F\x01\0\x10\x01\0\x11\x01\0\x12\x01\0\x13\x01\0\x14\x01\0\x15\x01\0\x16\x01\0\x17\x01\0\x18\x01\0\x19\x01\0\x1A\x01\0\x1B\x01\0\x1C\x01\0\x1D\x01\0\x1E\x01\0\x1F\x01\0 \x01\0!\x01\0\"\x01\0#\x01\0$\x01\0%\x01\0&\x01\0'\x01\0(\x01\0)\x01\0*\x01\0+\x01\0,\x01\0-\x01\0.\x01\0/\x01\x000\x01\x001\x01\x002\x01\x003\x01\x004\x01\x005\x01\x006\x01\x007\x01\08\x01\0:\x01\0;\x01\0<\x01\0=\x01\0>\x01\0?\x01\0@\x01\0A\x01\0B\x01\0C\x01\0D\x01\0E\x01\0F\x01\0G\x01\0H\x01\0J\x01\0K\x01\0L\x01\0M\x01\0N\x01\0O\x01\0P\x01\0Q\x01\0R\x01\0S\x01\0T\x01\0U\x01\0V\x01\0W\x01\0X\x01\0Y\x01\0Z\x01\0[\x01\0\\\x01\0]\x01\0^\x01\0_\x01\0`\x01\0a\x01\0b\x01\0c\x01\0d\x01\0e\x01\0f\x01\0g\x01\0h\x01\0i\x01\0j\x01\0k\x01\0l\x01\0m\x01\0n\x01\0o\x01\0p\x01\0q\x01\0r\x01\0s\x01\0t\x01\0u\x01\0v\x01\0w\x01\0x\x01\0z\x01\0{\x01\0|\x01\0}\x01\0~\x01\0\x81\x01\0\x83\x01\0\x84\x01\0\x85\x01\0\x86\x01\0\x88\x01\0\x89\x01\0\x8C\x01\0\x8D\x01\0\x92\x01\0\x93\x01\0\x95\x01\0\x96\x01\0\x99\x01\0\x9C\x01\0\x9E\x01\0\x9F\x01\0\xA1\x01\0\xA2\x01\0\xA3\x01\0\xA4\x01\0\xA5\x01\0\xA6\x01\0\xA8\x01\0\xA9\x01\0\xAD\x01\0\xAE\x01\0\xB0\x01\0\xB1\x01\0\xB4\x01\0\xB5\x01\0\xB6\x01\0\xB7\x01\0\xB9\x01\0\xBA\x01\0\xBD\x01\0\xBE\x01\0\xBF\x01\0\xC0\x01\0\xC5\x01\0\xC7\x01\0\xC8\x01\0\xCA\x01\0\xCB\x01\0\xCD\x01\0\xCE\x01\0\xCF\x01\0\xD0\x01\0\xD1\x01\0\xD2\x01\0\xD3\x01\0\xD4\x01\0\xD5\x01\0\xD6\x01\0\xD7\x01\0\xD8\x01\0\xD9\x01\0\xDA\x01\0\xDB\x01\0\xDC\x01\0\xDE\x01\0\xDF\x01\0\xE0\x01\0\xE1\x01\0\xE2\x01\0\xE3\x01\0\xE4\x01\0\xE5\x01\0\xE6\x01\0\xE7\x01\0\xE8\x01\0\xE9\x01\0\xEA\x01\0\xEB\x01\0\xEC\x01\0\xED\x01\0\xEE\x01\0\xEF\x01\0\xF1\x01\0\xF2\x01\0\xF4\x01\0\xF5\x01\0\xF6\x01\0\xF9\x01\0\xFA\x01\0\xFB\x01\0\xFC\x01\0\xFD\x01\0\xFE\x01\0\xFF\x01\0\0\x02\0\x01\x02\0\x02\x02\0\x03\x02\0\x04\x02\0\x05\x02\0\x06\x02\0\x07\x02\0\x08\x02\0\t\x02\0\n\x02\0\x0B\x02\0\x0C\x02\0\r\x02\0\x0E\x02\0\x0F\x02\0\x10\x02\0\x11\x02\0\x12\x02\0\x13\x02\0\x14\x02\0\x15\x02\0\x16\x02\0\x17\x02\0\x18\x02\0\x19\x02\0\x1A\x02\0\x1B\x02\0\x1C\x02\0\x1D\x02\0\x1E\x02\0\x1F\x02\0 \x02\0#\x02\0$\x02\0%\x02\0&\x02\0'\x02\0(\x02\0)\x02\0*\x02\0+\x02\0,\x02\0-\x02\0.\x02\0/\x02\x000\x02\x001\x02\x002\x02\x003\x02\x004\x02\0<\x02\0=\x02\0?\x02\0A\x02\0B\x02\0C\x02\0G\x02\0H\x02\0I\x02\0J\x02\0K\x02\0L\x02\0M\x02\0N\x02\0O\x02\0U\x02\0V\x02\0X\x02\0Y\x02\0Z\x02\0[\x02\0]\x02\0`\x02\0b\x02\0c\x02\0g\x02\0h\x02\0m\x02\0o\x02\0p\x02\0q\x02\0s\x02\0u\x02\0v\x02\0}\x02\0~\x02\0\x80\x02\0\x81\x02\0\x82\x02\0\x84\x02\0\x87\x02\0\x8D\x02\0\x92\x02\0\x93\x02\0\x9D\x02\0\x9F\x02\0E\x03\0F\x03\0q\x03\0r\x03\0s\x03\0t\x03\0w\x03\0x\x03\0{\x03\0~\x03\0\x90\x03\0\x91\x03\0\xAC\x03\0\xCF\x03\0\xD0\x03\0\xD2\x03\0\xD5\x03\0\xD8\x03\0\xD9\x03\0\xDA\x03\0\xDB\x03\0\xDC\x03\0\xDD\x03\0\xDE\x03\0\xDF\x03\0\xE0\x03\0\xE1\x03\0\xE2\x03\0\xE3\x03\0\xE4\x03\0\xE5\x03\0\xE6\x03\0\xE7\x03\0\xE8\x03\0\xE9\x03\0\xEA\x03\0\xEB\x03\0\xEC\x03\0\xED\x03\0\xEE\x03\0\xEF\x03\0\xF4\x03\0\xF5\x03\0\xF6\x03\0\xF8\x03\0\xF9\x03\0\xFB\x03\0\xFC\x03\x000\x04\0`\x04\0a\x04\0b\x04\0c\x04\0d\x04\0e\x04\0f\x04\0g\x04\0h\x04\0i\x04\0j\x04\0k\x04\0l\x04\0m\x04\0n\x04\0o\x04\0p\x04\0q\x04\0r\x04\0s\x04\0t\x04\0u\x04\0v\x04\0w\x04\0x\x04\0y\x04\0z\x04\0{\x04\0|\x04\0}\x04\0~\x04\0\x7F\x04\0\x80\x04\0\x81\x04\0\x82\x04\0\x8B\x04\0\x8C\x04\0\x8D\x04\0\x8E\x04\0\x8F\x04\0\x90\x04\0\x91\x04\0\x92\x04\0\x93\x04\0\x94\x04\0\x95\x04\0\x96\x04\0\x97\x04\0\x98\x04\0\x99\x04\0\x9A\x04\0\x9B\x04\0\x9C\x04\0\x9D\x04\0\x9E\x04\0\x9F\x04\0\xA0\x04\0\xA1\x04\0\xA2\x04\0\xA3\x04\0\xA4\x04\0\xA5\x04\0\xA6\x04\0\xA7\x04\0\xA8\x04\0\xA9\x04\0\xAA\x04\0\xAB\x04\0\xAC\x04\0\xAD\x04\0\xAE\x04\0\xAF\x04\0\xB0\x04\0\xB1\x04\0\xB2\x04\0\xB3\x04\0\xB4\x04\0\xB5\x04\0\xB6\x04\0\xB7\x04\0\xB8\x04\0\xB9\x04\0\xBA\x04\0\xBB\x04\0\xBC\x04\0\xBD\x04\0\xBE\x04\0\xBF\x04\0\xC0\x04\0\xC2\x04\0\xC3\x04\0\xC4\x04\0\xC5\x04\0\xC6\x04\0\xC7\x04\0\xC8\x04\0\xC9\x04\0\xCA\x04\0\xCB\x04\0\xCC\x04\0\xCD\x04\0\xCE\x04\0\xD0\x04\0\xD1\x04\0\xD2\x04\0\xD3\x04\0\xD4\x04\0\xD5\x04\0\xD6\x04\0\xD7\x04\0\xD8\x04\0\xD9\x04\0\xDA\x04\0\xDB\x04\0\xDC\x04\0\xDD\x04\0\xDE\x04\0\xDF\x04\0\xE0\x04\0\xE1\x04\0\xE2\x04\0\xE3\x04\0\xE4\x04\0\xE5\x04\0\xE6\x04\0\xE7\x04\0\xE8\x04\0\xE9\x04\0\xEA\x04\0\xEB\x04\0\xEC\x04\0\xED\x04\0\xEE\x04\0\xEF\x04\0\xF0\x04\0\xF1\x04\0\xF2\x04\0\xF3\x04\0\xF4\x04\0\xF5\x04\0\xF6\x04\0\xF7\x04\0\xF8\x04\0\xF9\x04\0\xFA\x04\0\xFB\x04\0\xFC\x04\0\xFD\x04\0\xFE\x04\0\xFF\x04\0\0\x05\0\x01\x05\0\x02\x05\0\x03\x05\0\x04\x05\0\x05\x05\0\x06\x05\0\x07\x05\0\x08\x05\0\t\x05\0\n\x05\0\x0B\x05\0\x0C\x05\0\r\x05\0\x0E\x05\0\x0F\x05\0\x10\x05\0\x11\x05\0\x12\x05\0\x13\x05\0\x14\x05\0\x15\x05\0\x16\x05\0\x17\x05\0\x18\x05\0\x19\x05\0\x1A\x05\0\x1B\x05\0\x1C\x05\0\x1D\x05\0\x1E\x05\0\x1F\x05\0 \x05\0!\x05\0\"\x05\0#\x05\0$\x05\0%\x05\0&\x05\0'\x05\0(\x05\0)\x05\0*\x05\0+\x05\0,\x05\0-\x05\0.\x05\0/\x05\x000\x05\0a\x05\0\x88\x05\0\xD0\x10\0\xFB\x10\0\xFD\x10\0\0\x11\0\xF8\x13\0\xFE\x13\0\x80\x1C\0\x89\x1C\0\x8A\x1C\0\x8B\x1C\0y\x1D\0z\x1D\0}\x1D\0~\x1D\0\x8E\x1D\0\x8F\x1D\0\x01\x1E\0\x02\x1E\0\x03\x1E\0\x04\x1E\0\x05\x1E\0\x06\x1E\0\x07\x1E\0\x08\x1E\0\t\x1E\0\n\x1E\0\x0B\x1E\0\x0C\x1E\0\r\x1E\0\x0E\x1E\0\x0F\x1E\0\x10\x1E\0\x11\x1E\0\x12\x1E\0\x13\x1E\0\x14\x1E\0\x15\x1E\0\x16\x1E\0\x17\x1E\0\x18\x1E\0\x19\x1E\0\x1A\x1E\0\x1B\x1E\0\x1C\x1E\0\x1D\x1E\0\x1E\x1E\0\x1F\x1E\0 \x1E\0!\x1E\0\"\x1E\0#\x1E\0$\x1E\0%\x1E\0&\x1E\0'\x1E\0(\x1E\0)\x1E\0*\x1E\0+\x1E\0,\x1E\0-\x1E\0.\x1E\0/\x1E\x000\x1E\x001\x1E\x002\x1E\x003\x1E\x004\x1E\x005\x1E\x006\x1E\x007\x1E\08\x1E\09\x1E\0:\x1E\0;\x1E\0<\x1E\0=\x1E\0>\x1E\0?\x1E\0@\x1E\0A\x1E\0B\x1E\0C\x1E\0D\x1E\0E\x1E\0F\x1E\0G\x1E\0H\x1E\0I\x1E\0J\x1E\0K\x1E\0L\x1E\0M\x1E\0N\x1E\0O\x1E\0P\x1E\0Q\x1E\0R\x1E\0S\x1E\0T\x1E\0U\x1E\0V\x1E\0W\x1E\0X\x1E\0Y\x1E\0Z\x1E\0[\x1E\0\\\x1E\0]\x1E\0^\x1E\0_\x1E\0`\x1E\0a\x1E\0b\x1E\0c\x1E\0d\x1E\0e\x1E\0f\x1E\0g\x1E\0h\x1E\0i\x1E\0j\x1E\0k\x1E\0l\x1E\0m\x1E\0n\x1E\0o\x1E\0p\x1E\0q\x1E\0r\x1E\0s\x1E\0t\x1E\0u\x1E\0v\x1E\0w\x1E\0x\x1E\0y\x1E\0z\x1E\0{\x1E\0|\x1E\0}\x1E\0~\x1E\0\x7F\x1E\0\x80\x1E\0\x81\x1E\0\x82\x1E\0\x83\x1E\0\x84\x1E\0\x85\x1E\0\x86\x1E\0\x87\x1E\0\x88\x1E\0\x89\x1E\0\x8A\x1E\0\x8B\x1E\0\x8C\x1E\0\x8D\x1E\0\x8E\x1E\0\x8F\x1E\0\x90\x1E\0\x91\x1E\0\x92\x1E\0\x93\x1E\0\x94\x1E\0\x95\x1E\0\x9C\x1E\0\xA1\x1E\0\xA2\x1E\0\xA3\x1E\0\xA4\x1E\0\xA5\x1E\0\xA6\x1E\0\xA7\x1E\0\xA8\x1E\0\xA9\x1E\0\xAA\x1E\0\xAB\x1E\0\xAC\x1E\0\xAD\x1E\0\xAE\x1E\0\xAF\x1E\0\xB0\x1E\0\xB1\x1E\0\xB2\x1E\0\xB3\x1E\0\xB4\x1E\0\xB5\x1E\0\xB6\x1E\0\xB7\x1E\0\xB8\x1E\0\xB9\x1E\0\xBA\x1E\0\xBB\x1E\0\xBC\x1E\0\xBD\x1E\0\xBE\x1E\0\xBF\x1E\0\xC0\x1E\0\xC1\x1E\0\xC2\x1E\0\xC3\x1E\0\xC4\x1E\0\xC5\x1E\0\xC6\x1E\0\xC7\x1E\0\xC8\x1E\0\xC9\x1E\0\xCA\x1E\0\xCB\x1E\0\xCC\x1E\0\xCD\x1E\0\xCE\x1E\0\xCF\x1E\0\xD0\x1E\0\xD1\x1E\0\xD2\x1E\0\xD3\x1E\0\xD4\x1E\0\xD5\x1E\0\xD6\x1E\0\xD7\x1E\0\xD8\x1E\0\xD9\x1E\0\xDA\x1E\0\xDB\x1E\0\xDC\x1E\0\xDD\x1E\0\xDE\x1E\0\xDF\x1E\0\xE0\x1E\0\xE1\x1E\0\xE2\x1E\0\xE3\x1E\0\xE4\x1E\0\xE5\x1E\0\xE6\x1E\0\xE7\x1E\0\xE8\x1E\0\xE9\x1E\0\xEA\x1E\0\xEB\x1E\0\xEC\x1E\0\xED\x1E\0\xEE\x1E\0\xEF\x1E\0\xF0\x1E\0\xF1\x1E\0\xF2\x1E\0\xF3\x1E\0\xF4\x1E\0\xF5\x1E\0\xF6\x1E\0\xF7\x1E\0\xF8\x1E\0\xF9\x1E\0\xFA\x1E\0\xFB\x1E\0\xFC\x1E\0\xFD\x1E\0\xFE\x1E\0\xFF\x1E\0\x08\x1F\0\x10\x1F\0\x16\x1F\0 \x1F\0(\x1F\x000\x1F\08\x1F\0@\x1F\0F\x1F\0P\x1F\0X\x1F\0`\x1F\0h\x1F\0p\x1F\0~\x1F\0\x80\x1F\0\xB5\x1F\0\xB6\x1F\0\xB8\x1F\0\xBC\x1F\0\xBD\x1F\0\xBE\x1F\0\xBF\x1F\0\xC2\x1F\0\xC5\x1F\0\xC6\x1F\0\xC8\x1F\0\xCC\x1F\0\xCD\x1F\0\xD0\x1F\0\xD4\x1F\0\xD6\x1F\0\xD8\x1F\0\xE0\x1F\0\xE8\x1F\0\xF2\x1F\0\xF5\x1F\0\xF6\x1F\0\xF8\x1F\0\xFC\x1F\0\xFD\x1F\0N!\0O!\0p!\0\x80!\0\x84!\0\x85!\0\xD0$\0\xEA$\x000,\0`,\0a,\0b,\0e,\0g,\0h,\0i,\0j,\0k,\0l,\0m,\0s,\0t,\0v,\0w,\0\x81,\0\x82,\0\x83,\0\x84,\0\x85,\0\x86,\0\x87,\0\x88,\0\x89,\0\x8A,\0\x8B,\0\x8C,\0\x8D,\0\x8E,\0\x8F,\0\x90,\0\x91,\0\x92,\0\x93,\0\x94,\0\x95,\0\x96,\0\x97,\0\x98,\0\x99,\0\x9A,\0\x9B,\0\x9C,\0\x9D,\0\x9E,\0\x9F,\0\xA0,\0\xA1,\0\xA2,\0\xA3,\0\xA4,\0\xA5,\0\xA6,\0\xA7,\0\xA8,\0\xA9,\0\xAA,\0\xAB,\0\xAC,\0\xAD,\0\xAE,\0\xAF,\0\xB0,\0\xB1,\0\xB2,\0\xB3,\0\xB4,\0\xB5,\0\xB6,\0\xB7,\0\xB8,\0\xB9,\0\xBA,\0\xBB,\0\xBC,\0\xBD,\0\xBE,\0\xBF,\0\xC0,\0\xC1,\0\xC2,\0\xC3,\0\xC4,\0\xC5,\0\xC6,\0\xC7,\0\xC8,\0\xC9,\0\xCA,\0\xCB,\0\xCC,\0\xCD,\0\xCE,\0\xCF,\0\xD0,\0\xD1,\0\xD2,\0\xD3,\0\xD4,\0\xD5,\0\xD6,\0\xD7,\0\xD8,\0\xD9,\0\xDA,\0\xDB,\0\xDC,\0\xDD,\0\xDE,\0\xDF,\0\xE0,\0\xE1,\0\xE2,\0\xE3,\0\xE4,\0\xEC,\0\xED,\0\xEE,\0\xEF,\0\xF3,\0\xF4,\0\0-\0&-\0'-\0(-\0--\0.-\0A\xA6\0B\xA6\0C\xA6\0D\xA6\0E\xA6\0F\xA6\0G\xA6\0H\xA6\0I\xA6\0J\xA6\0K\xA6\0L\xA6\0M\xA6\0N\xA6\0O\xA6\0P\xA6\0Q\xA6\0R\xA6\0S\xA6\0T\xA6\0U\xA6\0V\xA6\0W\xA6\0X\xA6\0Y\xA6\0Z\xA6\0[\xA6\0\\\xA6\0]\xA6\0^\xA6\0_\xA6\0`\xA6\0a\xA6\0b\xA6\0c\xA6\0d\xA6\0e\xA6\0f\xA6\0g\xA6\0h\xA6\0i\xA6\0j\xA6\0k\xA6\0l\xA6\0m\xA6\0n\xA6\0\x81\xA6\0\x82\xA6\0\x83\xA6\0\x84\xA6\0\x85\xA6\0\x86\xA6\0\x87\xA6\0\x88\xA6\0\x89\xA6\0\x8A\xA6\0\x8B\xA6\0\x8C\xA6\0\x8D\xA6\0\x8E\xA6\0\x8F\xA6\0\x90\xA6\0\x91\xA6\0\x92\xA6\0\x93\xA6\0\x94\xA6\0\x95\xA6\0\x96\xA6\0\x97\xA6\0\x98\xA6\0\x99\xA6\0\x9A\xA6\0\x9B\xA6\0\x9C\xA6\0#\xA7\0$\xA7\0%\xA7\0&\xA7\0'\xA7\0(\xA7\0)\xA7\0*\xA7\0+\xA7\0,\xA7\0-\xA7\0.\xA7\0/\xA7\x000\xA7\x003\xA7\x004\xA7\x005\xA7\x006\xA7\x007\xA7\08\xA7\09\xA7\0:\xA7\0;\xA7\0<\xA7\0=\xA7\0>\xA7\0?\xA7\0@\xA7\0A\xA7\0B\xA7\0C\xA7\0D\xA7\0E\xA7\0F\xA7\0G\xA7\0H\xA7\0I\xA7\0J\xA7\0K\xA7\0L\xA7\0M\xA7\0N\xA7\0O\xA7\0P\xA7\0Q\xA7\0R\xA7\0S\xA7\0T\xA7\0U\xA7\0V\xA7\0W\xA7\0X\xA7\0Y\xA7\0Z\xA7\0[\xA7\0\\\xA7\0]\xA7\0^\xA7\0_\xA7\0`\xA7\0a\xA7\0b\xA7\0c\xA7\0d\xA7\0e\xA7\0f\xA7\0g\xA7\0h\xA7\0i\xA7\0j\xA7\0k\xA7\0l\xA7\0m\xA7\0n\xA7\0o\xA7\0p\xA7\0z\xA7\0{\xA7\0|\xA7\0}\xA7\0\x7F\xA7\0\x80\xA7\0\x81\xA7\0\x82\xA7\0\x83\xA7\0\x84\xA7\0\x85\xA7\0\x86\xA7\0\x87\xA7\0\x88\xA7\0\x8C\xA7\0\x8D\xA7\0\x91\xA7\0\x92\xA7\0\x93\xA7\0\x95\xA7\0\x97\xA7\0\x98\xA7\0\x99\xA7\0\x9A\xA7\0\x9B\xA7\0\x9C\xA7\0\x9D\xA7\0\x9E\xA7\0\x9F\xA7\0\xA0\xA7\0\xA1\xA7\0\xA2\xA7\0\xA3\xA7\0\xA4\xA7\0\xA5\xA7\0\xA6\xA7\0\xA7\xA7\0\xA8\xA7\0\xA9\xA7\0\xAA\xA7\0\xB5\xA7\0\xB6\xA7\0\xB7\xA7\0\xB8\xA7\0\xB9\xA7\0\xBA\xA7\0\xBB\xA7\0\xBC\xA7\0\xBD\xA7\0\xBE\xA7\0\xBF\xA7\0\xC0\xA7\0\xC1\xA7\0\xC2\xA7\0\xC3\xA7\0\xC4\xA7\0\xC8\xA7\0\xC9\xA7\0\xCA\xA7\0\xCB\xA7\0\xCD\xA7\0\xCE\xA7\0\xCF\xA7\0\xD0\xA7\0\xD1\xA7\0\xD2\xA7\0\xD3\xA7\0\xD4\xA7\0\xD5\xA7\0\xD6\xA7\0\xD7\xA7\0\xD8\xA7\0\xD9\xA7\0\xDA\xA7\0\xDB\xA7\0\xDC\xA7\0\xF6\xA7\0\xF7\xA7\0S\xAB\0T\xAB\0p\xAB\0\xC0\xAB\0\0\xFB\0\x07\xFB\0\x13\xFB\0\x18\xFB\0A\xFF\0[\xFF\0(\x04\x01P\x04\x01\xD8\x04\x01\xFC\x04\x01\x97\x05\x01\xA2\x05\x01\xA3\x05\x01\xB2\x05\x01\xB3\x05\x01\xBA\x05\x01\xBB\x05\x01\xBD\x05\x01\xC0\x0C\x01\xF3\x0C\x01p\r\x01\x86\r\x01\xC0\x18\x01\xE0\x18\x01`n\x01\x80n\x01\xBBn\x01\xD4n\x01\"\xE9\x01D\xE9\x01") }, 1580u32) }); } #[clippy::msrv = "1.83"] impl icu_provider::DataProvider for $provider { fn load(&self, req: icu_provider::DataRequest) -> Result, icu_provider::DataError> { if req.id.locale.is_unknown() { Ok(icu_provider::DataResponse { payload: icu_provider::DataPayload::from_static_ref(Self::SINGLETON_PROPERTY_BINARY_CHANGES_WHEN_UPPERCASED_V1), metadata: icu_provider::DataResponseMetadata::default() }) } else { Err(icu_provider::DataErrorKind::InvalidRequest.with_req(::INFO, req)) } } } }; ($ provider : ty , ITER) => { __impl_property_binary_changes_when_uppercased_v1!($provider); #[clippy::msrv = "1.83"] impl icu_provider::IterableDataProvider for $provider { fn iter_ids(&self) -> Result>, icu_provider::DataError> { Ok([Default::default()].into_iter().collect()) } } }; ($ provider : ty , DRY) => { __impl_property_binary_changes_when_uppercased_v1!($provider); #[clippy::msrv = "1.83"] impl icu_provider::DryDataProvider for $provider { fn dry_load(&self, req: icu_provider::DataRequest) -> Result { if req.id.locale.is_unknown() { Ok(icu_provider::DataResponseMetadata::default()) } else { Err(icu_provider::DataErrorKind::InvalidRequest.with_req(::INFO, req)) } } } }; ($ provider : ty , DRY , ITER) => { __impl_property_binary_changes_when_uppercased_v1!($provider); #[clippy::msrv = "1.83"] impl icu_provider::DryDataProvider for $provider { fn dry_load(&self, req: icu_provider::DataRequest) -> Result { if req.id.locale.is_unknown() { Ok(icu_provider::DataResponseMetadata::default()) } else { Err(icu_provider::DataErrorKind::InvalidRequest.with_req(::INFO, req)) } } } #[clippy::msrv = "1.83"] impl icu_provider::IterableDataProvider for $provider { fn iter_ids(&self) -> Result>, icu_provider::DataError> { Ok([Default::default()].into_iter().collect()) } } }; } #[doc(inline)] pub use __impl_property_binary_changes_when_uppercased_v1 as impl_property_binary_changes_when_uppercased_v1; # Changelog - imara-diff All notable changes to imara-diff will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## 0.1.8 - 2025-2-1 ### Changed * update MSRV to 1.71 * drop ahash dependency in favour of hashbrowns default hasher (foldhash) ### Fixed * incomplete documentation for sink and interner # Changelog - imara-diff All notable changes to imara-diff will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## 0.1.7 - 2024-26-7 ### Fixed * pointer alias violations in myers diff algorithm implementation ## 0.1.5 - 2022-11-4 ### Fixed * `inter::Interner::erase_tokens_after` not removing tokens from the LUT in some cases. ## 0.1.4 - 2022-11-4 ### Fixed * `inter::Interner::erase_tokens_after` only removed tokens from the LUT of the interner but did not actually remove the value from the list of tokens. This cause iteration to still access these values. ## 0.1.3 - 2022-10-26 ### Fixed * Dependency on multiple `ahash` versions ## 0.1.2 - 2022-10-26 # Documentation * Add multiple usage examples to the crate documentation ## 0.1.1 - 2022-10-25 ### Added * `Interner::erase_tokens_after` - allows reusing the interner without leaking memory. ## 0.1.0 - 2022-10-24 Initial Release # Changelog - imara-diff All notable changes to imara-diff will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## 0.1.8 - 2025-2-1 ### Changed * update MSRV to 1.71 * drop ahash dependency in favour of hashbrowns default hasher (foldhash) ### Fixed * incomplete documentation for sink and interner ## 0.1.7 - 2024-26-7 ### Fixed * pointer alias violations in myers diff algorithm implementation ## 0.1.5 - 2022-11-4 ### Fixed * `inter::Interner::erase_tokens_after` not removing tokens from the LUT in some cases. ## 0.1.4 - 2022-11-4 ### Fixed * `inter::Interner::erase_tokens_after` only removed tokens from the LUT of the interner but did not actually remove the value from the list of tokens. This cause iteration to still access these values. ## 0.1.3 - 2022-10-26 ### Fixed * Dependency on multiple `ahash` versions ## 0.1.2 - 2022-10-26 # Documentation * Add multiple usage examples to the crate documentation ## 0.1.1 - 2022-10-25 ### Added * `Interner::erase_tokens_after` - allows reusing the interner without leaking memory. ## 0.1.0 - 2022-10-24 Initial Release # Releases ## 2.13.0 (2026-01-07) - Implemented `Clone` for `IntoKeys` and `IntoValues`. - Added `map::Slice::split_at_checked` and `split_at_mut_checked`. - Added `set::Slice::split_at_checked`. ## 2.12.1 (2025-11-20) - Simplified a lot of internals using `hashbrown`'s new bucket API. ## 2.12.0 (2025-10-17) - **MSRV**: Rust 1.82.0 or later is now required. - Updated the `hashbrown` dependency to 0.16 alone. - Error types now implement `core::error::Error`. - Added `pop_if` methods to `IndexMap` and `IndexSet`, similar to the method for `Vec` added in Rust 1.86. ## 2.11.4 (2025-09-18) - Updated the `hashbrown` dependency to a range allowing 0.15 or 0.16. ## 2.11.3 (2025-09-15) - Make the minimum `serde` version only apply when "serde" is enabled. ## 2.11.2 (2025-09-15) - Switched the "serde" feature to depend on `serde_core`, improving build parallelism in cases where other dependents have enabled "serde/derive". ## 2.11.1 (2025-09-08) - Added a `get_key_value_mut` method to `IndexMap`. - Removed the unnecessary `Ord` bound on `insert_sorted_by` methods. ## 2.11.0 (2025-08-22) - Added `insert_sorted_by` and `insert_sorted_by_key` methods to `IndexMap`, `IndexSet`, and `VacantEntry`, like customizable versions of `insert_sorted`. - Added `is_sorted`, `is_sorted_by`, and `is_sorted_by_key` methods to `IndexMap` and `IndexSet`, as well as their `Slice` counterparts. - Added `sort_by_key` and `sort_unstable_by_key` methods to `IndexMap` and `IndexSet`, as well as parallel counterparts. - Added `replace_index` methods to `IndexMap`, `IndexSet`, and `VacantEntry` to replace the key (or set value) at a given index. - Added optional `sval` serialization support. ## 2.10.0 (2025-06-26) - Added `extract_if` methods to `IndexMap` and `IndexSet`, similar to the methods for `HashMap` and `HashSet` with ranges like `Vec::extract_if`. - Added more `#[track_caller]` annotations to functions that may panic. ## 2.9.0 (2025-04-04) - Added a `get_disjoint_mut` method to `IndexMap`, matching Rust 1.86's `HashMap` method. - Added a `get_disjoint_indices_mut` method to `IndexMap` and `map::Slice`, matching Rust 1.86's `get_disjoint_mut` method on slices. - Deprecated the `borsh` feature in favor of their own `indexmap` feature, solving a cyclic dependency that occurred via `borsh-derive`. ## 2.8.0 (2025-03-10) - Added `indexmap_with_default!` and `indexset_with_default!` to be used with alternative hashers, especially when using the crate without `std`. - Implemented `PartialEq` between each `Slice` and `[]`/arrays. - Removed the internal `rustc-rayon` feature and dependency. ## 2.7.1 (2025-01-19) - Added `#[track_caller]` to functions that may panic. - Improved memory reservation for `insert_entry`. ## 2.7.0 (2024-11-30) - Added methods `Entry::insert_entry` and `VacantEntry::insert_entry`, returning an `OccupiedEntry` after insertion. ## 2.6.0 (2024-10-01) - Implemented `Clone` for `map::IntoIter` and `set::IntoIter`. - Updated the `hashbrown` dependency to version 0.15. ## 2.5.0 (2024-08-30) - Added an `insert_before` method to `IndexMap` and `IndexSet`, as an alternative to `shift_insert` with different behavior on existing entries. - Added `first_entry` and `last_entry` methods to `IndexMap`. - Added `From` implementations between `IndexedEntry` and `OccupiedEntry`. ## 2.4.0 (2024-08-13) - Added methods `IndexMap::append` and `IndexSet::append`, moving all items from one map or set into another, and leaving the original capacity for reuse. ## 2.3.0 (2024-07-31) - Added trait `MutableEntryKey` for opt-in mutable access to map entry keys. - Added method `MutableKeys::iter_mut2` for opt-in mutable iteration of map keys and values. ## 2.2.6 (2024-03-22) - Added trait `MutableValues` for opt-in mutable access to set values. ## 2.2.5 (2024-02-29) - Added optional `borsh` serialization support. ## 2.2.4 (2024-02-28) - Added an `insert_sorted` method on `IndexMap`, `IndexSet`, and `VacantEntry`. - Avoid hashing for lookups in single-entry maps. - Limit preallocated memory in `serde` deserializers. ## 2.2.3 (2024-02-11) - Added `move_index` and `swap_indices` methods to `IndexedEntry`, `OccupiedEntry`, and `RawOccupiedEntryMut`, functioning like the existing methods on `IndexMap`. - Added `shift_insert` methods on `VacantEntry` and `RawVacantEntryMut`, as well as `shift_insert_hashed_nocheck` on the latter, to insert the new entry at a particular index. - Added `shift_insert` methods on `IndexMap` and `IndexSet` to insert a new entry at a particular index, or else move an existing entry there. ## 2.2.2 (2024-01-31) - Added indexing methods to raw entries: `RawEntryBuilder::from_hash_full`, `RawEntryBuilder::index_from_hash`, and `RawEntryMut::index`. ## 2.2.1 (2024-01-28) - Corrected the signature of `RawOccupiedEntryMut::into_key(self) -> &'a mut K`, This a breaking change from 2.2.0, but that version was published for less than a day and has now been yanked. ## 2.2.0 (2024-01-28) - The new `IndexMap::get_index_entry` method finds an entry by its index for in-place manipulation. - The `Keys` iterator now implements `Index` for quick access to the entry's key, compared to indexing the map to get the value. - The new `IndexMap::splice` and `IndexSet::splice` methods will drain the given range as an iterator, and then replace that range with entries from an input iterator. - The new trait `RawEntryApiV1` offers opt-in access to a raw entry API for `IndexMap`, corresponding to the unstable API on `HashSet` as of Rust 1.75. - Many `IndexMap` and `IndexSet` methods have relaxed their type constraints, e.g. removing `K: Hash` on methods that don't actually need to hash. - Removal methods `remove`, `remove_entry`, and `take` are now deprecated in favor of their `shift_` or `swap_` prefixed variants, which are more explicit about their effect on the index and order of remaining items. The deprecated methods will remain to guide drop-in replacements from `HashMap` and `HashSet` toward the prefixed methods. ## 2.1.0 (2023-10-31) - Empty slices can now be created with `map::Slice::{new, new_mut}` and `set::Slice::new`. In addition, `Slice::new`, `len`, and `is_empty` are now `const` functions on both types. - `IndexMap`, `IndexSet`, and their respective `Slice`s all have binary search methods for sorted data: map `binary_search_keys` and set `binary_search` for plain comparison, `binary_search_by` for custom comparators, `binary_search_by_key` for key extraction, and `partition_point` for boolean conditions. ## 2.0.2 (2023-09-29) - The `hashbrown` dependency has been updated to version 0.14.1 to complete the support for Rust 1.63. ## 2.0.1 (2023-09-27) - **MSRV**: Rust 1.63.0 is now supported as well, pending publication of `hashbrown`'s relaxed MSRV (or use cargo `--ignore-rust-version`). ## 2.0.0 (2023-06-23) - **MSRV**: Rust 1.64.0 or later is now required. - The `"std"` feature is no longer auto-detected. It is included in the default feature set, or else can be enabled like any other Cargo feature. - The `"serde-1"` feature has been removed, leaving just the optional `"serde"` dependency to be enabled like a feature itself. - `IndexMap::get_index_mut` now returns `Option<(&K, &mut V)>`, changing the key part from `&mut K` to `&K`. There is also a new alternative `MutableKeys::get_index_mut2` to access the former behavior. - The new `map::Slice` and `set::Slice` offer a linear view of maps and sets, behaving a lot like normal `[(K, V)]` and `[T]` slices. Notably, comparison traits like `Eq` only consider items in order, rather than hash lookups, and slices even implement `Hash`. - `IndexMap` and `IndexSet` now have `sort_by_cached_key` and `par_sort_by_cached_key` methods which perform stable sorts in place using a key extraction function. - `IndexMap` and `IndexSet` now have `reserve_exact`, `try_reserve`, and `try_reserve_exact` methods that correspond to the same methods on `Vec`. However, exactness only applies to the direct capacity for items, while the raw hash table still follows its own rules for capacity and load factor. - The `Equivalent` trait is now re-exported from the `equivalent` crate, intended as a common base to allow types to work with multiple map types. - The `hashbrown` dependency has been updated to version 0.14. - The `serde_seq` module has been moved from the crate root to below the `map` module. ## 1.9.3 (2023-03-24) - Bump the `rustc-rayon` dependency, for compiler use only. ## 1.9.2 (2022-11-17) - `IndexMap` and `IndexSet` both implement `arbitrary::Arbitrary<'_>` and `quickcheck::Arbitrary` if those optional dependency features are enabled. ## 1.9.1 (2022-06-21) - The MSRV now allows Rust 1.56.0 as well. However, currently `hashbrown` 0.12.1 requires 1.56.1, so users on 1.56.0 should downgrade that to 0.12.0 until there is a later published version relaxing its requirement. ## 1.9.0 (2022-06-16) - **MSRV**: Rust 1.56.1 or later is now required. - The `hashbrown` dependency has been updated to version 0.12. - `IterMut` and `ValuesMut` now implement `Debug`. - The new `IndexMap::shrink_to` and `IndexSet::shrink_to` methods shrink the capacity with a lower bound. - The new `IndexMap::move_index` and `IndexSet::move_index` methods change the position of an item from one index to another, shifting the items between to accommodate the move. ## 1.8.2 (2022-05-27) - Bump the `rustc-rayon` dependency, for compiler use only. ## 1.8.1 (2022-03-29) - The new `IndexSet::replace_full` will return the index of the item along with the replaced value, if any, by @zakcutner in PR [222]. [222]: https://github.com/indexmap-rs/indexmap/pull/222 ## 1.8.0 (2022-01-07) - The new `IndexMap::into_keys` and `IndexMap::into_values` will consume the map into keys or values, respectively, matching Rust 1.54's `HashMap` methods, by @taiki-e in PR [195]. - More of the iterator types implement `Debug`, `ExactSizeIterator`, and `FusedIterator`, by @cuviper in PR [196]. - `IndexMap` and `IndexSet` now implement rayon's `ParallelDrainRange`, by @cuviper in PR [197]. - `IndexMap::with_hasher` and `IndexSet::with_hasher` are now `const` functions, allowing static maps and sets, by @mwillsey in PR [203]. - `IndexMap` and `IndexSet` now implement `From` for arrays, matching Rust 1.56's implementation for `HashMap`, by @rouge8 in PR [205]. - `IndexMap` and `IndexSet` now have methods `sort_unstable_keys`, `sort_unstable_by`, `sorted_unstable_by`, and `par_*` equivalents, which sort in-place without preserving the order of equal items, by @bhgomes in PR [211]. [195]: https://github.com/indexmap-rs/indexmap/pull/195 [196]: https://github.com/indexmap-rs/indexmap/pull/196 [197]: https://github.com/indexmap-rs/indexmap/pull/197 [203]: https://github.com/indexmap-rs/indexmap/pull/203 [205]: https://github.com/indexmap-rs/indexmap/pull/205 [211]: https://github.com/indexmap-rs/indexmap/pull/211 ## 1.7.0 (2021-06-29) - **MSRV**: Rust 1.49 or later is now required. - The `hashbrown` dependency has been updated to version 0.11. ## 1.6.2 (2021-03-05) - Fixed to match `std` behavior, `OccupiedEntry::key` now references the existing key in the map instead of the lookup key, by @cuviper in PR [170]. - The new `Entry::or_insert_with_key` matches Rust 1.50's `Entry` method, passing `&K` to the callback to create a value, by @cuviper in PR [175]. [170]: https://github.com/indexmap-rs/indexmap/pull/170 [175]: https://github.com/indexmap-rs/indexmap/pull/175 ## 1.6.1 (2020-12-14) - The new `serde_seq` module implements `IndexMap` serialization as a sequence to ensure order is preserved, by @cuviper in PR [158]. - New methods on maps and sets work like the `Vec`/slice methods by the same name: `truncate`, `split_off`, `first`, `first_mut`, `last`, `last_mut`, and `swap_indices`, by @cuviper in PR [160]. [158]: https://github.com/indexmap-rs/indexmap/pull/158 [160]: https://github.com/indexmap-rs/indexmap/pull/160 ## 1.6.0 (2020-09-05) - **MSRV**: Rust 1.36 or later is now required. - The `hashbrown` dependency has been updated to version 0.9. ## 1.5.2 (2020-09-01) - The new "std" feature will force the use of `std` for users that explicitly want the default `S = RandomState`, bypassing the autodetection added in 1.3.0, by @cuviper in PR [145]. [145]: https://github.com/indexmap-rs/indexmap/pull/145 ## 1.5.1 (2020-08-07) - Values can now be indexed by their `usize` position by @cuviper in PR [132]. - Some of the generic bounds have been relaxed to match `std` by @cuviper in PR [141]. - `drain` now accepts any `R: RangeBounds` by @cuviper in PR [142]. [132]: https://github.com/indexmap-rs/indexmap/pull/132 [141]: https://github.com/indexmap-rs/indexmap/pull/141 [142]: https://github.com/indexmap-rs/indexmap/pull/142 ## 1.5.0 (2020-07-17) - **MSRV**: Rust 1.32 or later is now required. - The inner hash table is now based on `hashbrown` by @cuviper in PR [131]. This also completes the method `reserve` and adds `shrink_to_fit`. - Add new methods `get_key_value`, `remove_entry`, `swap_remove_entry`, and `shift_remove_entry`, by @cuviper in PR [136] - `Clone::clone_from` reuses allocations by @cuviper in PR [125] - Add new method `reverse` by @linclelinkpart5 in PR [128] [125]: https://github.com/indexmap-rs/indexmap/pull/125 [128]: https://github.com/indexmap-rs/indexmap/pull/128 [131]: https://github.com/indexmap-rs/indexmap/pull/131 [136]: https://github.com/indexmap-rs/indexmap/pull/136 ## 1.4.0 (2020-06-01) - Add new method `get_index_of` by @Thermatrix in PR [115] and [120] - Fix build script rebuild-if-changed configuration to use "build.rs"; fixes issue [123]. Fix by @cuviper. - Dev-dependencies (rand and quickcheck) have been updated. The crate's tests now run using Rust 1.32 or later (MSRV for building the crate has not changed). by @kjeremy and @bluss [123]: https://github.com/indexmap-rs/indexmap/issues/123 [115]: https://github.com/indexmap-rs/indexmap/pull/115 [120]: https://github.com/indexmap-rs/indexmap/pull/120 ## 1.3.2 (2020-02-05) - Maintenance update to regenerate the published `Cargo.toml`. ## 1.3.1 (2020-01-15) - Maintenance update for formatting and `autocfg` 1.0. ## 1.3.0 (2019-10-18) - The deprecation messages in the previous version have been removed. (The methods have not otherwise changed.) Docs for removal methods have been improved. - From Rust 1.36, this crate supports being built **without std**, requiring `alloc` instead. This is enabled automatically when it is detected that `std` is not available. There is no crate feature to enable/disable to trigger this. The new build-dep `autocfg` enables this. ## 1.2.0 (2019-09-08) - Plain `.remove()` now has a deprecation message, it informs the user about picking one of the removal functions `swap_remove` and `shift_remove` which have different performance and order semantics. Plain `.remove()` will not be removed, the warning message and method will remain until further. - Add new method `shift_remove` for order preserving removal on the map, and `shift_take` for the corresponding operation on the set. - Add methods `swap_remove`, `swap_remove_entry` to `Entry`. - Fix indexset/indexmap to support full paths, like `indexmap::indexmap!()` - Internal improvements: fix warnings, deprecations and style lints ## 1.1.0 (2019-08-20) - Added optional feature `"rayon"` that adds parallel iterator support to `IndexMap` and `IndexSet` using Rayon. This includes all the regular iterators in parallel versions, and parallel sort. - Implemented `Clone` for `map::{Iter, Keys, Values}` and `set::{Difference, Intersection, Iter, SymmetricDifference, Union}` - Implemented `Debug` for `map::{Entry, IntoIter, Iter, Keys, Values}` and `set::{Difference, Intersection, IntoIter, Iter, SymmetricDifference, Union}` - Serde trait `IntoDeserializer` are implemented for `IndexMap` and `IndexSet`. - Minimum Rust version requirement increased to Rust 1.30 for development builds. ## 1.0.2 (2018-10-22) - The new methods `IndexMap::insert_full` and `IndexSet::insert_full` are both like `insert` with the index included in the return value. - The new method `Entry::and_modify` can be used to modify occupied entries, matching the new methods of `std` maps in Rust 1.26. - The new method `Entry::or_default` inserts a default value in unoccupied entries, matching the new methods of `std` maps in Rust 1.28. ## 1.0.1 (2018-03-24) - Document Rust version policy for the crate (see rustdoc) ## 1.0.0 (2018-03-11) - This is the 1.0 release for `indexmap`! (the crate and datastructure formerly known as “ordermap”) - `OccupiedEntry::insert` changed its signature, to use `&mut self` for the method receiver, matching the equivalent method for a standard `HashMap`. Thanks to @dtolnay for finding this bug. - The deprecated old names from ordermap were removed: `OrderMap`, `OrderSet`, `ordermap!{}`, `orderset!{}`. Use the new `IndexMap` etc names instead. ## 0.4.1 (2018-02-14) - Renamed crate to `indexmap`; the `ordermap` crate is now deprecated and the types `OrderMap/Set` now have a deprecation notice. ## 0.4.0 (2018-02-02) - This is the last release series for this `ordermap` under that name, because the crate is **going to be renamed** to `indexmap` (with types `IndexMap`, `IndexSet`) and no change in functionality! - The map and its associated structs moved into the `map` submodule of the crate, so that the map and set are symmetric + The iterators, `Entry` and other structs are now under `ordermap::map::` - Internally refactored `OrderMap` so that all the main algorithms (insertion, lookup, removal etc) that don't use the `S` parameter (the hasher) are compiled without depending on `S`, which reduces generics bloat. - `Entry` no longer has a type parameter `S`, which is just like the standard `HashMap`'s entry. - Minimum Rust version requirement increased to Rust 1.18 ## 0.3.5 (2018-01-14) - Documentation improvements ## 0.3.4 (2018-01-04) - The `.retain()` methods for `OrderMap` and `OrderSet` now traverse the elements in order, and the retained elements **keep their order** - Added new methods `.sort_by()`, `.sort_keys()` to `OrderMap` and `.sort_by()`, `.sort()` to `OrderSet`. These methods allow you to sort the maps in place efficiently. ## 0.3.3 (2017-12-28) - Document insertion behaviour better by @lucab - Updated dependences (no feature changes) by @ignatenkobrain ## 0.3.2 (2017-11-25) - Add `OrderSet` by @cuviper! - `OrderMap::drain` is now (too) a double ended iterator. ## 0.3.1 (2017-11-19) - In all ordermap iterators, forward the `collect` method to the underlying iterator as well. - Add crates.io categories. ## 0.3.0 (2017-10-07) - The methods `get_pair`, `get_pair_index` were both replaced by `get_full` (and the same for the mutable case). - Method `swap_remove_pair` replaced by `swap_remove_full`. - Add trait `MutableKeys` for opt-in mutable key access. Mutable key access is only possible through the methods of this extension trait. - Add new trait `Equivalent` for key equivalence. This extends the `Borrow` trait mechanism for `OrderMap::get` in a backwards compatible way, just some minor type inference related issues may become apparent. See [#10] for more information. - Implement `Extend<(&K, &V)>` by @xfix. [#10]: https://github.com/indexmap-rs/indexmap/pull/10 ## 0.2.13 (2017-09-30) - Fix deserialization to support custom hashers by @Techcable. - Add methods `.index()` on the entry types by @garro95. ## 0.2.12 (2017-09-11) - Add methods `.with_hasher()`, `.hasher()`. ## 0.2.11 (2017-08-29) - Support `ExactSizeIterator` for the iterators. By @Binero. - Use `Box<[Pos]>` internally, saving a word in the `OrderMap` struct. - Serde support, with crate feature `"serde-1"`. By @xfix. ## 0.2.10 (2017-04-29) - Add iterator `.drain(..)` by @stevej. ## 0.2.9 (2017-03-26) - Add method `.is_empty()` by @overvenus. - Implement `PartialEq, Eq` by @overvenus. - Add method `.sorted_by()`. ## 0.2.8 (2017-03-01) - Add iterators `.values()` and `.values_mut()`. - Fix compatibility with 32-bit platforms. ## 0.2.7 (2016-11-02) - Add `.retain()`. ## 0.2.6 (2016-11-02) - Add `OccupiedEntry::remove_entry` and other minor entry methods, so that it now has all the features of `HashMap`'s entries. ## 0.2.5 (2016-10-31) - Improved `.pop()` slightly. ## 0.2.4 (2016-10-22) - Improved performance of `.insert()` ([#3]) by @pczarn. [#3]: https://github.com/indexmap-rs/indexmap/pull/3 ## 0.2.3 (2016-10-11) - Generalize `Entry` for now, so that it works on hashmaps with non-default hasher. However, there's a lingering compat issue since libstd `HashMap` does not parameterize its entries by the hasher (`S` typarm). - Special case some iterator methods like `.nth()`. ## 0.2.2 (2016-10-02) - Disable the verbose `Debug` impl by default. ## 0.2.1 (2016-10-02) - Fix doc links and clarify docs. ## 0.2.0 (2016-10-01) - Add more `HashMap` methods & compat with its API. - Experimental support for `.entry()` (the simplest parts of the API). - Add `.reserve()` (placeholder impl). - Add `.remove()` as synonym for `.swap_remove()`. - Changed `.insert()` to swap value if the entry already exists, and return `Option`. - Experimental support as an *indexed* hash map! Added methods `.get_index()`, `.get_index_mut()`, `.swap_remove_index()`, `.get_pair_index()`, `.get_pair_index_mut()`. ## 0.1.2 (2016-09-19) - Implement the 32/32 split idea for `Pos` which improves cache utilization and lookup performance. ## 0.1.1 (2016-09-16) - Initial release. # Releases ## 2.14.0 (2026-04-09) - **MSRV**: Rust 1.85.0 or later is now required. - Updated the `hashbrown` dependency to 0.17. - Made more `map::Slice` methods `const`: `new_mut`, `first_mut`, `last_mut`, `split_at_mut`, `split_at_mut_checked`, `split_first_mut`, `split_last_mut` ## 2.13.1 (2026-04-02) - Made some `Slice` methods `const`: - `map::Slice::{first,last,split_at,split_at_checked,split_first,split_last}` - `set::Slice::{first,last,split_at,split_at_checked,split_first,split_last}` ## 2.13.0 (2026-01-07) - Implemented `Clone` for `IntoKeys` and `IntoValues`. - Added `map::Slice::split_at_checked` and `split_at_mut_checked`. - Added `set::Slice::split_at_checked`. ## 2.12.1 (2025-11-20) - Simplified a lot of internals using `hashbrown`'s new bucket API. ## 2.12.0 (2025-10-17) - **MSRV**: Rust 1.82.0 or later is now required. - Updated the `hashbrown` dependency to 0.16 alone. - Error types now implement `core::error::Error`. - Added `pop_if` methods to `IndexMap` and `IndexSet`, similar to the method for `Vec` added in Rust 1.86. ## 2.11.4 (2025-09-18) - Updated the `hashbrown` dependency to a range allowing 0.15 or 0.16. ## 2.11.3 (2025-09-15) - Make the minimum `serde` version only apply when "serde" is enabled. ## 2.11.2 (2025-09-15) - Switched the "serde" feature to depend on `serde_core`, improving build parallelism in cases where other dependents have enabled "serde/derive". ## 2.11.1 (2025-09-08) - Added a `get_key_value_mut` method to `IndexMap`. - Removed the unnecessary `Ord` bound on `insert_sorted_by` methods. ## 2.11.0 (2025-08-22) - Added `insert_sorted_by` and `insert_sorted_by_key` methods to `IndexMap`, `IndexSet`, and `VacantEntry`, like customizable versions of `insert_sorted`. - Added `is_sorted`, `is_sorted_by`, and `is_sorted_by_key` methods to `IndexMap` and `IndexSet`, as well as their `Slice` counterparts. - Added `sort_by_key` and `sort_unstable_by_key` methods to `IndexMap` and `IndexSet`, as well as parallel counterparts. - Added `replace_index` methods to `IndexMap`, `IndexSet`, and `VacantEntry` to replace the key (or set value) at a given index. - Added optional `sval` serialization support. ## 2.10.0 (2025-06-26) - Added `extract_if` methods to `IndexMap` and `IndexSet`, similar to the methods for `HashMap` and `HashSet` with ranges like `Vec::extract_if`. - Added more `#[track_caller]` annotations to functions that may panic. ## 2.9.0 (2025-04-04) - Added a `get_disjoint_mut` method to `IndexMap`, matching Rust 1.86's `HashMap` method. - Added a `get_disjoint_indices_mut` method to `IndexMap` and `map::Slice`, matching Rust 1.86's `get_disjoint_mut` method on slices. - Deprecated the `borsh` feature in favor of their own `indexmap` feature, solving a cyclic dependency that occurred via `borsh-derive`. ## 2.8.0 (2025-03-10) - Added `indexmap_with_default!` and `indexset_with_default!` to be used with alternative hashers, especially when using the crate without `std`. - Implemented `PartialEq` between each `Slice` and `[]`/arrays. - Removed the internal `rustc-rayon` feature and dependency. ## 2.7.1 (2025-01-19) - Added `#[track_caller]` to functions that may panic. - Improved memory reservation for `insert_entry`. ## 2.7.0 (2024-11-30) - Added methods `Entry::insert_entry` and `VacantEntry::insert_entry`, returning an `OccupiedEntry` after insertion. ## 2.6.0 (2024-10-01) - Implemented `Clone` for `map::IntoIter` and `set::IntoIter`. - Updated the `hashbrown` dependency to version 0.15. ## 2.5.0 (2024-08-30) - Added an `insert_before` method to `IndexMap` and `IndexSet`, as an alternative to `shift_insert` with different behavior on existing entries. - Added `first_entry` and `last_entry` methods to `IndexMap`. - Added `From` implementations between `IndexedEntry` and `OccupiedEntry`. ## 2.4.0 (2024-08-13) - Added methods `IndexMap::append` and `IndexSet::append`, moving all items from one map or set into another, and leaving the original capacity for reuse. ## 2.3.0 (2024-07-31) - Added trait `MutableEntryKey` for opt-in mutable access to map entry keys. - Added method `MutableKeys::iter_mut2` for opt-in mutable iteration of map keys and values. ## 2.2.6 (2024-03-22) - Added trait `MutableValues` for opt-in mutable access to set values. ## 2.2.5 (2024-02-29) - Added optional `borsh` serialization support. ## 2.2.4 (2024-02-28) - Added an `insert_sorted` method on `IndexMap`, `IndexSet`, and `VacantEntry`. - Avoid hashing for lookups in single-entry maps. - Limit preallocated memory in `serde` deserializers. ## 2.2.3 (2024-02-11) - Added `move_index` and `swap_indices` methods to `IndexedEntry`, `OccupiedEntry`, and `RawOccupiedEntryMut`, functioning like the existing methods on `IndexMap`. - Added `shift_insert` methods on `VacantEntry` and `RawVacantEntryMut`, as well as `shift_insert_hashed_nocheck` on the latter, to insert the new entry at a particular index. - Added `shift_insert` methods on `IndexMap` and `IndexSet` to insert a new entry at a particular index, or else move an existing entry there. ## 2.2.2 (2024-01-31) - Added indexing methods to raw entries: `RawEntryBuilder::from_hash_full`, `RawEntryBuilder::index_from_hash`, and `RawEntryMut::index`. ## 2.2.1 (2024-01-28) - Corrected the signature of `RawOccupiedEntryMut::into_key(self) -> &'a mut K`, This a breaking change from 2.2.0, but that version was published for less than a day and has now been yanked. ## 2.2.0 (2024-01-28) - The new `IndexMap::get_index_entry` method finds an entry by its index for in-place manipulation. - The `Keys` iterator now implements `Index` for quick access to the entry's key, compared to indexing the map to get the value. - The new `IndexMap::splice` and `IndexSet::splice` methods will drain the given range as an iterator, and then replace that range with entries from an input iterator. - The new trait `RawEntryApiV1` offers opt-in access to a raw entry API for `IndexMap`, corresponding to the unstable API on `HashSet` as of Rust 1.75. - Many `IndexMap` and `IndexSet` methods have relaxed their type constraints, e.g. removing `K: Hash` on methods that don't actually need to hash. - Removal methods `remove`, `remove_entry`, and `take` are now deprecated in favor of their `shift_` or `swap_` prefixed variants, which are more explicit about their effect on the index and order of remaining items. The deprecated methods will remain to guide drop-in replacements from `HashMap` and `HashSet` toward the prefixed methods. ## 2.1.0 (2023-10-31) - Empty slices can now be created with `map::Slice::{new, new_mut}` and `set::Slice::new`. In addition, `Slice::new`, `len`, and `is_empty` are now `const` functions on both types. - `IndexMap`, `IndexSet`, and their respective `Slice`s all have binary search methods for sorted data: map `binary_search_keys` and set `binary_search` for plain comparison, `binary_search_by` for custom comparators, `binary_search_by_key` for key extraction, and `partition_point` for boolean conditions. ## 2.0.2 (2023-09-29) - The `hashbrown` dependency has been updated to version 0.14.1 to complete the support for Rust 1.63. ## 2.0.1 (2023-09-27) - **MSRV**: Rust 1.63.0 is now supported as well, pending publication of `hashbrown`'s relaxed MSRV (or use cargo `--ignore-rust-version`). ## 2.0.0 (2023-06-23) - **MSRV**: Rust 1.64.0 or later is now required. - The `"std"` feature is no longer auto-detected. It is included in the default feature set, or else can be enabled like any other Cargo feature. - The `"serde-1"` feature has been removed, leaving just the optional `"serde"` dependency to be enabled like a feature itself. - `IndexMap::get_index_mut` now returns `Option<(&K, &mut V)>`, changing the key part from `&mut K` to `&K`. There is also a new alternative `MutableKeys::get_index_mut2` to access the former behavior. - The new `map::Slice` and `set::Slice` offer a linear view of maps and sets, behaving a lot like normal `[(K, V)]` and `[T]` slices. Notably, comparison traits like `Eq` only consider items in order, rather than hash lookups, and slices even implement `Hash`. - `IndexMap` and `IndexSet` now have `sort_by_cached_key` and `par_sort_by_cached_key` methods which perform stable sorts in place using a key extraction function. - `IndexMap` and `IndexSet` now have `reserve_exact`, `try_reserve`, and `try_reserve_exact` methods that correspond to the same methods on `Vec`. However, exactness only applies to the direct capacity for items, while the raw hash table still follows its own rules for capacity and load factor. - The `Equivalent` trait is now re-exported from the `equivalent` crate, intended as a common base to allow types to work with multiple map types. - The `hashbrown` dependency has been updated to version 0.14. - The `serde_seq` module has been moved from the crate root to below the `map` module. ## 1.9.3 (2023-03-24) - Bump the `rustc-rayon` dependency, for compiler use only. ## 1.9.2 (2022-11-17) - `IndexMap` and `IndexSet` both implement `arbitrary::Arbitrary<'_>` and `quickcheck::Arbitrary` if those optional dependency features are enabled. ## 1.9.1 (2022-06-21) - The MSRV now allows Rust 1.56.0 as well. However, currently `hashbrown` 0.12.1 requires 1.56.1, so users on 1.56.0 should downgrade that to 0.12.0 until there is a later published version relaxing its requirement. ## 1.9.0 (2022-06-16) - **MSRV**: Rust 1.56.1 or later is now required. - The `hashbrown` dependency has been updated to version 0.12. - `IterMut` and `ValuesMut` now implement `Debug`. - The new `IndexMap::shrink_to` and `IndexSet::shrink_to` methods shrink the capacity with a lower bound. - The new `IndexMap::move_index` and `IndexSet::move_index` methods change the position of an item from one index to another, shifting the items between to accommodate the move. ## 1.8.2 (2022-05-27) - Bump the `rustc-rayon` dependency, for compiler use only. ## 1.8.1 (2022-03-29) - The new `IndexSet::replace_full` will return the index of the item along with the replaced value, if any, by @zakcutner in PR [222]. [222]: https://github.com/indexmap-rs/indexmap/pull/222 ## 1.8.0 (2022-01-07) - The new `IndexMap::into_keys` and `IndexMap::into_values` will consume the map into keys or values, respectively, matching Rust 1.54's `HashMap` methods, by @taiki-e in PR [195]. - More of the iterator types implement `Debug`, `ExactSizeIterator`, and `FusedIterator`, by @cuviper in PR [196]. - `IndexMap` and `IndexSet` now implement rayon's `ParallelDrainRange`, by @cuviper in PR [197]. - `IndexMap::with_hasher` and `IndexSet::with_hasher` are now `const` functions, allowing static maps and sets, by @mwillsey in PR [203]. - `IndexMap` and `IndexSet` now implement `From` for arrays, matching Rust 1.56's implementation for `HashMap`, by @rouge8 in PR [205]. - `IndexMap` and `IndexSet` now have methods `sort_unstable_keys`, `sort_unstable_by`, `sorted_unstable_by`, and `par_*` equivalents, which sort in-place without preserving the order of equal items, by @bhgomes in PR [211]. [195]: https://github.com/indexmap-rs/indexmap/pull/195 [196]: https://github.com/indexmap-rs/indexmap/pull/196 [197]: https://github.com/indexmap-rs/indexmap/pull/197 [203]: https://github.com/indexmap-rs/indexmap/pull/203 [205]: https://github.com/indexmap-rs/indexmap/pull/205 [211]: https://github.com/indexmap-rs/indexmap/pull/211 ## 1.7.0 (2021-06-29) - **MSRV**: Rust 1.49 or later is now required. - The `hashbrown` dependency has been updated to version 0.11. ## 1.6.2 (2021-03-05) - Fixed to match `std` behavior, `OccupiedEntry::key` now references the existing key in the map instead of the lookup key, by @cuviper in PR [170]. - The new `Entry::or_insert_with_key` matches Rust 1.50's `Entry` method, passing `&K` to the callback to create a value, by @cuviper in PR [175]. [170]: https://github.com/indexmap-rs/indexmap/pull/170 [175]: https://github.com/indexmap-rs/indexmap/pull/175 ## 1.6.1 (2020-12-14) - The new `serde_seq` module implements `IndexMap` serialization as a sequence to ensure order is preserved, by @cuviper in PR [158]. - New methods on maps and sets work like the `Vec`/slice methods by the same name: `truncate`, `split_off`, `first`, `first_mut`, `last`, `last_mut`, and `swap_indices`, by @cuviper in PR [160]. [158]: https://github.com/indexmap-rs/indexmap/pull/158 [160]: https://github.com/indexmap-rs/indexmap/pull/160 ## 1.6.0 (2020-09-05) - **MSRV**: Rust 1.36 or later is now required. - The `hashbrown` dependency has been updated to version 0.9. ## 1.5.2 (2020-09-01) - The new "std" feature will force the use of `std` for users that explicitly want the default `S = RandomState`, bypassing the autodetection added in 1.3.0, by @cuviper in PR [145]. [145]: https://github.com/indexmap-rs/indexmap/pull/145 ## 1.5.1 (2020-08-07) - Values can now be indexed by their `usize` position by @cuviper in PR [132]. - Some of the generic bounds have been relaxed to match `std` by @cuviper in PR [141]. - `drain` now accepts any `R: RangeBounds` by @cuviper in PR [142]. [132]: https://github.com/indexmap-rs/indexmap/pull/132 [141]: https://github.com/indexmap-rs/indexmap/pull/141 [142]: https://github.com/indexmap-rs/indexmap/pull/142 ## 1.5.0 (2020-07-17) - **MSRV**: Rust 1.32 or later is now required. - The inner hash table is now based on `hashbrown` by @cuviper in PR [131]. This also completes the method `reserve` and adds `shrink_to_fit`. - Add new methods `get_key_value`, `remove_entry`, `swap_remove_entry`, and `shift_remove_entry`, by @cuviper in PR [136] - `Clone::clone_from` reuses allocations by @cuviper in PR [125] - Add new method `reverse` by @linclelinkpart5 in PR [128] [125]: https://github.com/indexmap-rs/indexmap/pull/125 [128]: https://github.com/indexmap-rs/indexmap/pull/128 [131]: https://github.com/indexmap-rs/indexmap/pull/131 [136]: https://github.com/indexmap-rs/indexmap/pull/136 ## 1.4.0 (2020-06-01) - Add new method `get_index_of` by @Thermatrix in PR [115] and [120] - Fix build script rebuild-if-changed configuration to use "build.rs"; fixes issue [123]. Fix by @cuviper. - Dev-dependencies (rand and quickcheck) have been updated. The crate's tests now run using Rust 1.32 or later (MSRV for building the crate has not changed). by @kjeremy and @bluss [123]: https://github.com/indexmap-rs/indexmap/issues/123 [115]: https://github.com/indexmap-rs/indexmap/pull/115 [120]: https://github.com/indexmap-rs/indexmap/pull/120 ## 1.3.2 (2020-02-05) - Maintenance update to regenerate the published `Cargo.toml`. ## 1.3.1 (2020-01-15) - Maintenance update for formatting and `autocfg` 1.0. ## 1.3.0 (2019-10-18) - The deprecation messages in the previous version have been removed. (The methods have not otherwise changed.) Docs for removal methods have been improved. - From Rust 1.36, this crate supports being built **without std**, requiring `alloc` instead. This is enabled automatically when it is detected that `std` is not available. There is no crate feature to enable/disable to trigger this. The new build-dep `autocfg` enables this. ## 1.2.0 (2019-09-08) - Plain `.remove()` now has a deprecation message, it informs the user about picking one of the removal functions `swap_remove` and `shift_remove` which have different performance and order semantics. Plain `.remove()` will not be removed, the warning message and method will remain until further. - Add new method `shift_remove` for order preserving removal on the map, and `shift_take` for the corresponding operation on the set. - Add methods `swap_remove`, `swap_remove_entry` to `Entry`. - Fix indexset/indexmap to support full paths, like `indexmap::indexmap!()` - Internal improvements: fix warnings, deprecations and style lints ## 1.1.0 (2019-08-20) - Added optional feature `"rayon"` that adds parallel iterator support to `IndexMap` and `IndexSet` using Rayon. This includes all the regular iterators in parallel versions, and parallel sort. - Implemented `Clone` for `map::{Iter, Keys, Values}` and `set::{Difference, Intersection, Iter, SymmetricDifference, Union}` - Implemented `Debug` for `map::{Entry, IntoIter, Iter, Keys, Values}` and `set::{Difference, Intersection, IntoIter, Iter, SymmetricDifference, Union}` - Serde trait `IntoDeserializer` are implemented for `IndexMap` and `IndexSet`. - Minimum Rust version requirement increased to Rust 1.30 for development builds. ## 1.0.2 (2018-10-22) - The new methods `IndexMap::insert_full` and `IndexSet::insert_full` are both like `insert` with the index included in the return value. - The new method `Entry::and_modify` can be used to modify occupied entries, matching the new methods of `std` maps in Rust 1.26. - The new method `Entry::or_default` inserts a default value in unoccupied entries, matching the new methods of `std` maps in Rust 1.28. ## 1.0.1 (2018-03-24) - Document Rust version policy for the crate (see rustdoc) ## 1.0.0 (2018-03-11) - This is the 1.0 release for `indexmap`! (the crate and datastructure formerly known as “ordermap”) - `OccupiedEntry::insert` changed its signature, to use `&mut self` for the method receiver, matching the equivalent method for a standard `HashMap`. Thanks to @dtolnay for finding this bug. - The deprecated old names from ordermap were removed: `OrderMap`, `OrderSet`, `ordermap!{}`, `orderset!{}`. Use the new `IndexMap` etc names instead. ## 0.4.1 (2018-02-14) - Renamed crate to `indexmap`; the `ordermap` crate is now deprecated and the types `OrderMap/Set` now have a deprecation notice. ## 0.4.0 (2018-02-02) - This is the last release series for this `ordermap` under that name, because the crate is **going to be renamed** to `indexmap` (with types `IndexMap`, `IndexSet`) and no change in functionality! - The map and its associated structs moved into the `map` submodule of the crate, so that the map and set are symmetric + The iterators, `Entry` and other structs are now under `ordermap::map::` - Internally refactored `OrderMap` so that all the main algorithms (insertion, lookup, removal etc) that don't use the `S` parameter (the hasher) are compiled without depending on `S`, which reduces generics bloat. - `Entry` no longer has a type parameter `S`, which is just like the standard `HashMap`'s entry. - Minimum Rust version requirement increased to Rust 1.18 ## 0.3.5 (2018-01-14) - Documentation improvements ## 0.3.4 (2018-01-04) - The `.retain()` methods for `OrderMap` and `OrderSet` now traverse the elements in order, and the retained elements **keep their order** - Added new methods `.sort_by()`, `.sort_keys()` to `OrderMap` and `.sort_by()`, `.sort()` to `OrderSet`. These methods allow you to sort the maps in place efficiently. ## 0.3.3 (2017-12-28) - Document insertion behaviour better by @lucab - Updated dependences (no feature changes) by @ignatenkobrain ## 0.3.2 (2017-11-25) - Add `OrderSet` by @cuviper! - `OrderMap::drain` is now (too) a double ended iterator. ## 0.3.1 (2017-11-19) - In all ordermap iterators, forward the `collect` method to the underlying iterator as well. - Add crates.io categories. ## 0.3.0 (2017-10-07) - The methods `get_pair`, `get_pair_index` were both replaced by `get_full` (and the same for the mutable case). - Method `swap_remove_pair` replaced by `swap_remove_full`. - Add trait `MutableKeys` for opt-in mutable key access. Mutable key access is only possible through the methods of this extension trait. - Add new trait `Equivalent` for key equivalence. This extends the `Borrow` trait mechanism for `OrderMap::get` in a backwards compatible way, just some minor type inference related issues may become apparent. See [#10] for more information. - Implement `Extend<(&K, &V)>` by @xfix. [#10]: https://github.com/indexmap-rs/indexmap/pull/10 ## 0.2.13 (2017-09-30) - Fix deserialization to support custom hashers by @Techcable. - Add methods `.index()` on the entry types by @garro95. ## 0.2.12 (2017-09-11) - Add methods `.with_hasher()`, `.hasher()`. ## 0.2.11 (2017-08-29) - Support `ExactSizeIterator` for the iterators. By @Binero. - Use `Box<[Pos]>` internally, saving a word in the `OrderMap` struct. - Serde support, with crate feature `"serde-1"`. By @xfix. ## 0.2.10 (2017-04-29) - Add iterator `.drain(..)` by @stevej. ## 0.2.9 (2017-03-26) - Add method `.is_empty()` by @overvenus. - Implement `PartialEq, Eq` by @overvenus. - Add method `.sorted_by()`. ## 0.2.8 (2017-03-01) - Add iterators `.values()` and `.values_mut()`. - Fix compatibility with 32-bit platforms. ## 0.2.7 (2016-11-02) - Add `.retain()`. ## 0.2.6 (2016-11-02) - Add `OccupiedEntry::remove_entry` and other minor entry methods, so that it now has all the features of `HashMap`'s entries. ## 0.2.5 (2016-10-31) - Improved `.pop()` slightly. ## 0.2.4 (2016-10-22) - Improved performance of `.insert()` ([#3]) by @pczarn. [#3]: https://github.com/indexmap-rs/indexmap/pull/3 ## 0.2.3 (2016-10-11) - Generalize `Entry` for now, so that it works on hashmaps with non-default hasher. However, there's a lingering compat issue since libstd `HashMap` does not parameterize its entries by the hasher (`S` typarm). - Special case some iterator methods like `.nth()`. ## 0.2.2 (2016-10-02) - Disable the verbose `Debug` impl by default. ## 0.2.1 (2016-10-02) - Fix doc links and clarify docs. ## 0.2.0 (2016-10-01) - Add more `HashMap` methods & compat with its API. - Experimental support for `.entry()` (the simplest parts of the API). - Add `.reserve()` (placeholder impl). - Add `.remove()` as synonym for `.swap_remove()`. - Changed `.insert()` to swap value if the entry already exists, and return `Option`. - Experimental support as an *indexed* hash map! Added methods `.get_index()`, `.get_index_mut()`, `.swap_remove_index()`, `.get_pair_index()`, `.get_pair_index_mut()`. ## 0.1.2 (2016-09-19) - Implement the 32/32 split idea for `Pos` which improves cache utilization and lookup performance. ## 0.1.1 (2016-09-16) - Initial release. # Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## 0.1.4 (2025-02-21) ### Fixed - Return output length from `InOutBufReserved::get_out_len` instead of input length ([#1150]) [#1150]: https://github.com/RustCrypto/utils/pull/1150 ## 0.1.3 (2022-03-31) ### Fixed - MIRI error in `From` impl for `InOutBuf` ([#755]) [#755]: https://github.com/RustCrypto/utils/pull/755 ## 0.1.2 (2022-02-10) ### Changed - Use borrow instead of consuming in `InOutBufReserved::get_*_len()` methods ([#734]) [#734]: https://github.com/RustCrypto/utils/pull/734 ## 0.1.1 (2022-02-10) ### Fixed - Fix doc build on docs.rs by optionally enabling the `doc_cfg` feature ([#733]) [#733]: https://github.com/RustCrypto/utils/pull/733 ## 0.1.0 (2022-02-10) - Initial release ([#675]) [#675]: https://github.com/RustCrypto/utils/pull/675 # Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## 0.2.2 (2025-12-27) ### Changed - Require `block-padding` v0.4.2 ([#1291]) [#1291]: https://github.com/RustCrypto/utils/pull/1291 ## 0.2.1 (2025-10-06) ### Changed - Migrate to fixed `Padding::pad_detached` from `block-padding` v0.4.1 ([#1227]) [#1227]: https://github.com/RustCrypto/utils/pull/1227 ## 0.2.0 (2025-10-06) [YANKED] ### Changed - Migrated from `generic-array` to `hybrid-array` ([#944]) - Edition changed to 2024 and MSRV bumped to 1.85 ([#1149]) ### Added - `InOut::into_out` and `InOutBufReserved::into_out` methods ([#1132]) - `InOutBufReserved::split_reserved` method ([#1133]) - `InOut::into_out_with_copied_in` and `InOutBuf::into_out_with_copied_in` methods ([#1169]) [#944]: https://github.com/RustCrypto/utils/pull/944 [#1132]: https://github.com/RustCrypto/utils/pull/1132 [#1133]: https://github.com/RustCrypto/utils/pull/1133 [#1149]: https://github.com/RustCrypto/utils/pull/1149 [#1169]: https://github.com/RustCrypto/utils/pull/1169 ## 0.1.4 (2025-02-21) ### Fixed - Return output length from `InOutBufReserved::get_out_len` instead of input length ([#1150]) [#1150]: https://github.com/RustCrypto/utils/pull/1150 ## 0.1.3 (2022-03-31) ### Fixed - MIRI error in `From` impl for `InOutBuf` ([#755]) [#755]: https://github.com/RustCrypto/utils/pull/755 ## 0.1.2 (2022-02-10) ### Changed - Use borrow instead of consuming in `InOutBufReserved::get_*_len()` methods ([#734]) [#734]: https://github.com/RustCrypto/utils/pull/734 ## 0.1.1 (2022-02-10) ### Fixed - Fix doc build on docs.rs by optionally enabling the `doc_cfg` feature ([#733]) [#733]: https://github.com/RustCrypto/utils/pull/733 ## 0.1.0 (2022-02-10) - Initial release ([#675]) [#675]: https://github.com/RustCrypto/utils/pull/675 # CHANGELOG 0.2.23 (2026-03-03) =================== This release updates Jiff's bundled copy of the [IANA Time Zone Database] to `2026a`. See the [`2026a` release announcement] for more details. [`2026a` release announcement]: https://lists.iana.org/hyperkitty/list/tz-announce@iana.org/thread/ASPLBE3A4BAEXIOQ3KZ6EJSJWBU6L53G/ 0.2.22 (2026-02-28) =================== This release includes a bug fix where fallible conversions from signed durations to unsigned durations could panic in some cases. Bug fixes: * [#526](https://github.com/BurntSushi/jiff/issues/526): Fix a panicking bug that occurs for `std::time::Duration::try_from(SignedDuration::new(0, -1))`. 0.2.21 (2026-02-22) =================== This release contains a performance improvement and a bug fix for `civil::Date::new` where it could panic on some inputs. Bug fixes: * [#523](https://github.com/BurntSushi/jiff/issues/523): Fix a bug where `Date::new` could panic. This was a regression introduced in `jiff 0.2.20`. Performance: * [#518](https://github.com/BurntSushi/jiff/pull/518): Improve `Timestamp` to `civil::DateTime` conversion performance by ~15%. 0.2.20 (2026-02-11) =================== This release contains a major internal refactor that moves off of using ranged integers internally. There are also some small bug fixes and added support for finding the system time zone on emscripten targets. Enhancements: * [#11](https://github.com/BurntSushi/jiff/issues/11): Stop using ranged integers internally. * [#490](https://github.com/BurntSushi/jiff/issues/490): Add support for retrieving the system time zone on emscripten targets. * [#500](https://github.com/BurntSushi/jiff/issues/500): Update comparison with the `time` crate in the Jiff documentation. * [#502](https://github.com/BurntSushi/jiff/issues/502): Enable some non-default features for the Rust Playground deployment. Bug fixes: * [#485](https://github.com/BurntSushi/jiff/issues/485): Fix bug with padding for negative integers in `strftime`. * [#486](https://github.com/BurntSushi/jiff/issues/486): Make `%^c` result in uppercase strings where appropriate. 0.2.19 (2026-02-05) =================== This is a small release with a performance optimization (with respect to doing heavily contended arithmetic on `Zoned` values) and a bug fix for a panic that can occur when using `%2s` in `strftime`. Enhancements: * [#491](https://github.com/BurntSushi/jiff/issues/491): Avoid cloning `TimeZone` for consuming operations on `Zoned`. Bug fixes: * [#497](https://github.com/BurntSushi/jiff/issues/497): Fix a panic in `timestamp.strftime("%2s")`. 0.2.18 (2026-01-05) =================== This release ships a sizeable refactor to the RFC 2822, RFC 9110, RC 3339, RFC 9557, ISO 8601 and friendly format printers. Specifically, they are now all monomorphic internally (instead of being generic over `jiff::fmt::Write`) and write to uninitialized buffers. This improves runtime performance (sometimes dramatically so), and to a more modest degree, decreases binary size and improves compile times. This release also includes a bug fix where `DateTime::MIN.to_zoned(..)` could panic. Enhancements: * [#460](https://github.com/BurntSushi/jiff/pull/460): Improve runtime performance and binary size of RFC 2822 printer. * [#461](https://github.com/BurntSushi/jiff/pull/461): Tweak behavior of printing min/max offsets in RFC 2822 and Temporal printers. * [#462](https://github.com/BurntSushi/jiff/pull/462): Export fallible constructors for `jiff::SignedDuration`. * [#465](https://github.com/BurntSushi/jiff/pull/465): Improve runtime performance and binary size of the "friendly" duration printer. * [#468](https://github.com/BurntSushi/jiff/pull/468): Improve runtime performance and binary size of the Temporal ISO 8601 duration printer. * [#470](https://github.com/BurntSushi/jiff/pull/470): Improve runtime performance and binary size of the Temporal ISO 8601 datetime printer. * [#474](https://github.com/BurntSushi/jiff/pull/474): Improve runtime performance and binary size of Jiff's `strftime` implementation. * [#477](https://github.com/BurntSushi/jiff/pull/477): Fix a bug where time zone lookups for `civil::DateTime::MIN` could panic. 0.2.17 (2025-12-24) =================== This release contains binary size improvements to Jiff, more succinct error messages and some new minor APIs. While Jiff 1.0 is overdue, I've been doing a lot of experimenting with improving Jiff's binary size and compile times. In particular, I want to spend time doing this before Jiff 1.0 so that we don't box ourselves into a corner. (For example, some binary size improvements may require minor API breaking changes.) In this release, Jiff has switched to structured error handling internally in an effort to provide error predicates and also hopefully improve binary sizes and compile times. Overall this didn't have as big of an impact on binary sizes or compile times as I was hoping. I did take this opportunity to make Jiff's error messages a bit more succinct. In many cases, this involved de-duplicating some aspects of error messages and omitting user provided input in the messages. If you feel like there is a significant decrease in error message quality that isn't easily amended by callers providing additional context themselves, please open an issue. This release also updates Jiff's bundled copy of the [IANA Time Zone Database] to `2025c`. See the [`2025c` release announcement] for more details. Enhancements: * [#412](https://github.com/BurntSushi/jiff/issues/412): Add `Display`, `FromStr`, `Serialize` and `Deserialize` trait implementations for `jiff::civil::ISOWeekDate`. These all use the ISO 8601 week date format. * [#418](https://github.com/BurntSushi/jiff/issues/418): Add some basic predicates to `jiff::Error` for basic error introspection. * [#453](https://github.com/BurntSushi/jiff/pull/453), [#454](https://github.com/BurntSushi/jiff/pull/454): Switch to structured error handling internally. * [#456](https://github.com/BurntSushi/jiff/pull/456), [#457](https://github.com/BurntSushi/jiff/pull/457), [#458](https://github.com/BurntSushi/jiff/pull/458): Various improvements to binary size. [`2025c` release announcement]: https://lists.iana.org/hyperkitty/list/tz-announce@iana.org/thread/TAGXKYLMAQRZRFTERQ33CEKOW7KRJVAK/ 0.2.16 (2025-11-07) =================== This release contains a number of enhancements and bug fixes that have accrued over the last few months. Most are small polishes. A couple of the bug fixes apply to panics that could occur when parsing invalid `TZ` strings or invalid `strptime` format strings. Also, parsing into a `Span` should now be much faster (for both the ISO 8601 and "friendly" duration formats). Enhancements: * [#298](https://github.com/BurntSushi/jiff/issues/298): Add Serde helpers for (de)serializing `std::time::Duration` values. * [#396](https://github.com/BurntSushi/jiff/issues/396): Add `Sub` and `Add` trait implementations for `Zoned` (in addition to the already existing trait implementations for `&Zoned`). * [#397](https://github.com/BurntSushi/jiff/pull/397): Add `BrokenDownTime::set_meridiem` and ensure it overrides the hour when formatting. * [#409](https://github.com/BurntSushi/jiff/pull/409): Switch dependency on `serde` to `serde_core`. This should help speed up compilation times in some cases. * [#430](https://github.com/BurntSushi/jiff/pull/430): Add new `Zoned::series` API, making it consistent with the same API on other datetime types. * [#432](https://github.com/BurntSushi/jiff/pull/432): When `lenient` mode is enabled for `strftime`, Jiff will no longer error when the formatting string contains invalid UTF-8. * [#432](https://github.com/BurntSushi/jiff/pull/432): Formatting of `%y` and `%g` no longer fails based on the specific year value. * [#432](https://github.com/BurntSushi/jiff/pull/432): Parsing of `%s` is now a bit more consistent with other fields. Moreover, `BrokenDownTime::{to_timestamp,to_zoned}` will now prefer timestamps parsed with `%s` over any other fields that have been parsed. * [#433](https://github.com/BurntSushi/jiff/pull/433): Allow parsing just a `%s` into a `Zoned` via the `Etc/Unknown` time zone. Bug fixes: * [#386](https://github.com/BurntSushi/jiff/issues/386): Fix a bug where `2087-12-31T23:00:00Z` in the `Africa/Casablanca` time zone could not be round-tripped (because its offset was calculated incorrectly as a result of not handling "permanent DST" POSIX time zones). * [#407](https://github.com/BurntSushi/jiff/issues/407): Fix a panic that occurred when parsing an empty string as a POSIX time zone. * [#410](https://github.com/BurntSushi/jiff/issues/410): Fix a panic that could occur when parsing `%:` via `strptime` APIs. * [#414](https://github.com/BurntSushi/jiff/pull/414): Update some parts of the documentation to indicate that `TimeZone::unknown()` is a fallback for `TimeZone::system()` (instead of the `jiff 0.1` behavior of using `TimeZone::UTC`). * [#423](https://github.com/BurntSushi/jiff/issues/423): Fix a panicking bug when reading malformed TZif data. * [#426](https://github.com/BurntSushi/jiff/issues/426): Fix a panicking bug when parsing century (`%C`) via `strptime`. * [#445](https://github.com/BurntSushi/jiff/pull/445): Fixed bugs with parsing durations like `-9223372036854775808s` and `-PT9223372036854775808S`. Performance: * [#445](https://github.com/BurntSushi/jiff/pull/445): Parsing into `Span` or `SignedDuration` is now a fair bit faster in some cases. 0.2.15 (2025-06-13) =================== This release fixes a bug where error values were being constructed during parsing even in the success case. This was a regression introduced in `0.2.14` as a result of trying to improve compilation times. Thankfully, fixing this regression doesn't seem to meaningfully impact the amount of IR generated by compiling Jiff. Bug fixes: * [#385](https://github.com/BurntSushi/jiff/pull/385): Fixes a performance regression for parsing. 0.2.14 (2025-05-20) =================== This release includes a smattering of bug fixes, and hopefully a small improvement to the time it takes to compile Jiff. Also, in this release, when `TZ` is set to a non-empty but invalid value, Jiff will always fall back to `Etc/Unknown` when using `TimeZone::system()`. This differs from previous behavior where Jiff would, in this case, attempt to read the system's default time zone. This change brings Jiff into consistency with existing Unix tooling like `date`, and is also arguably a better failure mode. That is, when `TZ` is set but invalid, we shouldn't silently fall back to the default system time zone, but instead do something that indicates something has potentially gone wrong. Enhancements: * [#364](https://github.com/BurntSushi/jiff/issues/364): Jiff now falls back to `Etc/Unknown` for invalid `TZ` values. * [#379](https://github.com/BurntSushi/jiff/pull/379): Improve compilation times. Bug fixes: * [#365](https://github.com/BurntSushi/jiff/issues/365): Fixes a compile error in Jiff when only the `tzdb-concatenated` feature was enabled. * [#366](https://github.com/BurntSushi/jiff/issues/366): Fixes slow initial `Zoned::now()` in environments where `/usr/share/zoneinfo` is on a very slow file system (like CI environments). * [#376](https://github.com/BurntSushi/jiff/issues/376): Avoids searching for a tzdb at `/usr/share/zoneinfo` on Windows. 0.2.13 (2025-05-05) =================== This release fixes a bug in a corner case where `TimeZone::following` could sometimes omit the last time zone transition. This could only happen in time zones that once had daylight saving time, but ended it. This did not have an impact on other Jiff APIs that handle daylight saving time. Bug fixes: * [#362](https://github.com/BurntSushi/jiff/issues/362): Fix a bug where `TimeZone::following` could omit the last historical time zone transition. 0.2.12 (2025-05-03) =================== This release fixes a couple bugs in Jiff's parser. In particular, a regression was introduced in `jiff 0.2.11` where its RFC 2822 parser could panic on some inputs. Previous releases of Jiff are unaffected. Bug fixes: * [#357](https://github.com/BurntSushi/jiff/issues/357): Fix a bug where parsing `1970-06-01T00-00:45:00[Africa/Monrovia]` succeeded but it should fail. * [#359](https://github.com/BurntSushi/jiff/issues/359): Fix a bug where the RFC 2822 parser could panic on some inputs. 0.2.11 (2025-05-01) =================== This release includes new APIs for customizing Jiff's `strtime` behavior along with a few minor bug fixes. Jiff's `strtime` formatting API has also been optimized. It's about twice as fast as it was. This release also coincides with the publication of `jiff-icu 0.2.0-beta.2`, which has support for `icu 2.0.0-beta.2`. Enhancements: * [#338](https://github.com/BurntSushi/jiff/pull/338): Add support for the `%c`, `%r`, `%X` and `%x` conversion specifiers. * [#341](https://github.com/BurntSushi/jiff/issues/341): Add support for `%q` in `jiff::fmt::strtime` (prints quarter of year). * [#342](https://github.com/BurntSushi/jiff/issues/342): Add support for `%::z` and `%:::z` in `jiff::fmt::strtime`. * [#344](https://github.com/BurntSushi/jiff/issues/344): Add support for `%N` in `jiff::fmt::strtime` (alias for `%9f`). * [#350](https://github.com/BurntSushi/jiff/issues/350): Add a "lenient" mode for `strtime` formatting APIs that ignores most errors. Bug fixes: * [#328](https://github.com/BurntSushi/jiff/issues/328): Document default precision behavior of `Display` impls for datetime types. * [#340](https://github.com/BurntSushi/jiff/issues/340): Allow whitespace in more places in RFC 2822 parser (improves spec compliance). * [#346](https://github.com/BurntSushi/jiff/issues/346): `TimeZone::get("UTC")` should now always return `TimeZone::UTC`. Performance: * [#338](https://github.com/BurntSushi/jiff/pull/338): Jiff's `strftime` APIs are now approximately twice as fast as they were. Performance should be comparable to `chrono` and `time`'s prebuilt APIs. 0.2.10 (2025-04-21) =================== This release includes a bug fix for parsing `Tuesday` when using `%A` via Jiff's `strptime` APIs. Specifically, it would recognize `Tueday` instead of `Tuesday`. Bug fixes: * [#333](https://github.com/BurntSushi/jiff/issues/333): Fix typo in `strptime` parsing from `Tueday` to `Tuesday`. 0.2.9 (2025-04-19) ================== This release includes a bug fix that, in debug mode, could result in datetime types having different hashes for the same value. This could cause problems, for example, if you are using datetimes as keys in a hash map. This problem didn't exist when Jiff was compiled in release mode. This release also improves the panic message shown when the `js` feature isn't enabled and the current time is requested on `wasm32-unknown-unknown` targets. Enhancements: * [#296](https://github.com/BurntSushi/jiff/issues/296): Provide a better panic message when `Zoned::now()` fails on WASM. Bug fixes: * [#330](https://github.com/BurntSushi/jiff/issues/330): Fix bug where `Hash` on datetime types could yield different hash values for the same underlying date/time. 0.2.8 (2025-04-13) ================== This release fixes a bug where the constructors on `SignedDuration` for floating point durations could panic (in debug mode) or produce incorrect results (in release mode). This bug only impacts users of the `try_from_secs_{f32,f64}` and `from_secs_{f32,f64}` methods on `SignedDuration`. Enhancements: * [#326](https://github.com/BurntSushi/jiff/pull/326): Add an alternate `Debug` impl for `SignedDuration` that only shows its second and nanosecond components (while using only one component when the other is zero). Bug fixes: * [#324](https://github.com/BurntSushi/jiff/issues/324): Fix a bug that could produce a panic or incorrect results in `SignedDuration::(try_)?from_secs_{f32,f64}`. 0.2.7 (2025-04-13) ================== This release includes a bug fix that changes how an empty but set `TZ` environment variable is interpreted (as indistinguishable from `TZ=UTC`). This also includes a new enabled by default create feature, `perf-inline`, which allows toggling Jiff's use of `inline(always)`. This may help improve compile times or decrease binary size. Enhancements: * [#320](https://github.com/BurntSushi/jiff/pull/320): Remove some internal uses of generics to mildly improve compile times. * [#321](https://github.com/BurntSushi/jiff/pull/321): Add `perf-inline` crate feature for controlling `inline(always)` annotations. Bug fixes: * [#311](https://github.com/BurntSushi/jiff/issues/311): Make `TZ=` indistinguishable from `TZ=UTC`. 0.2.6 (2025-04-07) ================== This release includes a few bug fixes and support for discovering the IANA Time Zone Database automatically on Illumos. Enhancements: * [#315](https://github.com/BurntSushi/jiff/issues/315): Add support for automatically finding the tzdb on Illumos. Bug fixes: * [#305](https://github.com/BurntSushi/jiff/issues/305): Fixed `Zoned` rounding on days with DST time zone transitions. * [#309](https://github.com/BurntSushi/jiff/issues/309): Fixed bug where `TimeZone::preceding` could omit historical time zone transitions for time zones that have eliminated DST in the present. * [#312](https://github.com/BurntSushi/jiff/issues/312): Fixed `nth_weekday_in_month`, where it would sometimes incorrectly return an error. 0.2.5 (2025-03-22) ================== This release updates Jiff's bundled copy of the [IANA Time Zone Database] to `2025b`. See the [`2025b` release announcement] for more details. Enhancements: * [#300](https://github.com/BurntSushi/jiff/pull/300): Update `jiff-tzdb` to `2025b`. [`2025b` release announcement]: https://lists.iana.org/hyperkitty/list/tz-announce@iana.org/thread/6JVHNHLB6I2WAYTQ75L6KEPEQHFXAJK3/ 0.2.4 (2025-03-10) ================== This is another small release that fixes a problem where Jiff could break builds if they relied on inference for integer comparisons. Specifically, Jiff uses internal trait impls to make comparing its internal ranged integers more convenient. But Rust the language has no concept of "internal" trait impls, and thus this can impact type inference. If code was written in a way that relies on a singular trait impl that is available, then adding Jiff to the project can cause it to break. This isn't arguably Jiff's fault per se, but since these trait impls were just about internal convenience and not essential to Jiff's design, we adopt a pragmatic approach and just remove them. Bug fixes: * [#293](https://github.com/BurntSushi/jiff/issues/293): Remove internal trait impls that can cause breaks due to inference failures. 0.2.3 (2025-03-07) ================== This is a small release that fixes a bug in the handling of POSIX time zones in some cases. Specifically, the implementation of `Date::yesterday` was wrong when the date was the first of the month. This was a regression introduced in `0.2.2` and was not present in older releases. More test coverage has been added. Bug fixes: * [#290](https://github.com/BurntSushi/jiff/issues/290): Fix bug in implementation of `Date::yesterday`. 0.2.2 (2025-03-06) ================== This release of Jiff includes a new opt-in proc macro for embedding a `TimeZone` into your binary. Just enable Jiff's `static` feature, and this will print the current time in the `America/New_York` time zone: ```rust use jiff::{ tz::{self, TimeZone}, Timestamp, }; fn main() { static TZ: TimeZone = tz::get!("America/New_York"); let zdt = Timestamp::now().to_zoned(TZ.clone()); println!("{zdt}"); } ``` This enables `TimeZone` to be meaningfully used in core-only environments, even when dynamic memory allocation isn't available. This release also features a number of performance improvements for time zone lookups. In some cases, the improvement is significant (by an order of magnitude). Additionally, the IANA Time Zone Database embedded into `jiff-tzdb` now uses "rearguard" semantics. This means that the boolean flag indicating whether daylight saving time is active or not (only accessible via `TimeZone::to_offset_info`) will respect the actual definition of daylight saving time. (This is relevant, for example, for time zones like `Europe/Dublin`, where their summer time is _legally_ known as their standard time, but is in effect daylight saving time.) Enhancements: * [#256](https://github.com/BurntSushi/jiff/issues/256): Add `tz::{get,include}` macros for time zone support in core-only environments. * [#258](https://github.com/BurntSushi/jiff/issues/258): Switch to `rearguard` tzdb data in `jiff-tzdb` and document it. * [#259](https://github.com/BurntSushi/jiff/pull/259): De-duplicate TZif data in `jiff-tzdb`. * [#273](https://github.com/BurntSushi/jiff/issues/273): Add "crate features" documentation to `jiff-sqlx` and `jiff-diesel`. * [#277](https://github.com/BurntSushi/jiff/issues/277): Document semver guarantee for error conditions on `Timestamp` constructors. * [#277](https://github.com/BurntSushi/jiff/pull/287): Greatly optimize time zone lookups (for both timestamps and civil datetimes). Bug fixes: * [#261](https://github.com/BurntSushi/jiff/issues/261): Improve the documentation for `ZonedWith::nanosecond` and `ZonedWith::subsec_nanosecond`. 0.2.1 (2025-02-16) ================== This release includes a massive number of optimizations that significantly improves performance in some cases. If you had a workload whose performance with Jiff was underwhelming, please give it a try. I welcome questions via [Discussions on GitHub]. This release also provides a new API, `Timestamp::constant`, for constructing `Timestamp` values in a `const` context. Enhancements: * [#235](https://github.com/BurntSushi/jiff/discussions/235), [#255](https://github.com/BurntSushi/jiff/discussions/255), [#266](https://github.com/BurntSushi/jiff/pull/266): A massive number of performance improvements. Jiff should now generally be faster than `chrono` and `time`. * [#263](https://github.com/BurntSushi/jiff/issues/263): Add `Timestamp::constant` for constructing timestamps in `const` context. 0.2.0 (2025-02-10) ================== This is a new semver incompatible release of Jiff. It contains several breaking changes. I expect most users of Jiff to be able to upgrade without any changes. The fundamental API organization of Jiff has not changed. Some of the highlights of this release include reducing footguns and better ecosystem integration. For reducing footguns, APIs on `Span` will no longer implicitly assume that days are always 24 hours long. And `Span` no longer implements `PartialEq` or `Eq` (instead favoring `span.fieldwise()` to create a value that supports naive fieldwise comparison). Moreover, when using `TimeZone::system()` (perhaps via `Zoned::now()`), if the system time zone could not be detected, then a special `Etc/Unknown` time zone will be used instead. This avoids erroring, but also surfaces itself to make it clearer that something has (perhaps) gone wrong. As for ecosystem integration, this release coincides with the publication of the [`jiff-icu`], [`jiff-sqlx`] and [`jiff-diesel`] crates. `jiff-icu` integrates with the [ICU4X project], and is now the recommended way to use Jiff to work with non-Gregorian calendars or to localize datetimes for end users. `jiff-sqlx` and `jiff-diesel` provide wrapper types that implement the necessary traits to make it ergonomic to store and retrieve Jiff values in a database using [SQLx] or [Diesel], respectively. Unless something unexpected happens, my plan is for the next breaking change release to be Jiff 1.0 in about 6 months. Once Jiff 1.0 is out, I plan to commit to it indefinitely. **BREAKING CHANGES**: This is an exhaustive list of breaking changes. Changes with the bolded **RUNTIME** prefix are changes that will not be caught by the Rust compiler. That is, they are changes in runtime behavior. * [#28](https://github.com/BurntSushi/jiff/issues/28): The deprecated `intz` routines on `Zoned`, `Timestamp`, `civil::DateTime` and `civil::Date` have been removed. You can use `in_tz` instead. This change was made because many found the name `intz` to be unclear. * [#32](https://github.com/BurntSushi/jiff/issues/32): The `PartialEq` and `Eq` trait implementations on `Span` have been removed. Ideally these shouldn't have been used, but if you do need them, please use `Span::fieldwise` to create a `SpanFieldwise`, which does have the `PartialEq` and `Eq` traits implemented. These were removed on `Span` itself because they made it very easy to commit subtle bugs. * [#36](https://github.com/BurntSushi/jiff/issues/36): Turn panics during `Timestamp::saturing_add` into errors. Callers adding spans that are known to contain units of hours or smaller are guaranteed that this will not return an error. * **RUNTIME** [#48](https://github.com/BurntSushi/jiff/issues/48): On `Span` APIs, days are no longer silently assumed to always be 24 hours when a relative datetime is not provided. Instead, to perform operations on units of days or bigger, callers must either provide a relative date or opt into invariant 24-hour days with `SpanRelativeTo::days_are_24_hours`. Shortcuts have been added to the span builders. For example, `SpanTotal::days_are_24_hours`. * **RUNTIME** [#147](https://github.com/BurntSushi/jiff/issues/147): Change the behavior of the deprecated `%V` conversion specifier in `jiff::fmt::strtime` from formatting an IANA time zone identifier to formatting an ISO 8601 week number. To format an IANA time zone identifier, use `%Q` or `%:Q` (which were introduced in `jiff 0.1`). * **RUNTIME** [#212](https://github.com/BurntSushi/jiff/issues/212): When parsing into a `Zoned` with a civil time corresponding to a gap, we treat all offsets as invalid and return an error. Previously, we would accept the offset as given. This brings us into line with Temporal's behavior. For example, previously Jiff accepted `2006-04-02T02:30-05[America/Indiana/Vevay]` but will now return an error. This is desirable for cases where a datetime in the future is serialized before a change in the daylight saving time rules. For more examples, see `jiff::fmt::temporal::DateTimeParser::offset_conflict` for details on how to change Jiff's default behavior. This behavior change also applies to `tz::OffsetConflict::PreferOffset`. * **RUNTIME** [#213](https://github.com/BurntSushi/jiff/issues/213): Tweak the semantics of `tz::TimeZoneDatabase` so that it only initializes one internal tzdb instead of trying to find as many as possible. It is unlikely that you'll be impacted by this change, but it's meant to make the semantics be a bit more sensible. (In `jiff 0.1`, it was in theory possible for one tz lookup to succeed in the system zoneinfo and then another tz lookup to fail in zoneinfo but succeed automatically via the bundled copy. But this seems confusing and possibly not desirable. Hence the change.) * [#218](https://github.com/BurntSushi/jiff/issues/218): In order to make naming a little more consistent between `Zoned` and `civil::Date`, the `civil::Date::to_iso_week_date` and `civil::ISOWeekDate::to_date` APIs were renamed to `civil::Date::iso_week_date` and `civil::ISOWeekDate::date`. * [#220](https://github.com/BurntSushi/jiff/issues/220): Remove `Span::to_duration` for converting a `Span` to a `std::time::Duration` and rename `Span::to_jiff_duration` to `Span::to_duration`. This prioritizes `SignedDuration` as the "primary" non-calendar duration type in Jiff. And makes it more consistent with APIs like `Zoned::duration_since`. For non-calendar spans, the `TryFrom for std::time::Duration` still exists. For calendar durations, use `Span::to_duration` and then convert the `SignedDuration` to `std::time::Duration`. Additionally, `Timestamp::from_jiff_duration` and `Timestamp::as_jiff_duration` were renamed to `Timestamp::from_duration` and `Timestamp::as_duration`, respectively. The old deprecated routines on the unsigned `std::time::Duration` have been removed. * [#221](https://github.com/BurntSushi/jiff/issues/221): Change the type of the value yielded by the `jiff::tz::TimeZoneNameIter` iterator from `String` to `jiff::tz::TimeZoneName`. This opaque type is more API evolution friendly. To access the string, either use `TimeZoneName`'s `Display` trait implementation, or its `as_str` method. * [#222](https://github.com/BurntSushi/jiff/issues/222): Split `TimeZone::to_offset` into two methods. One that just returns the offset, and another, `TimeZone::to_offset_info`, which includes the offset, DST status and time zone abbreviation. The extra info is rarely needed and is sometimes more costly to compute. Also, make the lifetime of the time zone abbreviation returned by `TimeZoneTransition::abbreviation` tied to the transition instead of the time zone (for future API flexibility, likely in core-only environments). This change was overall motivated by wanting to do less work in the common case (where we only need the offset), and for reducing the size of a `TimeZone` considerably in core-only environments. Callers previously using `TimeZone::to_offset` to get DST status and time zone abbreviation should now use `TimeZone::to_offset_info`. * **RUNTIME** [#230](https://github.com/BurntSushi/jiff/issues/230): When `TimeZone::system()` cannot find a system configured time zone, `jiff 0.1` would automatically fall back to `TimeZone::UTC` (with a WARN-level log message). In `jiff 0.2`, the fall back is now to `TimeZone::unknown()`, which has a special `Etc/Unknown` identifier (as specified by Unicode and reserved by the IANA time zone database). The fallback otherwise still behaves as if it were `TimeZone::UTC`. This helps surface error conditions related to finding the system time zone without causing unrecoverable failure. Enhancements: * [#136](https://github.com/BurntSushi/jiff/issues/136): When the special `SpanRelativeTo::days_are_24_hours()` marker is used, weeks will also be treated as invariant. That is, seven 24-hour days. In all cases, working with years and months still requires a relative date. * [#228](https://github.com/BurntSushi/jiff/issues/228): It is now possible to forcefully use a bundled copy of the IANA time zone database without relying on disabling crate features. This can be done by enabling the `tzdb-bundle-always` crate feature and explicitly creating a `jiff::tz::TimeZoneDatabase::bundled()` database. Once in hand, you must use APIs like `TimeZoneDatabase::get` to create a `TimeZone` and avoid any APIs that implicitly use the global time zone database (like `Timestamp::in_tz` or even `Zoned::from_str`). * [#238](https://github.com/BurntSushi/jiff/pull/238): Add integration with the ICU4X project via the [`jiff-icu`] crate. `jiff-icu` provides traits for easily converting between datetime types defined in Jiff and datetime types defined in ICU4X. * [#240](https://github.com/BurntSushi/jiff/pull/240): Add integration with the SQLx project via the [`jiff-sqlx`] crate. `jiff-sqlx` provides wrapper types that implement the necessary traits in SQLx for reasonably ergonomic integration. This includes PostgreSQL and SQLite support, but not MySQL support. (It's not clear if it's possible at present to provide MySQL support for SQLx for datetime types outside of SQLx itself.) * [#241](https://github.com/BurntSushi/jiff/pull/241): Add integration with the Diesel project via the [`jiff-diesel`] crate. `jiff-diesel` provides wrapper types that implement the necessary traits in Diesel for reasonably ergonomic integration. This includes MySQL, PostgreSQL and SQLite support. 0.1.29 (2025-02-02) =================== This release includes a few small enhancements and a bug fix. In particular, there is now Serde support for `TimeZone` and the `ISOWeekDate` API has been filled out a bit more. Unless a serious issue is uncovered, my plan is that this will be the last release before `jiff 0.2`. Enhancements: * [#89](https://github.com/BurntSushi/jiff/issues/89): Opt-in support for using Serde with `jiff::tz::TimeZone` has been added. * [#227](https://github.com/BurntSushi/jiff/issues/227): The `civil::ISOWeekDate` API has been beefed up with a few convenience methods. * [#233](https://github.com/BurntSushi/jiff/issues/233): Add `tz::Offset::round` for rounding time zone offsets. Bug fixes: * [#231](https://github.com/BurntSushi/jiff/issues/231): Use more flexible offset equality when parsing offsets with fractional minutes. 0.1.28 (2025-01-27) =================== This is a small release that just removes the dev-dependency on `serde_yml`. It has been replaced with the deprecated `serde_yaml`. See [this post about `serde_yml` shenanigans](https://x.com/davidtolnay/status/1883906113428676938) for why this was done. Note that this was only a dev-dependency and thus doesn't impact folks using Jiff. Bug fixes: * [#225](https://github.com/BurntSushi/jiff/pull/225): Remove dependency on `serde_yml` in favor of `serde_yaml`. 0.1.27 (2025-01-25) =================== This is a small release with a bug fix for precision loss in some cases when doing arithmetic on `Timestamp` or `Zoned`. Bug fixes: * [#223](https://github.com/BurntSushi/jiff/issues/223): Fix the check for fractional seconds before taking the fast path. 0.1.26 (2025-01-23) =================== This is a small release with another deprecation and a new API for doing prefix parsing via `strptime`. There's also a bug fix for a corner case when dealing with daylight saving time gaps with the `Zoned::with` API. Deprecations: * [#210](https://github.com/BurntSushi/jiff/pull/210): Deprecate `ISOWeekDate::to_date` in favor of `ISOWeekDate::date`. Enhancements: * [#209](https://github.com/BurntSushi/jiff/issues/209): Add `fmt::strtime::BrokenDownTime::parse_prefix` for parsing only a prefix. Bug fixes: * [#211](https://github.com/BurntSushi/jiff/issues/211): Fix unintuitive behavior of `Zoned::with` when time falls in a DST gap. 0.1.25 (2025-01-21) =================== This release contains a number of deprecations in preparation for a `jiff 0.2` release. The deprecations are meant to facilitate a smoother transition. The deprecations, when possible, come with new APIs that will permit users to write forward compatible code that will work in both `jiff 0.1` and `jiff 0.2`. This release also includes a handful of new conversion specifiers in Jiff's `strftime` and `strptime` APIs. This improves compatibility with the analogous implementation with GNU libc. Deprecations: * [#28](https://github.com/BurntSushi/jiff/issues/28): The `intz` methods on `Zoned`, `Timestamp`, `civil::DateTime` and `civil::Date` have been deprecated in favor of `in_tz`. * [#32](https://github.com/BurntSushi/jiff/issues/32): The `Eq` and `PartialEq` trait implementations on `Span` have been deprecated in favor of using the new `SpanFieldwise` type. * [#48](https://github.com/BurntSushi/jiff/issues/48): Silently assuming days are always 24 hours in some `Span` APIs has now been deprecated. This will become an error in `jiff 0.2`. To continue assuming days are 24 hours without a relative reference date, you can use the new `SpanRelativeTo::days_are_24_hours` API. In `jiff 0.1`, you'll seen a WARN-level log message emitted if you're code will be broken by `jiff 0.2`. * [#147](https://github.com/BurntSushi/jiff/issues/147): Both `%V` and `%:V` have been deprecated in favor of `%Q` and `%:Q`. In `jiff 0.2`, `%V` will correspond to the ISO 8601 week number and `%:V` will result in an error. This change was made to improve compatibility with other `strtime` implementations. `%V` and `%:V` continue to correspond to IANA time zone identifiers in `jiff 0.1`, but using them for parsing or formatting will result in a WARN-level deprecation message. Enhancements: * [#147](https://github.com/BurntSushi/jiff/issues/147): Adds a number of new conversion specifiers to Jiff's `strftime` and `strptime` APIs. Specifically, `%C`, `%G`, `%g`, `%j`, `%k`, `%l`, `%n`, `%R`, `%s`, `%t`, `%U`, `%u`, `%W`, `%w`. Their behavior should match the corresponding specifiers in GNU libc. 0.1.24 (2025-01-16) =================== This release updates Jiff's bundled copy of the [IANA Time Zone Database] to `2025a`. See the [`2025a` release announcement] for more details. Enhancements: * [#206](https://github.com/BurntSushi/jiff/pull/206): Update `jiff-tzdb` to `2025a`. [`2025a` release announcement]: https://lists.iana.org/hyperkitty/list/tz-announce@iana.org/thread/MWII7R3HMCEDNUCIYQKSSTYYR7UWK4OQ/ 0.1.23 (2025-01-13) =================== This release includes some bug fixes, particularly for compilation on `aarch64-linux-android`. There are also some minor enhancements, such as making `Zoned::iso_week_date` a convenience function for `civil::Date::iso_week_date`, in line with similar functions. My current plan is to make a reasonably quick transition to `jiff 0.2` with a few pending breaking changes. I will be making some `jiff 0.1` releases with deprecations in order to make the transition as smooth as possible. If all goes well with `jiff 0.2`, then my plan is still to do a Jiff 1.0 release in the Summer of 2025. Deprecations: * [#197](https://github.com/BurntSushi/jiff/discussions/197): `Date::to_iso_week_date` has been deprecated in favor of `Date::iso_week_date`. Enhancements: * [#196](https://github.com/BurntSushi/jiff/discussions/196): Improve ISO week date documentation regarding weekday offsets. * [#197](https://github.com/BurntSushi/jiff/discussions/197): Add `Zoned::iso_week_date`, `DateTime::iso_week_date` and `Date::iso_week_date`. Bug fixes: * [#200](https://github.com/BurntSushi/jiff/issues/200): Fix compilation failure on Android in a Termux shell. * [#202](https://github.com/BurntSushi/jiff/pull/202): Re-add license files to crate artifact. 0.1.22 (2025-01-12) =================== This release adds support for Android. This support means that Jiff will automatically read its special concatenated time zone database, and will read the `persist.sys.timezone` property to determine the system's current time zone. See [PLATFORM] for more specific information about Android support. Note that this release also removed all non-essential files (including tests and test data) for the artifact uploaded to crates.io. If you need or want these files, please open a new issue. Enhancements: * [#140](https://github.com/BurntSushi/jiff/issues/140): Add support for the Android platform. 0.1.21 (2025-01-04) =================== This release includes a new API for setting the unit designator label in a friendly formatted duration for zero-length durations. Enhancements: * [#192](https://github.com/BurntSushi/jiff/issues/192): Add option to the friendly printer for setting the unit when writing a zero-length duration. 0.1.20 (2025-01-03) =================== This release includes a new type, `Pieces`, in the `jiff::fmt::temporal` sub-module. This exposes the individual components of a parsed Temporal ISO 8601 datetime string. It allows users of Jiff to circumvent the checks in the higher level parsing routines that prevent you from shooting yourself in the foot. For example, parsing into a `Zoned` will return an error for raw RFC 3339 timestamps like `2025-01-03T22:03-05` because there is no time zone annotation. Without a time zone, Jiff cannot do time zone aware arithmetic and rounding. Instead, such a datetime can only be parsed into a `Timestamp`. This lower level `Pieces` API now permits users of Jiff to parse this string into its component parts and assemble it into a `Zoned` if they so choose. Enhancements: * [#188](https://github.com/BurntSushi/jiff/issues/188): Add `fmt::temporal::Pieces` for granular datetime parsing and formatting. 0.1.19 (2025-01-02) =================== This releases includes a UTF-8 related bug fix and a few enhancements. Firstly, a `Span`'s default `Display` implementation now writes uppercase unit designator labels. That means you'll get `P1Y2M3DT4H5M6S` instead of `P1y2m3dT4h5m6s` by default. You can restore previous behavior via `jiff::fmt::temporal::SpanPrinter::lowercase`. This change was made to improve interoperability. Secondly, `SignedDuration` now supports rounding via `SignedDuration::round`. Note that it only supports rounding time units (hours or smaller). In order to round with calendar units, you'll still need to use a `Span`. Enhancements: * [#130](https://github.com/BurntSushi/jiff/issues/130): Document value ranges for methods like `year`, `day`, `hour` and so on. * [#187](https://github.com/BurntSushi/jiff/issues/187): Add a rounding API (for time units only) on `SignedDuration`. * [#190](https://github.com/BurntSushi/jiff/issues/190): `Span` and `SignedDuration` now use uppercase unit designator labels in their default ISO 8601 `Display` implementation. Bug fixes: * [#155](https://github.com/BurntSushi/jiff/issues/155): Relax `strftime` format strings from ASCII-only to all of UTF-8. 0.1.18 (2024-12-31) =================== This release includes a few minor enhancements. Namely, the ability to iterate over time zone transitions (in the future or the past), and some improvements to failure modes when `Timestamp` and `Span` arithmetic fails. Enhancements: * [#144](https://github.com/BurntSushi/jiff/issues/144): Add APIs for iterating over the transitions of a time zone. * [#145](https://github.com/BurntSushi/jiff/issues/145): Improve docs and error messages around fallible `Timestamp` arithmetic. 0.1.17 (2024-12-31) =================== This release enhances Jiff's support for `no_std` environments by making its `alloc` feature optional. When `alloc` is disabled, only fixed offset time zones are supported and error messages are significantly degraded. If you have core-only use cases for Jiff, I'd love to hear about them on the issue tracker. Enhancements: * [#162](https://github.com/BurntSushi/jiff/issues/162): Support platforms that do not have atomics in `std`. * [#168](https://github.com/BurntSushi/jiff/issues/168): Jiff now supports disabling the `alloc` feature, which enables core-only mode. * [#169](https://github.com/BurntSushi/jiff/issues/169): Add `TimeZone::to_fixed_offset` for accessing an invariant offset if possible. 0.1.16 (2024-12-26) =================== This release includes a new `jiff::fmt::friendly` module for formatting and parsing durations in a more human readable format than what ISO 8601 specifies. ISO 8601 remains the "default" duration format in Jiff due to its widespread support. Here are some examples: ```text 40d 40 days 1y1d 1yr 1d 3d4h59m 3 days, 4 hours, 59 minutes 3d 4h 59m 2h30m 2h 30m 1mo 1w 1 week 1w4d 1 wk 4 days 1m 0.0021s 0s 0d 0 days 3 mins 34s 123ms 3 mins 34.123 secs 3 mins 34,123s 1y1mo1d1h1m1.1s 1yr 1mo 1day 1hr 1min 1.1sec 1 year, 1 month, 1 day, 1 hour, 1 minute 1.1 seconds 1 year, 1 month, 1 day, 01:01:01.1 ``` To quickly demonstrate this new feature, here's a simple CLI program using Clap: ```ignore use clap::Parser; use jiff::{Span, Zoned}; #[derive(Parser, Debug)] #[command(version, about, long_about = None)] struct Args { duration: Span, } fn main() { let args = Args::parse(); println!("adding duration to now: {}", &Zoned::now() + args.duration); } ``` And running the program: ```text $ cargo run -q -- '1 year, 2 months, 5 hours' adding duration to now: 2026-02-26T18:58:22-05:00[America/New_York] $ cargo run -q -- 'P1Y2MT5H' # ISO 8601 durations are supported too! adding duration to now: 2026-02-26T19:00:57-05:00[America/New_York] ``` With Jiff, you should no longer need to pull in crates like [`humantime`](https://docs.rs/humantime) and [`humantime-serde`](https://docs.rs/humantime-serde) to accomplish a similar task. While this new format doesn't support any kind of internationalization, the prevalence of the `humantime` crate suggests there's a desire for something like this. The "friendly" format is meant to service all the same use cases as `humantime` does for durations, but in a way that doesn't let you shoot yourself in the foot. The new "friendly" format is now the default for the `Debug` implementations of both `Span` and `SignedDuration`. It's also available via the "alternate" `Display` implementations for `Span` and `SignedDuration` as well. Moreover, the `FromStr` trait implementations for both `Span` and `SignedDuration` will parse _both_ the ISO 8601 duration and this new "friendly" format. Finally, when `serde` integration is enabled, the `Deserialize` implementations for `SignedDuration` and `Span` also automatically parse either ISO 8601 or the friendly format. For serialization, ISO 8601 remains the default, but the `jiff::fmt::serde` module provides easy to use helpers to switch to the friendly format. The `jiff::fmt::friendly` module documentation provides many more details, including a complete grammar for the format. Enhancements: * [#143](https://github.com/BurntSushi/jiff/pull/143): Add `Hash` implementation for `Zoned` and `Timestamp`. Bug fixes: * [#60](https://github.com/BurntSushi/jiff/issues/60): Use a better `Debug` output format for `SignedDuration` and `Span`. * [#111](https://github.com/BurntSushi/jiff/issues/111): Add a new "friendly" duration format. * [#138](https://github.com/BurntSushi/jiff/issues/138): Fix deserialization in `serde_yml` and `serde_yaml` crates. * [#161](https://github.com/BurntSushi/jiff/pull/161): Fix `serde` dependency configuration so that it builds in no-std mode. 0.1.15 (2024-11-30) =================== This release fixes a bug where Jiff would sometimes fail to parse TZif files (found, typically, in `/usr/share/zoneinfo` on Unix systems). This occurred when the TZif file contained a time zone transition outside the range of Jiff's `Timestamp` type (which is `-9999-01-01` to `9999-12-31`). The bug fix works by clamping the out-of-range transitions to Jiff's supported range. This bug only seems to occur in some environments where their TZif files contain more extreme values than what is typically found. Bug fixes: * [#163](https://github.com/BurntSushi/jiff/issues/163): Fix a bug where Jiff would fail to parse some TZif files. 0.1.14 (2024-11-01) =================== This release introduces new APIs to the RFC 2822 printer that explicitly print timestamps in a format strictly compatible with [RFC 9110]. Enhancements: * [#151](https://github.com/BurntSushi/jiff/issues/151): Add `rfc2822::DateTimePrinter::timestamp_to_rfc9110_string` method. 0.1.13 (2024-09-07) =================== This release introduces a new `jiff::tz::TimeZone::try_system` API. It is like `TimeZone::system`, but returns an error instead of an automatic fall back to UTC when the system time zone could not be discovered. This also includes an update to the bundled [IANA Time Zone Database] to the `2024b` release in the `jiff-tzdb` crate. As a reminder, the bundled database is not used or included on Unix platforms by default. See [PLATFORM] for more details. Enhancements: * [#65](https://github.com/BurntSushi/jiff/issues/65): Add `TimeZone::try_system` for fallibly determining the system's time zone. * [#125](https://github.com/BurntSushi/jiff/pull/125): Update to the `2024b` release of the [IANA Time Zone Database]. 0.1.12 (2024-08-31) =================== This release introduces some new minor APIs that support formatting `Timestamp` values as RFC 3339 strings with a specific offset. Previously, using the standard formatting routines that Jiff provides, it was only possible to format a `Timestamp` using Zulu time. For example: ```rust use jiff::Timestamp; assert_eq!( Timestamp::UNIX_EPOCH.to_string(), "1970-01-01T00:00:00Z", ); ``` This is fine most use cases, but it can be useful on occasion to format a `Timestamp` with a specific offset. While this isn't as expressive as formatting a datetime with a time zone (e.g., with an IANA time zone identifier), it may be useful in contexts where you just want to "hint" at what a user's local time is. To that end, there is a new `Timestamp::display_with_offset` method that makes this possible: ```rust use jiff::{tz, Timestamp}; assert_eq!( Timestamp::UNIX_EPOCH.display_with_offset(tz::offset(-5)).to_string(), "1969-12-31T19:00:00-05:00", ); ``` A corresponding API was added to `jiff::fmt::temporal::DateTimePrinter` for lower level use. Moreover, this release also includes new convenience APIs on the Temporal and RFC 2822 printer types for returning strings. For example, previously, if you were using the RFC 2822 printer to format a `Timestamp`, you had to do this: ```rust use jiff::{fmt::rfc2822::DateTimePrinter, Timestamp}; let mut buf = String::new(); DateTimePrinter::new().print_timestamp(&Timestamp::UNIX_EPOCH, &mut buf).unwrap(); assert_eq!(buf, "Thu, 1 Jan 1970 00:00:00 -0000"); ``` But now you can just do this: ```rust use jiff::{fmt::rfc2822::DateTimePrinter, Timestamp}; assert_eq!( DateTimePrinter::new().timestamp_to_string(&Timestamp::UNIX_EPOCH).unwrap(), "Thu, 1 Jan 1970 00:00:00 -0000", ); ``` Enhancements: * [#122](https://github.com/BurntSushi/jiff/pull/122): Support formatting `Timestamp` to an RFC 3339 string with a specific offset. 0.1.11 (2024-08-28) =================== This release includes a few small enhancements that have been requested over the last several weeks. The biggest enhancement is a new `jiff::fmt::serde` sub-module. It provides convenience routines similar to Chrono's `chrono::serde` sub-module for serializing and deserializing between a `jiff::Timestamp` and an integer number of seconds, milliseconds, microseconds or nanoseconds. For example: ```rust use jiff::Timestamp; #[derive(serde::Serialize, serde::Deserialize)] struct Record { #[serde(with = "jiff::fmt::serde::timestamp::second::required")] timestamp: Timestamp, } let json = r#"{"timestamp":1517644800}"#; let got: Record = serde_json::from_str(&json).unwrap(); assert_eq!(got.timestamp, Timestamp::from_second(1517644800).unwrap()); assert_eq!(serde_json::to_string(&got).unwrap(), json); ``` If you need to support optional timestamps via `Option`, then use `jiff::fmt::serde::timestamp::second::optional` instead. Similarly, if you need to support milliseconds instead of seconds, then replace `second` with `millisecond` in the module path. Enhancements: * [#78](https://github.com/BurntSushi/jiff/issues/78): Add `BrokenDownTime::set_{offset,iana_time_zone}` APIs. * [#93](https://github.com/BurntSushi/jiff/issues/93): Add note about using `Timestamp::now().to_zoned()` instead of `Zoned::now().with_time_zone()`. * [#101](https://github.com/BurntSushi/jiff/issues/101): Add new `jiff::fmt::serde` module for integration with integer timestamps. * [#117](https://github.com/BurntSushi/jiff/pull/117): Remove `unsafe` usage in `libm` functions (applicable only to no-std users). 0.1.10 (2024-08-23) =================== This release features a small bug fix where Jiff will detect an IANA time zone identifier in some cases where it wouldn't before. While Jiff would previously read the symlink metadata on `/etc/localtime` by default to discover the system configured time zone on Unix systems, it *wouldn't* do so when `TZ=/etc/localtime`. There's really no reason not to, so this release of Jiff is fixed to use symlink sniffing on file paths provided by the `TZ` environment variable. Bug fixes: * [#113](https://github.com/BurntSushi/jiff/issues/113): When `TZ=/etc/localtime`, use symlink metadata to detect IANA identifier. 0.1.9 (2024-08-23) ================== This release introduces new options for controlling the precision of fractional seconds when printing `Zoned`, `Timestamp`, `civil::DateTime` or `civil::Time` values. This is principally exposed via `jiff::fmt::temporal::DateTimePrinter::precision`, but it's also available via the standard library's formatting machinery. For example, if `zdt` is a `jiff::Zoned`, then `format!("{zdt:.6}")` will format it into a string with microsecond precision, even if its fractional component is zero. Enhancements: * [#92](https://github.com/BurntSushi/jiff/issues/92): Support setting the precision of fractional seconds when printing datetimes. 0.1.8 (2024-08-19) ================== This releases fixes a build error in Jiff's `alloc`-only configuration. This regression was introduced in `jiff 0.1.6`. Bug fixes: * [#108](https://github.com/BurntSushi/jiff/issues/108): Use `core::time::Duration` everywhere instead of `std::time::Duration`. 0.1.7 (2024-08-18) ================== This release relaxes Jiff's dependency on `windows-sys` to include multiple semver incompatible releases. The purpose of this relaxation is to enable Jiff to work with different versions of `windows-sys` in the hopes that this reduces the likelihood that multiple copies of `windows-sys` are included in your dependency tree. Dependencies: * [#106](https://github.com/BurntSushi/jiff/pull/106): Relax `windows-sys` dependency constraint to `>=0.52.0, <=0.59.*`. 0.1.6 (2024-08-18) ================== This release includes a new top-level type, `SignedDuration`, that provides a near exact replica of `std::time::Duration`, but signed. It is meant to provide alternative APIs for working with durations at a lower level than what `Span` provides, and to facilitate better integration with the standard library. A `SignedDuration` has also been integrated with all of Jiff's datetime types. For example, previously, `Zoned::checked_add` only accepted a concrete `jiff::Span`. But now it accepts a `jiff::Span`, `jiff::SignedDuration` or even a `std::time::Duration`. Moreover, all of the `until` and `since` APIs on datetime types have been ported and copied to return `SignedDuration` under the `duration_until` and `duration_since` names. This marks an initial integration phase with `SignedDuration`. It is planned to integrate it more with the datetime types. Currently, there are integrations on `Timestamp` and `Span`, but more will be added in the future. Overall, folks should still use `Span`. That is the intended default duration type in Jiff and will continue to be. Users of Jiff may find `SignedDuration` useful in contexts where speed is important or when one needs to integrate with the standard library. This release also includes a few related deprecations as the APIs involving `std::time::Duration` are phased out in favor of `SignedDuration`. Deprecations: * `Timestamp::as_duration`: replaced with `as_jiff_duration`, which will be renamed to `as_duration` in `jiff 0.2`. * `Timestamp::from_duration`: replaced with `from_jiff_duration`, which will be renamed to `from_duration` in `jiff 0.2`. * `Timestamp::from_signed_duration`: replaced with `from_jiff_duration`. * `Span::to_duration`: replaced with `to_jiff_duration`, which will be renamed to `to_duration` in `jiff 0.2`. Basically, all of the above APIs either accept or return a `std::time::Duration`. To avoid breaking changes at this point, new methods for `SignedDuration` were added. For example, `Timestamp::as_jiff_duration`. In `jiff 0.2`, the above deprecated methods will be removed and replaced with equivalent methods that accept or return a `SignedDuration` instead. Callers can then convert between a `SignedDuration` and a `std::time::Duration` using appropriate `TryFrom` trait implementations. Enhancements: * [#21](https://github.com/BurntSushi/jiff/issues/21): Add new top-level `SignedDuration` type. * [#90](https://github.com/BurntSushi/jiff/issues/90): Improve error message when using `Span` with >=day units with a `Timestamp`. Performance: * [#104](https://github.com/BurntSushi/jiff/pull/104) Optimize offset calculations in time zones without DST. * [#105](https://github.com/BurntSushi/jiff/pull/105) Optimize offset calculations for timestamps after last DST rule change. 0.1.5 (2024-08-09) ================== This release includes some improvements and bug fixes, particularly for Jiff's `strtime` APIs. Enhancements: * [#63](https://github.com/BurntSushi/jiff/issues/63): Add link to original Chrono maintainer's commentary in `DESIGN.md`. * [#75](https://github.com/BurntSushi/jiff/issues/75): Add support for `%V` for formatting _and_ parsing IANA time zone identifiers. * [#79](https://github.com/BurntSushi/jiff/pull/79): Add `devcontainer.json` to support GitHub Codespaces. * [#85](https://github.com/BurntSushi/jiff/pull/85): Set correct ranges for internal tracking in return value of `days_in_month`. Bug fixes: * [#59](https://github.com/BurntSushi/jiff/issues/59): Fixes a bug where some `Span`s could not be roundtripped through ISO 8601. * [#71](https://github.com/BurntSushi/jiff/issues/71): Tweak wording in documentation of "printf"-style API. * [#73](https://github.com/BurntSushi/jiff/issues/73): Make it so `%.Nf` only formats to `N` decimal places. * [#77](https://github.com/BurntSushi/jiff/pull/77): Disable optimizations when running tests. 0.1.4 (2024-08-01) ================== This release includes a small improvement for `strptime` that permits `%Y%m%d` to parse `20240730` correctly. Enhancements: * [#62](https://github.com/BurntSushi/jiff/issues/62): Tweak `strptime` so that things like `%Y` aren't unceremoniously greedy. 0.1.3 (2024-07-30) ================== This release features support for `wasm32-unknown-unknown`. That is, when Jiff's new `js` crate feature is enabled, Jiff will automatically use JavaScript APIs to determine the current time and time zone. Enhancements: * [#58](https://github.com/BurntSushi/jiff/pull/58): Add WASM support and a new `PLATFORM.md` guide. 0.1.2 (2024-07-28) ================== This release features a few new APIs that a need for arose while experimenting with actually using Jiff in real projects. Namely, the `jiff::fmt::strtime` module now has `%f` and `%.f` directives for parsing and formatting fractional seconds. And both `jiff::fmt::rfc2822` and `jiff::fmt::strtime` now have support for skipping weekday checks during parsing. (Previously, Jiff required that an English weekday be consistent with the date parsed, and there was no way to opt out. While this is still the default behavior, callers can disable this check.) Enhancements: * [#52](https://github.com/BurntSushi/jiff/pull/52): Improve documentation for `Span` getter methods. * [#53](https://github.com/BurntSushi/jiff/pull/53): Add support for skipping weekday checking when parsing datetimes. * [#55](https://github.com/BurntSushi/jiff/pull/55): Add support for fractional seconds in `jiff::fmt::strtime`. Bug fixes: * [#49](https://github.com/BurntSushi/jiff/pull/49): Fix informational regex describing ISO 8601 format. * [#51](https://github.com/BurntSushi/jiff/pull/51): Explicitly allow new deny-by-default lint `ambiguous_negative_literals`. 0.1.1 (2024-07-25) ================== This is a new semver compatible release. The principle addition are APIs for converting between a `jiff::Span` and a `std::time::Duration`. Specifically, there are now `TryFrom for Duration` and `TryFrom for Span` trait implementations. There is also a `Span::to_duration`, which requires a relative date, for converting spans with non-uniform units (like months) to a `Duration`. Enhancements: * [#21](https://github.com/BurntSushi/jiff/issues/21), [#40](https://github.com/BurntSushi/jiff/issues/40): Adds APIs for converting between `Span` and `std::time::Duration`. Bug fixes: * [#36](https://github.com/BurntSushi/jiff/issues/36): Saturating arithmetic for `Timestamp` panics with day-or-greater units. * [#38](https://github.com/BurntSushi/jiff/issues/38): Fix some bugs in the micro-benchmarks. * [#39](https://github.com/BurntSushi/jiff/issues/39): Document that the RFC 2822 parser is not technically fully spec compliant. 0.1.0 (2024-07-21) ================== The initial release of Jiff. [IANA Time Zone Database]: https://www.iana.org/time-zones [PLATFORM]: PLATFORM.md [RFC 9110]: https://datatracker.ietf.org/doc/html/rfc9110#section-5.6.7-15 [`jiff-icu`]: https://docs.rs/jiff-icu [`jiff-sqlx`]: https://docs.rs/jiff-sqlx [`jiff-diesel`]: https://docs.rs/jiff-diesel [ICU4X project]: https://github.com/unicode-org/icu4x [SQLx]: https://github.com/launchbadge/sqlx [Diesel]: https://github.com/diesel-rs/diesel [Discussions on GitHub]: https://github.com/BurntSushi/jiff/discussions # CHANGELOG 0.2.24 (2026-04-23) =================== This release primarily adds a new `memory_usage` routine for reporting heap allocation sizes for the `TimeZone` and `Zoned` types. This release also acknowledges and updates the timeline expectations for a Jiff 1.0 release in `README.md`. Enhancements: * [#520](https://github.com/BurntSushi/jiff/issues/520): Add `memory_usage` to the `TimeZone` and `Zoned` types. * [#535](https://github.com/BurntSushi/jiff/pull/535): Improve comment in `Span::checked_add` example. Bug fixes: * [#541](https://github.com/BurntSushi/jiff/pull/541): Update Jiff 1.0 timeline. 0.2.23 (2026-03-03) =================== This release updates Jiff's bundled copy of the [IANA Time Zone Database] to `2026a`. See the [`2026a` release announcement] for more details. [`2026a` release announcement]: https://lists.iana.org/hyperkitty/list/tz-announce@iana.org/thread/ASPLBE3A4BAEXIOQ3KZ6EJSJWBU6L53G/ 0.2.22 (2026-02-28) =================== This release includes a bug fix where fallible conversions from signed durations to unsigned durations could panic in some cases. Bug fixes: * [#526](https://github.com/BurntSushi/jiff/issues/526): Fix a panicking bug that occurs for `std::time::Duration::try_from(SignedDuration::new(0, -1))`. 0.2.21 (2026-02-22) =================== This release contains a performance improvement and a bug fix for `civil::Date::new` where it could panic on some inputs. Bug fixes: * [#523](https://github.com/BurntSushi/jiff/issues/523): Fix a bug where `Date::new` could panic. This was a regression introduced in `jiff 0.2.20`. Performance: * [#518](https://github.com/BurntSushi/jiff/pull/518): Improve `Timestamp` to `civil::DateTime` conversion performance by ~15%. 0.2.20 (2026-02-11) =================== This release contains a major internal refactor that moves off of using ranged integers internally. There are also some small bug fixes and added support for finding the system time zone on emscripten targets. Enhancements: * [#11](https://github.com/BurntSushi/jiff/issues/11): Stop using ranged integers internally. * [#490](https://github.com/BurntSushi/jiff/issues/490): Add support for retrieving the system time zone on emscripten targets. * [#500](https://github.com/BurntSushi/jiff/issues/500): Update comparison with the `time` crate in the Jiff documentation. * [#502](https://github.com/BurntSushi/jiff/issues/502): Enable some non-default features for the Rust Playground deployment. Bug fixes: * [#485](https://github.com/BurntSushi/jiff/issues/485): Fix bug with padding for negative integers in `strftime`. * [#486](https://github.com/BurntSushi/jiff/issues/486): Make `%^c` result in uppercase strings where appropriate. 0.2.19 (2026-02-05) =================== This is a small release with a performance optimization (with respect to doing heavily contended arithmetic on `Zoned` values) and a bug fix for a panic that can occur when using `%2s` in `strftime`. Enhancements: * [#491](https://github.com/BurntSushi/jiff/issues/491): Avoid cloning `TimeZone` for consuming operations on `Zoned`. Bug fixes: * [#497](https://github.com/BurntSushi/jiff/issues/497): Fix a panic in `timestamp.strftime("%2s")`. 0.2.18 (2026-01-05) =================== This release ships a sizeable refactor to the RFC 2822, RFC 9110, RC 3339, RFC 9557, ISO 8601 and friendly format printers. Specifically, they are now all monomorphic internally (instead of being generic over `jiff::fmt::Write`) and write to uninitialized buffers. This improves runtime performance (sometimes dramatically so), and to a more modest degree, decreases binary size and improves compile times. This release also includes a bug fix where `DateTime::MIN.to_zoned(..)` could panic. Enhancements: * [#460](https://github.com/BurntSushi/jiff/pull/460): Improve runtime performance and binary size of RFC 2822 printer. * [#461](https://github.com/BurntSushi/jiff/pull/461): Tweak behavior of printing min/max offsets in RFC 2822 and Temporal printers. * [#462](https://github.com/BurntSushi/jiff/pull/462): Export fallible constructors for `jiff::SignedDuration`. * [#465](https://github.com/BurntSushi/jiff/pull/465): Improve runtime performance and binary size of the "friendly" duration printer. * [#468](https://github.com/BurntSushi/jiff/pull/468): Improve runtime performance and binary size of the Temporal ISO 8601 duration printer. * [#470](https://github.com/BurntSushi/jiff/pull/470): Improve runtime performance and binary size of the Temporal ISO 8601 datetime printer. * [#474](https://github.com/BurntSushi/jiff/pull/474): Improve runtime performance and binary size of Jiff's `strftime` implementation. * [#477](https://github.com/BurntSushi/jiff/pull/477): Fix a bug where time zone lookups for `civil::DateTime::MIN` could panic. 0.2.17 (2025-12-24) =================== This release contains binary size improvements to Jiff, more succinct error messages and some new minor APIs. While Jiff 1.0 is overdue, I've been doing a lot of experimenting with improving Jiff's binary size and compile times. In particular, I want to spend time doing this before Jiff 1.0 so that we don't box ourselves into a corner. (For example, some binary size improvements may require minor API breaking changes.) In this release, Jiff has switched to structured error handling internally in an effort to provide error predicates and also hopefully improve binary sizes and compile times. Overall this didn't have as big of an impact on binary sizes or compile times as I was hoping. I did take this opportunity to make Jiff's error messages a bit more succinct. In many cases, this involved de-duplicating some aspects of error messages and omitting user provided input in the messages. If you feel like there is a significant decrease in error message quality that isn't easily amended by callers providing additional context themselves, please open an issue. This release also updates Jiff's bundled copy of the [IANA Time Zone Database] to `2025c`. See the [`2025c` release announcement] for more details. Enhancements: * [#412](https://github.com/BurntSushi/jiff/issues/412): Add `Display`, `FromStr`, `Serialize` and `Deserialize` trait implementations for `jiff::civil::ISOWeekDate`. These all use the ISO 8601 week date format. * [#418](https://github.com/BurntSushi/jiff/issues/418): Add some basic predicates to `jiff::Error` for basic error introspection. * [#453](https://github.com/BurntSushi/jiff/pull/453), [#454](https://github.com/BurntSushi/jiff/pull/454): Switch to structured error handling internally. * [#456](https://github.com/BurntSushi/jiff/pull/456), [#457](https://github.com/BurntSushi/jiff/pull/457), [#458](https://github.com/BurntSushi/jiff/pull/458): Various improvements to binary size. [`2025c` release announcement]: https://lists.iana.org/hyperkitty/list/tz-announce@iana.org/thread/TAGXKYLMAQRZRFTERQ33CEKOW7KRJVAK/ 0.2.16 (2025-11-07) =================== This release contains a number of enhancements and bug fixes that have accrued over the last few months. Most are small polishes. A couple of the bug fixes apply to panics that could occur when parsing invalid `TZ` strings or invalid `strptime` format strings. Also, parsing into a `Span` should now be much faster (for both the ISO 8601 and "friendly" duration formats). Enhancements: * [#298](https://github.com/BurntSushi/jiff/issues/298): Add Serde helpers for (de)serializing `std::time::Duration` values. * [#396](https://github.com/BurntSushi/jiff/issues/396): Add `Sub` and `Add` trait implementations for `Zoned` (in addition to the already existing trait implementations for `&Zoned`). * [#397](https://github.com/BurntSushi/jiff/pull/397): Add `BrokenDownTime::set_meridiem` and ensure it overrides the hour when formatting. * [#409](https://github.com/BurntSushi/jiff/pull/409): Switch dependency on `serde` to `serde_core`. This should help speed up compilation times in some cases. * [#430](https://github.com/BurntSushi/jiff/pull/430): Add new `Zoned::series` API, making it consistent with the same API on other datetime types. * [#432](https://github.com/BurntSushi/jiff/pull/432): When `lenient` mode is enabled for `strftime`, Jiff will no longer error when the formatting string contains invalid UTF-8. * [#432](https://github.com/BurntSushi/jiff/pull/432): Formatting of `%y` and `%g` no longer fails based on the specific year value. * [#432](https://github.com/BurntSushi/jiff/pull/432): Parsing of `%s` is now a bit more consistent with other fields. Moreover, `BrokenDownTime::{to_timestamp,to_zoned}` will now prefer timestamps parsed with `%s` over any other fields that have been parsed. * [#433](https://github.com/BurntSushi/jiff/pull/433): Allow parsing just a `%s` into a `Zoned` via the `Etc/Unknown` time zone. Bug fixes: * [#386](https://github.com/BurntSushi/jiff/issues/386): Fix a bug where `2087-12-31T23:00:00Z` in the `Africa/Casablanca` time zone could not be round-tripped (because its offset was calculated incorrectly as a result of not handling "permanent DST" POSIX time zones). * [#407](https://github.com/BurntSushi/jiff/issues/407): Fix a panic that occurred when parsing an empty string as a POSIX time zone. * [#410](https://github.com/BurntSushi/jiff/issues/410): Fix a panic that could occur when parsing `%:` via `strptime` APIs. * [#414](https://github.com/BurntSushi/jiff/pull/414): Update some parts of the documentation to indicate that `TimeZone::unknown()` is a fallback for `TimeZone::system()` (instead of the `jiff 0.1` behavior of using `TimeZone::UTC`). * [#423](https://github.com/BurntSushi/jiff/issues/423): Fix a panicking bug when reading malformed TZif data. * [#426](https://github.com/BurntSushi/jiff/issues/426): Fix a panicking bug when parsing century (`%C`) via `strptime`. * [#445](https://github.com/BurntSushi/jiff/pull/445): Fixed bugs with parsing durations like `-9223372036854775808s` and `-PT9223372036854775808S`. Performance: * [#445](https://github.com/BurntSushi/jiff/pull/445): Parsing into `Span` or `SignedDuration` is now a fair bit faster in some cases. 0.2.15 (2025-06-13) =================== This release fixes a bug where error values were being constructed during parsing even in the success case. This was a regression introduced in `0.2.14` as a result of trying to improve compilation times. Thankfully, fixing this regression doesn't seem to meaningfully impact the amount of IR generated by compiling Jiff. Bug fixes: * [#385](https://github.com/BurntSushi/jiff/pull/385): Fixes a performance regression for parsing. 0.2.14 (2025-05-20) =================== This release includes a smattering of bug fixes, and hopefully a small improvement to the time it takes to compile Jiff. Also, in this release, when `TZ` is set to a non-empty but invalid value, Jiff will always fall back to `Etc/Unknown` when using `TimeZone::system()`. This differs from previous behavior where Jiff would, in this case, attempt to read the system's default time zone. This change brings Jiff into consistency with existing Unix tooling like `date`, and is also arguably a better failure mode. That is, when `TZ` is set but invalid, we shouldn't silently fall back to the default system time zone, but instead do something that indicates something has potentially gone wrong. Enhancements: * [#364](https://github.com/BurntSushi/jiff/issues/364): Jiff now falls back to `Etc/Unknown` for invalid `TZ` values. * [#379](https://github.com/BurntSushi/jiff/pull/379): Improve compilation times. Bug fixes: * [#365](https://github.com/BurntSushi/jiff/issues/365): Fixes a compile error in Jiff when only the `tzdb-concatenated` feature was enabled. * [#366](https://github.com/BurntSushi/jiff/issues/366): Fixes slow initial `Zoned::now()` in environments where `/usr/share/zoneinfo` is on a very slow file system (like CI environments). * [#376](https://github.com/BurntSushi/jiff/issues/376): Avoids searching for a tzdb at `/usr/share/zoneinfo` on Windows. 0.2.13 (2025-05-05) =================== This release fixes a bug in a corner case where `TimeZone::following` could sometimes omit the last time zone transition. This could only happen in time zones that once had daylight saving time, but ended it. This did not have an impact on other Jiff APIs that handle daylight saving time. Bug fixes: * [#362](https://github.com/BurntSushi/jiff/issues/362): Fix a bug where `TimeZone::following` could omit the last historical time zone transition. 0.2.12 (2025-05-03) =================== This release fixes a couple bugs in Jiff's parser. In particular, a regression was introduced in `jiff 0.2.11` where its RFC 2822 parser could panic on some inputs. Previous releases of Jiff are unaffected. Bug fixes: * [#357](https://github.com/BurntSushi/jiff/issues/357): Fix a bug where parsing `1970-06-01T00-00:45:00[Africa/Monrovia]` succeeded but it should fail. * [#359](https://github.com/BurntSushi/jiff/issues/359): Fix a bug where the RFC 2822 parser could panic on some inputs. 0.2.11 (2025-05-01) =================== This release includes new APIs for customizing Jiff's `strtime` behavior along with a few minor bug fixes. Jiff's `strtime` formatting API has also been optimized. It's about twice as fast as it was. This release also coincides with the publication of `jiff-icu 0.2.0-beta.2`, which has support for `icu 2.0.0-beta.2`. Enhancements: * [#338](https://github.com/BurntSushi/jiff/pull/338): Add support for the `%c`, `%r`, `%X` and `%x` conversion specifiers. * [#341](https://github.com/BurntSushi/jiff/issues/341): Add support for `%q` in `jiff::fmt::strtime` (prints quarter of year). * [#342](https://github.com/BurntSushi/jiff/issues/342): Add support for `%::z` and `%:::z` in `jiff::fmt::strtime`. * [#344](https://github.com/BurntSushi/jiff/issues/344): Add support for `%N` in `jiff::fmt::strtime` (alias for `%9f`). * [#350](https://github.com/BurntSushi/jiff/issues/350): Add a "lenient" mode for `strtime` formatting APIs that ignores most errors. Bug fixes: * [#328](https://github.com/BurntSushi/jiff/issues/328): Document default precision behavior of `Display` impls for datetime types. * [#340](https://github.com/BurntSushi/jiff/issues/340): Allow whitespace in more places in RFC 2822 parser (improves spec compliance). * [#346](https://github.com/BurntSushi/jiff/issues/346): `TimeZone::get("UTC")` should now always return `TimeZone::UTC`. Performance: * [#338](https://github.com/BurntSushi/jiff/pull/338): Jiff's `strftime` APIs are now approximately twice as fast as they were. Performance should be comparable to `chrono` and `time`'s prebuilt APIs. 0.2.10 (2025-04-21) =================== This release includes a bug fix for parsing `Tuesday` when using `%A` via Jiff's `strptime` APIs. Specifically, it would recognize `Tueday` instead of `Tuesday`. Bug fixes: * [#333](https://github.com/BurntSushi/jiff/issues/333): Fix typo in `strptime` parsing from `Tueday` to `Tuesday`. 0.2.9 (2025-04-19) ================== This release includes a bug fix that, in debug mode, could result in datetime types having different hashes for the same value. This could cause problems, for example, if you are using datetimes as keys in a hash map. This problem didn't exist when Jiff was compiled in release mode. This release also improves the panic message shown when the `js` feature isn't enabled and the current time is requested on `wasm32-unknown-unknown` targets. Enhancements: * [#296](https://github.com/BurntSushi/jiff/issues/296): Provide a better panic message when `Zoned::now()` fails on WASM. Bug fixes: * [#330](https://github.com/BurntSushi/jiff/issues/330): Fix bug where `Hash` on datetime types could yield different hash values for the same underlying date/time. 0.2.8 (2025-04-13) ================== This release fixes a bug where the constructors on `SignedDuration` for floating point durations could panic (in debug mode) or produce incorrect results (in release mode). This bug only impacts users of the `try_from_secs_{f32,f64}` and `from_secs_{f32,f64}` methods on `SignedDuration`. Enhancements: * [#326](https://github.com/BurntSushi/jiff/pull/326): Add an alternate `Debug` impl for `SignedDuration` that only shows its second and nanosecond components (while using only one component when the other is zero). Bug fixes: * [#324](https://github.com/BurntSushi/jiff/issues/324): Fix a bug that could produce a panic or incorrect results in `SignedDuration::(try_)?from_secs_{f32,f64}`. 0.2.7 (2025-04-13) ================== This release includes a bug fix that changes how an empty but set `TZ` environment variable is interpreted (as indistinguishable from `TZ=UTC`). This also includes a new enabled by default create feature, `perf-inline`, which allows toggling Jiff's use of `inline(always)`. This may help improve compile times or decrease binary size. Enhancements: * [#320](https://github.com/BurntSushi/jiff/pull/320): Remove some internal uses of generics to mildly improve compile times. * [#321](https://github.com/BurntSushi/jiff/pull/321): Add `perf-inline` crate feature for controlling `inline(always)` annotations. Bug fixes: * [#311](https://github.com/BurntSushi/jiff/issues/311): Make `TZ=` indistinguishable from `TZ=UTC`. 0.2.6 (2025-04-07) ================== This release includes a few bug fixes and support for discovering the IANA Time Zone Database automatically on Illumos. Enhancements: * [#315](https://github.com/BurntSushi/jiff/issues/315): Add support for automatically finding the tzdb on Illumos. Bug fixes: * [#305](https://github.com/BurntSushi/jiff/issues/305): Fixed `Zoned` rounding on days with DST time zone transitions. * [#309](https://github.com/BurntSushi/jiff/issues/309): Fixed bug where `TimeZone::preceding` could omit historical time zone transitions for time zones that have eliminated DST in the present. * [#312](https://github.com/BurntSushi/jiff/issues/312): Fixed `nth_weekday_in_month`, where it would sometimes incorrectly return an error. 0.2.5 (2025-03-22) ================== This release updates Jiff's bundled copy of the [IANA Time Zone Database] to `2025b`. See the [`2025b` release announcement] for more details. Enhancements: * [#300](https://github.com/BurntSushi/jiff/pull/300): Update `jiff-tzdb` to `2025b`. [`2025b` release announcement]: https://lists.iana.org/hyperkitty/list/tz-announce@iana.org/thread/6JVHNHLB6I2WAYTQ75L6KEPEQHFXAJK3/ 0.2.4 (2025-03-10) ================== This is another small release that fixes a problem where Jiff could break builds if they relied on inference for integer comparisons. Specifically, Jiff uses internal trait impls to make comparing its internal ranged integers more convenient. But Rust the language has no concept of "internal" trait impls, and thus this can impact type inference. If code was written in a way that relies on a singular trait impl that is available, then adding Jiff to the project can cause it to break. This isn't arguably Jiff's fault per se, but since these trait impls were just about internal convenience and not essential to Jiff's design, we adopt a pragmatic approach and just remove them. Bug fixes: * [#293](https://github.com/BurntSushi/jiff/issues/293): Remove internal trait impls that can cause breaks due to inference failures. 0.2.3 (2025-03-07) ================== This is a small release that fixes a bug in the handling of POSIX time zones in some cases. Specifically, the implementation of `Date::yesterday` was wrong when the date was the first of the month. This was a regression introduced in `0.2.2` and was not present in older releases. More test coverage has been added. Bug fixes: * [#290](https://github.com/BurntSushi/jiff/issues/290): Fix bug in implementation of `Date::yesterday`. 0.2.2 (2025-03-06) ================== This release of Jiff includes a new opt-in proc macro for embedding a `TimeZone` into your binary. Just enable Jiff's `static` feature, and this will print the current time in the `America/New_York` time zone: ```rust use jiff::{ tz::{self, TimeZone}, Timestamp, }; fn main() { static TZ: TimeZone = tz::get!("America/New_York"); let zdt = Timestamp::now().to_zoned(TZ.clone()); println!("{zdt}"); } ``` This enables `TimeZone` to be meaningfully used in core-only environments, even when dynamic memory allocation isn't available. This release also features a number of performance improvements for time zone lookups. In some cases, the improvement is significant (by an order of magnitude). Additionally, the IANA Time Zone Database embedded into `jiff-tzdb` now uses "rearguard" semantics. This means that the boolean flag indicating whether daylight saving time is active or not (only accessible via `TimeZone::to_offset_info`) will respect the actual definition of daylight saving time. (This is relevant, for example, for time zones like `Europe/Dublin`, where their summer time is _legally_ known as their standard time, but is in effect daylight saving time.) Enhancements: * [#256](https://github.com/BurntSushi/jiff/issues/256): Add `tz::{get,include}` macros for time zone support in core-only environments. * [#258](https://github.com/BurntSushi/jiff/issues/258): Switch to `rearguard` tzdb data in `jiff-tzdb` and document it. * [#259](https://github.com/BurntSushi/jiff/pull/259): De-duplicate TZif data in `jiff-tzdb`. * [#273](https://github.com/BurntSushi/jiff/issues/273): Add "crate features" documentation to `jiff-sqlx` and `jiff-diesel`. * [#277](https://github.com/BurntSushi/jiff/issues/277): Document semver guarantee for error conditions on `Timestamp` constructors. * [#277](https://github.com/BurntSushi/jiff/pull/287): Greatly optimize time zone lookups (for both timestamps and civil datetimes). Bug fixes: * [#261](https://github.com/BurntSushi/jiff/issues/261): Improve the documentation for `ZonedWith::nanosecond` and `ZonedWith::subsec_nanosecond`. 0.2.1 (2025-02-16) ================== This release includes a massive number of optimizations that significantly improves performance in some cases. If you had a workload whose performance with Jiff was underwhelming, please give it a try. I welcome questions via [Discussions on GitHub]. This release also provides a new API, `Timestamp::constant`, for constructing `Timestamp` values in a `const` context. Enhancements: * [#235](https://github.com/BurntSushi/jiff/discussions/235), [#255](https://github.com/BurntSushi/jiff/discussions/255), [#266](https://github.com/BurntSushi/jiff/pull/266): A massive number of performance improvements. Jiff should now generally be faster than `chrono` and `time`. * [#263](https://github.com/BurntSushi/jiff/issues/263): Add `Timestamp::constant` for constructing timestamps in `const` context. 0.2.0 (2025-02-10) ================== This is a new semver incompatible release of Jiff. It contains several breaking changes. I expect most users of Jiff to be able to upgrade without any changes. The fundamental API organization of Jiff has not changed. Some of the highlights of this release include reducing footguns and better ecosystem integration. For reducing footguns, APIs on `Span` will no longer implicitly assume that days are always 24 hours long. And `Span` no longer implements `PartialEq` or `Eq` (instead favoring `span.fieldwise()` to create a value that supports naive fieldwise comparison). Moreover, when using `TimeZone::system()` (perhaps via `Zoned::now()`), if the system time zone could not be detected, then a special `Etc/Unknown` time zone will be used instead. This avoids erroring, but also surfaces itself to make it clearer that something has (perhaps) gone wrong. As for ecosystem integration, this release coincides with the publication of the [`jiff-icu`], [`jiff-sqlx`] and [`jiff-diesel`] crates. `jiff-icu` integrates with the [ICU4X project], and is now the recommended way to use Jiff to work with non-Gregorian calendars or to localize datetimes for end users. `jiff-sqlx` and `jiff-diesel` provide wrapper types that implement the necessary traits to make it ergonomic to store and retrieve Jiff values in a database using [SQLx] or [Diesel], respectively. Unless something unexpected happens, my plan is for the next breaking change release to be Jiff 1.0 in about 6 months. Once Jiff 1.0 is out, I plan to commit to it indefinitely. **BREAKING CHANGES**: This is an exhaustive list of breaking changes. Changes with the bolded **RUNTIME** prefix are changes that will not be caught by the Rust compiler. That is, they are changes in runtime behavior. * [#28](https://github.com/BurntSushi/jiff/issues/28): The deprecated `intz` routines on `Zoned`, `Timestamp`, `civil::DateTime` and `civil::Date` have been removed. You can use `in_tz` instead. This change was made because many found the name `intz` to be unclear. * [#32](https://github.com/BurntSushi/jiff/issues/32): The `PartialEq` and `Eq` trait implementations on `Span` have been removed. Ideally these shouldn't have been used, but if you do need them, please use `Span::fieldwise` to create a `SpanFieldwise`, which does have the `PartialEq` and `Eq` traits implemented. These were removed on `Span` itself because they made it very easy to commit subtle bugs. * [#36](https://github.com/BurntSushi/jiff/issues/36): Turn panics during `Timestamp::saturing_add` into errors. Callers adding spans that are known to contain units of hours or smaller are guaranteed that this will not return an error. * **RUNTIME** [#48](https://github.com/BurntSushi/jiff/issues/48): On `Span` APIs, days are no longer silently assumed to always be 24 hours when a relative datetime is not provided. Instead, to perform operations on units of days or bigger, callers must either provide a relative date or opt into invariant 24-hour days with `SpanRelativeTo::days_are_24_hours`. Shortcuts have been added to the span builders. For example, `SpanTotal::days_are_24_hours`. * **RUNTIME** [#147](https://github.com/BurntSushi/jiff/issues/147): Change the behavior of the deprecated `%V` conversion specifier in `jiff::fmt::strtime` from formatting an IANA time zone identifier to formatting an ISO 8601 week number. To format an IANA time zone identifier, use `%Q` or `%:Q` (which were introduced in `jiff 0.1`). * **RUNTIME** [#212](https://github.com/BurntSushi/jiff/issues/212): When parsing into a `Zoned` with a civil time corresponding to a gap, we treat all offsets as invalid and return an error. Previously, we would accept the offset as given. This brings us into line with Temporal's behavior. For example, previously Jiff accepted `2006-04-02T02:30-05[America/Indiana/Vevay]` but will now return an error. This is desirable for cases where a datetime in the future is serialized before a change in the daylight saving time rules. For more examples, see `jiff::fmt::temporal::DateTimeParser::offset_conflict` for details on how to change Jiff's default behavior. This behavior change also applies to `tz::OffsetConflict::PreferOffset`. * **RUNTIME** [#213](https://github.com/BurntSushi/jiff/issues/213): Tweak the semantics of `tz::TimeZoneDatabase` so that it only initializes one internal tzdb instead of trying to find as many as possible. It is unlikely that you'll be impacted by this change, but it's meant to make the semantics be a bit more sensible. (In `jiff 0.1`, it was in theory possible for one tz lookup to succeed in the system zoneinfo and then another tz lookup to fail in zoneinfo but succeed automatically via the bundled copy. But this seems confusing and possibly not desirable. Hence the change.) * [#218](https://github.com/BurntSushi/jiff/issues/218): In order to make naming a little more consistent between `Zoned` and `civil::Date`, the `civil::Date::to_iso_week_date` and `civil::ISOWeekDate::to_date` APIs were renamed to `civil::Date::iso_week_date` and `civil::ISOWeekDate::date`. * [#220](https://github.com/BurntSushi/jiff/issues/220): Remove `Span::to_duration` for converting a `Span` to a `std::time::Duration` and rename `Span::to_jiff_duration` to `Span::to_duration`. This prioritizes `SignedDuration` as the "primary" non-calendar duration type in Jiff. And makes it more consistent with APIs like `Zoned::duration_since`. For non-calendar spans, the `TryFrom for std::time::Duration` still exists. For calendar durations, use `Span::to_duration` and then convert the `SignedDuration` to `std::time::Duration`. Additionally, `Timestamp::from_jiff_duration` and `Timestamp::as_jiff_duration` were renamed to `Timestamp::from_duration` and `Timestamp::as_duration`, respectively. The old deprecated routines on the unsigned `std::time::Duration` have been removed. * [#221](https://github.com/BurntSushi/jiff/issues/221): Change the type of the value yielded by the `jiff::tz::TimeZoneNameIter` iterator from `String` to `jiff::tz::TimeZoneName`. This opaque type is more API evolution friendly. To access the string, either use `TimeZoneName`'s `Display` trait implementation, or its `as_str` method. * [#222](https://github.com/BurntSushi/jiff/issues/222): Split `TimeZone::to_offset` into two methods. One that just returns the offset, and another, `TimeZone::to_offset_info`, which includes the offset, DST status and time zone abbreviation. The extra info is rarely needed and is sometimes more costly to compute. Also, make the lifetime of the time zone abbreviation returned by `TimeZoneTransition::abbreviation` tied to the transition instead of the time zone (for future API flexibility, likely in core-only environments). This change was overall motivated by wanting to do less work in the common case (where we only need the offset), and for reducing the size of a `TimeZone` considerably in core-only environments. Callers previously using `TimeZone::to_offset` to get DST status and time zone abbreviation should now use `TimeZone::to_offset_info`. * **RUNTIME** [#230](https://github.com/BurntSushi/jiff/issues/230): When `TimeZone::system()` cannot find a system configured time zone, `jiff 0.1` would automatically fall back to `TimeZone::UTC` (with a WARN-level log message). In `jiff 0.2`, the fall back is now to `TimeZone::unknown()`, which has a special `Etc/Unknown` identifier (as specified by Unicode and reserved by the IANA time zone database). The fallback otherwise still behaves as if it were `TimeZone::UTC`. This helps surface error conditions related to finding the system time zone without causing unrecoverable failure. Enhancements: * [#136](https://github.com/BurntSushi/jiff/issues/136): When the special `SpanRelativeTo::days_are_24_hours()` marker is used, weeks will also be treated as invariant. That is, seven 24-hour days. In all cases, working with years and months still requires a relative date. * [#228](https://github.com/BurntSushi/jiff/issues/228): It is now possible to forcefully use a bundled copy of the IANA time zone database without relying on disabling crate features. This can be done by enabling the `tzdb-bundle-always` crate feature and explicitly creating a `jiff::tz::TimeZoneDatabase::bundled()` database. Once in hand, you must use APIs like `TimeZoneDatabase::get` to create a `TimeZone` and avoid any APIs that implicitly use the global time zone database (like `Timestamp::in_tz` or even `Zoned::from_str`). * [#238](https://github.com/BurntSushi/jiff/pull/238): Add integration with the ICU4X project via the [`jiff-icu`] crate. `jiff-icu` provides traits for easily converting between datetime types defined in Jiff and datetime types defined in ICU4X. * [#240](https://github.com/BurntSushi/jiff/pull/240): Add integration with the SQLx project via the [`jiff-sqlx`] crate. `jiff-sqlx` provides wrapper types that implement the necessary traits in SQLx for reasonably ergonomic integration. This includes PostgreSQL and SQLite support, but not MySQL support. (It's not clear if it's possible at present to provide MySQL support for SQLx for datetime types outside of SQLx itself.) * [#241](https://github.com/BurntSushi/jiff/pull/241): Add integration with the Diesel project via the [`jiff-diesel`] crate. `jiff-diesel` provides wrapper types that implement the necessary traits in Diesel for reasonably ergonomic integration. This includes MySQL, PostgreSQL and SQLite support. 0.1.29 (2025-02-02) =================== This release includes a few small enhancements and a bug fix. In particular, there is now Serde support for `TimeZone` and the `ISOWeekDate` API has been filled out a bit more. Unless a serious issue is uncovered, my plan is that this will be the last release before `jiff 0.2`. Enhancements: * [#89](https://github.com/BurntSushi/jiff/issues/89): Opt-in support for using Serde with `jiff::tz::TimeZone` has been added. * [#227](https://github.com/BurntSushi/jiff/issues/227): The `civil::ISOWeekDate` API has been beefed up with a few convenience methods. * [#233](https://github.com/BurntSushi/jiff/issues/233): Add `tz::Offset::round` for rounding time zone offsets. Bug fixes: * [#231](https://github.com/BurntSushi/jiff/issues/231): Use more flexible offset equality when parsing offsets with fractional minutes. 0.1.28 (2025-01-27) =================== This is a small release that just removes the dev-dependency on `serde_yml`. It has been replaced with the deprecated `serde_yaml`. See [this post about `serde_yml` shenanigans](https://x.com/davidtolnay/status/1883906113428676938) for why this was done. Note that this was only a dev-dependency and thus doesn't impact folks using Jiff. Bug fixes: * [#225](https://github.com/BurntSushi/jiff/pull/225): Remove dependency on `serde_yml` in favor of `serde_yaml`. 0.1.27 (2025-01-25) =================== This is a small release with a bug fix for precision loss in some cases when doing arithmetic on `Timestamp` or `Zoned`. Bug fixes: * [#223](https://github.com/BurntSushi/jiff/issues/223): Fix the check for fractional seconds before taking the fast path. 0.1.26 (2025-01-23) =================== This is a small release with another deprecation and a new API for doing prefix parsing via `strptime`. There's also a bug fix for a corner case when dealing with daylight saving time gaps with the `Zoned::with` API. Deprecations: * [#210](https://github.com/BurntSushi/jiff/pull/210): Deprecate `ISOWeekDate::to_date` in favor of `ISOWeekDate::date`. Enhancements: * [#209](https://github.com/BurntSushi/jiff/issues/209): Add `fmt::strtime::BrokenDownTime::parse_prefix` for parsing only a prefix. Bug fixes: * [#211](https://github.com/BurntSushi/jiff/issues/211): Fix unintuitive behavior of `Zoned::with` when time falls in a DST gap. 0.1.25 (2025-01-21) =================== This release contains a number of deprecations in preparation for a `jiff 0.2` release. The deprecations are meant to facilitate a smoother transition. The deprecations, when possible, come with new APIs that will permit users to write forward compatible code that will work in both `jiff 0.1` and `jiff 0.2`. This release also includes a handful of new conversion specifiers in Jiff's `strftime` and `strptime` APIs. This improves compatibility with the analogous implementation with GNU libc. Deprecations: * [#28](https://github.com/BurntSushi/jiff/issues/28): The `intz` methods on `Zoned`, `Timestamp`, `civil::DateTime` and `civil::Date` have been deprecated in favor of `in_tz`. * [#32](https://github.com/BurntSushi/jiff/issues/32): The `Eq` and `PartialEq` trait implementations on `Span` have been deprecated in favor of using the new `SpanFieldwise` type. * [#48](https://github.com/BurntSushi/jiff/issues/48): Silently assuming days are always 24 hours in some `Span` APIs has now been deprecated. This will become an error in `jiff 0.2`. To continue assuming days are 24 hours without a relative reference date, you can use the new `SpanRelativeTo::days_are_24_hours` API. In `jiff 0.1`, you'll seen a WARN-level log message emitted if you're code will be broken by `jiff 0.2`. * [#147](https://github.com/BurntSushi/jiff/issues/147): Both `%V` and `%:V` have been deprecated in favor of `%Q` and `%:Q`. In `jiff 0.2`, `%V` will correspond to the ISO 8601 week number and `%:V` will result in an error. This change was made to improve compatibility with other `strtime` implementations. `%V` and `%:V` continue to correspond to IANA time zone identifiers in `jiff 0.1`, but using them for parsing or formatting will result in a WARN-level deprecation message. Enhancements: * [#147](https://github.com/BurntSushi/jiff/issues/147): Adds a number of new conversion specifiers to Jiff's `strftime` and `strptime` APIs. Specifically, `%C`, `%G`, `%g`, `%j`, `%k`, `%l`, `%n`, `%R`, `%s`, `%t`, `%U`, `%u`, `%W`, `%w`. Their behavior should match the corresponding specifiers in GNU libc. 0.1.24 (2025-01-16) =================== This release updates Jiff's bundled copy of the [IANA Time Zone Database] to `2025a`. See the [`2025a` release announcement] for more details. Enhancements: * [#206](https://github.com/BurntSushi/jiff/pull/206): Update `jiff-tzdb` to `2025a`. [`2025a` release announcement]: https://lists.iana.org/hyperkitty/list/tz-announce@iana.org/thread/MWII7R3HMCEDNUCIYQKSSTYYR7UWK4OQ/ 0.1.23 (2025-01-13) =================== This release includes some bug fixes, particularly for compilation on `aarch64-linux-android`. There are also some minor enhancements, such as making `Zoned::iso_week_date` a convenience function for `civil::Date::iso_week_date`, in line with similar functions. My current plan is to make a reasonably quick transition to `jiff 0.2` with a few pending breaking changes. I will be making some `jiff 0.1` releases with deprecations in order to make the transition as smooth as possible. If all goes well with `jiff 0.2`, then my plan is still to do a Jiff 1.0 release in the Summer of 2025. Deprecations: * [#197](https://github.com/BurntSushi/jiff/discussions/197): `Date::to_iso_week_date` has been deprecated in favor of `Date::iso_week_date`. Enhancements: * [#196](https://github.com/BurntSushi/jiff/discussions/196): Improve ISO week date documentation regarding weekday offsets. * [#197](https://github.com/BurntSushi/jiff/discussions/197): Add `Zoned::iso_week_date`, `DateTime::iso_week_date` and `Date::iso_week_date`. Bug fixes: * [#200](https://github.com/BurntSushi/jiff/issues/200): Fix compilation failure on Android in a Termux shell. * [#202](https://github.com/BurntSushi/jiff/pull/202): Re-add license files to crate artifact. 0.1.22 (2025-01-12) =================== This release adds support for Android. This support means that Jiff will automatically read its special concatenated time zone database, and will read the `persist.sys.timezone` property to determine the system's current time zone. See [PLATFORM] for more specific information about Android support. Note that this release also removed all non-essential files (including tests and test data) for the artifact uploaded to crates.io. If you need or want these files, please open a new issue. Enhancements: * [#140](https://github.com/BurntSushi/jiff/issues/140): Add support for the Android platform. 0.1.21 (2025-01-04) =================== This release includes a new API for setting the unit designator label in a friendly formatted duration for zero-length durations. Enhancements: * [#192](https://github.com/BurntSushi/jiff/issues/192): Add option to the friendly printer for setting the unit when writing a zero-length duration. 0.1.20 (2025-01-03) =================== This release includes a new type, `Pieces`, in the `jiff::fmt::temporal` sub-module. This exposes the individual components of a parsed Temporal ISO 8601 datetime string. It allows users of Jiff to circumvent the checks in the higher level parsing routines that prevent you from shooting yourself in the foot. For example, parsing into a `Zoned` will return an error for raw RFC 3339 timestamps like `2025-01-03T22:03-05` because there is no time zone annotation. Without a time zone, Jiff cannot do time zone aware arithmetic and rounding. Instead, such a datetime can only be parsed into a `Timestamp`. This lower level `Pieces` API now permits users of Jiff to parse this string into its component parts and assemble it into a `Zoned` if they so choose. Enhancements: * [#188](https://github.com/BurntSushi/jiff/issues/188): Add `fmt::temporal::Pieces` for granular datetime parsing and formatting. 0.1.19 (2025-01-02) =================== This releases includes a UTF-8 related bug fix and a few enhancements. Firstly, a `Span`'s default `Display` implementation now writes uppercase unit designator labels. That means you'll get `P1Y2M3DT4H5M6S` instead of `P1y2m3dT4h5m6s` by default. You can restore previous behavior via `jiff::fmt::temporal::SpanPrinter::lowercase`. This change was made to improve interoperability. Secondly, `SignedDuration` now supports rounding via `SignedDuration::round`. Note that it only supports rounding time units (hours or smaller). In order to round with calendar units, you'll still need to use a `Span`. Enhancements: * [#130](https://github.com/BurntSushi/jiff/issues/130): Document value ranges for methods like `year`, `day`, `hour` and so on. * [#187](https://github.com/BurntSushi/jiff/issues/187): Add a rounding API (for time units only) on `SignedDuration`. * [#190](https://github.com/BurntSushi/jiff/issues/190): `Span` and `SignedDuration` now use uppercase unit designator labels in their default ISO 8601 `Display` implementation. Bug fixes: * [#155](https://github.com/BurntSushi/jiff/issues/155): Relax `strftime` format strings from ASCII-only to all of UTF-8. 0.1.18 (2024-12-31) =================== This release includes a few minor enhancements. Namely, the ability to iterate over time zone transitions (in the future or the past), and some improvements to failure modes when `Timestamp` and `Span` arithmetic fails. Enhancements: * [#144](https://github.com/BurntSushi/jiff/issues/144): Add APIs for iterating over the transitions of a time zone. * [#145](https://github.com/BurntSushi/jiff/issues/145): Improve docs and error messages around fallible `Timestamp` arithmetic. 0.1.17 (2024-12-31) =================== This release enhances Jiff's support for `no_std` environments by making its `alloc` feature optional. When `alloc` is disabled, only fixed offset time zones are supported and error messages are significantly degraded. If you have core-only use cases for Jiff, I'd love to hear about them on the issue tracker. Enhancements: * [#162](https://github.com/BurntSushi/jiff/issues/162): Support platforms that do not have atomics in `std`. * [#168](https://github.com/BurntSushi/jiff/issues/168): Jiff now supports disabling the `alloc` feature, which enables core-only mode. * [#169](https://github.com/BurntSushi/jiff/issues/169): Add `TimeZone::to_fixed_offset` for accessing an invariant offset if possible. 0.1.16 (2024-12-26) =================== This release includes a new `jiff::fmt::friendly` module for formatting and parsing durations in a more human readable format than what ISO 8601 specifies. ISO 8601 remains the "default" duration format in Jiff due to its widespread support. Here are some examples: ```text 40d 40 days 1y1d 1yr 1d 3d4h59m 3 days, 4 hours, 59 minutes 3d 4h 59m 2h30m 2h 30m 1mo 1w 1 week 1w4d 1 wk 4 days 1m 0.0021s 0s 0d 0 days 3 mins 34s 123ms 3 mins 34.123 secs 3 mins 34,123s 1y1mo1d1h1m1.1s 1yr 1mo 1day 1hr 1min 1.1sec 1 year, 1 month, 1 day, 1 hour, 1 minute 1.1 seconds 1 year, 1 month, 1 day, 01:01:01.1 ``` To quickly demonstrate this new feature, here's a simple CLI program using Clap: ```ignore use clap::Parser; use jiff::{Span, Zoned}; #[derive(Parser, Debug)] #[command(version, about, long_about = None)] struct Args { duration: Span, } fn main() { let args = Args::parse(); println!("adding duration to now: {}", &Zoned::now() + args.duration); } ``` And running the program: ```text $ cargo run -q -- '1 year, 2 months, 5 hours' adding duration to now: 2026-02-26T18:58:22-05:00[America/New_York] $ cargo run -q -- 'P1Y2MT5H' # ISO 8601 durations are supported too! adding duration to now: 2026-02-26T19:00:57-05:00[America/New_York] ``` With Jiff, you should no longer need to pull in crates like [`humantime`](https://docs.rs/humantime) and [`humantime-serde`](https://docs.rs/humantime-serde) to accomplish a similar task. While this new format doesn't support any kind of internationalization, the prevalence of the `humantime` crate suggests there's a desire for something like this. The "friendly" format is meant to service all the same use cases as `humantime` does for durations, but in a way that doesn't let you shoot yourself in the foot. The new "friendly" format is now the default for the `Debug` implementations of both `Span` and `SignedDuration`. It's also available via the "alternate" `Display` implementations for `Span` and `SignedDuration` as well. Moreover, the `FromStr` trait implementations for both `Span` and `SignedDuration` will parse _both_ the ISO 8601 duration and this new "friendly" format. Finally, when `serde` integration is enabled, the `Deserialize` implementations for `SignedDuration` and `Span` also automatically parse either ISO 8601 or the friendly format. For serialization, ISO 8601 remains the default, but the `jiff::fmt::serde` module provides easy to use helpers to switch to the friendly format. The `jiff::fmt::friendly` module documentation provides many more details, including a complete grammar for the format. Enhancements: * [#143](https://github.com/BurntSushi/jiff/pull/143): Add `Hash` implementation for `Zoned` and `Timestamp`. Bug fixes: * [#60](https://github.com/BurntSushi/jiff/issues/60): Use a better `Debug` output format for `SignedDuration` and `Span`. * [#111](https://github.com/BurntSushi/jiff/issues/111): Add a new "friendly" duration format. * [#138](https://github.com/BurntSushi/jiff/issues/138): Fix deserialization in `serde_yml` and `serde_yaml` crates. * [#161](https://github.com/BurntSushi/jiff/pull/161): Fix `serde` dependency configuration so that it builds in no-std mode. 0.1.15 (2024-11-30) =================== This release fixes a bug where Jiff would sometimes fail to parse TZif files (found, typically, in `/usr/share/zoneinfo` on Unix systems). This occurred when the TZif file contained a time zone transition outside the range of Jiff's `Timestamp` type (which is `-9999-01-01` to `9999-12-31`). The bug fix works by clamping the out-of-range transitions to Jiff's supported range. This bug only seems to occur in some environments where their TZif files contain more extreme values than what is typically found. Bug fixes: * [#163](https://github.com/BurntSushi/jiff/issues/163): Fix a bug where Jiff would fail to parse some TZif files. 0.1.14 (2024-11-01) =================== This release introduces new APIs to the RFC 2822 printer that explicitly print timestamps in a format strictly compatible with [RFC 9110]. Enhancements: * [#151](https://github.com/BurntSushi/jiff/issues/151): Add `rfc2822::DateTimePrinter::timestamp_to_rfc9110_string` method. 0.1.13 (2024-09-07) =================== This release introduces a new `jiff::tz::TimeZone::try_system` API. It is like `TimeZone::system`, but returns an error instead of an automatic fall back to UTC when the system time zone could not be discovered. This also includes an update to the bundled [IANA Time Zone Database] to the `2024b` release in the `jiff-tzdb` crate. As a reminder, the bundled database is not used or included on Unix platforms by default. See [PLATFORM] for more details. Enhancements: * [#65](https://github.com/BurntSushi/jiff/issues/65): Add `TimeZone::try_system` for fallibly determining the system's time zone. * [#125](https://github.com/BurntSushi/jiff/pull/125): Update to the `2024b` release of the [IANA Time Zone Database]. 0.1.12 (2024-08-31) =================== This release introduces some new minor APIs that support formatting `Timestamp` values as RFC 3339 strings with a specific offset. Previously, using the standard formatting routines that Jiff provides, it was only possible to format a `Timestamp` using Zulu time. For example: ```rust use jiff::Timestamp; assert_eq!( Timestamp::UNIX_EPOCH.to_string(), "1970-01-01T00:00:00Z", ); ``` This is fine most use cases, but it can be useful on occasion to format a `Timestamp` with a specific offset. While this isn't as expressive as formatting a datetime with a time zone (e.g., with an IANA time zone identifier), it may be useful in contexts where you just want to "hint" at what a user's local time is. To that end, there is a new `Timestamp::display_with_offset` method that makes this possible: ```rust use jiff::{tz, Timestamp}; assert_eq!( Timestamp::UNIX_EPOCH.display_with_offset(tz::offset(-5)).to_string(), "1969-12-31T19:00:00-05:00", ); ``` A corresponding API was added to `jiff::fmt::temporal::DateTimePrinter` for lower level use. Moreover, this release also includes new convenience APIs on the Temporal and RFC 2822 printer types for returning strings. For example, previously, if you were using the RFC 2822 printer to format a `Timestamp`, you had to do this: ```rust use jiff::{fmt::rfc2822::DateTimePrinter, Timestamp}; let mut buf = String::new(); DateTimePrinter::new().print_timestamp(&Timestamp::UNIX_EPOCH, &mut buf).unwrap(); assert_eq!(buf, "Thu, 1 Jan 1970 00:00:00 -0000"); ``` But now you can just do this: ```rust use jiff::{fmt::rfc2822::DateTimePrinter, Timestamp}; assert_eq!( DateTimePrinter::new().timestamp_to_string(&Timestamp::UNIX_EPOCH).unwrap(), "Thu, 1 Jan 1970 00:00:00 -0000", ); ``` Enhancements: * [#122](https://github.com/BurntSushi/jiff/pull/122): Support formatting `Timestamp` to an RFC 3339 string with a specific offset. 0.1.11 (2024-08-28) =================== This release includes a few small enhancements that have been requested over the last several weeks. The biggest enhancement is a new `jiff::fmt::serde` sub-module. It provides convenience routines similar to Chrono's `chrono::serde` sub-module for serializing and deserializing between a `jiff::Timestamp` and an integer number of seconds, milliseconds, microseconds or nanoseconds. For example: ```rust use jiff::Timestamp; #[derive(serde::Serialize, serde::Deserialize)] struct Record { #[serde(with = "jiff::fmt::serde::timestamp::second::required")] timestamp: Timestamp, } let json = r#"{"timestamp":1517644800}"#; let got: Record = serde_json::from_str(&json).unwrap(); assert_eq!(got.timestamp, Timestamp::from_second(1517644800).unwrap()); assert_eq!(serde_json::to_string(&got).unwrap(), json); ``` If you need to support optional timestamps via `Option`, then use `jiff::fmt::serde::timestamp::second::optional` instead. Similarly, if you need to support milliseconds instead of seconds, then replace `second` with `millisecond` in the module path. Enhancements: * [#78](https://github.com/BurntSushi/jiff/issues/78): Add `BrokenDownTime::set_{offset,iana_time_zone}` APIs. * [#93](https://github.com/BurntSushi/jiff/issues/93): Add note about using `Timestamp::now().to_zoned()` instead of `Zoned::now().with_time_zone()`. * [#101](https://github.com/BurntSushi/jiff/issues/101): Add new `jiff::fmt::serde` module for integration with integer timestamps. * [#117](https://github.com/BurntSushi/jiff/pull/117): Remove `unsafe` usage in `libm` functions (applicable only to no-std users). 0.1.10 (2024-08-23) =================== This release features a small bug fix where Jiff will detect an IANA time zone identifier in some cases where it wouldn't before. While Jiff would previously read the symlink metadata on `/etc/localtime` by default to discover the system configured time zone on Unix systems, it *wouldn't* do so when `TZ=/etc/localtime`. There's really no reason not to, so this release of Jiff is fixed to use symlink sniffing on file paths provided by the `TZ` environment variable. Bug fixes: * [#113](https://github.com/BurntSushi/jiff/issues/113): When `TZ=/etc/localtime`, use symlink metadata to detect IANA identifier. 0.1.9 (2024-08-23) ================== This release introduces new options for controlling the precision of fractional seconds when printing `Zoned`, `Timestamp`, `civil::DateTime` or `civil::Time` values. This is principally exposed via `jiff::fmt::temporal::DateTimePrinter::precision`, but it's also available via the standard library's formatting machinery. For example, if `zdt` is a `jiff::Zoned`, then `format!("{zdt:.6}")` will format it into a string with microsecond precision, even if its fractional component is zero. Enhancements: * [#92](https://github.com/BurntSushi/jiff/issues/92): Support setting the precision of fractional seconds when printing datetimes. 0.1.8 (2024-08-19) ================== This releases fixes a build error in Jiff's `alloc`-only configuration. This regression was introduced in `jiff 0.1.6`. Bug fixes: * [#108](https://github.com/BurntSushi/jiff/issues/108): Use `core::time::Duration` everywhere instead of `std::time::Duration`. 0.1.7 (2024-08-18) ================== This release relaxes Jiff's dependency on `windows-sys` to include multiple semver incompatible releases. The purpose of this relaxation is to enable Jiff to work with different versions of `windows-sys` in the hopes that this reduces the likelihood that multiple copies of `windows-sys` are included in your dependency tree. Dependencies: * [#106](https://github.com/BurntSushi/jiff/pull/106): Relax `windows-sys` dependency constraint to `>=0.52.0, <=0.59.*`. 0.1.6 (2024-08-18) ================== This release includes a new top-level type, `SignedDuration`, that provides a near exact replica of `std::time::Duration`, but signed. It is meant to provide alternative APIs for working with durations at a lower level than what `Span` provides, and to facilitate better integration with the standard library. A `SignedDuration` has also been integrated with all of Jiff's datetime types. For example, previously, `Zoned::checked_add` only accepted a concrete `jiff::Span`. But now it accepts a `jiff::Span`, `jiff::SignedDuration` or even a `std::time::Duration`. Moreover, all of the `until` and `since` APIs on datetime types have been ported and copied to return `SignedDuration` under the `duration_until` and `duration_since` names. This marks an initial integration phase with `SignedDuration`. It is planned to integrate it more with the datetime types. Currently, there are integrations on `Timestamp` and `Span`, but more will be added in the future. Overall, folks should still use `Span`. That is the intended default duration type in Jiff and will continue to be. Users of Jiff may find `SignedDuration` useful in contexts where speed is important or when one needs to integrate with the standard library. This release also includes a few related deprecations as the APIs involving `std::time::Duration` are phased out in favor of `SignedDuration`. Deprecations: * `Timestamp::as_duration`: replaced with `as_jiff_duration`, which will be renamed to `as_duration` in `jiff 0.2`. * `Timestamp::from_duration`: replaced with `from_jiff_duration`, which will be renamed to `from_duration` in `jiff 0.2`. * `Timestamp::from_signed_duration`: replaced with `from_jiff_duration`. * `Span::to_duration`: replaced with `to_jiff_duration`, which will be renamed to `to_duration` in `jiff 0.2`. Basically, all of the above APIs either accept or return a `std::time::Duration`. To avoid breaking changes at this point, new methods for `SignedDuration` were added. For example, `Timestamp::as_jiff_duration`. In `jiff 0.2`, the above deprecated methods will be removed and replaced with equivalent methods that accept or return a `SignedDuration` instead. Callers can then convert between a `SignedDuration` and a `std::time::Duration` using appropriate `TryFrom` trait implementations. Enhancements: * [#21](https://github.com/BurntSushi/jiff/issues/21): Add new top-level `SignedDuration` type. * [#90](https://github.com/BurntSushi/jiff/issues/90): Improve error message when using `Span` with >=day units with a `Timestamp`. Performance: * [#104](https://github.com/BurntSushi/jiff/pull/104) Optimize offset calculations in time zones without DST. * [#105](https://github.com/BurntSushi/jiff/pull/105) Optimize offset calculations for timestamps after last DST rule change. 0.1.5 (2024-08-09) ================== This release includes some improvements and bug fixes, particularly for Jiff's `strtime` APIs. Enhancements: * [#63](https://github.com/BurntSushi/jiff/issues/63): Add link to original Chrono maintainer's commentary in `DESIGN.md`. * [#75](https://github.com/BurntSushi/jiff/issues/75): Add support for `%V` for formatting _and_ parsing IANA time zone identifiers. * [#79](https://github.com/BurntSushi/jiff/pull/79): Add `devcontainer.json` to support GitHub Codespaces. * [#85](https://github.com/BurntSushi/jiff/pull/85): Set correct ranges for internal tracking in return value of `days_in_month`. Bug fixes: * [#59](https://github.com/BurntSushi/jiff/issues/59): Fixes a bug where some `Span`s could not be roundtripped through ISO 8601. * [#71](https://github.com/BurntSushi/jiff/issues/71): Tweak wording in documentation of "printf"-style API. * [#73](https://github.com/BurntSushi/jiff/issues/73): Make it so `%.Nf` only formats to `N` decimal places. * [#77](https://github.com/BurntSushi/jiff/pull/77): Disable optimizations when running tests. 0.1.4 (2024-08-01) ================== This release includes a small improvement for `strptime` that permits `%Y%m%d` to parse `20240730` correctly. Enhancements: * [#62](https://github.com/BurntSushi/jiff/issues/62): Tweak `strptime` so that things like `%Y` aren't unceremoniously greedy. 0.1.3 (2024-07-30) ================== This release features support for `wasm32-unknown-unknown`. That is, when Jiff's new `js` crate feature is enabled, Jiff will automatically use JavaScript APIs to determine the current time and time zone. Enhancements: * [#58](https://github.com/BurntSushi/jiff/pull/58): Add WASM support and a new `PLATFORM.md` guide. 0.1.2 (2024-07-28) ================== This release features a few new APIs that a need for arose while experimenting with actually using Jiff in real projects. Namely, the `jiff::fmt::strtime` module now has `%f` and `%.f` directives for parsing and formatting fractional seconds. And both `jiff::fmt::rfc2822` and `jiff::fmt::strtime` now have support for skipping weekday checks during parsing. (Previously, Jiff required that an English weekday be consistent with the date parsed, and there was no way to opt out. While this is still the default behavior, callers can disable this check.) Enhancements: * [#52](https://github.com/BurntSushi/jiff/pull/52): Improve documentation for `Span` getter methods. * [#53](https://github.com/BurntSushi/jiff/pull/53): Add support for skipping weekday checking when parsing datetimes. * [#55](https://github.com/BurntSushi/jiff/pull/55): Add support for fractional seconds in `jiff::fmt::strtime`. Bug fixes: * [#49](https://github.com/BurntSushi/jiff/pull/49): Fix informational regex describing ISO 8601 format. * [#51](https://github.com/BurntSushi/jiff/pull/51): Explicitly allow new deny-by-default lint `ambiguous_negative_literals`. 0.1.1 (2024-07-25) ================== This is a new semver compatible release. The principle addition are APIs for converting between a `jiff::Span` and a `std::time::Duration`. Specifically, there are now `TryFrom for Duration` and `TryFrom for Span` trait implementations. There is also a `Span::to_duration`, which requires a relative date, for converting spans with non-uniform units (like months) to a `Duration`. Enhancements: * [#21](https://github.com/BurntSushi/jiff/issues/21), [#40](https://github.com/BurntSushi/jiff/issues/40): Adds APIs for converting between `Span` and `std::time::Duration`. Bug fixes: * [#36](https://github.com/BurntSushi/jiff/issues/36): Saturating arithmetic for `Timestamp` panics with day-or-greater units. * [#38](https://github.com/BurntSushi/jiff/issues/38): Fix some bugs in the micro-benchmarks. * [#39](https://github.com/BurntSushi/jiff/issues/39): Document that the RFC 2822 parser is not technically fully spec compliant. 0.1.0 (2024-07-21) ================== The initial release of Jiff. [IANA Time Zone Database]: https://www.iana.org/time-zones [PLATFORM]: PLATFORM.md [RFC 9110]: https://datatracker.ietf.org/doc/html/rfc9110#section-5.6.7-15 [`jiff-icu`]: https://docs.rs/jiff-icu [`jiff-sqlx`]: https://docs.rs/jiff-sqlx [`jiff-diesel`]: https://docs.rs/jiff-diesel [ICU4X project]: https://github.com/unicode-org/icu4x [SQLx]: https://github.com/launchbadge/sqlx [Diesel]: https://github.com/diesel-rs/diesel [Discussions on GitHub]: https://github.com/BurntSushi/jiff/discussions # Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [v1.3.0] - 2025-09-03 ### Change MSRV from 1.57 to 1.60 This is the same MSRV that our direct dependency `windows-sys` requires (pr#29). ## [v1.2.0] - 2024-09-08 ### Change MSRV from 1.56 to 1.57 Minor refactoring to abuse assertions in constants that Rust 1.57.0 allows. ## [v1.1.0] - 2024-04-30 ### Change MSRV from 1.51 to 1.56 windows-sys bump to 1.56 when they switch to 2021 edition. As a dependent of that crate, we have no choice but to follow. ## [v1.0.0] - 2023-02-26 ### First major version The public API of this crate has been unchanged around 3 years without complains. It signals that the API is mature enough to be stable for a long time. ## [v0.2.1] - 2023-02-25 ### Fixed * Fix weird build failure when cross-compiling from non-Windows hosts 657c176a440a64437236ba9d88a2ebd98a8babb1 ## [v0.2.0] - 2020-09-05 ### Changed * Some internal refactorings that requires Rust v1.46.0 ## [v0.1.5] - 2020-03-18 ### Fixed * Prevent a panic happen when open a reparse point (Commit fd9bbec6061fb100f79795ac9b64db59fbb6a3c0) ## [v0.1.4] - 2020-01-30 ### Changed * Ask for forgiveness in case we have no necessary permission instead of always asking for permission. ## [v0.1.3] - 2019-10-28 ### Changed * Obtain appropriate privilege before opening directories. ## [v0.1.0] - 2019-05-15 First release [v1.3.0]: https://github.com/lzutao/junction/compare/v1.2.0...v1.3.0 [v1.2.0]: https://github.com/lzutao/junction/compare/v1.1.0...v1.2.0 [v1.1.0]: https://github.com/lzutao/junction/compare/v1.0.0...v1.1.0 [v1.0.0]: https://github.com/lzutao/junction/compare/v0.2.1...v1.0.0 [v0.2.1]: https://github.com/lzutao/junction/compare/v0.2.0...v0.2.1 [v0.2.0]: https://github.com/lzutao/junction/compare/v0.1.0...v0.2.0 [v0.1.5]: https://github.com/lzutao/junction/compare/v0.1.4...v0.1.5 [v0.1.4]: https://github.com/lzutao/junction/compare/v0.1.3...v0.1.4 [v0.1.3]: https://github.com/lzutao/junction/compare/v0.1.0...v0.1.3 [v0.1.0]: https://github.com/lzutao/junction/releases/tag/v0.1.0 # Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [v1.4.2] - 2026-02-24 ### Fixed * Fix the empty `PrintName` causes junctions to break in Windows Containers (WCoW) during layer serialization. Thank *Zanie Blue* in #33 for the report and the quick fix. ## [v1.4.1] - 2026-01-17 ### Fixed * Junction creation failed silently with verbatim `\\?\` prefix paths (#31) by @DK26. ## [v1.4.0] - 2026-01-17 ### Change MSRV from 1.60 to 1.71 This is the same MSRV that our direct dependency `windows-sys` requires (#32). ## [v1.3.0] - 2025-09-03 ### Change MSRV from 1.57 to 1.60 This is the same MSRV that our direct dependency `windows-sys` requires (#29). ## [v1.2.0] - 2024-09-08 ### Change MSRV from 1.56 to 1.57 Minor refactoring to abuse assertions in constants that Rust 1.57.0 allows. ## [v1.1.0] - 2024-04-30 ### Change MSRV from 1.51 to 1.56 windows-sys bump to 1.56 when they switch to 2021 edition. As a dependent of that crate, we have no choice but to follow. ## [v1.0.0] - 2023-02-26 ### First major version The public API of this crate has been unchanged around 3 years without complains. It signals that the API is mature enough to be stable for a long time. ## [v0.2.1] - 2023-02-25 ### Fixed * Fix weird build failure when cross-compiling from non-Windows hosts 657c176a440a64437236ba9d88a2ebd98a8babb1 ## [v0.2.0] - 2020-09-05 ### Changed * Some internal refactorings that requires Rust v1.46.0 ## [v0.1.5] - 2020-03-18 ### Fixed * Prevent a panic happen when open a reparse point (Commit fd9bbec6061fb100f79795ac9b64db59fbb6a3c0) ## [v0.1.4] - 2020-01-30 ### Changed * Ask for forgiveness in case we have no necessary permission instead of always asking for permission. ## [v0.1.3] - 2019-10-28 ### Changed * Obtain appropriate privilege before opening directories. ## [v0.1.0] - 2019-05-15 First release [v1.4.2]: https://github.com/tesuji/junction/compare/v1.4.1...v1.4.2 [v1.4.1]: https://github.com/tesuji/junction/compare/v1.4.0...v1.4.1 [v1.4.0]: https://github.com/tesuji/junction/compare/v1.3.0...v1.4.0 [v1.3.0]: https://github.com/tesuji/junction/compare/v1.2.0...v1.3.0 [v1.2.0]: https://github.com/tesuji/junction/compare/v1.1.0...v1.2.0 [v1.1.0]: https://github.com/tesuji/junction/compare/v1.0.0...v1.1.0 [v1.0.0]: https://github.com/tesuji/junction/compare/v0.2.1...v1.0.0 [v0.2.1]: https://github.com/tesuji/junction/compare/v0.2.0...v0.2.1 [v0.2.0]: https://github.com/tesuji/junction/compare/v0.1.0...v0.2.0 [v0.1.5]: https://github.com/tesuji/junction/compare/v0.1.4...v0.1.5 [v0.1.4]: https://github.com/tesuji/junction/compare/v0.1.3...v0.1.4 [v0.1.3]: https://github.com/tesuji/junction/compare/v0.1.0...v0.1.3 [v0.1.0]: https://github.com/tesuji/junction/releases/tag/v0.1.0 # Changelog ## [0.2.174](https://github.com/rust-lang/libc/compare/0.2.173...0.2.174) - 2025-06-17 ### Added - Linux: Make `pidfd_info` fields pub ([#4487](https://github.com/rust-lang/libc/pull/4487)) ### Fixed - Gnu x32: Add missing `timespec.tv_nsec` ([#4497](https://github.com/rust-lang/libc/pull/4497)) - NuttX: Use `nlink_t` type for `st_nlink` in `struct stat` definition ([#4483](https://github.com/rust-lang/libc/pull/4483)) ### Other - Allow new `unpredictable_function_pointer_comparisons` lints ([#4489](https://github.com/rust-lang/libc/pull/4489)) - OpenBSD: Fix some clippy warnings to use `pointer::cast`. ([#4490](https://github.com/rust-lang/libc/pull/4490)) - Remove unessecary semicolons from definitions of `CMSG_NXTHDR`. ([#4492](https://github.com/rust-lang/libc/pull/4492)) ## [0.2.173](https://github.com/rust-lang/libc/compare/0.2.172...0.2.173) - 2025-06-09 ### Added - AIX: Add an AIX triple to Cargo.toml for doc ([#4475](https://github.com/rust-lang/libc/pull/4475)) - FreeBSD: Add the `SO_SPLICE` socket option support for FreeBSD >= 14.2 ([#4451](https://github.com/rust-lang/libc/pull/4451)) - Linux GNU: Prepare for supporting `_TIME_BITS=64` ([#4433](https://github.com/rust-lang/libc/pull/4433)) - Linux: Add constant PACKET_IGNORE_OUTGOING ([#4319](https://github.com/rust-lang/libc/pull/4319)) - Linux: Add constants and types for `nsfs` ioctls ([#4436](https://github.com/rust-lang/libc/pull/4436)) - Linux: Add constants for Memory-Deny-Write-Execute `prctls` ([#4400](https://github.com/rust-lang/libc/pull/4400)) - Linux: Add constants from `linux/cn_proc.h` and `linux/connector.h` ([#4434](https://github.com/rust-lang/libc/pull/4434)) - Linux: Add new flags for `pwritev2` and `preadv2` ([#4452](https://github.com/rust-lang/libc/pull/4452)) - Linux: Add pid_type enum values ([#4403](https://github.com/rust-lang/libc/pull/4403)) - Linux: Update pidfd constants and types (Linux 6.9-6.15) ([#4402](https://github.com/rust-lang/libc/pull/4402)) - Loongarch64 musl: Define the `MADV_SOFT_OFFLINE` constant ([#4448](https://github.com/rust-lang/libc/pull/4448)) - Musl: Add new fields since 1.2.0/1.2.2 to `struct tcp_info` ([#4443](https://github.com/rust-lang/libc/pull/4443)) - Musl: Prepare for supporting v1.2.3 ([#4443](https://github.com/rust-lang/libc/pull/4443)) - NuttX: Add `arc4random` and `arc4random_buf` ([#4464](https://github.com/rust-lang/libc/pull/4464)) - RISC-V Musl: Add `MADV_SOFT_OFFLINE` definition ([#4447](https://github.com/rust-lang/libc/pull/4447)) - Redox: Define SCM_RIGHTS ([#4440](https://github.com/rust-lang/libc/pull/4440)) - VxWorks: Add missing UTIME defines and TASK_RENAME_LENGTH ([#4407](https://github.com/rust-lang/libc/pull/4407)) - Windows: Add more `time.h` functions ([#4427](https://github.com/rust-lang/libc/pull/4427)) ### Changed - Redox: Update `SA_` constants. ([#4426](https://github.com/rust-lang/libc/pull/4426)) - Redox: make `CMSG_ALIGN`, `CMSG_LEN`, and `CMSG_SPACE` const functions ([#4441](https://github.com/rust-lang/libc/pull/4441)) ### Fixed - AIX: Enable libc-test and fix definitions/declarations. ([#4450](https://github.com/rust-lang/libc/pull/4450)) - Emscripten: Fix querying emcc on windows (use emcc.bat) ([#4248](https://github.com/rust-lang/libc/pull/4248)) - Hurd: Fix build from missing `fpos_t` ([#4472](https://github.com/rust-lang/libc/pull/4472)) - Loongarch64 Musl: Fix the `struct ipc_perm` bindings ([#4384](https://github.com/rust-lang/libc/pull/4384)) - Musl: Fix the `O_LARGEFILE` constant value. ([#4443](https://github.com/rust-lang/libc/pull/4443)) ## [0.2.172](https://github.com/rust-lang/libc/compare/0.2.171...0.2.172) - 2025-04-14 ### Added - Android: Add `getauxval` for 32-bit targets ([#4338](https://github.com/rust-lang/libc/pull/4338)) - Android: Add `if_tun.h` ioctls ([#4379](https://github.com/rust-lang/libc/pull/4379)) - Android: Define `SO_BINDTOIFINDEX` ([#4391](https://github.com/rust-lang/libc/pull/4391)) - Cygwin: Add `posix_spawn_file_actions_add[f]chdir[_np]` ([#4387](https://github.com/rust-lang/libc/pull/4387)) - Cygwin: Add new socket options ([#4350](https://github.com/rust-lang/libc/pull/4350)) - Cygwin: Add statfs & fcntl ([#4321](https://github.com/rust-lang/libc/pull/4321)) - FreeBSD: Add `filedesc` and `fdescenttbl` ([#4327](https://github.com/rust-lang/libc/pull/4327)) - Glibc: Add unstable support for _FILE_OFFSET_BITS=64 ([#4345](https://github.com/rust-lang/libc/pull/4345)) - Hermit: Add `AF_UNSPEC` ([#4344](https://github.com/rust-lang/libc/pull/4344)) - Hermit: Add `AF_VSOCK` ([#4344](https://github.com/rust-lang/libc/pull/4344)) - Illumos, NetBSD: Add `timerfd` APIs ([#4333](https://github.com/rust-lang/libc/pull/4333)) - Linux: Add `_IO`, `_IOW`, `_IOR`, `_IOWR` to the exported API ([#4325](https://github.com/rust-lang/libc/pull/4325)) - Linux: Add `tcp_info` to uClibc bindings ([#4347](https://github.com/rust-lang/libc/pull/4347)) - Linux: Add further BPF program flags ([#4356](https://github.com/rust-lang/libc/pull/4356)) - Linux: Add missing INPUT_PROP_XXX flags from `input-event-codes.h` ([#4326](https://github.com/rust-lang/libc/pull/4326)) - Linux: Add missing TLS bindings ([#4296](https://github.com/rust-lang/libc/pull/4296)) - Linux: Add more constants from `seccomp.h` ([#4330](https://github.com/rust-lang/libc/pull/4330)) - Linux: Add more glibc `ptrace_sud_config` and related `PTRACE_*ET_SYSCALL_USER_DISPATCH_CONFIG`. ([#4386](https://github.com/rust-lang/libc/pull/4386)) - Linux: Add new netlink flags ([#4288](https://github.com/rust-lang/libc/pull/4288)) - Linux: Define ioctl codes on more architectures ([#4382](https://github.com/rust-lang/libc/pull/4382)) - Linux: Add missing `pthread_attr_setstack` ([#4349](https://github.com/rust-lang/libc/pull/4349)) - Musl: Add missing `utmpx` API ([#4332](https://github.com/rust-lang/libc/pull/4332)) - Musl: Enable `getrandom` on all platforms ([#4346](https://github.com/rust-lang/libc/pull/4346)) - NuttX: Add more signal constants ([#4353](https://github.com/rust-lang/libc/pull/4353)) - QNX: Add QNX 7.1-iosock and 8.0 to list of additional cfgs ([#4169](https://github.com/rust-lang/libc/pull/4169)) - QNX: Add support for alternative Neutrino network stack `io-sock` ([#4169](https://github.com/rust-lang/libc/pull/4169)) - Redox: Add more `sys/socket.h` and `sys/uio.h` definitions ([#4388](https://github.com/rust-lang/libc/pull/4388)) - Solaris: Temporarily define `O_DIRECT` and `SIGINFO` ([#4348](https://github.com/rust-lang/libc/pull/4348)) - Solarish: Add `secure_getenv` ([#4342](https://github.com/rust-lang/libc/pull/4342)) - VxWorks: Add missing `d_type` member to `dirent` ([#4352](https://github.com/rust-lang/libc/pull/4352)) - VxWorks: Add missing signal-related constsants ([#4352](https://github.com/rust-lang/libc/pull/4352)) - VxWorks: Add more error codes ([#4337](https://github.com/rust-lang/libc/pull/4337)) ### Deprecated - FreeBSD: Deprecate `TCP_PCAP_OUT` and `TCP_PCAP_IN` ([#4381](https://github.com/rust-lang/libc/pull/4381)) ### Fixed - Cygwin: Fix member types of `statfs` ([#4324](https://github.com/rust-lang/libc/pull/4324)) - Cygwin: Fix tests ([#4357](https://github.com/rust-lang/libc/pull/4357)) - Hermit: Make `AF_INET = 3` ([#4344](https://github.com/rust-lang/libc/pull/4344)) - Musl: Fix the syscall table on RISC-V-32 ([#4335](https://github.com/rust-lang/libc/pull/4335)) - Musl: Fix the value of `SA_ONSTACK` on RISC-V-32 ([#4335](https://github.com/rust-lang/libc/pull/4335)) - VxWorks: Fix a typo in the `waitpid` parameter name ([#4334](https://github.com/rust-lang/libc/pull/4334)) ### Removed - Musl: Remove `O_FSYNC` on RISC-V-32 (use `O_SYNC` instead) ([#4335](https://github.com/rust-lang/libc/pull/4335)) - Musl: Remove `RTLD_DEEPBIND` on RISC-V-32 ([#4335](https://github.com/rust-lang/libc/pull/4335)) ### Other - CI: Add matrix env variables to the environment ([#4345](https://github.com/rust-lang/libc/pull/4345)) - CI: Always deny warnings ([#4363](https://github.com/rust-lang/libc/pull/4363)) - CI: Always upload successfully created artifacts ([#4345](https://github.com/rust-lang/libc/pull/4345)) - CI: Install musl from source for loongarch64 ([#4320](https://github.com/rust-lang/libc/pull/4320)) - CI: Revert "Also skip `MFD_EXEC` and `MFD_NOEXEC_SEAL` on sparc64" ([#]()) - CI: Use `$PWD` instead of `$(pwd)` in run-docker ([#4345](https://github.com/rust-lang/libc/pull/4345)) - Solarish: Restrict `openpty` and `forkpty` polyfills to Illumos, replace Solaris implementation with bindings ([#4329](https://github.com/rust-lang/libc/pull/4329)) - Testing: Ensure the makedev test does not emit unused errors ([#4363](https://github.com/rust-lang/libc/pull/4363)) ## [0.2.171](https://github.com/rust-lang/libc/compare/0.2.170...0.2.171) - 2025-03-11 ### Added - Android: Add `if_nameindex`/`if_freenameindex` support ([#4247](https://github.com/rust-lang/libc/pull/4247)) - Apple: Add missing proc types and constants ([#4310](https://github.com/rust-lang/libc/pull/4310)) - BSD: Add `devname` ([#4285](https://github.com/rust-lang/libc/pull/4285)) - Cygwin: Add PTY and group API ([#4309](https://github.com/rust-lang/libc/pull/4309)) - Cygwin: Add support ([#4279](https://github.com/rust-lang/libc/pull/4279)) - FreeBSD: Make `spawn.h` interfaces available on all FreeBSD-like systems ([#4294](https://github.com/rust-lang/libc/pull/4294)) - Linux: Add `AF_XDP` structs for all Linux environments ([#4163](https://github.com/rust-lang/libc/pull/4163)) - Linux: Add SysV semaphore constants ([#4286](https://github.com/rust-lang/libc/pull/4286)) - Linux: Add `F_SEAL_EXEC` ([#4316](https://github.com/rust-lang/libc/pull/4316)) - Linux: Add `SO_PREFER_BUSY_POLL` and `SO_BUSY_POLL_BUDGET` ([#3917](https://github.com/rust-lang/libc/pull/3917)) - Linux: Add `devmem` structs ([#4299](https://github.com/rust-lang/libc/pull/4299)) - Linux: Add socket constants up to `SO_DEVMEM_DONTNEED` ([#4299](https://github.com/rust-lang/libc/pull/4299)) - NetBSD, OpenBSD, DragonflyBSD: Add `closefrom` ([#4290](https://github.com/rust-lang/libc/pull/4290)) - NuttX: Add `pw_passwd` field to `passwd` ([#4222](https://github.com/rust-lang/libc/pull/4222)) - Solarish: define `IP_BOUND_IF` and `IPV6_BOUND_IF` ([#4287](https://github.com/rust-lang/libc/pull/4287)) - Wali: Add bindings for `wasm32-wali-linux-musl` target ([#4244](https://github.com/rust-lang/libc/pull/4244)) ### Changed - AIX: Use `sa_sigaction` instead of a union ([#4250](https://github.com/rust-lang/libc/pull/4250)) - Make `msqid_ds.__msg_cbytes` public ([#4301](https://github.com/rust-lang/libc/pull/4301)) - Unix: Make all `major`, `minor`, `makedev` into `const fn` ([#4208](https://github.com/rust-lang/libc/pull/4208)) ### Deprecated - Linux: Deprecate obsolete packet filter interfaces ([#4267](https://github.com/rust-lang/libc/pull/4267)) ### Fixed - Cygwin: Fix strerror_r ([#4308](https://github.com/rust-lang/libc/pull/4308)) - Cygwin: Fix usage of f! ([#4308](https://github.com/rust-lang/libc/pull/4308)) - Hermit: Make `stat::st_size` signed ([#4298](https://github.com/rust-lang/libc/pull/4298)) - Linux: Correct values for `SI_TIMER`, `SI_MESGQ`, `SI_ASYNCIO` ([#4292](https://github.com/rust-lang/libc/pull/4292)) - NuttX: Update `tm_zone` and `d_name` fields to use `c_char` type ([#4222](https://github.com/rust-lang/libc/pull/4222)) - Xous: Include the prelude to define `c_int` ([#4304](https://github.com/rust-lang/libc/pull/4304)) ### Other - Add labels to FIXMEs ([#4231](https://github.com/rust-lang/libc/pull/4231), [#4232](https://github.com/rust-lang/libc/pull/4232), [#4234](https://github.com/rust-lang/libc/pull/4234), [#4235](https://github.com/rust-lang/libc/pull/4235), [#4236](https://github.com/rust-lang/libc/pull/4236)) - CI: Fix "cannot find libc" error on Sparc64 ([#4317](https://github.com/rust-lang/libc/pull/4317)) - CI: Fix "cannot find libc" error on s390x ([#4317](https://github.com/rust-lang/libc/pull/4317)) - CI: Pass `--no-self-update` to `rustup update` ([#4306](https://github.com/rust-lang/libc/pull/4306)) - CI: Remove tests for the `i586-pc-windows-msvc` target ([#4311](https://github.com/rust-lang/libc/pull/4311)) - CI: Remove the `check_cfg` job ([#4322](https://github.com/rust-lang/libc/pull/4312)) - Change the range syntax that is giving `ctest` problems ([#4311](https://github.com/rust-lang/libc/pull/4311)) - Linux: Split out the stat struct for gnu/b32/mips ([#4276](https://github.com/rust-lang/libc/pull/4276)) ### Removed - NuttX: Remove `pthread_set_name_np` ([#4251](https://github.com/rust-lang/libc/pull/4251)) ## [0.2.170](https://github.com/rust-lang/libc/compare/0.2.169...0.2.170) - 2025-02-23 ### Added - Android: Declare `setdomainname` and `getdomainname` - FreeBSD: Add `evdev` structures - FreeBSD: Add the new `st_filerev` field to `stat32` ([#4254](https://github.com/rust-lang/libc/pull/4254)) - Linux: Add `SI_*`` and `TRAP_*`` signal codes - Linux: Add experimental configuration to enable 64-bit time in kernel APIs, set by `RUST_LIBC_UNSTABLE_LINUX_TIME_BITS64`. - Linux: Add recent socket timestamping flags - Linux: Added new CANFD_FDF flag for the flags field of canfd_frame - Musl: add CLONE_NEWTIME - Solarish: add the posix_spawn family of functions ### Deprecated - Linux: deprecate kernel modules syscalls ### Changed - Emscripten: Assume version is at least 3.1.42 ### Fixed - BSD: Correct the definition of `WEXITSTATUS` - Hurd: Fix CMSG_DATA on 64bit systems ([#4240](https://github.com/rust-lang/libc/pull/424)) - NetBSD: fix `getmntinfo` ([#4265](https://github.com/rust-lang/libc/pull/4265) - VxWorks: Fix the size of `time_t` ### Other - Add labels to FIXMEs , , - CI: Bump FreeBSD CI to 13.4 and 14.2 - Copy definitions from core::ffi and centralize them - Define c_char at top-level and remove per-target c_char definitions - Port style.rs to syn and add tests for the style checker ## [0.2.169](https://github.com/rust-lang/libc/compare/0.2.168...0.2.169) - 2024-12-18 ### Added - FreeBSD: add more socket TCP stack constants - Fuchsia: add a `sockaddr_vm` definition ### Fixed **Breaking**: [rust-lang/rust#132975](https://github.com/rust-lang/rust/pull/132975) corrected the signedness of `core::ffi::c_char` on various Tier 2 and Tier 3 platforms (mostly Arm and RISC-V) to match Clang. This release contains the corresponding changes to `libc`, including the following specific pull requests: - ESP-IDF: Replace arch-conditional `c_char` with a reexport - Fix `c_char` on various targets - Mirror `c_char` configuration from `rust-lang/rust` ### Cleanup - Do not re-export `c_void` in target-specific code ## [0.2.168](https://github.com/rust-lang/libc/compare/0.2.167...0.2.168) - 2024-12-09 ### Added - Linux: Add new process flags ([#4174](https://github.com/rust-lang/libc/pull/4174)) - Linux: Make `IFA_*` constants available on all Linux targets - Linux: add `MAP_DROPPABLE` - Solaris, Illumos: add `SIGRTMIN` and `SIGRTMAX` - Unix, Linux: adding POSIX `memccpy` and `mempcpy` GNU extension - CI: Upload artifacts created by libc-test - CI: Use workflow commands to group output by target - CI: add caching ## [0.2.167](https://github.com/rust-lang/libc/compare/0.2.166...0.2.167) - 2024-11-28 ### Added - Solarish: add `st_fstype` to `stat` - Trusty: Add `intptr_t` and `uintptr_t` ([#4161](https://github.com/rust-lang/libc/pull/4161)) ### Fixed - Fix the build with `rustc-dep-of-std` - Wasi: Add back unsafe block for `clockid_t` static variables ([#4157](https://github.com/rust-lang/libc/pull/4157)) ### Cleanup - Create an internal prelude - Fix `unused_qualifications` ### Other - CI: Check various FreeBSD versions ([#4159](https://github.com/rust-lang/libc/pull/4159)) - CI: add a timeout for all jobs - CI: verify MSRV for `wasm32-wasi` - Migrate to the 2021 edition ### Removed - Remove one unused import after the edition 2021 bump ## [0.2.166](https://github.com/rust-lang/libc/compare/0.2.165...0.2.166) - 2024-11-26 ### Fixed This release resolves two cases of unintentional breakage from the previous release: - Revert removal of array size hacks [#4150](https://github.com/rust-lang/libc/pull/4150) - Ensure `const extern` functions are always enabled [#4151](https://github.com/rust-lang/libc/pull/4151) ## [0.2.165](https://github.com/rust-lang/libc/compare/0.2.164...0.2.165) - 2024-11-25 ### Added - Android: add `mkostemp`, `mkostemps` - Android: add a few API 30 calls - Android: add missing syscall constants - Apple: add `in6_ifreq` - Apple: add missing `sysctl` net types (before release: remove `if_family_id` ([#4137](https://github.com/rust-lang/libc/pulls/4137))) - Freebsd: add `kcmp` call support - Hurd: add `MAP_32BIT` and `MAP_EXCL` - Hurd: add `domainname` field to `utsname` ([#4089](https://github.com/rust-lang/libc/pulls/4089)) - Linux GNU: add `f_flags` to struct `statfs` for arm, mips, powerpc and x86 - Linux GNU: add `malloc_stats` - Linux: add ELF relocation-related structs - Linux: add `ptp_*` structs - Linux: add `ptp_clock_caps` - Linux: add `ptp_pin_function` and most `PTP_` constants - Linux: add missing AF_XDP structs & constants - Linux: add missing netfilter consts ([#3734](https://github.com/rust-lang/libc/pulls/3734)) - Linux: add struct and constants for the `mount_setattr` syscall - Linux: add wireless API - Linux: expose the `len8_dlc` field of `can_frame` - Musl: add `utmpx` API - Musl: add missing syscall constants - NetBSD: add `mcontext`-related data for RISCV64 - Redox: add new `netinet` constants ) - Solarish: add `_POSIX_VDISABLE` ([#4103](https://github.com/rust-lang/libc/pulls/4103)) - Tests: Add a test that the `const extern fn` macro works - Tests: Add test of primitive types against `std` - Unix: Add `htonl`, `htons`, `ntohl`, `ntohs` - Unix: add `aligned_alloc` - Windows: add `aligned_realloc` ### Fixed - **breaking** Hurd: fix `MAP_HASSEMAPHORE` name ([#4127](https://github.com/rust-lang/libc/pulls/4127)) - **breaking** ulibc Mips: fix `SA_*` mismatched types ([#3211](https://github.com/rust-lang/libc/pulls/3211)) - Aix: fix an enum FFI safety warning - Haiku: fix some typos ([#3664](https://github.com/rust-lang/libc/pulls/3664)) - Tests: fix `Elf{32,64}_Relr`-related tests - Tests: fix libc-tests for `loongarch64-linux-musl` - Tests: fix some clippy warnings - Tests: fix tests on `riscv64gc-unknown-freebsd` ### Deprecated - Apple: deprecate `iconv_open` - Apple: deprecate `mach_task_self` - Apple: update `mach` deprecation notices for things that were removed in `main` ### Cleanup - Adjust the `f!` macro to be more flexible - Aix: remove duplicate constants - CI: make scripts more uniform - Drop the `libc_align` conditional - Drop the `libc_cfg_target_vendor` conditional - Drop the `libc_const_size_of` conditional - Drop the `libc_core_cvoid` conditional - Drop the `libc_int128` conditional - Drop the `libc_non_exhaustive` conditional - Drop the `libc_packedN` conditional - Drop the `libc_priv_mod_use` conditional - Drop the `libc_union` conditional - Drop the `long_array` conditional - Drop the `ptr_addr_of` conditional - Drop warnings about deprecated cargo features - Eliminate uses of `struct_formatter` - Fix a few other array size hacks - Glibc: remove redundant definitions ([#3261](https://github.com/rust-lang/libc/pulls/3261)) - Musl: remove redundant definitions ([#3261](https://github.com/rust-lang/libc/pulls/3261)) - Musl: unify definitions of `siginfo_t` ([#3261](https://github.com/rust-lang/libc/pulls/3261)) - Musl: unify definitions of statfs and statfs64 ([#3261](https://github.com/rust-lang/libc/pulls/3261)) - Musl: unify definitions of statvfs and statvfs64 ([#3261](https://github.com/rust-lang/libc/pulls/3261)) - Musl: unify statx definitions ([#3978](https://github.com/rust-lang/libc/pulls/3978)) - Remove array size hacks for Rust < 1.47 - Remove repetitive words - Use #[derive] for Copy/Clone in s! and friends - Use some tricks to format macro bodies ### Other - Apply formatting to macro bodies - Bump libc-test to Rust 2021 Edition - CI: Add a check that semver files don't contain duplicate entries - CI: Add `fanotify_event_info_fid` to FAM-exempt types - CI: Allow rustfmt to organize imports ([#4136](https://github.com/rust-lang/libc/pulls/4136)) - CI: Always run rustfmt - CI: Change 32-bit Docker images to use EOL repos - CI: Change 64-bit Docker images to ubuntu:24.10 - CI: Disable the check for >1 s! invocation - CI: Ensure build channels get run even if FILTER is unset - CI: Ensure there is a fallback for no_std - CI: Fix cases where unset variables cause errors - CI: Naming adjustments and cleanup - CI: Only invoke rustup if running in CI - CI: Remove the logic to handle old rust versions - CI: Set -u (error on unset) in all script files - CI: add support for `loongarch64-unknown-linux-musl` - CI: make `aarch64-apple-darwin` not a nightly-only target - CI: run shellcheck on all scripts - CI: update musl headers to Linux 6.6 - CI: use qemu-sparc64 to run sparc64 tests - Drop the `libc_const_extern_fn` conditional - Drop the `libc_underscore_const_names` conditional - Explicitly set the edition to 2015 - Introduce a `git-blame-ignore-revs` file - Tests: Ignore fields as required on Ubuntu 24.10 - Tests: skip `ATF_*` constants for OpenBSD - Triagebot: Add an autolabel for CI ## [0.2.164](https://github.com/rust-lang/libc/compare/0.2.163...0.2.164) - 2024-11-16 ### MSRV This release increases the MSRV of `libc` to 1.63. ### Other - CI: remove tests with rust < 1.63 - MSRV: document the MSRV of the stable channel to be 1.63 - MacOS: move ifconf to s_no_extra_traits ## [0.2.163](https://github.com/rust-lang/libc/compare/0.2.162...0.2.163) - 2024-11-16 ### Added - Aix: add more `dlopen` flags - Android: add group calls - FreeBSD: add `TCP_FUNCTION_BLK` and `TCP_FUNCTION_ALIAS` - Linux: add `confstr` - Solarish: add `aio` - Solarish: add `arc4random*` ### Changed - Emscripten: upgrade emsdk to 3.1.68 - Hurd: use more standard types - Hurd: use the standard `ssize_t = isize` - Solaris: fix `confstr` and `ucontext_t` ### Other - CI: add Solaris - CI: add `i686-unknown-freebsd` - CI: ensure that calls to `sort` do not depend on locale - Specify `rust-version` in `Cargo.toml` ## [0.2.162](https://github.com/rust-lang/libc/compare/0.2.161...0.2.162) - 2024-11-07 ### Added - Android: fix the alignment of `uc_mcontext` on arm64 - Apple: add `host_cpu_load_info` - ESP-IDF: add a time flag - FreeBSD: add the `CLOSE_RANGE_CLOEXEC` flag - FreeBSD: fix test errors regarding `__gregset_t` - FreeBSD: fix tests on x86 FreeBSD 15 - FreeBSD: make `ucontext_t` and `mcontext_t` available on all architectures - Haiku: add `getentropy` - Illumos: add `syncfs` - Illumos: add some recently-added constants - Linux: add `ioctl` flags - Linux: add epoll busy polling parameters - NuttX: add `pthread_[get/set]name_np` - RTEMS: add `arc4random_buf` - Trusty OS: add initial support - WASIp2: expand socket support ### Fixed - Emscripten: don't pass `-lc` - Hurd: change `st_fsid` field to `st_dev` - Hurd: fix the definition of `utsname` - Illumos/Solaris: fix `FNM_CASEFOLD` definition - Solaris: fix all tests ### Other - CI: Add loongarch64 - CI: Check that semver files are sorted - CI: Re-enable the FreeBSD 15 job - Clean up imports and `extern crate` usage - Convert `mode_t` constants to octal - Remove the `wasm32-wasi` target that has been deleted upstream ## [0.2.161](https://github.com/rust-lang/libc/compare/0.2.160...0.2.161) - 2024-10-17 ### Fixed - OpenBSD: fix `FNM_PATHNAME` and `FNM_NOESCAPE` values ## [0.2.160](https://github.com/rust-lang/libc/compare/0.2.159...0.2.160) - 2024-10-17 ### Added - Android: add `PR_GET_NAME` and `PR_SET_NAME` - Apple: add `F_TRANSFEREXTENTS` - Apple: add `mach_error_string` - Apple: add additional `pthread` APIs - Apple: add the `LOCAL_PEERTOKEN` socket option - BSD: add `RTF_*`, `RTA_*`, `RTAX_*`, and `RTM_*` definitions - Emscripten: add `AT_EACCESS` - Emscripten: add `getgrgid`, `getgrnam`, `getgrnam_r` and `getgrgid_r` - Emscripten: add `getpwnam_r` and `getpwuid_r` - FreeBSD: add `POLLRDHUP` - Haiku: add `arc4random` - Illumos: add `ptsname_r` - Linux: add `fanotify` interfaces - Linux: add `tcp_info` - Linux: add additional AF_PACKET options - Linux: make Elf constants always available - Musl x86: add `iopl` and `ioperm` - Musl: add `posix_spawn` chdir functions - Musl: add `utmpx.h` constants - NetBSD: add `sysctlnametomib`, `CLOCK_THREAD_CPUTIME_ID` and `CLOCK_PROCESS_CPUTIME_ID` - Nuttx: initial support - RTEMS: add `getentropy` - RTEMS: initial support - Solarish: add `POLLRDHUP`, `POSIX_FADV_*`, `O_RSYNC`, and `posix_fallocate` - Unix: add `fnmatch.h` - VxWorks: add riscv64 support - VxWorks: update constants related to the scheduler ### Changed - Redox: change `ino_t` to be `c_ulonglong` ### Fixed - ESP-IDF: fix mismatched constants and structs - FreeBSD: fix `struct stat` on FreeBSD 12+ ### Other - CI: Fix CI for FreeBSD 15 - Docs: link to `windows-sys` ## [0.2.159](https://github.com/rust-lang/libc/compare/0.2.158...0.2.159) - 2024-09-24 ### Added - Android: add more `AT_*` constants in - Apple: add missing `NOTE_*` constants in - Hermit: add missing error numbers in - Hurd: add `__timeval` for 64-bit support in - Linux: add `epoll_pwait2` in - Linux: add `mq_notify` in - Linux: add missing `NFT_CT_*` constants in - Linux: add the `fchmodat2` syscall in - Linux: add the `mseal` syscall in - OpenBSD: add `sendmmsg` and `recvmmsg` in - Unix: add `IN6ADDR_ANY_INIT` and `IN6ADDR_LOOPBACK_INIT` in - VxWorks: add `S_ISVTX` in - VxWorks: add `vxCpuLib` and `taskLib` functions - WASIp2: add definitions for `std::net` support in ### Fixed - Correctly handle version checks when `clippy-driver` is used ### Changed - EspIdf: change signal constants to c_int in - HorizonOS: update network definitions in - Linux: combine `ioctl` APIs in - WASI: enable CI testing in - WASIp2: enable CI testing in ## [0.2.158](https://github.com/rust-lang/libc/compare/0.2.157...0.2.158) - 2024-08-19 ### Other - WASI: fix missing `Iterator` with `rustc-dep-of-std` in ## [0.2.157](https://github.com/rust-lang/libc/compare/0.2.156...0.2.157) - 2024-08-17 ### Added - Apple: add `_NSGetArgv`, `_NSGetArgc` and `_NSGetProgname` in - Build: add `RUSTC_WRAPPER` support in - FreeBSD: add `execvpe` support from 14.1 release in - Fuchsia: add `SO_BINDTOIFINDEX` - Linux: add `klogctl` in - MacOS: add `fcntl` OFD commands in - NetBSD: add `_lwp_park` in - Solaris: add missing networking support in - Unix: add `pthread_equal` in - WASI: add `select`, `FD_SET`, `FD_ZERO`, `FD_ISSET ` in ### Fixed - TEEOS: fix octal notation for `O_*` constants in ### Changed - FreeBSD: always use freebsd12 when `rustc_dep_of_std` is set in ## [0.2.156](https://github.com/rust-lang/libc/compare/v0.2.155...v0.2.156) - 2024-08-15 ### Added - Apple: add `F_ALLOCATEPERSIST` in - Apple: add `os_sync_wait_on_address` and related definitions in - BSD: generalise `IPV6_DONTFRAG` to all BSD targets in - FreeBSD/DragonFly: add `IP_RECVTTL`/`IPV6_RECVHOPLIMIT` in - Hurd: add `XATTR_CREATE`, `XATTR_REPLACE` in - Linux GNU: `confstr` API and `_CS_*` in - Linux musl: add `preadv2` and `pwritev2` (1.2.5 min.) in - VxWorks: add the constant `SOMAXCONN` in - VxWorks: add a few errnoLib related constants in ### Fixed - Solaris/illumos: Change `ifa_flags` type to u64 in - QNX 7.0: Disable `libregex` in ### Changed - QNX NTO: update platform support in - `addr_of!(EXTERN_STATIC)` is now considered safe in ### Removed - Apple: remove `rmx_state` in ### Other - Update or remove CI tests that have been failing # Changelog ## [0.2.184](https://github.com/rust-lang/libc/compare/0.2.183...0.2.184) - 2026-04-01 ### MSRV This release increases the MSRV of `libc` to 1.65. With this update, you can now always use the `core::ffi::c_*` types with `libc` definitions, since `libc` has been changed to reexport from `core` rather than redefining them. (This _usually_ worked before but had edge cases.) ([#4972](https://github.com/rust-lang/libc/pull/4972)) ### Added - BSD: Add `IP_MINTTL` to bsd ([#5026](https://github.com/rust-lang/libc/pull/5026)) - Cygwin: Add `TIOCM_DSR` ([#5031](https://github.com/rust-lang/libc/pull/5031)) - FreeBSD: Added `xfile` structe and file descriptor types ([#5002](https://github.com/rust-lang/libc/pull/5002)) - Linux: Add CAN netlink bindings ([#5011](https://github.com/rust-lang/libc/pull/5011)) - Linux: Add `struct ethhdr` ([#4239](https://github.com/rust-lang/libc/pull/4239)) - Linux: Add `struct ifinfomsg` ([#5012](https://github.com/rust-lang/libc/pull/5012)) - Linux: Define `max_align_t` for riscv64 ([#5029](https://github.com/rust-lang/libc/pull/5029)) - NetBSD: Add missing `CLOCK_` constants ([#5020](https://github.com/rust-lang/libc/pull/5020)) - NuttX: Add `_SC_HOST_NAME_MAX` ([#5004](https://github.com/rust-lang/libc/pull/5004)) - VxWorks: Add `flock` and `F_*LCK` constants ([#4043](https://github.com/rust-lang/libc/pull/4043)) - WASI: Add all `_SC_*` sysconf constants ([#5023](https://github.com/rust-lang/libc/pull/5023)) ### Deprecated The remaining fixed-width integer aliases, `__uint128_t`, `__uint128`, `__int128_t`, and `__int128`, have been deprecated. Use `i128` and `u128` instead. ([#4343](https://github.com/rust-lang/libc/pull/4343)) ### Fixed - **breaking** Redox: Fix signal action constant types ([#5009](https://github.com/rust-lang/libc/pull/5009)) - EspIDF: Correct the value of `DT_*` constants ([#5034](https://github.com/rust-lang/libc/pull/5034)) - Redox: Fix locale values and add `RTLD_NOLOAD`, some TCP constants ([#5025](https://github.com/rust-lang/libc/pull/5025)) - Various: Use `Padding::new()` rather than `Padding::uninit()` ([#5036](https://github.com/rust-lang/libc/pull/5036)) ### Changed - **potentially breaking** Linux: Add new fields to `struct ptrace_syscall_info` ([#4966](https://github.com/rust-lang/libc/pull/4966)) - Re-export `core::ffi` integer types rather than redefining ([#5015](https://github.com/rust-lang/libc/pull/5015)) - Redox: Update `F_DUPFD`, `IP`, and `TCP` constants to match relibc ([#4990](https://github.com/rust-lang/libc/pull/4990)) ## [0.2.183](https://github.com/rust-lang/libc/compare/0.2.182...0.2.183) - 2026-03-08 ### Added - ESP-IDF: Add `SOMAXCONN` ([#4993](https://github.com/rust-lang/libc/pull/4993)) - Linux: Add `name_to_handle_at` and `open_by_handle_at` ([#4988](https://github.com/rust-lang/libc/pull/4988)) - NetBSD: Add `kinfo_file`, `kinfo_pcb`, and related constants ([#4985](https://github.com/rust-lang/libc/pull/4985)) - OpenBSD: Add `kinfo_file` and related constants ([#4991](https://github.com/rust-lang/libc/pull/4991)) - VxWorks: Add additional structs and defines ([#5003](https://github.com/rust-lang/libc/pull/5003)) - Various: Implement `Default` for `timeval` and `timespec` ([#4976](https://github.com/rust-lang/libc/pull/4976)) ### Fixed - Hexagon musl: Enable unstable 64-bit `time_t` support and `musl_v1_2_3` ([#4992](https://github.com/rust-lang/libc/pull/4992)) - Nintendo Switch: Fix target support ([#4982](https://github.com/rust-lang/libc/pull/4982)) - OpenBSD: Wrap an unused field in `Padding` ([#4997](https://github.com/rust-lang/libc/pull/4997)) - Redox: Change `sigaction.sa_flags` to `c_int` ([#4986](https://github.com/rust-lang/libc/pull/4986)) - Redox: Fix `blkcnt_t` type ([#4994](https://github.com/rust-lang/libc/pull/4994)) ## [0.2.182](https://github.com/rust-lang/libc/compare/0.2.181...0.2.182) - 2026-02-13 ### Added - Android, Linux: Add `tgkill` ([#4970](https://github.com/rust-lang/libc/pull/4970)) - Redox: Add `RENAME_NOREPLACE` ([#4968](https://github.com/rust-lang/libc/pull/4968)) - Redox: Add `renameat2` ([#4968](https://github.com/rust-lang/libc/pull/4968)) ## [0.2.181](https://github.com/rust-lang/libc/compare/0.2.180...0.2.181) - 2026-02-09 ### Added - Apple: Add `MADV_ZERO` ([#4924](https://github.com/rust-lang/libc/pull/4924)) - Redox: Add `makedev`, `major`, and `minor` ([#4928](https://github.com/rust-lang/libc/pull/4928)) - GLibc: Add `PTRACE_SET_SYSCALL_INFO` ([#4933](https://github.com/rust-lang/libc/pull/4933)) - OpenBSD: Add more kqueue related constants for ([#4945](https://github.com/rust-lang/libc/pull/4945)) - Linux: add CAN error types ([#4944](https://github.com/rust-lang/libc/pull/4944)) - OpenBSD: Add siginfo_t::si_status ([#4946](https://github.com/rust-lang/libc/pull/4946)) - QNX NTO: Add `max_align_t` ([#4927](https://github.com/rust-lang/libc/pull/4927)) - Illumos: Add `_CS_PATH` ([#4956](https://github.com/rust-lang/libc/pull/4956)) - OpenBSD: add `ppoll` ([#4957](https://github.com/rust-lang/libc/pull/4957)) ### Fixed - **breaking**: Redox: Fix the type of dev_t ([#4928](https://github.com/rust-lang/libc/pull/4928)) - AIX: Change 'tv_nsec' of 'struct timespec' to type 'c_long' ([#4931](https://github.com/rust-lang/libc/pull/4931)) - AIX: Use 'struct st_timespec' in 'struct stat{,64}' ([#4931](https://github.com/rust-lang/libc/pull/4931)) - Glibc: Link old version of `tc{g,s}etattr` ([#4938](https://github.com/rust-lang/libc/pull/4938)) - Glibc: Link the correct version of `cf{g,s}et{i,o}speed` on mips{32,64}r6 ([#4938](https://github.com/rust-lang/libc/pull/4938)) - OpenBSD: Fix constness of tm.tm_zone ([#4948](https://github.com/rust-lang/libc/pull/4948)) - OpenBSD: Fix the definition of `ptrace_thread_state` ([#4947](https://github.com/rust-lang/libc/pull/4947)) - QuRT: Fix type visibility and defs ([#4932](https://github.com/rust-lang/libc/pull/4932)) - Redox: Fix values for `PTHREAD_MUTEX_{NORMAL, RECURSIVE}` ([#4943](https://github.com/rust-lang/libc/pull/4943)) - Various: Mark additional fields as private padding ([#4922](https://github.com/rust-lang/libc/pull/4922)) ### Changed - Fuchsia: Update `SO_*` constants ([#4937](https://github.com/rust-lang/libc/pull/4937)) - Revert "musl: convert inline timespecs to timespec" (resolves build issues on targets only supported by Musl 1.2.3+ ) ([#4958](https://github.com/rust-lang/libc/pull/4958)) ## [0.2.180](https://github.com/rust-lang/libc/compare/0.2.179...0.2.180) - 2026-01-08 ### Added - QNX: Add missing BPF and ifreq structures ([#4769](https://github.com/rust-lang/libc/pull/4769)) ### Fixed - Linux, L4Re: address soundness issues of `CMSG_NXTHDR` ([#4903](https://github.com/rust-lang/libc/pull/4903)) - Linux-like: Handle zero-sized payload differences in `CMSG_NXTHDR` ([#4903](https://github.com/rust-lang/libc/pull/4903)) - Musl: Fix incorrect definitions of struct stat on some 32-bit architectures ([#4914](https://github.com/rust-lang/libc/pull/4914)) - NetBSD: RISC-V 64: Correct `mcontext` type definitions ([#4886](https://github.com/rust-lang/libc/pull/4886)) - uClibc: Re-enable `__SIZEOF_PTHREAD_COND_T` on non-L4Re uclibc ([#4915](https://github.com/rust-lang/libc/pull/4915)) - uClibc: Restructure Linux `netlink` module to resolve build errors ([#4915](https://github.com/rust-lang/libc/pull/4915)) ## [0.2.179](https://github.com/rust-lang/libc/compare/0.2.178...0.2.179) - 2025-01-03 With this release, we now have _unstable_ support for 64-bit `time_t` on 32-bit platforms with both Musl and Glibc. Testing is appreciated! For now, these can be enabled by setting environment variables during build: ```text RUST_LIBC_UNSTABLE_MUSL_V1_2_3=1 RUST_LIBC_UNSTABLE_GNU_TIME_BITS=64 ``` Note that the exact configuration will change in the future. Setting the `MUSL_V1_2_3` variable also enables some newer API unrelated to `time_t`. ### Added - L4Re: Add uclibc aarch64 support ([#4479](https://github.com/rust-lang/libc/pull/4479)) - Linux, Android: Add a generic definition for `XCASE` ([#4847](https://github.com/rust-lang/libc/pull/4847)) - Linux-like: Add `NAME_MAX` ([#4888](https://github.com/rust-lang/libc/pull/4888)) - Linux: Add `AT_EXECVE_CHECK` ([#4422](https://github.com/rust-lang/libc/pull/4422)) - Linux: Add the `SUN_LEN` macro ([#4269](https://github.com/rust-lang/libc/pull/4269)) - Linux: add `getitimer` and `setitimer` ([#4890](https://github.com/rust-lang/libc/pull/4890)) - Linux: add `pthread_tryjoin_n` and `pthread_timedjoin_np` ([#4887](https://github.com/rust-lang/libc/pull/4887)) - Musl: Add unstable support for 64-bit `time_t` on 32-bit platforms ([#4463](https://github.com/rust-lang/libc/pull/4463)) - NetBSD, OpenBSD: Add interface `LINK_STATE_*` definitions from `sys/net/if.h` ([#4751](https://github.com/rust-lang/libc/pull/4751)) - QuRT: Add support for Qualcomm QuRT ([#4845](https://github.com/rust-lang/libc/pull/4845)) - Types: Add Padding::uninit() ([#4862](https://github.com/rust-lang/libc/pull/4862)) ### Fixed - Glibc: Link old version of `cf{g,s}et{i,o}speed` ([#4882](https://github.com/rust-lang/libc/pull/4882)) - L4Re: Fixes for `pthread` ([#4479](https://github.com/rust-lang/libc/pull/4479)) - L4re: Fix a wide variety of incorrect definitions ([#4479](https://github.com/rust-lang/libc/pull/4479)) - Musl: Fix the value of `CPU_SETSIZE` on musl 1.2+ ([#4865](https://github.com/rust-lang/libc/pull/4865)) - Musl: RISC-V: fix public padding fields in `stat/stat64` ([#4463](https://github.com/rust-lang/libc/pull/4463)) - Musl: s390x: Fix definition of `SIGSTKSZ`/`MINSIGSTKSZ` ([#4884](https://github.com/rust-lang/libc/pull/4884)) - NetBSD: Arm: Fix `PT_{GET,SET}FPREGS`, `_REG_TIPDR`, and `_REG_{LR,SP}` ([#4899](https://github.com/rust-lang/libc/pull/4899)) - NetBSD: Fix `if_msghdr` alignment ([#4902](https://github.com/rust-lang/libc/pull/4902)) - NetBSD: Fix `siginfo_t` layout on 32-bit platforms ([#4904](https://github.com/rust-lang/libc/pull/4904)) - NetBSD: change definition of `pthread_spin_t` to allow arch redefinition. ([#4899](https://github.com/rust-lang/libc/pull/4899)) - Newlib: Fix ambiguous glob exports and other warnings for Vita and 3DS ([#4875](https://github.com/rust-lang/libc/pull/4875)) - QNX: Fix build error ([#4879](https://github.com/rust-lang/libc/pull/4879)) ### Changed - CI: Update CI images to FreeBSD 15.0-release ([#4857](https://github.com/rust-lang/libc/pull/4857)) - L4Re: Make `pthread` struct fields private ([#4876](https://github.com/rust-lang/libc/pull/4876)) - Linux, Fuchsia: Mark mq_attr padding area as such ([#4858](https://github.com/rust-lang/libc/pull/4858)) - Types: Wrap a number of private fields in the `Padding` type ([#4862](https://github.com/rust-lang/libc/pull/4862)) ### Removed - Build: Remove `RUST_LIBC_UNSTABLE_LINUX_TIME_BITS64` ([#4865](https://github.com/rust-lang/libc/pull/4865)) - WASI: Remove nonexistent clocks ([#4880](https://github.com/rust-lang/libc/pull/4880)) ## [0.2.178](https://github.com/rust-lang/libc/compare/0.2.177...0.2.178) - 2025-12-01 ### Added - BSD: Add `issetugid` ([#4744](https://github.com/rust-lang/libc/pull/4744)) - Cygwin: Add missing utmp/x.h, grp.h, and stdio.h interfaces ([#4827](https://github.com/rust-lang/libc/pull/4827)) - Linux s390x musl: Add `__psw_t`/`fprefset_t`/`*context_t` ([#4726](https://github.com/rust-lang/libc/pull/4726)) - Linux, Android: Add definition for IUCLC ([#4846](https://github.com/rust-lang/libc/pull/4846)) - Linux, FreeBSD: Add `AT_HWCAP{3,4}` ([#4734](https://github.com/rust-lang/libc/pull/4734)) - Linux: Add definitions from linux/can/bcm.h ([#4683](https://github.com/rust-lang/libc/pull/4683)) - Linux: Add syscalls 451-469 for m68k ([#4850](https://github.com/rust-lang/libc/pull/4850)) - Linux: PowerPC: Add 'ucontext.h' definitions ([#4696](https://github.com/rust-lang/libc/pull/4696)) - NetBSD: Define `eventfd` ([#4830](https://github.com/rust-lang/libc/pull/4830)) - Newlib: Add missing constants from `unistd.h` ([#4811](https://github.com/rust-lang/libc/pull/4811)) - QNX NTO: Add `cfmakeraw` ([#4704](https://github.com/rust-lang/libc/pull/4704)) - QNX NTO: Add `cfsetspeed` ([#4704](https://github.com/rust-lang/libc/pull/4704)) - Redox: Add `getresgid` and `getresuid` ([#4752](https://github.com/rust-lang/libc/pull/4752)) - Redox: Add `setresgid` and `setresuid` ([#4752](https://github.com/rust-lang/libc/pull/4752)) - VxWorks: Add definitions from `select.h`, `stat.h`, `poll.h`, `ttycom.h`, `utsname.h`, `resource.h`, `mman.h`, `udp.h`, `in.h`, `in6.h`, `if.h`, `fnmatch.h`, and `sioLibCommon.h` ([#4781](https://github.com/rust-lang/libc/pull/4781)) - VxWorks: Add missing defines/functions needed by rust stdlib ([#4779](https://github.com/rust-lang/libc/pull/4779)) - WASI: Add more definitions for libstd ([#4747](https://github.com/rust-lang/libc/pull/4747)) ### Deprecated - Apple: Deprecate `TIOCREMOTE` ([#4764](https://github.com/rust-lang/libc/pull/4764)) ### Fixed Note that there were a large number of fixes on NetBSD for this `libc` release, some of which include minor breakage. - AIX: Change errno `EWOULDBLOCK` to make it an alias of `EAGAIN` ([#4790](https://github.com/rust-lang/libc/pull/4790)) - AIX: Resolve function comparison and `unnecessary_transmutes` warnings ([#4780](https://github.com/rust-lang/libc/pull/4780)) - Apple: Correct the value of `SF_SETTABLE` ([#4764](https://github.com/rust-lang/libc/pull/4764)) - DragonflyBSD: Fix the type of `mcontext_t.mc_fpregs` ([#]()) - EspIDF: Fix the duplicate definition of `gethostname` ([#4773](https://github.com/rust-lang/libc/pull/4773)) - L4Re: Update available pthread API ([#4836](https://github.com/rust-lang/libc/pull/4836)) - Linux: Correct the value of `NFT_MSG_MAX` ([#4761](https://github.com/rust-lang/libc/pull/4761)) - Linux: Remove incorrect `repr(align(8))` for `canxl_frame` ([#4760](https://github.com/rust-lang/libc/pull/4760)) - Make `eventfd` argument names match OS docs/headers ([#4830](https://github.com/rust-lang/libc/pull/4830)) - NetBSD: Account for upstream changes to ptrace with LWP ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Correct `ipc_perm`, split from OpenBSD as `ipc.rs` ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Correct a number of symbol link names ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Correct the type of `kinfo_vmentry.kve_path` ([#]()) - NetBSD: Fix `uucred.cr_ngroups` from `int` to `short` ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Fix the type of `kevent.udata` ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Fix the type of `mcontext_t.__fpregs` ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Fix the value of `PT_SUSPEND` ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Fix the values of FNM_* constants ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Increase the size of `sockaddr_dl.sdl_data` from 12 to 24 ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Introduce `if_.rs`, fix the definition of `ifreq` ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Introduce `time.rs`, fix the values of `CLOCK_*_CPUTIME_ID` ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Introduce `timex.rs` ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Introduce `types.rs`, correct the definition of `lwpid_t` ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Introduce `utmp_.rs`, correct the definition of `lastlog` ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Introduce `utmpx_.rs`, correct utmpx definitions ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Make `_cpuset` an extern type ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: RISC-V 64: Fix the `mcontext` types ([#4782](https://github.com/rust-lang/libc/pull/4782)) - Nuttx: Resolve warnings ([#4773](https://github.com/rust-lang/libc/pull/4773)) - OHOS: Don't emit duplicate lfs64 definitions ([#4804](https://github.com/rust-lang/libc/pull/4804)) - Redox: Fix the type of `pid_t` ([#4825](https://github.com/rust-lang/libc/pull/4825)) - WASI: Gate `__wasilibc_register_preopened_fd` ([#4837](https://github.com/rust-lang/libc/pull/4837)) - Wali: Fix unknown config ([#4773](https://github.com/rust-lang/libc/pull/4773)) ### Changed - AIX: Declare field 'tv_nsec' of structure 'timespec' as 'i32' in both 32-bit and 64-bit modes ([#4750](https://github.com/rust-lang/libc/pull/4750)) - DragonFly: Avoid usage of `thread_local` ([#3653](https://github.com/rust-lang/libc/pull/3653)) - Linux: Update the definition for `ucontext_t` and unskip its tests ([#4760](https://github.com/rust-lang/libc/pull/4760)) - MinGW: Set `L_tmpnam` and `TMP_MAX` to the UCRT value ([#4566](https://github.com/rust-lang/libc/pull/4566)) - WASI: More closely align pthread type reprs ([#4747](https://github.com/rust-lang/libc/pull/4747)) - Simplify rustc-check-cfg emission in build.rs ([#4724](https://github.com/rust-lang/libc/pull/4724)) - Transition a number of definitions to the new source structure (internal change) ### Removed - MIPS Musl: Remove rogue definition of `SIGSTKFLT` ([#4749](https://github.com/rust-lang/libc/pull/4749)) - NetBSD: Make `statvfs.f_spare` non-public ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Remove BPF constants ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Remove `*_MAXID` constants and `AT_SUN_LDPGSIZE` ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Remove `IFF_NOTRAILERS` ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Remove `vm_size_t` ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Replace REG_ENOSYS with REG_ILLSEQ ([#4782](https://github.com/rust-lang/libc/pull/4782)) ## [0.2.177](https://github.com/rust-lang/libc/compare/0.2.176...0.2.177) - 2025-10-09 ### Added - Apple: Add `TIOCGETA`, `TIOCSETA`, `TIOCSETAW`, `TIOCSETAF` constants ([#4736](https://github.com/rust-lang/libc/pull/4736)) - Apple: Add `pthread_cond_timedwait_relative_np` ([#4719](https://github.com/rust-lang/libc/pull/4719)) - BSDs: Add `_CS_PATH` constant ([#4738](https://github.com/rust-lang/libc/pull/4738)) - Linux-like: Add `SIGEMT` for mips* and sparc* architectures ([#4730](https://github.com/rust-lang/libc/pull/4730)) - OpenBSD: Add `elf_aux_info` ([#4729](https://github.com/rust-lang/libc/pull/4729)) - Redox: Add more sysconf constants ([#4728](https://github.com/rust-lang/libc/pull/4728)) - Windows: Add `wcsnlen` ([#4721](https://github.com/rust-lang/libc/pull/4721)) ### Changed - WASIP2: Invert conditional to include p2 APIs ([#4733](https://github.com/rust-lang/libc/pull/4733)) ## [0.2.176](https://github.com/rust-lang/libc/compare/0.2.175...0.2.176) - 2025-09-23 ### Support - The default FreeBSD version has been raised from 11 to 12. This matches `rustc` since 1.78. ([#2406](https://github.com/rust-lang/libc/pull/2406)) - `Debug` is now always implemented, rather than being gated behind the `extra_traits` feature. ([#4624](https://github.com/rust-lang/libc/pull/4624)) ### Added - AIX: Restore some non-POSIX functions guarded by the `_KERNEL` macro. ([#4607](https://github.com/rust-lang/libc/pull/4607)) - FreeBSD 14: Add `st_fileref` to `struct stat` ([#4642](https://github.com/rust-lang/libc/pull/4642)) - Haiku: Add the `accept4` POSIX call ([#4586](https://github.com/rust-lang/libc/pull/4586)) - Introduce a wrapper for representing padding ([#4632](https://github.com/rust-lang/libc/pull/4632)) - Linux: Add `EM_RISCV` ([#4659](https://github.com/rust-lang/libc/pull/4659)) - Linux: Add `MS_NOSYMFOLLOW` ([#4389](https://github.com/rust-lang/libc/pull/4389)) - Linux: Add `backtrace_symbols(_fd)` ([#4668](https://github.com/rust-lang/libc/pull/4668)) - Linux: Add missing `SOL_PACKET` optnames ([#4669](https://github.com/rust-lang/libc/pull/4669)) - Musl s390x: Add `SYS_mseal` ([#4549](https://github.com/rust-lang/libc/pull/4549)) - NuttX: Add `__errno` ([#4687](https://github.com/rust-lang/libc/pull/4687)) - Redox: Add `dirfd`, `VDISABLE`, and resource consts ([#4660](https://github.com/rust-lang/libc/pull/4660)) - Redox: Add more `resource.h`, `fcntl.h` constants ([#4666](https://github.com/rust-lang/libc/pull/4666)) - Redox: Enable `strftime` and `mkostemp[s]` ([#4629](https://github.com/rust-lang/libc/pull/4629)) - Unix, Windows: Add `qsort_r` (Unix), and `qsort(_s)` (Windows) ([#4677](https://github.com/rust-lang/libc/pull/4677)) - Unix: Add `dlvsym` for Linux-gnu, FreeBSD, and NetBSD ([#4671](https://github.com/rust-lang/libc/pull/4671)) - Unix: Add `sigqueue` ([#4620](https://github.com/rust-lang/libc/pull/4620)) ### Changed - FreeBSD 15: Mark `kinfo_proc` as non-exhaustive ([#4553](https://github.com/rust-lang/libc/pull/4553)) - FreeBSD: Set the ELF symbol version for `readdir_r` ([#4694](https://github.com/rust-lang/libc/pull/4694)) - Linux: Correct the config for whether or not `epoll_event` is packed ([#4639](https://github.com/rust-lang/libc/pull/4639)) - Tests: Replace the old `ctest` with the much more reliable new implementation ([#4655](https://github.com/rust-lang/libc/pull/4655) and many related PRs) ### Fixed - AIX: Fix the type of the 4th arguement of `getgrnam_r` ([#4656](https://github.com/rust-lang/libc/pull/4656 - FreeBSD: Limit `P_IDLEPROC` to FreeBSD 15 ([#4640](https://github.com/rust-lang/libc/pull/4640)) - FreeBSD: Limit `mcontext_t::mc_tlsbase` to FreeBSD 15 ([#4640](https://github.com/rust-lang/libc/pull/464)) - FreeBSD: Update gating of `mcontext_t.mc_tlsbase` ([#4703](https://github.com/rust-lang/libc/pull/4703)) - Musl s390x: Correct the definition of `statfs[64]` ([#4549](https://github.com/rust-lang/libc/pull/4549)) - Musl s390x: Make `fpreg_t` a union ([#4549](https://github.com/rust-lang/libc/pull/4549)) - Redox: Fix the types of `gid_t` and `uid_t` ([#4689](https://github.com/rust-lang/libc/pull/4689)) - Redox: Fix the value of `MAP_FIXED` ([#4684](https://github.com/rust-lang/libc/pull/4684)) ### Deprecated - Apple: Correct the `deprecated` attribute for `iconv` ([`a97a0b53`](https://github.com/rust-lang/libc/commit/a97a0b53fb7faf5f99cd720ab12b1b8a5bf9f950)) - FreeBSD: Deprecate `TIOCMGDTRWAIT` and `TIOCMSDTRWAIT` ([#4685](https://github.com/rust-lang/libc/pull/4685)) ### Removed - FreeBSD: Remove `JAIL_{GET,SET}_MASK`, `_MC_FLAG_MASK` ([#4691](https://github.com/rust-lang/libc/pull/4691)) ## [0.2.175](https://github.com/rust-lang/libc/compare/0.2.174...0.2.175) - 2025-08-10 ### Added - AIX: Add `getpeereid` ([#4524](https://github.com/rust-lang/libc/pull/4524)) - AIX: Add `struct ld_info` and friends ([#4578](https://github.com/rust-lang/libc/pull/4578)) - AIX: Retore `struct winsize` ([#4577](https://github.com/rust-lang/libc/pull/4577)) - Android: Add UDP socket option constants ([#4619](https://github.com/rust-lang/libc/pull/4619)) - Android: Add `CLONE_CLEAR_SIGHAND` and `CLONE_INTO_CGROUP` ([#4502](https://github.com/rust-lang/libc/pull/4502)) - Android: Add more `prctl` constants ([#4531](https://github.com/rust-lang/libc/pull/4531)) - FreeBSD Add further TCP stack-related constants ([#4196](https://github.com/rust-lang/libc/pull/4196)) - FreeBSD x86-64: Add `mcontext_t.mc_tlsbase ` ([#4503](https://github.com/rust-lang/libc/pull/4503)) - FreeBSD15: Add `kinfo_proc.ki_uerrmsg` ([#4552](https://github.com/rust-lang/libc/pull/4552)) - FreeBSD: Add `in_conninfo` ([#4482](https://github.com/rust-lang/libc/pull/4482)) - FreeBSD: Add `xinpgen` and related types ([#4482](https://github.com/rust-lang/libc/pull/4482)) - FreeBSD: Add `xktls_session` ([#4482](https://github.com/rust-lang/libc/pull/4482)) - Haiku: Add functionality from `libbsd` ([#4221](https://github.com/rust-lang/libc/pull/4221)) - Linux: Add `SECBIT_*` ([#4480](https://github.com/rust-lang/libc/pull/4480)) - NetBSD, OpenBSD: Export `ioctl` request generator macros ([#4460](https://github.com/rust-lang/libc/pull/4460)) - NetBSD: Add `ptsname_r` ([#4608](https://github.com/rust-lang/libc/pull/4608)) - RISCV32: Add time-related syscalls ([#4612](https://github.com/rust-lang/libc/pull/4612)) - Solarish: Add `strftime*` ([#4453](https://github.com/rust-lang/libc/pull/4453)) - linux: Add `EXEC_RESTRICT_*` and `EXEC_DENY_*` ([#4545](https://github.com/rust-lang/libc/pull/4545)) ### Changed - AIX: Add `const` to signatures to be consistent with other platforms ([#4563](https://github.com/rust-lang/libc/pull/4563)) ### Fixed - AIX: Fix the type of `struct statvfs.f_fsid` ([#4576](https://github.com/rust-lang/libc/pull/4576)) - AIX: Fix the type of constants for the `ioctl` `request` argument ([#4582](https://github.com/rust-lang/libc/pull/4582)) - AIX: Fix the types of `stat{,64}.st_*tim` ([#4597](https://github.com/rust-lang/libc/pull/4597)) - AIX: Use unique `errno` values ([#4507](https://github.com/rust-lang/libc/pull/4507)) - Build: Fix an incorrect `target_os` -> `target_arch` check ([#4550](https://github.com/rust-lang/libc/pull/4550)) - FreeBSD: Fix the type of `xktls_session_onedir.ifnet` ([#4552](https://github.com/rust-lang/libc/pull/4552)) - Mips64 musl: Fix the type of `nlink_t` ([#4509](https://github.com/rust-lang/libc/pull/4509)) - Mips64 musl: Use a special MIPS definition of `stack_t` ([#4528](https://github.com/rust-lang/libc/pull/4528)) - Mips64: Fix `SI_TIMER`, `SI_MESGQ` and `SI_ASYNCIO` definitions ([#4529](https://github.com/rust-lang/libc/pull/4529)) - Musl Mips64: Swap the order of `si_errno` and `si_code` in `siginfo_t` ([#4530](https://github.com/rust-lang/libc/pull/4530)) - Musl Mips64: Use a special MIPS definition of `statfs` ([#4527](https://github.com/rust-lang/libc/pull/4527)) - Musl: Fix the definition of `fanotify_event_metadata` ([#4510](https://github.com/rust-lang/libc/pull/4510)) - NetBSD: Correct `enum fae_action` to be `#[repr(C)]` ([#60a8cfd5](https://github.com/rust-lang/libc/commit/60a8cfd564f83164d45b9533ff7a0d7371878f2a)) - PSP: Correct `char` -> `c_char` ([eaab4fc3](https://github.com/rust-lang/libc/commit/eaab4fc3f05dc646a953d4fd5ba46dfa1f8bd6f6)) - PowerPC musl: Fix `termios` definitions ([#4518](https://github.com/rust-lang/libc/pull/4518)) - PowerPC musl: Fix the definition of `EDEADLK` ([#4517](https://github.com/rust-lang/libc/pull/4517)) - PowerPC musl: Fix the definition of `NCCS` ([#4513](https://github.com/rust-lang/libc/pull/4513)) - PowerPC musl: Fix the definitions of `MAP_LOCKED` and `MAP_NORESERVE` ([#4516](https://github.com/rust-lang/libc/pull/4516)) - PowerPC64 musl: Fix the definition of `shmid_ds` ([#4519](https://github.com/rust-lang/libc/pull/4519)) ### Deprecated - Linux: `MAP_32BIT` is only defined on x86 on non-x86 architectures ([#4511](https://github.com/rust-lang/libc/pull/4511)) ### Removed - AIX: Remove duplicate constant definitions `FIND` and `ENTER` ([#4588](https://github.com/rust-lang/libc/pull/4588)) - s390x musl: Remove `O_FSYNC` ([#4515](https://github.com/rust-lang/libc/pull/4515)) - s390x musl: Remove `RTLD_DEEPBIND` ([#4515](https://github.com/rust-lang/libc/pull/4515)) ## [0.2.174](https://github.com/rust-lang/libc/compare/0.2.173...0.2.174) - 2025-06-17 ### Added - Linux: Make `pidfd_info` fields pub ([#4487](https://github.com/rust-lang/libc/pull/4487)) ### Fixed - Gnu x32: Add missing `timespec.tv_nsec` ([#4497](https://github.com/rust-lang/libc/pull/4497)) - NuttX: Use `nlink_t` type for `st_nlink` in `struct stat` definition ([#4483](https://github.com/rust-lang/libc/pull/4483)) ### Other - Allow new `unpredictable_function_pointer_comparisons` lints ([#4489](https://github.com/rust-lang/libc/pull/4489)) - OpenBSD: Fix some clippy warnings to use `pointer::cast`. ([#4490](https://github.com/rust-lang/libc/pull/4490)) - Remove unessecary semicolons from definitions of `CMSG_NXTHDR`. ([#4492](https://github.com/rust-lang/libc/pull/4492)) ## [0.2.173](https://github.com/rust-lang/libc/compare/0.2.172...0.2.173) - 2025-06-09 ### Added - AIX: Add an AIX triple to Cargo.toml for doc ([#4475](https://github.com/rust-lang/libc/pull/4475)) - FreeBSD: Add the `SO_SPLICE` socket option support for FreeBSD >= 14.2 ([#4451](https://github.com/rust-lang/libc/pull/4451)) - Linux GNU: Prepare for supporting `_TIME_BITS=64` ([#4433](https://github.com/rust-lang/libc/pull/4433)) - Linux: Add constant PACKET_IGNORE_OUTGOING ([#4319](https://github.com/rust-lang/libc/pull/4319)) - Linux: Add constants and types for `nsfs` ioctls ([#4436](https://github.com/rust-lang/libc/pull/4436)) - Linux: Add constants for Memory-Deny-Write-Execute `prctls` ([#4400](https://github.com/rust-lang/libc/pull/4400)) - Linux: Add constants from `linux/cn_proc.h` and `linux/connector.h` ([#4434](https://github.com/rust-lang/libc/pull/4434)) - Linux: Add new flags for `pwritev2` and `preadv2` ([#4452](https://github.com/rust-lang/libc/pull/4452)) - Linux: Add pid_type enum values ([#4403](https://github.com/rust-lang/libc/pull/4403)) - Linux: Update pidfd constants and types (Linux 6.9-6.15) ([#4402](https://github.com/rust-lang/libc/pull/4402)) - Loongarch64 musl: Define the `MADV_SOFT_OFFLINE` constant ([#4448](https://github.com/rust-lang/libc/pull/4448)) - Musl: Add new fields since 1.2.0/1.2.2 to `struct tcp_info` ([#4443](https://github.com/rust-lang/libc/pull/4443)) - Musl: Prepare for supporting v1.2.3 ([#4443](https://github.com/rust-lang/libc/pull/4443)) - NuttX: Add `arc4random` and `arc4random_buf` ([#4464](https://github.com/rust-lang/libc/pull/4464)) - RISC-V Musl: Add `MADV_SOFT_OFFLINE` definition ([#4447](https://github.com/rust-lang/libc/pull/4447)) - Redox: Define SCM_RIGHTS ([#4440](https://github.com/rust-lang/libc/pull/4440)) - VxWorks: Add missing UTIME defines and TASK_RENAME_LENGTH ([#4407](https://github.com/rust-lang/libc/pull/4407)) - Windows: Add more `time.h` functions ([#4427](https://github.com/rust-lang/libc/pull/4427)) ### Changed - Redox: Update `SA_` constants. ([#4426](https://github.com/rust-lang/libc/pull/4426)) - Redox: make `CMSG_ALIGN`, `CMSG_LEN`, and `CMSG_SPACE` const functions ([#4441](https://github.com/rust-lang/libc/pull/4441)) ### Fixed - AIX: Enable libc-test and fix definitions/declarations. ([#4450](https://github.com/rust-lang/libc/pull/4450)) - Emscripten: Fix querying emcc on windows (use emcc.bat) ([#4248](https://github.com/rust-lang/libc/pull/4248)) - Hurd: Fix build from missing `fpos_t` ([#4472](https://github.com/rust-lang/libc/pull/4472)) - Loongarch64 Musl: Fix the `struct ipc_perm` bindings ([#4384](https://github.com/rust-lang/libc/pull/4384)) - Musl: Fix the `O_LARGEFILE` constant value. ([#4443](https://github.com/rust-lang/libc/pull/4443)) ## [0.2.172](https://github.com/rust-lang/libc/compare/0.2.171...0.2.172) - 2025-04-14 ### Added - Android: Add `getauxval` for 32-bit targets ([#4338](https://github.com/rust-lang/libc/pull/4338)) - Android: Add `if_tun.h` ioctls ([#4379](https://github.com/rust-lang/libc/pull/4379)) - Android: Define `SO_BINDTOIFINDEX` ([#4391](https://github.com/rust-lang/libc/pull/4391)) - Cygwin: Add `posix_spawn_file_actions_add[f]chdir[_np]` ([#4387](https://github.com/rust-lang/libc/pull/4387)) - Cygwin: Add new socket options ([#4350](https://github.com/rust-lang/libc/pull/4350)) - Cygwin: Add statfs & fcntl ([#4321](https://github.com/rust-lang/libc/pull/4321)) - FreeBSD: Add `filedesc` and `fdescenttbl` ([#4327](https://github.com/rust-lang/libc/pull/4327)) - Glibc: Add unstable support for _FILE_OFFSET_BITS=64 ([#4345](https://github.com/rust-lang/libc/pull/4345)) - Hermit: Add `AF_UNSPEC` ([#4344](https://github.com/rust-lang/libc/pull/4344)) - Hermit: Add `AF_VSOCK` ([#4344](https://github.com/rust-lang/libc/pull/4344)) - Illumos, NetBSD: Add `timerfd` APIs ([#4333](https://github.com/rust-lang/libc/pull/4333)) - Linux: Add `_IO`, `_IOW`, `_IOR`, `_IOWR` to the exported API ([#4325](https://github.com/rust-lang/libc/pull/4325)) - Linux: Add `tcp_info` to uClibc bindings ([#4347](https://github.com/rust-lang/libc/pull/4347)) - Linux: Add further BPF program flags ([#4356](https://github.com/rust-lang/libc/pull/4356)) - Linux: Add missing INPUT_PROP_XXX flags from `input-event-codes.h` ([#4326](https://github.com/rust-lang/libc/pull/4326)) - Linux: Add missing TLS bindings ([#4296](https://github.com/rust-lang/libc/pull/4296)) - Linux: Add more constants from `seccomp.h` ([#4330](https://github.com/rust-lang/libc/pull/4330)) - Linux: Add more glibc `ptrace_sud_config` and related `PTRACE_*ET_SYSCALL_USER_DISPATCH_CONFIG`. ([#4386](https://github.com/rust-lang/libc/pull/4386)) - Linux: Add new netlink flags ([#4288](https://github.com/rust-lang/libc/pull/4288)) - Linux: Define ioctl codes on more architectures ([#4382](https://github.com/rust-lang/libc/pull/4382)) - Linux: Add missing `pthread_attr_setstack` ([#4349](https://github.com/rust-lang/libc/pull/4349)) - Musl: Add missing `utmpx` API ([#4332](https://github.com/rust-lang/libc/pull/4332)) - Musl: Enable `getrandom` on all platforms ([#4346](https://github.com/rust-lang/libc/pull/4346)) - NuttX: Add more signal constants ([#4353](https://github.com/rust-lang/libc/pull/4353)) - QNX: Add QNX 7.1-iosock and 8.0 to list of additional cfgs ([#4169](https://github.com/rust-lang/libc/pull/4169)) - QNX: Add support for alternative Neutrino network stack `io-sock` ([#4169](https://github.com/rust-lang/libc/pull/4169)) - Redox: Add more `sys/socket.h` and `sys/uio.h` definitions ([#4388](https://github.com/rust-lang/libc/pull/4388)) - Solaris: Temporarily define `O_DIRECT` and `SIGINFO` ([#4348](https://github.com/rust-lang/libc/pull/4348)) - Solarish: Add `secure_getenv` ([#4342](https://github.com/rust-lang/libc/pull/4342)) - VxWorks: Add missing `d_type` member to `dirent` ([#4352](https://github.com/rust-lang/libc/pull/4352)) - VxWorks: Add missing signal-related constsants ([#4352](https://github.com/rust-lang/libc/pull/4352)) - VxWorks: Add more error codes ([#4337](https://github.com/rust-lang/libc/pull/4337)) ### Deprecated - FreeBSD: Deprecate `TCP_PCAP_OUT` and `TCP_PCAP_IN` ([#4381](https://github.com/rust-lang/libc/pull/4381)) ### Fixed - Cygwin: Fix member types of `statfs` ([#4324](https://github.com/rust-lang/libc/pull/4324)) - Cygwin: Fix tests ([#4357](https://github.com/rust-lang/libc/pull/4357)) - Hermit: Make `AF_INET = 3` ([#4344](https://github.com/rust-lang/libc/pull/4344)) - Musl: Fix the syscall table on RISC-V-32 ([#4335](https://github.com/rust-lang/libc/pull/4335)) - Musl: Fix the value of `SA_ONSTACK` on RISC-V-32 ([#4335](https://github.com/rust-lang/libc/pull/4335)) - VxWorks: Fix a typo in the `waitpid` parameter name ([#4334](https://github.com/rust-lang/libc/pull/4334)) ### Removed - Musl: Remove `O_FSYNC` on RISC-V-32 (use `O_SYNC` instead) ([#4335](https://github.com/rust-lang/libc/pull/4335)) - Musl: Remove `RTLD_DEEPBIND` on RISC-V-32 ([#4335](https://github.com/rust-lang/libc/pull/4335)) ### Other - CI: Add matrix env variables to the environment ([#4345](https://github.com/rust-lang/libc/pull/4345)) - CI: Always deny warnings ([#4363](https://github.com/rust-lang/libc/pull/4363)) - CI: Always upload successfully created artifacts ([#4345](https://github.com/rust-lang/libc/pull/4345)) - CI: Install musl from source for loongarch64 ([#4320](https://github.com/rust-lang/libc/pull/4320)) - CI: Revert "Also skip `MFD_EXEC` and `MFD_NOEXEC_SEAL` on sparc64" ([#]()) - CI: Use `$PWD` instead of `$(pwd)` in run-docker ([#4345](https://github.com/rust-lang/libc/pull/4345)) - Solarish: Restrict `openpty` and `forkpty` polyfills to Illumos, replace Solaris implementation with bindings ([#4329](https://github.com/rust-lang/libc/pull/4329)) - Testing: Ensure the makedev test does not emit unused errors ([#4363](https://github.com/rust-lang/libc/pull/4363)) ## [0.2.171](https://github.com/rust-lang/libc/compare/0.2.170...0.2.171) - 2025-03-11 ### Added - Android: Add `if_nameindex`/`if_freenameindex` support ([#4247](https://github.com/rust-lang/libc/pull/4247)) - Apple: Add missing proc types and constants ([#4310](https://github.com/rust-lang/libc/pull/4310)) - BSD: Add `devname` ([#4285](https://github.com/rust-lang/libc/pull/4285)) - Cygwin: Add PTY and group API ([#4309](https://github.com/rust-lang/libc/pull/4309)) - Cygwin: Add support ([#4279](https://github.com/rust-lang/libc/pull/4279)) - FreeBSD: Make `spawn.h` interfaces available on all FreeBSD-like systems ([#4294](https://github.com/rust-lang/libc/pull/4294)) - Linux: Add `AF_XDP` structs for all Linux environments ([#4163](https://github.com/rust-lang/libc/pull/4163)) - Linux: Add SysV semaphore constants ([#4286](https://github.com/rust-lang/libc/pull/4286)) - Linux: Add `F_SEAL_EXEC` ([#4316](https://github.com/rust-lang/libc/pull/4316)) - Linux: Add `SO_PREFER_BUSY_POLL` and `SO_BUSY_POLL_BUDGET` ([#3917](https://github.com/rust-lang/libc/pull/3917)) - Linux: Add `devmem` structs ([#4299](https://github.com/rust-lang/libc/pull/4299)) - Linux: Add socket constants up to `SO_DEVMEM_DONTNEED` ([#4299](https://github.com/rust-lang/libc/pull/4299)) - NetBSD, OpenBSD, DragonflyBSD: Add `closefrom` ([#4290](https://github.com/rust-lang/libc/pull/4290)) - NuttX: Add `pw_passwd` field to `passwd` ([#4222](https://github.com/rust-lang/libc/pull/4222)) - Solarish: define `IP_BOUND_IF` and `IPV6_BOUND_IF` ([#4287](https://github.com/rust-lang/libc/pull/4287)) - Wali: Add bindings for `wasm32-wali-linux-musl` target ([#4244](https://github.com/rust-lang/libc/pull/4244)) ### Changed - AIX: Use `sa_sigaction` instead of a union ([#4250](https://github.com/rust-lang/libc/pull/4250)) - Make `msqid_ds.__msg_cbytes` public ([#4301](https://github.com/rust-lang/libc/pull/4301)) - Unix: Make all `major`, `minor`, `makedev` into `const fn` ([#4208](https://github.com/rust-lang/libc/pull/4208)) ### Deprecated - Linux: Deprecate obsolete packet filter interfaces ([#4267](https://github.com/rust-lang/libc/pull/4267)) ### Fixed - Cygwin: Fix strerror_r ([#4308](https://github.com/rust-lang/libc/pull/4308)) - Cygwin: Fix usage of f! ([#4308](https://github.com/rust-lang/libc/pull/4308)) - Hermit: Make `stat::st_size` signed ([#4298](https://github.com/rust-lang/libc/pull/4298)) - Linux: Correct values for `SI_TIMER`, `SI_MESGQ`, `SI_ASYNCIO` ([#4292](https://github.com/rust-lang/libc/pull/4292)) - NuttX: Update `tm_zone` and `d_name` fields to use `c_char` type ([#4222](https://github.com/rust-lang/libc/pull/4222)) - Xous: Include the prelude to define `c_int` ([#4304](https://github.com/rust-lang/libc/pull/4304)) ### Other - Add labels to FIXMEs ([#4231](https://github.com/rust-lang/libc/pull/4231), [#4232](https://github.com/rust-lang/libc/pull/4232), [#4234](https://github.com/rust-lang/libc/pull/4234), [#4235](https://github.com/rust-lang/libc/pull/4235), [#4236](https://github.com/rust-lang/libc/pull/4236)) - CI: Fix "cannot find libc" error on Sparc64 ([#4317](https://github.com/rust-lang/libc/pull/4317)) - CI: Fix "cannot find libc" error on s390x ([#4317](https://github.com/rust-lang/libc/pull/4317)) - CI: Pass `--no-self-update` to `rustup update` ([#4306](https://github.com/rust-lang/libc/pull/4306)) - CI: Remove tests for the `i586-pc-windows-msvc` target ([#4311](https://github.com/rust-lang/libc/pull/4311)) - CI: Remove the `check_cfg` job ([#4322](https://github.com/rust-lang/libc/pull/4312)) - Change the range syntax that is giving `ctest` problems ([#4311](https://github.com/rust-lang/libc/pull/4311)) - Linux: Split out the stat struct for gnu/b32/mips ([#4276](https://github.com/rust-lang/libc/pull/4276)) ### Removed - NuttX: Remove `pthread_set_name_np` ([#4251](https://github.com/rust-lang/libc/pull/4251)) ## [0.2.170](https://github.com/rust-lang/libc/compare/0.2.169...0.2.170) - 2025-02-23 ### Added - Android: Declare `setdomainname` and `getdomainname` - FreeBSD: Add `evdev` structures - FreeBSD: Add the new `st_filerev` field to `stat32` ([#4254](https://github.com/rust-lang/libc/pull/4254)) - Linux: Add `SI_*`` and `TRAP_*`` signal codes - Linux: Add experimental configuration to enable 64-bit time in kernel APIs, set by `RUST_LIBC_UNSTABLE_LINUX_TIME_BITS64`. - Linux: Add recent socket timestamping flags - Linux: Added new CANFD_FDF flag for the flags field of canfd_frame - Musl: add CLONE_NEWTIME - Solarish: add the posix_spawn family of functions ### Deprecated - Linux: deprecate kernel modules syscalls ### Changed - Emscripten: Assume version is at least 3.1.42 ### Fixed - BSD: Correct the definition of `WEXITSTATUS` - Hurd: Fix CMSG_DATA on 64bit systems ([#4240](https://github.com/rust-lang/libc/pull/424)) - NetBSD: fix `getmntinfo` ([#4265](https://github.com/rust-lang/libc/pull/4265) - VxWorks: Fix the size of `time_t` ### Other - Add labels to FIXMEs , , - CI: Bump FreeBSD CI to 13.4 and 14.2 - Copy definitions from core::ffi and centralize them - Define c_char at top-level and remove per-target c_char definitions - Port style.rs to syn and add tests for the style checker ## [0.2.169](https://github.com/rust-lang/libc/compare/0.2.168...0.2.169) - 2024-12-18 ### Added - FreeBSD: add more socket TCP stack constants - Fuchsia: add a `sockaddr_vm` definition ### Fixed **Breaking**: [rust-lang/rust#132975](https://github.com/rust-lang/rust/pull/132975) corrected the signedness of `core::ffi::c_char` on various Tier 2 and Tier 3 platforms (mostly Arm and RISC-V) to match Clang. This release contains the corresponding changes to `libc`, including the following specific pull requests: - ESP-IDF: Replace arch-conditional `c_char` with a reexport - Fix `c_char` on various targets - Mirror `c_char` configuration from `rust-lang/rust` ### Cleanup - Do not re-export `c_void` in target-specific code ## [0.2.168](https://github.com/rust-lang/libc/compare/0.2.167...0.2.168) - 2024-12-09 ### Added - Linux: Add new process flags ([#4174](https://github.com/rust-lang/libc/pull/4174)) - Linux: Make `IFA_*` constants available on all Linux targets - Linux: add `MAP_DROPPABLE` - Solaris, Illumos: add `SIGRTMIN` and `SIGRTMAX` - Unix, Linux: adding POSIX `memccpy` and `mempcpy` GNU extension - CI: Upload artifacts created by libc-test - CI: Use workflow commands to group output by target - CI: add caching ## [0.2.167](https://github.com/rust-lang/libc/compare/0.2.166...0.2.167) - 2024-11-28 ### Added - Solarish: add `st_fstype` to `stat` - Trusty: Add `intptr_t` and `uintptr_t` ([#4161](https://github.com/rust-lang/libc/pull/4161)) ### Fixed - Fix the build with `rustc-dep-of-std` - Wasi: Add back unsafe block for `clockid_t` static variables ([#4157](https://github.com/rust-lang/libc/pull/4157)) ### Cleanup - Create an internal prelude - Fix `unused_qualifications` ### Other - CI: Check various FreeBSD versions ([#4159](https://github.com/rust-lang/libc/pull/4159)) - CI: add a timeout for all jobs - CI: verify MSRV for `wasm32-wasi` - Migrate to the 2021 edition ### Removed - Remove one unused import after the edition 2021 bump ## [0.2.166](https://github.com/rust-lang/libc/compare/0.2.165...0.2.166) - 2024-11-26 ### Fixed This release resolves two cases of unintentional breakage from the previous release: - Revert removal of array size hacks [#4150](https://github.com/rust-lang/libc/pull/4150) - Ensure `const extern` functions are always enabled [#4151](https://github.com/rust-lang/libc/pull/4151) ## [0.2.165](https://github.com/rust-lang/libc/compare/0.2.164...0.2.165) - 2024-11-25 ### Added - Android: add `mkostemp`, `mkostemps` - Android: add a few API 30 calls - Android: add missing syscall constants - Apple: add `in6_ifreq` - Apple: add missing `sysctl` net types (before release: remove `if_family_id` ([#4137](https://github.com/rust-lang/libc/pulls/4137))) - Freebsd: add `kcmp` call support - Hurd: add `MAP_32BIT` and `MAP_EXCL` - Hurd: add `domainname` field to `utsname` ([#4089](https://github.com/rust-lang/libc/pulls/4089)) - Linux GNU: add `f_flags` to struct `statfs` for arm, mips, powerpc and x86 - Linux GNU: add `malloc_stats` - Linux: add ELF relocation-related structs - Linux: add `ptp_*` structs - Linux: add `ptp_clock_caps` - Linux: add `ptp_pin_function` and most `PTP_` constants - Linux: add missing AF_XDP structs & constants - Linux: add missing netfilter consts ([#3734](https://github.com/rust-lang/libc/pulls/3734)) - Linux: add struct and constants for the `mount_setattr` syscall - Linux: add wireless API - Linux: expose the `len8_dlc` field of `can_frame` - Musl: add `utmpx` API - Musl: add missing syscall constants - NetBSD: add `mcontext`-related data for RISCV64 - Redox: add new `netinet` constants ) - Solarish: add `_POSIX_VDISABLE` ([#4103](https://github.com/rust-lang/libc/pulls/4103)) - Tests: Add a test that the `const extern fn` macro works - Tests: Add test of primitive types against `std` - Unix: Add `htonl`, `htons`, `ntohl`, `ntohs` - Unix: add `aligned_alloc` - Windows: add `aligned_realloc` ### Fixed - **breaking** Hurd: fix `MAP_HASSEMAPHORE` name ([#4127](https://github.com/rust-lang/libc/pulls/4127)) - **breaking** ulibc Mips: fix `SA_*` mismatched types ([#3211](https://github.com/rust-lang/libc/pulls/3211)) - Aix: fix an enum FFI safety warning - Haiku: fix some typos ([#3664](https://github.com/rust-lang/libc/pulls/3664)) - Tests: fix `Elf{32,64}_Relr`-related tests - Tests: fix libc-tests for `loongarch64-linux-musl` - Tests: fix some clippy warnings - Tests: fix tests on `riscv64gc-unknown-freebsd` ### Deprecated - Apple: deprecate `iconv_open` - Apple: deprecate `mach_task_self` - Apple: update `mach` deprecation notices for things that were removed in `main` ### Cleanup - Adjust the `f!` macro to be more flexible - Aix: remove duplicate constants - CI: make scripts more uniform - Drop the `libc_align` conditional - Drop the `libc_cfg_target_vendor` conditional - Drop the `libc_const_size_of` conditional - Drop the `libc_core_cvoid` conditional - Drop the `libc_int128` conditional - Drop the `libc_non_exhaustive` conditional - Drop the `libc_packedN` conditional - Drop the `libc_priv_mod_use` conditional - Drop the `libc_union` conditional - Drop the `long_array` conditional - Drop the `ptr_addr_of` conditional - Drop warnings about deprecated cargo features - Eliminate uses of `struct_formatter` - Fix a few other array size hacks - Glibc: remove redundant definitions ([#3261](https://github.com/rust-lang/libc/pulls/3261)) - Musl: remove redundant definitions ([#3261](https://github.com/rust-lang/libc/pulls/3261)) - Musl: unify definitions of `siginfo_t` ([#3261](https://github.com/rust-lang/libc/pulls/3261)) - Musl: unify definitions of statfs and statfs64 ([#3261](https://github.com/rust-lang/libc/pulls/3261)) - Musl: unify definitions of statvfs and statvfs64 ([#3261](https://github.com/rust-lang/libc/pulls/3261)) - Musl: unify statx definitions ([#3978](https://github.com/rust-lang/libc/pulls/3978)) - Remove array size hacks for Rust < 1.47 - Remove repetitive words - Use #[derive] for Copy/Clone in s! and friends - Use some tricks to format macro bodies ### Other - Apply formatting to macro bodies - Bump libc-test to Rust 2021 Edition - CI: Add a check that semver files don't contain duplicate entries - CI: Add `fanotify_event_info_fid` to FAM-exempt types - CI: Allow rustfmt to organize imports ([#4136](https://github.com/rust-lang/libc/pulls/4136)) - CI: Always run rustfmt - CI: Change 32-bit Docker images to use EOL repos - CI: Change 64-bit Docker images to ubuntu:24.10 - CI: Disable the check for >1 s! invocation - CI: Ensure build channels get run even if FILTER is unset - CI: Ensure there is a fallback for no_std - CI: Fix cases where unset variables cause errors - CI: Naming adjustments and cleanup - CI: Only invoke rustup if running in CI - CI: Remove the logic to handle old rust versions - CI: Set -u (error on unset) in all script files - CI: add support for `loongarch64-unknown-linux-musl` - CI: make `aarch64-apple-darwin` not a nightly-only target - CI: run shellcheck on all scripts - CI: update musl headers to Linux 6.6 - CI: use qemu-sparc64 to run sparc64 tests - Drop the `libc_const_extern_fn` conditional - Drop the `libc_underscore_const_names` conditional - Explicitly set the edition to 2015 - Introduce a `git-blame-ignore-revs` file - Tests: Ignore fields as required on Ubuntu 24.10 - Tests: skip `ATF_*` constants for OpenBSD - Triagebot: Add an autolabel for CI ## [0.2.164](https://github.com/rust-lang/libc/compare/0.2.163...0.2.164) - 2024-11-16 ### MSRV This release increases the MSRV of `libc` to 1.63. ### Other - CI: remove tests with rust < 1.63 - MSRV: document the MSRV of the stable channel to be 1.63 - MacOS: move ifconf to s_no_extra_traits ## [0.2.163](https://github.com/rust-lang/libc/compare/0.2.162...0.2.163) - 2024-11-16 ### Added - Aix: add more `dlopen` flags - Android: add group calls - FreeBSD: add `TCP_FUNCTION_BLK` and `TCP_FUNCTION_ALIAS` - Linux: add `confstr` - Solarish: add `aio` - Solarish: add `arc4random*` ### Changed - Emscripten: upgrade emsdk to 3.1.68 - Hurd: use more standard types - Hurd: use the standard `ssize_t = isize` - Solaris: fix `confstr` and `ucontext_t` ### Other - CI: add Solaris - CI: add `i686-unknown-freebsd` - CI: ensure that calls to `sort` do not depend on locale - Specify `rust-version` in `Cargo.toml` ## [0.2.162](https://github.com/rust-lang/libc/compare/0.2.161...0.2.162) - 2024-11-07 ### Added - Android: fix the alignment of `uc_mcontext` on arm64 - Apple: add `host_cpu_load_info` - ESP-IDF: add a time flag - FreeBSD: add the `CLOSE_RANGE_CLOEXEC` flag - FreeBSD: fix test errors regarding `__gregset_t` - FreeBSD: fix tests on x86 FreeBSD 15 - FreeBSD: make `ucontext_t` and `mcontext_t` available on all architectures - Haiku: add `getentropy` - Illumos: add `syncfs` - Illumos: add some recently-added constants - Linux: add `ioctl` flags - Linux: add epoll busy polling parameters - NuttX: add `pthread_[get/set]name_np` - RTEMS: add `arc4random_buf` - Trusty OS: add initial support - WASIp2: expand socket support ### Fixed - Emscripten: don't pass `-lc` - Hurd: change `st_fsid` field to `st_dev` - Hurd: fix the definition of `utsname` - Illumos/Solaris: fix `FNM_CASEFOLD` definition - Solaris: fix all tests ### Other - CI: Add loongarch64 - CI: Check that semver files are sorted - CI: Re-enable the FreeBSD 15 job - Clean up imports and `extern crate` usage - Convert `mode_t` constants to octal - Remove the `wasm32-wasi` target that has been deleted upstream ## [0.2.161](https://github.com/rust-lang/libc/compare/0.2.160...0.2.161) - 2024-10-17 ### Fixed - OpenBSD: fix `FNM_PATHNAME` and `FNM_NOESCAPE` values ## [0.2.160](https://github.com/rust-lang/libc/compare/0.2.159...0.2.160) - 2024-10-17 ### Added - Android: add `PR_GET_NAME` and `PR_SET_NAME` - Apple: add `F_TRANSFEREXTENTS` - Apple: add `mach_error_string` - Apple: add additional `pthread` APIs - Apple: add the `LOCAL_PEERTOKEN` socket option - BSD: add `RTF_*`, `RTA_*`, `RTAX_*`, and `RTM_*` definitions - Emscripten: add `AT_EACCESS` - Emscripten: add `getgrgid`, `getgrnam`, `getgrnam_r` and `getgrgid_r` - Emscripten: add `getpwnam_r` and `getpwuid_r` - FreeBSD: add `POLLRDHUP` - Haiku: add `arc4random` - Illumos: add `ptsname_r` - Linux: add `fanotify` interfaces - Linux: add `tcp_info` - Linux: add additional AF_PACKET options - Linux: make Elf constants always available - Musl x86: add `iopl` and `ioperm` - Musl: add `posix_spawn` chdir functions - Musl: add `utmpx.h` constants - NetBSD: add `sysctlnametomib`, `CLOCK_THREAD_CPUTIME_ID` and `CLOCK_PROCESS_CPUTIME_ID` - Nuttx: initial support - RTEMS: add `getentropy` - RTEMS: initial support - Solarish: add `POLLRDHUP`, `POSIX_FADV_*`, `O_RSYNC`, and `posix_fallocate` - Unix: add `fnmatch.h` - VxWorks: add riscv64 support - VxWorks: update constants related to the scheduler ### Changed - Redox: change `ino_t` to be `c_ulonglong` ### Fixed - ESP-IDF: fix mismatched constants and structs - FreeBSD: fix `struct stat` on FreeBSD 12+ ### Other - CI: Fix CI for FreeBSD 15 - Docs: link to `windows-sys` ## [0.2.159](https://github.com/rust-lang/libc/compare/0.2.158...0.2.159) - 2024-09-24 ### Added - Android: add more `AT_*` constants in - Apple: add missing `NOTE_*` constants in - Hermit: add missing error numbers in - Hurd: add `__timeval` for 64-bit support in - Linux: add `epoll_pwait2` in - Linux: add `mq_notify` in - Linux: add missing `NFT_CT_*` constants in - Linux: add the `fchmodat2` syscall in - Linux: add the `mseal` syscall in - OpenBSD: add `sendmmsg` and `recvmmsg` in - Unix: add `IN6ADDR_ANY_INIT` and `IN6ADDR_LOOPBACK_INIT` in - VxWorks: add `S_ISVTX` in - VxWorks: add `vxCpuLib` and `taskLib` functions - WASIp2: add definitions for `std::net` support in ### Fixed - Correctly handle version checks when `clippy-driver` is used ### Changed - EspIdf: change signal constants to c_int in - HorizonOS: update network definitions in - Linux: combine `ioctl` APIs in - WASI: enable CI testing in - WASIp2: enable CI testing in ## [0.2.158](https://github.com/rust-lang/libc/compare/0.2.157...0.2.158) - 2024-08-19 ### Other - WASI: fix missing `Iterator` with `rustc-dep-of-std` in ## [0.2.157](https://github.com/rust-lang/libc/compare/0.2.156...0.2.157) - 2024-08-17 ### Added - Apple: add `_NSGetArgv`, `_NSGetArgc` and `_NSGetProgname` in - Build: add `RUSTC_WRAPPER` support in - FreeBSD: add `execvpe` support from 14.1 release in - Fuchsia: add `SO_BINDTOIFINDEX` - Linux: add `klogctl` in - MacOS: add `fcntl` OFD commands in - NetBSD: add `_lwp_park` in - Solaris: add missing networking support in - Unix: add `pthread_equal` in - WASI: add `select`, `FD_SET`, `FD_ZERO`, `FD_ISSET ` in ### Fixed - TEEOS: fix octal notation for `O_*` constants in ### Changed - FreeBSD: always use freebsd12 when `rustc_dep_of_std` is set in ## [0.2.156](https://github.com/rust-lang/libc/compare/v0.2.155...v0.2.156) - 2024-08-15 ### Added - Apple: add `F_ALLOCATEPERSIST` in - Apple: add `os_sync_wait_on_address` and related definitions in - BSD: generalise `IPV6_DONTFRAG` to all BSD targets in - FreeBSD/DragonFly: add `IP_RECVTTL`/`IPV6_RECVHOPLIMIT` in - Hurd: add `XATTR_CREATE`, `XATTR_REPLACE` in - Linux GNU: `confstr` API and `_CS_*` in - Linux musl: add `preadv2` and `pwritev2` (1.2.5 min.) in - VxWorks: add the constant `SOMAXCONN` in - VxWorks: add a few errnoLib related constants in ### Fixed - Solaris/illumos: Change `ifa_flags` type to u64 in - QNX 7.0: Disable `libregex` in ### Changed - QNX NTO: update platform support in - `addr_of!(EXTERN_STATIC)` is now considered safe in ### Removed - Apple: remove `rmx_state` in ### Other - Update or remove CI tests that have been failing [workspace] git_release_name = "{{ version }}" git_tag_name = "{{ version }}" [changelog] body = """ ## [{{ version | trim_start_matches(pat="v") }}]\ {%- if release_link -%}\ ({{ release_link }})\ {% endif %} \ - {{ timestamp | date(format="%Y-%m-%d") }} {% for group, commits in commits | group_by(attribute="group") %} ### {{ group | upper_first }} {% for commit in commits %} - {% if commit.scope -%}{{ commit.scope | upper_first }}: {% endif %} {%- if commit.breaking %}[**breaking**] {% endif %} {{- commit.message }} {%- if commit.links %} ([{{ commit.links.1.text }}]({{ commit.links.1.href }})){% endif -%} {% endfor %} {% endfor %} {%- if github -%} {% if github.contributors | filter(attribute="is_first_time", value=true) | length != 0 %} ## New Contributors ❤️ {% endif %}\ {% for contributor in github.contributors | filter(attribute="is_first_time", value=true) %} * @{{ contributor.username }} made their first contribution {%- if contributor.pr_number %} in \ [#{{ contributor.pr_number }}]({{ self::remote_url() }}/pull/{{ contributor.pr_number }}) \ {%- endif %} {%- endfor -%} {%- endif %} """ commit_parsers = [ { message = '(?i)^(\w+: )?feat', group = "added" }, { message = '(?i)^(\w+: )?add', group = "added" }, { message = '(?i)^(\w+: )?change', group = "changed" }, { message = '(?i)^(\w+: )?cleanup', group = "cleanup" }, { message = '(?i)^(\w+: )?deprecate', group = "deprecated" }, { message = '(?i)^(\w+: )?remove', group = "removed" }, { message = '(?i)^(\w+: )?fix', group = "fixed" }, { message = '(?i)^(\w+: )?fix', group = "fixed" }, { message = '^.*', group = "other" }, ] link_parsers = [ # Extract backport patterns { pattern = '\(backport <.*/(\d+)>\)', text = "#$1", href = "https://github.com/rust-lang/libc/pull/$1"} ] # Changelog ## [0.2.185](https://github.com/rust-lang/libc/compare/0.2.184...0.2.185) - 2026-04-13 ### Added - EspIDF: Add `espidf_picolibc` cfg for picolibc `O_*` flag values ([#5035](https://github.com/rust-lang/libc/pull/5035)) - Hexagon: add missing constants and fix types for linux-musl ([#5042](https://github.com/rust-lang/libc/pull/5042)) - Redox: Add semaphore functions ([#5051](https://github.com/rust-lang/libc/pull/5051)) - Windows: Add `sprintf`, `snprintf`, and the `scanf` family ([#5024](https://github.com/rust-lang/libc/pull/5024)) ### Fixed - Hexagon: Decouple `time64` types from musl symbol redirects ([#5040](https://github.com/rust-lang/libc/pull/5040)) - Horizon: Change `POLL` constants from `c_short` to `c_int` ([#5045](https://github.com/rust-lang/libc/pull/5045)) ## [0.2.184](https://github.com/rust-lang/libc/compare/0.2.183...0.2.184) - 2026-04-01 ### MSRV This release increases the MSRV of `libc` to 1.65. With this update, you can now always use the `core::ffi::c_*` types with `libc` definitions, since `libc` has been changed to reexport from `core` rather than redefining them. (This _usually_ worked before but had edge cases.) ([#4972](https://github.com/rust-lang/libc/pull/4972)) ### Added - BSD: Add `IP_MINTTL` to bsd ([#5026](https://github.com/rust-lang/libc/pull/5026)) - Cygwin: Add `TIOCM_DSR` ([#5031](https://github.com/rust-lang/libc/pull/5031)) - FreeBSD: Added `xfile` structe and file descriptor types ([#5002](https://github.com/rust-lang/libc/pull/5002)) - Linux: Add CAN netlink bindings ([#5011](https://github.com/rust-lang/libc/pull/5011)) - Linux: Add `struct ethhdr` ([#4239](https://github.com/rust-lang/libc/pull/4239)) - Linux: Add `struct ifinfomsg` ([#5012](https://github.com/rust-lang/libc/pull/5012)) - Linux: Define `max_align_t` for riscv64 ([#5029](https://github.com/rust-lang/libc/pull/5029)) - NetBSD: Add missing `CLOCK_` constants ([#5020](https://github.com/rust-lang/libc/pull/5020)) - NuttX: Add `_SC_HOST_NAME_MAX` ([#5004](https://github.com/rust-lang/libc/pull/5004)) - VxWorks: Add `flock` and `F_*LCK` constants ([#4043](https://github.com/rust-lang/libc/pull/4043)) - WASI: Add all `_SC_*` sysconf constants ([#5023](https://github.com/rust-lang/libc/pull/5023)) ### Deprecated The remaining fixed-width integer aliases, `__uint128_t`, `__uint128`, `__int128_t`, and `__int128`, have been deprecated. Use `i128` and `u128` instead. ([#4343](https://github.com/rust-lang/libc/pull/4343)) ### Fixed - **breaking** Redox: Fix signal action constant types ([#5009](https://github.com/rust-lang/libc/pull/5009)) - EspIDF: Correct the value of `DT_*` constants ([#5034](https://github.com/rust-lang/libc/pull/5034)) - Redox: Fix locale values and add `RTLD_NOLOAD`, some TCP constants ([#5025](https://github.com/rust-lang/libc/pull/5025)) - Various: Use `Padding::new()` rather than `Padding::uninit()` ([#5036](https://github.com/rust-lang/libc/pull/5036)) ### Changed - **potentially breaking** Linux: Add new fields to `struct ptrace_syscall_info` ([#4966](https://github.com/rust-lang/libc/pull/4966)) - Re-export `core::ffi` integer types rather than redefining ([#5015](https://github.com/rust-lang/libc/pull/5015)) - Redox: Update `F_DUPFD`, `IP`, and `TCP` constants to match relibc ([#4990](https://github.com/rust-lang/libc/pull/4990)) ## [0.2.183](https://github.com/rust-lang/libc/compare/0.2.182...0.2.183) - 2026-03-08 ### Added - ESP-IDF: Add `SOMAXCONN` ([#4993](https://github.com/rust-lang/libc/pull/4993)) - Linux: Add `name_to_handle_at` and `open_by_handle_at` ([#4988](https://github.com/rust-lang/libc/pull/4988)) - NetBSD: Add `kinfo_file`, `kinfo_pcb`, and related constants ([#4985](https://github.com/rust-lang/libc/pull/4985)) - OpenBSD: Add `kinfo_file` and related constants ([#4991](https://github.com/rust-lang/libc/pull/4991)) - VxWorks: Add additional structs and defines ([#5003](https://github.com/rust-lang/libc/pull/5003)) - Various: Implement `Default` for `timeval` and `timespec` ([#4976](https://github.com/rust-lang/libc/pull/4976)) ### Fixed - Hexagon musl: Enable unstable 64-bit `time_t` support and `musl_v1_2_3` ([#4992](https://github.com/rust-lang/libc/pull/4992)) - Nintendo Switch: Fix target support ([#4982](https://github.com/rust-lang/libc/pull/4982)) - OpenBSD: Wrap an unused field in `Padding` ([#4997](https://github.com/rust-lang/libc/pull/4997)) - Redox: Change `sigaction.sa_flags` to `c_int` ([#4986](https://github.com/rust-lang/libc/pull/4986)) - Redox: Fix `blkcnt_t` type ([#4994](https://github.com/rust-lang/libc/pull/4994)) ## [0.2.182](https://github.com/rust-lang/libc/compare/0.2.181...0.2.182) - 2026-02-13 ### Added - Android, Linux: Add `tgkill` ([#4970](https://github.com/rust-lang/libc/pull/4970)) - Redox: Add `RENAME_NOREPLACE` ([#4968](https://github.com/rust-lang/libc/pull/4968)) - Redox: Add `renameat2` ([#4968](https://github.com/rust-lang/libc/pull/4968)) ## [0.2.181](https://github.com/rust-lang/libc/compare/0.2.180...0.2.181) - 2026-02-09 ### Added - Apple: Add `MADV_ZERO` ([#4924](https://github.com/rust-lang/libc/pull/4924)) - Redox: Add `makedev`, `major`, and `minor` ([#4928](https://github.com/rust-lang/libc/pull/4928)) - GLibc: Add `PTRACE_SET_SYSCALL_INFO` ([#4933](https://github.com/rust-lang/libc/pull/4933)) - OpenBSD: Add more kqueue related constants for ([#4945](https://github.com/rust-lang/libc/pull/4945)) - Linux: add CAN error types ([#4944](https://github.com/rust-lang/libc/pull/4944)) - OpenBSD: Add siginfo_t::si_status ([#4946](https://github.com/rust-lang/libc/pull/4946)) - QNX NTO: Add `max_align_t` ([#4927](https://github.com/rust-lang/libc/pull/4927)) - Illumos: Add `_CS_PATH` ([#4956](https://github.com/rust-lang/libc/pull/4956)) - OpenBSD: add `ppoll` ([#4957](https://github.com/rust-lang/libc/pull/4957)) ### Fixed - **breaking**: Redox: Fix the type of dev_t ([#4928](https://github.com/rust-lang/libc/pull/4928)) - AIX: Change 'tv_nsec' of 'struct timespec' to type 'c_long' ([#4931](https://github.com/rust-lang/libc/pull/4931)) - AIX: Use 'struct st_timespec' in 'struct stat{,64}' ([#4931](https://github.com/rust-lang/libc/pull/4931)) - Glibc: Link old version of `tc{g,s}etattr` ([#4938](https://github.com/rust-lang/libc/pull/4938)) - Glibc: Link the correct version of `cf{g,s}et{i,o}speed` on mips{32,64}r6 ([#4938](https://github.com/rust-lang/libc/pull/4938)) - OpenBSD: Fix constness of tm.tm_zone ([#4948](https://github.com/rust-lang/libc/pull/4948)) - OpenBSD: Fix the definition of `ptrace_thread_state` ([#4947](https://github.com/rust-lang/libc/pull/4947)) - QuRT: Fix type visibility and defs ([#4932](https://github.com/rust-lang/libc/pull/4932)) - Redox: Fix values for `PTHREAD_MUTEX_{NORMAL, RECURSIVE}` ([#4943](https://github.com/rust-lang/libc/pull/4943)) - Various: Mark additional fields as private padding ([#4922](https://github.com/rust-lang/libc/pull/4922)) ### Changed - Fuchsia: Update `SO_*` constants ([#4937](https://github.com/rust-lang/libc/pull/4937)) - Revert "musl: convert inline timespecs to timespec" (resolves build issues on targets only supported by Musl 1.2.3+ ) ([#4958](https://github.com/rust-lang/libc/pull/4958)) ## [0.2.180](https://github.com/rust-lang/libc/compare/0.2.179...0.2.180) - 2026-01-08 ### Added - QNX: Add missing BPF and ifreq structures ([#4769](https://github.com/rust-lang/libc/pull/4769)) ### Fixed - Linux, L4Re: address soundness issues of `CMSG_NXTHDR` ([#4903](https://github.com/rust-lang/libc/pull/4903)) - Linux-like: Handle zero-sized payload differences in `CMSG_NXTHDR` ([#4903](https://github.com/rust-lang/libc/pull/4903)) - Musl: Fix incorrect definitions of struct stat on some 32-bit architectures ([#4914](https://github.com/rust-lang/libc/pull/4914)) - NetBSD: RISC-V 64: Correct `mcontext` type definitions ([#4886](https://github.com/rust-lang/libc/pull/4886)) - uClibc: Re-enable `__SIZEOF_PTHREAD_COND_T` on non-L4Re uclibc ([#4915](https://github.com/rust-lang/libc/pull/4915)) - uClibc: Restructure Linux `netlink` module to resolve build errors ([#4915](https://github.com/rust-lang/libc/pull/4915)) ## [0.2.179](https://github.com/rust-lang/libc/compare/0.2.178...0.2.179) - 2025-01-03 With this release, we now have _unstable_ support for 64-bit `time_t` on 32-bit platforms with both Musl and Glibc. Testing is appreciated! For now, these can be enabled by setting environment variables during build: ```text RUST_LIBC_UNSTABLE_MUSL_V1_2_3=1 RUST_LIBC_UNSTABLE_GNU_TIME_BITS=64 ``` Note that the exact configuration will change in the future. Setting the `MUSL_V1_2_3` variable also enables some newer API unrelated to `time_t`. ### Added - L4Re: Add uclibc aarch64 support ([#4479](https://github.com/rust-lang/libc/pull/4479)) - Linux, Android: Add a generic definition for `XCASE` ([#4847](https://github.com/rust-lang/libc/pull/4847)) - Linux-like: Add `NAME_MAX` ([#4888](https://github.com/rust-lang/libc/pull/4888)) - Linux: Add `AT_EXECVE_CHECK` ([#4422](https://github.com/rust-lang/libc/pull/4422)) - Linux: Add the `SUN_LEN` macro ([#4269](https://github.com/rust-lang/libc/pull/4269)) - Linux: add `getitimer` and `setitimer` ([#4890](https://github.com/rust-lang/libc/pull/4890)) - Linux: add `pthread_tryjoin_n` and `pthread_timedjoin_np` ([#4887](https://github.com/rust-lang/libc/pull/4887)) - Musl: Add unstable support for 64-bit `time_t` on 32-bit platforms ([#4463](https://github.com/rust-lang/libc/pull/4463)) - NetBSD, OpenBSD: Add interface `LINK_STATE_*` definitions from `sys/net/if.h` ([#4751](https://github.com/rust-lang/libc/pull/4751)) - QuRT: Add support for Qualcomm QuRT ([#4845](https://github.com/rust-lang/libc/pull/4845)) - Types: Add Padding::uninit() ([#4862](https://github.com/rust-lang/libc/pull/4862)) ### Fixed - Glibc: Link old version of `cf{g,s}et{i,o}speed` ([#4882](https://github.com/rust-lang/libc/pull/4882)) - L4Re: Fixes for `pthread` ([#4479](https://github.com/rust-lang/libc/pull/4479)) - L4re: Fix a wide variety of incorrect definitions ([#4479](https://github.com/rust-lang/libc/pull/4479)) - Musl: Fix the value of `CPU_SETSIZE` on musl 1.2+ ([#4865](https://github.com/rust-lang/libc/pull/4865)) - Musl: RISC-V: fix public padding fields in `stat/stat64` ([#4463](https://github.com/rust-lang/libc/pull/4463)) - Musl: s390x: Fix definition of `SIGSTKSZ`/`MINSIGSTKSZ` ([#4884](https://github.com/rust-lang/libc/pull/4884)) - NetBSD: Arm: Fix `PT_{GET,SET}FPREGS`, `_REG_TIPDR`, and `_REG_{LR,SP}` ([#4899](https://github.com/rust-lang/libc/pull/4899)) - NetBSD: Fix `if_msghdr` alignment ([#4902](https://github.com/rust-lang/libc/pull/4902)) - NetBSD: Fix `siginfo_t` layout on 32-bit platforms ([#4904](https://github.com/rust-lang/libc/pull/4904)) - NetBSD: change definition of `pthread_spin_t` to allow arch redefinition. ([#4899](https://github.com/rust-lang/libc/pull/4899)) - Newlib: Fix ambiguous glob exports and other warnings for Vita and 3DS ([#4875](https://github.com/rust-lang/libc/pull/4875)) - QNX: Fix build error ([#4879](https://github.com/rust-lang/libc/pull/4879)) ### Changed - CI: Update CI images to FreeBSD 15.0-release ([#4857](https://github.com/rust-lang/libc/pull/4857)) - L4Re: Make `pthread` struct fields private ([#4876](https://github.com/rust-lang/libc/pull/4876)) - Linux, Fuchsia: Mark mq_attr padding area as such ([#4858](https://github.com/rust-lang/libc/pull/4858)) - Types: Wrap a number of private fields in the `Padding` type ([#4862](https://github.com/rust-lang/libc/pull/4862)) ### Removed - Build: Remove `RUST_LIBC_UNSTABLE_LINUX_TIME_BITS64` ([#4865](https://github.com/rust-lang/libc/pull/4865)) - WASI: Remove nonexistent clocks ([#4880](https://github.com/rust-lang/libc/pull/4880)) ## [0.2.178](https://github.com/rust-lang/libc/compare/0.2.177...0.2.178) - 2025-12-01 ### Added - BSD: Add `issetugid` ([#4744](https://github.com/rust-lang/libc/pull/4744)) - Cygwin: Add missing utmp/x.h, grp.h, and stdio.h interfaces ([#4827](https://github.com/rust-lang/libc/pull/4827)) - Linux s390x musl: Add `__psw_t`/`fprefset_t`/`*context_t` ([#4726](https://github.com/rust-lang/libc/pull/4726)) - Linux, Android: Add definition for IUCLC ([#4846](https://github.com/rust-lang/libc/pull/4846)) - Linux, FreeBSD: Add `AT_HWCAP{3,4}` ([#4734](https://github.com/rust-lang/libc/pull/4734)) - Linux: Add definitions from linux/can/bcm.h ([#4683](https://github.com/rust-lang/libc/pull/4683)) - Linux: Add syscalls 451-469 for m68k ([#4850](https://github.com/rust-lang/libc/pull/4850)) - Linux: PowerPC: Add 'ucontext.h' definitions ([#4696](https://github.com/rust-lang/libc/pull/4696)) - NetBSD: Define `eventfd` ([#4830](https://github.com/rust-lang/libc/pull/4830)) - Newlib: Add missing constants from `unistd.h` ([#4811](https://github.com/rust-lang/libc/pull/4811)) - QNX NTO: Add `cfmakeraw` ([#4704](https://github.com/rust-lang/libc/pull/4704)) - QNX NTO: Add `cfsetspeed` ([#4704](https://github.com/rust-lang/libc/pull/4704)) - Redox: Add `getresgid` and `getresuid` ([#4752](https://github.com/rust-lang/libc/pull/4752)) - Redox: Add `setresgid` and `setresuid` ([#4752](https://github.com/rust-lang/libc/pull/4752)) - VxWorks: Add definitions from `select.h`, `stat.h`, `poll.h`, `ttycom.h`, `utsname.h`, `resource.h`, `mman.h`, `udp.h`, `in.h`, `in6.h`, `if.h`, `fnmatch.h`, and `sioLibCommon.h` ([#4781](https://github.com/rust-lang/libc/pull/4781)) - VxWorks: Add missing defines/functions needed by rust stdlib ([#4779](https://github.com/rust-lang/libc/pull/4779)) - WASI: Add more definitions for libstd ([#4747](https://github.com/rust-lang/libc/pull/4747)) ### Deprecated - Apple: Deprecate `TIOCREMOTE` ([#4764](https://github.com/rust-lang/libc/pull/4764)) ### Fixed Note that there were a large number of fixes on NetBSD for this `libc` release, some of which include minor breakage. - AIX: Change errno `EWOULDBLOCK` to make it an alias of `EAGAIN` ([#4790](https://github.com/rust-lang/libc/pull/4790)) - AIX: Resolve function comparison and `unnecessary_transmutes` warnings ([#4780](https://github.com/rust-lang/libc/pull/4780)) - Apple: Correct the value of `SF_SETTABLE` ([#4764](https://github.com/rust-lang/libc/pull/4764)) - DragonflyBSD: Fix the type of `mcontext_t.mc_fpregs` ([#]()) - EspIDF: Fix the duplicate definition of `gethostname` ([#4773](https://github.com/rust-lang/libc/pull/4773)) - L4Re: Update available pthread API ([#4836](https://github.com/rust-lang/libc/pull/4836)) - Linux: Correct the value of `NFT_MSG_MAX` ([#4761](https://github.com/rust-lang/libc/pull/4761)) - Linux: Remove incorrect `repr(align(8))` for `canxl_frame` ([#4760](https://github.com/rust-lang/libc/pull/4760)) - Make `eventfd` argument names match OS docs/headers ([#4830](https://github.com/rust-lang/libc/pull/4830)) - NetBSD: Account for upstream changes to ptrace with LWP ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Correct `ipc_perm`, split from OpenBSD as `ipc.rs` ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Correct a number of symbol link names ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Correct the type of `kinfo_vmentry.kve_path` ([#]()) - NetBSD: Fix `uucred.cr_ngroups` from `int` to `short` ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Fix the type of `kevent.udata` ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Fix the type of `mcontext_t.__fpregs` ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Fix the value of `PT_SUSPEND` ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Fix the values of FNM_* constants ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Increase the size of `sockaddr_dl.sdl_data` from 12 to 24 ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Introduce `if_.rs`, fix the definition of `ifreq` ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Introduce `time.rs`, fix the values of `CLOCK_*_CPUTIME_ID` ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Introduce `timex.rs` ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Introduce `types.rs`, correct the definition of `lwpid_t` ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Introduce `utmp_.rs`, correct the definition of `lastlog` ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Introduce `utmpx_.rs`, correct utmpx definitions ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Make `_cpuset` an extern type ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: RISC-V 64: Fix the `mcontext` types ([#4782](https://github.com/rust-lang/libc/pull/4782)) - Nuttx: Resolve warnings ([#4773](https://github.com/rust-lang/libc/pull/4773)) - OHOS: Don't emit duplicate lfs64 definitions ([#4804](https://github.com/rust-lang/libc/pull/4804)) - Redox: Fix the type of `pid_t` ([#4825](https://github.com/rust-lang/libc/pull/4825)) - WASI: Gate `__wasilibc_register_preopened_fd` ([#4837](https://github.com/rust-lang/libc/pull/4837)) - Wali: Fix unknown config ([#4773](https://github.com/rust-lang/libc/pull/4773)) ### Changed - AIX: Declare field 'tv_nsec' of structure 'timespec' as 'i32' in both 32-bit and 64-bit modes ([#4750](https://github.com/rust-lang/libc/pull/4750)) - DragonFly: Avoid usage of `thread_local` ([#3653](https://github.com/rust-lang/libc/pull/3653)) - Linux: Update the definition for `ucontext_t` and unskip its tests ([#4760](https://github.com/rust-lang/libc/pull/4760)) - MinGW: Set `L_tmpnam` and `TMP_MAX` to the UCRT value ([#4566](https://github.com/rust-lang/libc/pull/4566)) - WASI: More closely align pthread type reprs ([#4747](https://github.com/rust-lang/libc/pull/4747)) - Simplify rustc-check-cfg emission in build.rs ([#4724](https://github.com/rust-lang/libc/pull/4724)) - Transition a number of definitions to the new source structure (internal change) ### Removed - MIPS Musl: Remove rogue definition of `SIGSTKFLT` ([#4749](https://github.com/rust-lang/libc/pull/4749)) - NetBSD: Make `statvfs.f_spare` non-public ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Remove BPF constants ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Remove `*_MAXID` constants and `AT_SUN_LDPGSIZE` ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Remove `IFF_NOTRAILERS` ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Remove `vm_size_t` ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Replace REG_ENOSYS with REG_ILLSEQ ([#4782](https://github.com/rust-lang/libc/pull/4782)) ## [0.2.177](https://github.com/rust-lang/libc/compare/0.2.176...0.2.177) - 2025-10-09 ### Added - Apple: Add `TIOCGETA`, `TIOCSETA`, `TIOCSETAW`, `TIOCSETAF` constants ([#4736](https://github.com/rust-lang/libc/pull/4736)) - Apple: Add `pthread_cond_timedwait_relative_np` ([#4719](https://github.com/rust-lang/libc/pull/4719)) - BSDs: Add `_CS_PATH` constant ([#4738](https://github.com/rust-lang/libc/pull/4738)) - Linux-like: Add `SIGEMT` for mips* and sparc* architectures ([#4730](https://github.com/rust-lang/libc/pull/4730)) - OpenBSD: Add `elf_aux_info` ([#4729](https://github.com/rust-lang/libc/pull/4729)) - Redox: Add more sysconf constants ([#4728](https://github.com/rust-lang/libc/pull/4728)) - Windows: Add `wcsnlen` ([#4721](https://github.com/rust-lang/libc/pull/4721)) ### Changed - WASIP2: Invert conditional to include p2 APIs ([#4733](https://github.com/rust-lang/libc/pull/4733)) ## [0.2.176](https://github.com/rust-lang/libc/compare/0.2.175...0.2.176) - 2025-09-23 ### Support - The default FreeBSD version has been raised from 11 to 12. This matches `rustc` since 1.78. ([#2406](https://github.com/rust-lang/libc/pull/2406)) - `Debug` is now always implemented, rather than being gated behind the `extra_traits` feature. ([#4624](https://github.com/rust-lang/libc/pull/4624)) ### Added - AIX: Restore some non-POSIX functions guarded by the `_KERNEL` macro. ([#4607](https://github.com/rust-lang/libc/pull/4607)) - FreeBSD 14: Add `st_fileref` to `struct stat` ([#4642](https://github.com/rust-lang/libc/pull/4642)) - Haiku: Add the `accept4` POSIX call ([#4586](https://github.com/rust-lang/libc/pull/4586)) - Introduce a wrapper for representing padding ([#4632](https://github.com/rust-lang/libc/pull/4632)) - Linux: Add `EM_RISCV` ([#4659](https://github.com/rust-lang/libc/pull/4659)) - Linux: Add `MS_NOSYMFOLLOW` ([#4389](https://github.com/rust-lang/libc/pull/4389)) - Linux: Add `backtrace_symbols(_fd)` ([#4668](https://github.com/rust-lang/libc/pull/4668)) - Linux: Add missing `SOL_PACKET` optnames ([#4669](https://github.com/rust-lang/libc/pull/4669)) - Musl s390x: Add `SYS_mseal` ([#4549](https://github.com/rust-lang/libc/pull/4549)) - NuttX: Add `__errno` ([#4687](https://github.com/rust-lang/libc/pull/4687)) - Redox: Add `dirfd`, `VDISABLE`, and resource consts ([#4660](https://github.com/rust-lang/libc/pull/4660)) - Redox: Add more `resource.h`, `fcntl.h` constants ([#4666](https://github.com/rust-lang/libc/pull/4666)) - Redox: Enable `strftime` and `mkostemp[s]` ([#4629](https://github.com/rust-lang/libc/pull/4629)) - Unix, Windows: Add `qsort_r` (Unix), and `qsort(_s)` (Windows) ([#4677](https://github.com/rust-lang/libc/pull/4677)) - Unix: Add `dlvsym` for Linux-gnu, FreeBSD, and NetBSD ([#4671](https://github.com/rust-lang/libc/pull/4671)) - Unix: Add `sigqueue` ([#4620](https://github.com/rust-lang/libc/pull/4620)) ### Changed - FreeBSD 15: Mark `kinfo_proc` as non-exhaustive ([#4553](https://github.com/rust-lang/libc/pull/4553)) - FreeBSD: Set the ELF symbol version for `readdir_r` ([#4694](https://github.com/rust-lang/libc/pull/4694)) - Linux: Correct the config for whether or not `epoll_event` is packed ([#4639](https://github.com/rust-lang/libc/pull/4639)) - Tests: Replace the old `ctest` with the much more reliable new implementation ([#4655](https://github.com/rust-lang/libc/pull/4655) and many related PRs) ### Fixed - AIX: Fix the type of the 4th arguement of `getgrnam_r` ([#4656](https://github.com/rust-lang/libc/pull/4656 - FreeBSD: Limit `P_IDLEPROC` to FreeBSD 15 ([#4640](https://github.com/rust-lang/libc/pull/4640)) - FreeBSD: Limit `mcontext_t::mc_tlsbase` to FreeBSD 15 ([#4640](https://github.com/rust-lang/libc/pull/464)) - FreeBSD: Update gating of `mcontext_t.mc_tlsbase` ([#4703](https://github.com/rust-lang/libc/pull/4703)) - Musl s390x: Correct the definition of `statfs[64]` ([#4549](https://github.com/rust-lang/libc/pull/4549)) - Musl s390x: Make `fpreg_t` a union ([#4549](https://github.com/rust-lang/libc/pull/4549)) - Redox: Fix the types of `gid_t` and `uid_t` ([#4689](https://github.com/rust-lang/libc/pull/4689)) - Redox: Fix the value of `MAP_FIXED` ([#4684](https://github.com/rust-lang/libc/pull/4684)) ### Deprecated - Apple: Correct the `deprecated` attribute for `iconv` ([`a97a0b53`](https://github.com/rust-lang/libc/commit/a97a0b53fb7faf5f99cd720ab12b1b8a5bf9f950)) - FreeBSD: Deprecate `TIOCMGDTRWAIT` and `TIOCMSDTRWAIT` ([#4685](https://github.com/rust-lang/libc/pull/4685)) ### Removed - FreeBSD: Remove `JAIL_{GET,SET}_MASK`, `_MC_FLAG_MASK` ([#4691](https://github.com/rust-lang/libc/pull/4691)) ## [0.2.175](https://github.com/rust-lang/libc/compare/0.2.174...0.2.175) - 2025-08-10 ### Added - AIX: Add `getpeereid` ([#4524](https://github.com/rust-lang/libc/pull/4524)) - AIX: Add `struct ld_info` and friends ([#4578](https://github.com/rust-lang/libc/pull/4578)) - AIX: Retore `struct winsize` ([#4577](https://github.com/rust-lang/libc/pull/4577)) - Android: Add UDP socket option constants ([#4619](https://github.com/rust-lang/libc/pull/4619)) - Android: Add `CLONE_CLEAR_SIGHAND` and `CLONE_INTO_CGROUP` ([#4502](https://github.com/rust-lang/libc/pull/4502)) - Android: Add more `prctl` constants ([#4531](https://github.com/rust-lang/libc/pull/4531)) - FreeBSD Add further TCP stack-related constants ([#4196](https://github.com/rust-lang/libc/pull/4196)) - FreeBSD x86-64: Add `mcontext_t.mc_tlsbase ` ([#4503](https://github.com/rust-lang/libc/pull/4503)) - FreeBSD15: Add `kinfo_proc.ki_uerrmsg` ([#4552](https://github.com/rust-lang/libc/pull/4552)) - FreeBSD: Add `in_conninfo` ([#4482](https://github.com/rust-lang/libc/pull/4482)) - FreeBSD: Add `xinpgen` and related types ([#4482](https://github.com/rust-lang/libc/pull/4482)) - FreeBSD: Add `xktls_session` ([#4482](https://github.com/rust-lang/libc/pull/4482)) - Haiku: Add functionality from `libbsd` ([#4221](https://github.com/rust-lang/libc/pull/4221)) - Linux: Add `SECBIT_*` ([#4480](https://github.com/rust-lang/libc/pull/4480)) - NetBSD, OpenBSD: Export `ioctl` request generator macros ([#4460](https://github.com/rust-lang/libc/pull/4460)) - NetBSD: Add `ptsname_r` ([#4608](https://github.com/rust-lang/libc/pull/4608)) - RISCV32: Add time-related syscalls ([#4612](https://github.com/rust-lang/libc/pull/4612)) - Solarish: Add `strftime*` ([#4453](https://github.com/rust-lang/libc/pull/4453)) - linux: Add `EXEC_RESTRICT_*` and `EXEC_DENY_*` ([#4545](https://github.com/rust-lang/libc/pull/4545)) ### Changed - AIX: Add `const` to signatures to be consistent with other platforms ([#4563](https://github.com/rust-lang/libc/pull/4563)) ### Fixed - AIX: Fix the type of `struct statvfs.f_fsid` ([#4576](https://github.com/rust-lang/libc/pull/4576)) - AIX: Fix the type of constants for the `ioctl` `request` argument ([#4582](https://github.com/rust-lang/libc/pull/4582)) - AIX: Fix the types of `stat{,64}.st_*tim` ([#4597](https://github.com/rust-lang/libc/pull/4597)) - AIX: Use unique `errno` values ([#4507](https://github.com/rust-lang/libc/pull/4507)) - Build: Fix an incorrect `target_os` -> `target_arch` check ([#4550](https://github.com/rust-lang/libc/pull/4550)) - FreeBSD: Fix the type of `xktls_session_onedir.ifnet` ([#4552](https://github.com/rust-lang/libc/pull/4552)) - Mips64 musl: Fix the type of `nlink_t` ([#4509](https://github.com/rust-lang/libc/pull/4509)) - Mips64 musl: Use a special MIPS definition of `stack_t` ([#4528](https://github.com/rust-lang/libc/pull/4528)) - Mips64: Fix `SI_TIMER`, `SI_MESGQ` and `SI_ASYNCIO` definitions ([#4529](https://github.com/rust-lang/libc/pull/4529)) - Musl Mips64: Swap the order of `si_errno` and `si_code` in `siginfo_t` ([#4530](https://github.com/rust-lang/libc/pull/4530)) - Musl Mips64: Use a special MIPS definition of `statfs` ([#4527](https://github.com/rust-lang/libc/pull/4527)) - Musl: Fix the definition of `fanotify_event_metadata` ([#4510](https://github.com/rust-lang/libc/pull/4510)) - NetBSD: Correct `enum fae_action` to be `#[repr(C)]` ([#60a8cfd5](https://github.com/rust-lang/libc/commit/60a8cfd564f83164d45b9533ff7a0d7371878f2a)) - PSP: Correct `char` -> `c_char` ([eaab4fc3](https://github.com/rust-lang/libc/commit/eaab4fc3f05dc646a953d4fd5ba46dfa1f8bd6f6)) - PowerPC musl: Fix `termios` definitions ([#4518](https://github.com/rust-lang/libc/pull/4518)) - PowerPC musl: Fix the definition of `EDEADLK` ([#4517](https://github.com/rust-lang/libc/pull/4517)) - PowerPC musl: Fix the definition of `NCCS` ([#4513](https://github.com/rust-lang/libc/pull/4513)) - PowerPC musl: Fix the definitions of `MAP_LOCKED` and `MAP_NORESERVE` ([#4516](https://github.com/rust-lang/libc/pull/4516)) - PowerPC64 musl: Fix the definition of `shmid_ds` ([#4519](https://github.com/rust-lang/libc/pull/4519)) ### Deprecated - Linux: `MAP_32BIT` is only defined on x86 on non-x86 architectures ([#4511](https://github.com/rust-lang/libc/pull/4511)) ### Removed - AIX: Remove duplicate constant definitions `FIND` and `ENTER` ([#4588](https://github.com/rust-lang/libc/pull/4588)) - s390x musl: Remove `O_FSYNC` ([#4515](https://github.com/rust-lang/libc/pull/4515)) - s390x musl: Remove `RTLD_DEEPBIND` ([#4515](https://github.com/rust-lang/libc/pull/4515)) ## [0.2.174](https://github.com/rust-lang/libc/compare/0.2.173...0.2.174) - 2025-06-17 ### Added - Linux: Make `pidfd_info` fields pub ([#4487](https://github.com/rust-lang/libc/pull/4487)) ### Fixed - Gnu x32: Add missing `timespec.tv_nsec` ([#4497](https://github.com/rust-lang/libc/pull/4497)) - NuttX: Use `nlink_t` type for `st_nlink` in `struct stat` definition ([#4483](https://github.com/rust-lang/libc/pull/4483)) ### Other - Allow new `unpredictable_function_pointer_comparisons` lints ([#4489](https://github.com/rust-lang/libc/pull/4489)) - OpenBSD: Fix some clippy warnings to use `pointer::cast`. ([#4490](https://github.com/rust-lang/libc/pull/4490)) - Remove unessecary semicolons from definitions of `CMSG_NXTHDR`. ([#4492](https://github.com/rust-lang/libc/pull/4492)) ## [0.2.173](https://github.com/rust-lang/libc/compare/0.2.172...0.2.173) - 2025-06-09 ### Added - AIX: Add an AIX triple to Cargo.toml for doc ([#4475](https://github.com/rust-lang/libc/pull/4475)) - FreeBSD: Add the `SO_SPLICE` socket option support for FreeBSD >= 14.2 ([#4451](https://github.com/rust-lang/libc/pull/4451)) - Linux GNU: Prepare for supporting `_TIME_BITS=64` ([#4433](https://github.com/rust-lang/libc/pull/4433)) - Linux: Add constant PACKET_IGNORE_OUTGOING ([#4319](https://github.com/rust-lang/libc/pull/4319)) - Linux: Add constants and types for `nsfs` ioctls ([#4436](https://github.com/rust-lang/libc/pull/4436)) - Linux: Add constants for Memory-Deny-Write-Execute `prctls` ([#4400](https://github.com/rust-lang/libc/pull/4400)) - Linux: Add constants from `linux/cn_proc.h` and `linux/connector.h` ([#4434](https://github.com/rust-lang/libc/pull/4434)) - Linux: Add new flags for `pwritev2` and `preadv2` ([#4452](https://github.com/rust-lang/libc/pull/4452)) - Linux: Add pid_type enum values ([#4403](https://github.com/rust-lang/libc/pull/4403)) - Linux: Update pidfd constants and types (Linux 6.9-6.15) ([#4402](https://github.com/rust-lang/libc/pull/4402)) - Loongarch64 musl: Define the `MADV_SOFT_OFFLINE` constant ([#4448](https://github.com/rust-lang/libc/pull/4448)) - Musl: Add new fields since 1.2.0/1.2.2 to `struct tcp_info` ([#4443](https://github.com/rust-lang/libc/pull/4443)) - Musl: Prepare for supporting v1.2.3 ([#4443](https://github.com/rust-lang/libc/pull/4443)) - NuttX: Add `arc4random` and `arc4random_buf` ([#4464](https://github.com/rust-lang/libc/pull/4464)) - RISC-V Musl: Add `MADV_SOFT_OFFLINE` definition ([#4447](https://github.com/rust-lang/libc/pull/4447)) - Redox: Define SCM_RIGHTS ([#4440](https://github.com/rust-lang/libc/pull/4440)) - VxWorks: Add missing UTIME defines and TASK_RENAME_LENGTH ([#4407](https://github.com/rust-lang/libc/pull/4407)) - Windows: Add more `time.h` functions ([#4427](https://github.com/rust-lang/libc/pull/4427)) ### Changed - Redox: Update `SA_` constants. ([#4426](https://github.com/rust-lang/libc/pull/4426)) - Redox: make `CMSG_ALIGN`, `CMSG_LEN`, and `CMSG_SPACE` const functions ([#4441](https://github.com/rust-lang/libc/pull/4441)) ### Fixed - AIX: Enable libc-test and fix definitions/declarations. ([#4450](https://github.com/rust-lang/libc/pull/4450)) - Emscripten: Fix querying emcc on windows (use emcc.bat) ([#4248](https://github.com/rust-lang/libc/pull/4248)) - Hurd: Fix build from missing `fpos_t` ([#4472](https://github.com/rust-lang/libc/pull/4472)) - Loongarch64 Musl: Fix the `struct ipc_perm` bindings ([#4384](https://github.com/rust-lang/libc/pull/4384)) - Musl: Fix the `O_LARGEFILE` constant value. ([#4443](https://github.com/rust-lang/libc/pull/4443)) ## [0.2.172](https://github.com/rust-lang/libc/compare/0.2.171...0.2.172) - 2025-04-14 ### Added - Android: Add `getauxval` for 32-bit targets ([#4338](https://github.com/rust-lang/libc/pull/4338)) - Android: Add `if_tun.h` ioctls ([#4379](https://github.com/rust-lang/libc/pull/4379)) - Android: Define `SO_BINDTOIFINDEX` ([#4391](https://github.com/rust-lang/libc/pull/4391)) - Cygwin: Add `posix_spawn_file_actions_add[f]chdir[_np]` ([#4387](https://github.com/rust-lang/libc/pull/4387)) - Cygwin: Add new socket options ([#4350](https://github.com/rust-lang/libc/pull/4350)) - Cygwin: Add statfs & fcntl ([#4321](https://github.com/rust-lang/libc/pull/4321)) - FreeBSD: Add `filedesc` and `fdescenttbl` ([#4327](https://github.com/rust-lang/libc/pull/4327)) - Glibc: Add unstable support for _FILE_OFFSET_BITS=64 ([#4345](https://github.com/rust-lang/libc/pull/4345)) - Hermit: Add `AF_UNSPEC` ([#4344](https://github.com/rust-lang/libc/pull/4344)) - Hermit: Add `AF_VSOCK` ([#4344](https://github.com/rust-lang/libc/pull/4344)) - Illumos, NetBSD: Add `timerfd` APIs ([#4333](https://github.com/rust-lang/libc/pull/4333)) - Linux: Add `_IO`, `_IOW`, `_IOR`, `_IOWR` to the exported API ([#4325](https://github.com/rust-lang/libc/pull/4325)) - Linux: Add `tcp_info` to uClibc bindings ([#4347](https://github.com/rust-lang/libc/pull/4347)) - Linux: Add further BPF program flags ([#4356](https://github.com/rust-lang/libc/pull/4356)) - Linux: Add missing INPUT_PROP_XXX flags from `input-event-codes.h` ([#4326](https://github.com/rust-lang/libc/pull/4326)) - Linux: Add missing TLS bindings ([#4296](https://github.com/rust-lang/libc/pull/4296)) - Linux: Add more constants from `seccomp.h` ([#4330](https://github.com/rust-lang/libc/pull/4330)) - Linux: Add more glibc `ptrace_sud_config` and related `PTRACE_*ET_SYSCALL_USER_DISPATCH_CONFIG`. ([#4386](https://github.com/rust-lang/libc/pull/4386)) - Linux: Add new netlink flags ([#4288](https://github.com/rust-lang/libc/pull/4288)) - Linux: Define ioctl codes on more architectures ([#4382](https://github.com/rust-lang/libc/pull/4382)) - Linux: Add missing `pthread_attr_setstack` ([#4349](https://github.com/rust-lang/libc/pull/4349)) - Musl: Add missing `utmpx` API ([#4332](https://github.com/rust-lang/libc/pull/4332)) - Musl: Enable `getrandom` on all platforms ([#4346](https://github.com/rust-lang/libc/pull/4346)) - NuttX: Add more signal constants ([#4353](https://github.com/rust-lang/libc/pull/4353)) - QNX: Add QNX 7.1-iosock and 8.0 to list of additional cfgs ([#4169](https://github.com/rust-lang/libc/pull/4169)) - QNX: Add support for alternative Neutrino network stack `io-sock` ([#4169](https://github.com/rust-lang/libc/pull/4169)) - Redox: Add more `sys/socket.h` and `sys/uio.h` definitions ([#4388](https://github.com/rust-lang/libc/pull/4388)) - Solaris: Temporarily define `O_DIRECT` and `SIGINFO` ([#4348](https://github.com/rust-lang/libc/pull/4348)) - Solarish: Add `secure_getenv` ([#4342](https://github.com/rust-lang/libc/pull/4342)) - VxWorks: Add missing `d_type` member to `dirent` ([#4352](https://github.com/rust-lang/libc/pull/4352)) - VxWorks: Add missing signal-related constsants ([#4352](https://github.com/rust-lang/libc/pull/4352)) - VxWorks: Add more error codes ([#4337](https://github.com/rust-lang/libc/pull/4337)) ### Deprecated - FreeBSD: Deprecate `TCP_PCAP_OUT` and `TCP_PCAP_IN` ([#4381](https://github.com/rust-lang/libc/pull/4381)) ### Fixed - Cygwin: Fix member types of `statfs` ([#4324](https://github.com/rust-lang/libc/pull/4324)) - Cygwin: Fix tests ([#4357](https://github.com/rust-lang/libc/pull/4357)) - Hermit: Make `AF_INET = 3` ([#4344](https://github.com/rust-lang/libc/pull/4344)) - Musl: Fix the syscall table on RISC-V-32 ([#4335](https://github.com/rust-lang/libc/pull/4335)) - Musl: Fix the value of `SA_ONSTACK` on RISC-V-32 ([#4335](https://github.com/rust-lang/libc/pull/4335)) - VxWorks: Fix a typo in the `waitpid` parameter name ([#4334](https://github.com/rust-lang/libc/pull/4334)) ### Removed - Musl: Remove `O_FSYNC` on RISC-V-32 (use `O_SYNC` instead) ([#4335](https://github.com/rust-lang/libc/pull/4335)) - Musl: Remove `RTLD_DEEPBIND` on RISC-V-32 ([#4335](https://github.com/rust-lang/libc/pull/4335)) ### Other - CI: Add matrix env variables to the environment ([#4345](https://github.com/rust-lang/libc/pull/4345)) - CI: Always deny warnings ([#4363](https://github.com/rust-lang/libc/pull/4363)) - CI: Always upload successfully created artifacts ([#4345](https://github.com/rust-lang/libc/pull/4345)) - CI: Install musl from source for loongarch64 ([#4320](https://github.com/rust-lang/libc/pull/4320)) - CI: Revert "Also skip `MFD_EXEC` and `MFD_NOEXEC_SEAL` on sparc64" ([#]()) - CI: Use `$PWD` instead of `$(pwd)` in run-docker ([#4345](https://github.com/rust-lang/libc/pull/4345)) - Solarish: Restrict `openpty` and `forkpty` polyfills to Illumos, replace Solaris implementation with bindings ([#4329](https://github.com/rust-lang/libc/pull/4329)) - Testing: Ensure the makedev test does not emit unused errors ([#4363](https://github.com/rust-lang/libc/pull/4363)) ## [0.2.171](https://github.com/rust-lang/libc/compare/0.2.170...0.2.171) - 2025-03-11 ### Added - Android: Add `if_nameindex`/`if_freenameindex` support ([#4247](https://github.com/rust-lang/libc/pull/4247)) - Apple: Add missing proc types and constants ([#4310](https://github.com/rust-lang/libc/pull/4310)) - BSD: Add `devname` ([#4285](https://github.com/rust-lang/libc/pull/4285)) - Cygwin: Add PTY and group API ([#4309](https://github.com/rust-lang/libc/pull/4309)) - Cygwin: Add support ([#4279](https://github.com/rust-lang/libc/pull/4279)) - FreeBSD: Make `spawn.h` interfaces available on all FreeBSD-like systems ([#4294](https://github.com/rust-lang/libc/pull/4294)) - Linux: Add `AF_XDP` structs for all Linux environments ([#4163](https://github.com/rust-lang/libc/pull/4163)) - Linux: Add SysV semaphore constants ([#4286](https://github.com/rust-lang/libc/pull/4286)) - Linux: Add `F_SEAL_EXEC` ([#4316](https://github.com/rust-lang/libc/pull/4316)) - Linux: Add `SO_PREFER_BUSY_POLL` and `SO_BUSY_POLL_BUDGET` ([#3917](https://github.com/rust-lang/libc/pull/3917)) - Linux: Add `devmem` structs ([#4299](https://github.com/rust-lang/libc/pull/4299)) - Linux: Add socket constants up to `SO_DEVMEM_DONTNEED` ([#4299](https://github.com/rust-lang/libc/pull/4299)) - NetBSD, OpenBSD, DragonflyBSD: Add `closefrom` ([#4290](https://github.com/rust-lang/libc/pull/4290)) - NuttX: Add `pw_passwd` field to `passwd` ([#4222](https://github.com/rust-lang/libc/pull/4222)) - Solarish: define `IP_BOUND_IF` and `IPV6_BOUND_IF` ([#4287](https://github.com/rust-lang/libc/pull/4287)) - Wali: Add bindings for `wasm32-wali-linux-musl` target ([#4244](https://github.com/rust-lang/libc/pull/4244)) ### Changed - AIX: Use `sa_sigaction` instead of a union ([#4250](https://github.com/rust-lang/libc/pull/4250)) - Make `msqid_ds.__msg_cbytes` public ([#4301](https://github.com/rust-lang/libc/pull/4301)) - Unix: Make all `major`, `minor`, `makedev` into `const fn` ([#4208](https://github.com/rust-lang/libc/pull/4208)) ### Deprecated - Linux: Deprecate obsolete packet filter interfaces ([#4267](https://github.com/rust-lang/libc/pull/4267)) ### Fixed - Cygwin: Fix strerror_r ([#4308](https://github.com/rust-lang/libc/pull/4308)) - Cygwin: Fix usage of f! ([#4308](https://github.com/rust-lang/libc/pull/4308)) - Hermit: Make `stat::st_size` signed ([#4298](https://github.com/rust-lang/libc/pull/4298)) - Linux: Correct values for `SI_TIMER`, `SI_MESGQ`, `SI_ASYNCIO` ([#4292](https://github.com/rust-lang/libc/pull/4292)) - NuttX: Update `tm_zone` and `d_name` fields to use `c_char` type ([#4222](https://github.com/rust-lang/libc/pull/4222)) - Xous: Include the prelude to define `c_int` ([#4304](https://github.com/rust-lang/libc/pull/4304)) ### Other - Add labels to FIXMEs ([#4231](https://github.com/rust-lang/libc/pull/4231), [#4232](https://github.com/rust-lang/libc/pull/4232), [#4234](https://github.com/rust-lang/libc/pull/4234), [#4235](https://github.com/rust-lang/libc/pull/4235), [#4236](https://github.com/rust-lang/libc/pull/4236)) - CI: Fix "cannot find libc" error on Sparc64 ([#4317](https://github.com/rust-lang/libc/pull/4317)) - CI: Fix "cannot find libc" error on s390x ([#4317](https://github.com/rust-lang/libc/pull/4317)) - CI: Pass `--no-self-update` to `rustup update` ([#4306](https://github.com/rust-lang/libc/pull/4306)) - CI: Remove tests for the `i586-pc-windows-msvc` target ([#4311](https://github.com/rust-lang/libc/pull/4311)) - CI: Remove the `check_cfg` job ([#4322](https://github.com/rust-lang/libc/pull/4312)) - Change the range syntax that is giving `ctest` problems ([#4311](https://github.com/rust-lang/libc/pull/4311)) - Linux: Split out the stat struct for gnu/b32/mips ([#4276](https://github.com/rust-lang/libc/pull/4276)) ### Removed - NuttX: Remove `pthread_set_name_np` ([#4251](https://github.com/rust-lang/libc/pull/4251)) ## [0.2.170](https://github.com/rust-lang/libc/compare/0.2.169...0.2.170) - 2025-02-23 ### Added - Android: Declare `setdomainname` and `getdomainname` - FreeBSD: Add `evdev` structures - FreeBSD: Add the new `st_filerev` field to `stat32` ([#4254](https://github.com/rust-lang/libc/pull/4254)) - Linux: Add `SI_*`` and `TRAP_*`` signal codes - Linux: Add experimental configuration to enable 64-bit time in kernel APIs, set by `RUST_LIBC_UNSTABLE_LINUX_TIME_BITS64`. - Linux: Add recent socket timestamping flags - Linux: Added new CANFD_FDF flag for the flags field of canfd_frame - Musl: add CLONE_NEWTIME - Solarish: add the posix_spawn family of functions ### Deprecated - Linux: deprecate kernel modules syscalls ### Changed - Emscripten: Assume version is at least 3.1.42 ### Fixed - BSD: Correct the definition of `WEXITSTATUS` - Hurd: Fix CMSG_DATA on 64bit systems ([#4240](https://github.com/rust-lang/libc/pull/424)) - NetBSD: fix `getmntinfo` ([#4265](https://github.com/rust-lang/libc/pull/4265) - VxWorks: Fix the size of `time_t` ### Other - Add labels to FIXMEs , , - CI: Bump FreeBSD CI to 13.4 and 14.2 - Copy definitions from core::ffi and centralize them - Define c_char at top-level and remove per-target c_char definitions - Port style.rs to syn and add tests for the style checker ## [0.2.169](https://github.com/rust-lang/libc/compare/0.2.168...0.2.169) - 2024-12-18 ### Added - FreeBSD: add more socket TCP stack constants - Fuchsia: add a `sockaddr_vm` definition ### Fixed **Breaking**: [rust-lang/rust#132975](https://github.com/rust-lang/rust/pull/132975) corrected the signedness of `core::ffi::c_char` on various Tier 2 and Tier 3 platforms (mostly Arm and RISC-V) to match Clang. This release contains the corresponding changes to `libc`, including the following specific pull requests: - ESP-IDF: Replace arch-conditional `c_char` with a reexport - Fix `c_char` on various targets - Mirror `c_char` configuration from `rust-lang/rust` ### Cleanup - Do not re-export `c_void` in target-specific code ## [0.2.168](https://github.com/rust-lang/libc/compare/0.2.167...0.2.168) - 2024-12-09 ### Added - Linux: Add new process flags ([#4174](https://github.com/rust-lang/libc/pull/4174)) - Linux: Make `IFA_*` constants available on all Linux targets - Linux: add `MAP_DROPPABLE` - Solaris, Illumos: add `SIGRTMIN` and `SIGRTMAX` - Unix, Linux: adding POSIX `memccpy` and `mempcpy` GNU extension - CI: Upload artifacts created by libc-test - CI: Use workflow commands to group output by target - CI: add caching ## [0.2.167](https://github.com/rust-lang/libc/compare/0.2.166...0.2.167) - 2024-11-28 ### Added - Solarish: add `st_fstype` to `stat` - Trusty: Add `intptr_t` and `uintptr_t` ([#4161](https://github.com/rust-lang/libc/pull/4161)) ### Fixed - Fix the build with `rustc-dep-of-std` - Wasi: Add back unsafe block for `clockid_t` static variables ([#4157](https://github.com/rust-lang/libc/pull/4157)) ### Cleanup - Create an internal prelude - Fix `unused_qualifications` ### Other - CI: Check various FreeBSD versions ([#4159](https://github.com/rust-lang/libc/pull/4159)) - CI: add a timeout for all jobs - CI: verify MSRV for `wasm32-wasi` - Migrate to the 2021 edition ### Removed - Remove one unused import after the edition 2021 bump ## [0.2.166](https://github.com/rust-lang/libc/compare/0.2.165...0.2.166) - 2024-11-26 ### Fixed This release resolves two cases of unintentional breakage from the previous release: - Revert removal of array size hacks [#4150](https://github.com/rust-lang/libc/pull/4150) - Ensure `const extern` functions are always enabled [#4151](https://github.com/rust-lang/libc/pull/4151) ## [0.2.165](https://github.com/rust-lang/libc/compare/0.2.164...0.2.165) - 2024-11-25 ### Added - Android: add `mkostemp`, `mkostemps` - Android: add a few API 30 calls - Android: add missing syscall constants - Apple: add `in6_ifreq` - Apple: add missing `sysctl` net types (before release: remove `if_family_id` ([#4137](https://github.com/rust-lang/libc/pulls/4137))) - Freebsd: add `kcmp` call support - Hurd: add `MAP_32BIT` and `MAP_EXCL` - Hurd: add `domainname` field to `utsname` ([#4089](https://github.com/rust-lang/libc/pulls/4089)) - Linux GNU: add `f_flags` to struct `statfs` for arm, mips, powerpc and x86 - Linux GNU: add `malloc_stats` - Linux: add ELF relocation-related structs - Linux: add `ptp_*` structs - Linux: add `ptp_clock_caps` - Linux: add `ptp_pin_function` and most `PTP_` constants - Linux: add missing AF_XDP structs & constants - Linux: add missing netfilter consts ([#3734](https://github.com/rust-lang/libc/pulls/3734)) - Linux: add struct and constants for the `mount_setattr` syscall - Linux: add wireless API - Linux: expose the `len8_dlc` field of `can_frame` - Musl: add `utmpx` API - Musl: add missing syscall constants - NetBSD: add `mcontext`-related data for RISCV64 - Redox: add new `netinet` constants ) - Solarish: add `_POSIX_VDISABLE` ([#4103](https://github.com/rust-lang/libc/pulls/4103)) - Tests: Add a test that the `const extern fn` macro works - Tests: Add test of primitive types against `std` - Unix: Add `htonl`, `htons`, `ntohl`, `ntohs` - Unix: add `aligned_alloc` - Windows: add `aligned_realloc` ### Fixed - **breaking** Hurd: fix `MAP_HASSEMAPHORE` name ([#4127](https://github.com/rust-lang/libc/pulls/4127)) - **breaking** ulibc Mips: fix `SA_*` mismatched types ([#3211](https://github.com/rust-lang/libc/pulls/3211)) - Aix: fix an enum FFI safety warning - Haiku: fix some typos ([#3664](https://github.com/rust-lang/libc/pulls/3664)) - Tests: fix `Elf{32,64}_Relr`-related tests - Tests: fix libc-tests for `loongarch64-linux-musl` - Tests: fix some clippy warnings - Tests: fix tests on `riscv64gc-unknown-freebsd` ### Deprecated - Apple: deprecate `iconv_open` - Apple: deprecate `mach_task_self` - Apple: update `mach` deprecation notices for things that were removed in `main` ### Cleanup - Adjust the `f!` macro to be more flexible - Aix: remove duplicate constants - CI: make scripts more uniform - Drop the `libc_align` conditional - Drop the `libc_cfg_target_vendor` conditional - Drop the `libc_const_size_of` conditional - Drop the `libc_core_cvoid` conditional - Drop the `libc_int128` conditional - Drop the `libc_non_exhaustive` conditional - Drop the `libc_packedN` conditional - Drop the `libc_priv_mod_use` conditional - Drop the `libc_union` conditional - Drop the `long_array` conditional - Drop the `ptr_addr_of` conditional - Drop warnings about deprecated cargo features - Eliminate uses of `struct_formatter` - Fix a few other array size hacks - Glibc: remove redundant definitions ([#3261](https://github.com/rust-lang/libc/pulls/3261)) - Musl: remove redundant definitions ([#3261](https://github.com/rust-lang/libc/pulls/3261)) - Musl: unify definitions of `siginfo_t` ([#3261](https://github.com/rust-lang/libc/pulls/3261)) - Musl: unify definitions of statfs and statfs64 ([#3261](https://github.com/rust-lang/libc/pulls/3261)) - Musl: unify definitions of statvfs and statvfs64 ([#3261](https://github.com/rust-lang/libc/pulls/3261)) - Musl: unify statx definitions ([#3978](https://github.com/rust-lang/libc/pulls/3978)) - Remove array size hacks for Rust < 1.47 - Remove repetitive words - Use #[derive] for Copy/Clone in s! and friends - Use some tricks to format macro bodies ### Other - Apply formatting to macro bodies - Bump libc-test to Rust 2021 Edition - CI: Add a check that semver files don't contain duplicate entries - CI: Add `fanotify_event_info_fid` to FAM-exempt types - CI: Allow rustfmt to organize imports ([#4136](https://github.com/rust-lang/libc/pulls/4136)) - CI: Always run rustfmt - CI: Change 32-bit Docker images to use EOL repos - CI: Change 64-bit Docker images to ubuntu:24.10 - CI: Disable the check for >1 s! invocation - CI: Ensure build channels get run even if FILTER is unset - CI: Ensure there is a fallback for no_std - CI: Fix cases where unset variables cause errors - CI: Naming adjustments and cleanup - CI: Only invoke rustup if running in CI - CI: Remove the logic to handle old rust versions - CI: Set -u (error on unset) in all script files - CI: add support for `loongarch64-unknown-linux-musl` - CI: make `aarch64-apple-darwin` not a nightly-only target - CI: run shellcheck on all scripts - CI: update musl headers to Linux 6.6 - CI: use qemu-sparc64 to run sparc64 tests - Drop the `libc_const_extern_fn` conditional - Drop the `libc_underscore_const_names` conditional - Explicitly set the edition to 2015 - Introduce a `git-blame-ignore-revs` file - Tests: Ignore fields as required on Ubuntu 24.10 - Tests: skip `ATF_*` constants for OpenBSD - Triagebot: Add an autolabel for CI ## [0.2.164](https://github.com/rust-lang/libc/compare/0.2.163...0.2.164) - 2024-11-16 ### MSRV This release increases the MSRV of `libc` to 1.63. ### Other - CI: remove tests with rust < 1.63 - MSRV: document the MSRV of the stable channel to be 1.63 - MacOS: move ifconf to s_no_extra_traits ## [0.2.163](https://github.com/rust-lang/libc/compare/0.2.162...0.2.163) - 2024-11-16 ### Added - Aix: add more `dlopen` flags - Android: add group calls - FreeBSD: add `TCP_FUNCTION_BLK` and `TCP_FUNCTION_ALIAS` - Linux: add `confstr` - Solarish: add `aio` - Solarish: add `arc4random*` ### Changed - Emscripten: upgrade emsdk to 3.1.68 - Hurd: use more standard types - Hurd: use the standard `ssize_t = isize` - Solaris: fix `confstr` and `ucontext_t` ### Other - CI: add Solaris - CI: add `i686-unknown-freebsd` - CI: ensure that calls to `sort` do not depend on locale - Specify `rust-version` in `Cargo.toml` ## [0.2.162](https://github.com/rust-lang/libc/compare/0.2.161...0.2.162) - 2024-11-07 ### Added - Android: fix the alignment of `uc_mcontext` on arm64 - Apple: add `host_cpu_load_info` - ESP-IDF: add a time flag - FreeBSD: add the `CLOSE_RANGE_CLOEXEC` flag - FreeBSD: fix test errors regarding `__gregset_t` - FreeBSD: fix tests on x86 FreeBSD 15 - FreeBSD: make `ucontext_t` and `mcontext_t` available on all architectures - Haiku: add `getentropy` - Illumos: add `syncfs` - Illumos: add some recently-added constants - Linux: add `ioctl` flags - Linux: add epoll busy polling parameters - NuttX: add `pthread_[get/set]name_np` - RTEMS: add `arc4random_buf` - Trusty OS: add initial support - WASIp2: expand socket support ### Fixed - Emscripten: don't pass `-lc` - Hurd: change `st_fsid` field to `st_dev` - Hurd: fix the definition of `utsname` - Illumos/Solaris: fix `FNM_CASEFOLD` definition - Solaris: fix all tests ### Other - CI: Add loongarch64 - CI: Check that semver files are sorted - CI: Re-enable the FreeBSD 15 job - Clean up imports and `extern crate` usage - Convert `mode_t` constants to octal - Remove the `wasm32-wasi` target that has been deleted upstream ## [0.2.161](https://github.com/rust-lang/libc/compare/0.2.160...0.2.161) - 2024-10-17 ### Fixed - OpenBSD: fix `FNM_PATHNAME` and `FNM_NOESCAPE` values ## [0.2.160](https://github.com/rust-lang/libc/compare/0.2.159...0.2.160) - 2024-10-17 ### Added - Android: add `PR_GET_NAME` and `PR_SET_NAME` - Apple: add `F_TRANSFEREXTENTS` - Apple: add `mach_error_string` - Apple: add additional `pthread` APIs - Apple: add the `LOCAL_PEERTOKEN` socket option - BSD: add `RTF_*`, `RTA_*`, `RTAX_*`, and `RTM_*` definitions - Emscripten: add `AT_EACCESS` - Emscripten: add `getgrgid`, `getgrnam`, `getgrnam_r` and `getgrgid_r` - Emscripten: add `getpwnam_r` and `getpwuid_r` - FreeBSD: add `POLLRDHUP` - Haiku: add `arc4random` - Illumos: add `ptsname_r` - Linux: add `fanotify` interfaces - Linux: add `tcp_info` - Linux: add additional AF_PACKET options - Linux: make Elf constants always available - Musl x86: add `iopl` and `ioperm` - Musl: add `posix_spawn` chdir functions - Musl: add `utmpx.h` constants - NetBSD: add `sysctlnametomib`, `CLOCK_THREAD_CPUTIME_ID` and `CLOCK_PROCESS_CPUTIME_ID` - Nuttx: initial support - RTEMS: add `getentropy` - RTEMS: initial support - Solarish: add `POLLRDHUP`, `POSIX_FADV_*`, `O_RSYNC`, and `posix_fallocate` - Unix: add `fnmatch.h` - VxWorks: add riscv64 support - VxWorks: update constants related to the scheduler ### Changed - Redox: change `ino_t` to be `c_ulonglong` ### Fixed - ESP-IDF: fix mismatched constants and structs - FreeBSD: fix `struct stat` on FreeBSD 12+ ### Other - CI: Fix CI for FreeBSD 15 - Docs: link to `windows-sys` ## [0.2.159](https://github.com/rust-lang/libc/compare/0.2.158...0.2.159) - 2024-09-24 ### Added - Android: add more `AT_*` constants in - Apple: add missing `NOTE_*` constants in - Hermit: add missing error numbers in - Hurd: add `__timeval` for 64-bit support in - Linux: add `epoll_pwait2` in - Linux: add `mq_notify` in - Linux: add missing `NFT_CT_*` constants in - Linux: add the `fchmodat2` syscall in - Linux: add the `mseal` syscall in - OpenBSD: add `sendmmsg` and `recvmmsg` in - Unix: add `IN6ADDR_ANY_INIT` and `IN6ADDR_LOOPBACK_INIT` in - VxWorks: add `S_ISVTX` in - VxWorks: add `vxCpuLib` and `taskLib` functions - WASIp2: add definitions for `std::net` support in ### Fixed - Correctly handle version checks when `clippy-driver` is used ### Changed - EspIdf: change signal constants to c_int in - HorizonOS: update network definitions in - Linux: combine `ioctl` APIs in - WASI: enable CI testing in - WASIp2: enable CI testing in ## [0.2.158](https://github.com/rust-lang/libc/compare/0.2.157...0.2.158) - 2024-08-19 ### Other - WASI: fix missing `Iterator` with `rustc-dep-of-std` in ## [0.2.157](https://github.com/rust-lang/libc/compare/0.2.156...0.2.157) - 2024-08-17 ### Added - Apple: add `_NSGetArgv`, `_NSGetArgc` and `_NSGetProgname` in - Build: add `RUSTC_WRAPPER` support in - FreeBSD: add `execvpe` support from 14.1 release in - Fuchsia: add `SO_BINDTOIFINDEX` - Linux: add `klogctl` in - MacOS: add `fcntl` OFD commands in - NetBSD: add `_lwp_park` in - Solaris: add missing networking support in - Unix: add `pthread_equal` in - WASI: add `select`, `FD_SET`, `FD_ZERO`, `FD_ISSET ` in ### Fixed - TEEOS: fix octal notation for `O_*` constants in ### Changed - FreeBSD: always use freebsd12 when `rustc_dep_of_std` is set in ## [0.2.156](https://github.com/rust-lang/libc/compare/v0.2.155...v0.2.156) - 2024-08-15 ### Added - Apple: add `F_ALLOCATEPERSIST` in - Apple: add `os_sync_wait_on_address` and related definitions in - BSD: generalise `IPV6_DONTFRAG` to all BSD targets in - FreeBSD/DragonFly: add `IP_RECVTTL`/`IPV6_RECVHOPLIMIT` in - Hurd: add `XATTR_CREATE`, `XATTR_REPLACE` in - Linux GNU: `confstr` API and `_CS_*` in - Linux musl: add `preadv2` and `pwritev2` (1.2.5 min.) in - VxWorks: add the constant `SOMAXCONN` in - VxWorks: add a few errnoLib related constants in ### Fixed - Solaris/illumos: Change `ifa_flags` type to u64 in - QNX 7.0: Disable `libregex` in ### Changed - QNX NTO: update platform support in - `addr_of!(EXTERN_STATIC)` is now considered safe in ### Removed - Apple: remove `rmx_state` in ### Other - Update or remove CI tests that have been failing [workspace] git_release_name = "{{ version }}" git_tag_name = "{{ version }}" [changelog] body = """ ## [{{ version | trim_start_matches(pat="v") }}]\ {%- if release_link -%}\ ({{ release_link }})\ {% endif %} \ - {{ timestamp | date(format="%Y-%m-%d") }} {% for group, commits in commits | group_by(attribute="group") %} ### {{ group | upper_first }} {% for commit in commits %} - {% if commit.scope -%}{{ commit.scope | upper_first }}: {% endif %} {%- if commit.breaking %}[**breaking**] {% endif %} {{- commit.message }} {%- if commit.links %} ([{{ commit.links.1.text }}]({{ commit.links.1.href }})){% endif -%} {% endfor %} {% endfor %} {%- if github -%} {% if github.contributors | filter(attribute="is_first_time", value=true) | length != 0 %} ## New Contributors ❤️ {% endif %}\ {% for contributor in github.contributors | filter(attribute="is_first_time", value=true) %} * @{{ contributor.username }} made their first contribution {%- if contributor.pr_number %} in \ [#{{ contributor.pr_number }}]({{ self::remote_url() }}/pull/{{ contributor.pr_number }}) \ {%- endif %} {%- endfor -%} {%- endif %} """ commit_parsers = [ { message = '(?i)^(\w+: )?feat', group = "added" }, { message = '(?i)^(\w+: )?add', group = "added" }, { message = '(?i)^(\w+: )?change', group = "changed" }, { message = '(?i)^(\w+: )?cleanup', group = "cleanup" }, { message = '(?i)^(\w+: )?deprecate', group = "deprecated" }, { message = '(?i)^(\w+: )?remove', group = "removed" }, { message = '(?i)^(\w+: )?fix', group = "fixed" }, { message = '(?i)^(\w+: )?fix', group = "fixed" }, { message = '^.*', group = "other" }, ] link_parsers = [ # Extract backport patterns { pattern = '\(backport <.*/(\d+)>\)', text = "#$1", href = "https://github.com/rust-lang/libc/pull/$1"} ] # Changelog ## [0.2.186](https://github.com/rust-lang/libc/compare/0.2.185...0.2.186) - 2026-04-24 ### Added - Apple: Add `KEVENT_FLAG_*` constants ([#5070](https://github.com/rust-lang/libc/pull/5070)) - Linux: Add `PR_SET_MEMORY_MERGE` and `PR_GET_MEMORY_MERGE` ([#5060](https://github.com/rust-lang/libc/pull/5060)) ### Changed - CI: Migrate FreeBSD CI from Cirrus CI to GitHub Actions ([#5058](https://github.com/rust-lang/libc/pull/5058)) ## [0.2.185](https://github.com/rust-lang/libc/compare/0.2.184...0.2.185) - 2026-04-13 ### Added - EspIDF: Add `espidf_picolibc` cfg for picolibc `O_*` flag values ([#5035](https://github.com/rust-lang/libc/pull/5035)) - Hexagon: add missing constants and fix types for linux-musl ([#5042](https://github.com/rust-lang/libc/pull/5042)) - Redox: Add semaphore functions ([#5051](https://github.com/rust-lang/libc/pull/5051)) - Windows: Add `sprintf`, `snprintf`, and the `scanf` family ([#5024](https://github.com/rust-lang/libc/pull/5024)) ### Fixed - Hexagon: Decouple `time64` types from musl symbol redirects ([#5040](https://github.com/rust-lang/libc/pull/5040)) - Horizon: Change `POLL` constants from `c_short` to `c_int` ([#5045](https://github.com/rust-lang/libc/pull/5045)) ## [0.2.184](https://github.com/rust-lang/libc/compare/0.2.183...0.2.184) - 2026-04-01 ### MSRV This release increases the MSRV of `libc` to 1.65. With this update, you can now always use the `core::ffi::c_*` types with `libc` definitions, since `libc` has been changed to reexport from `core` rather than redefining them. (This _usually_ worked before but had edge cases.) ([#4972](https://github.com/rust-lang/libc/pull/4972)) ### Added - BSD: Add `IP_MINTTL` to bsd ([#5026](https://github.com/rust-lang/libc/pull/5026)) - Cygwin: Add `TIOCM_DSR` ([#5031](https://github.com/rust-lang/libc/pull/5031)) - FreeBSD: Added `xfile` structe and file descriptor types ([#5002](https://github.com/rust-lang/libc/pull/5002)) - Linux: Add CAN netlink bindings ([#5011](https://github.com/rust-lang/libc/pull/5011)) - Linux: Add `struct ethhdr` ([#4239](https://github.com/rust-lang/libc/pull/4239)) - Linux: Add `struct ifinfomsg` ([#5012](https://github.com/rust-lang/libc/pull/5012)) - Linux: Define `max_align_t` for riscv64 ([#5029](https://github.com/rust-lang/libc/pull/5029)) - NetBSD: Add missing `CLOCK_` constants ([#5020](https://github.com/rust-lang/libc/pull/5020)) - NuttX: Add `_SC_HOST_NAME_MAX` ([#5004](https://github.com/rust-lang/libc/pull/5004)) - VxWorks: Add `flock` and `F_*LCK` constants ([#4043](https://github.com/rust-lang/libc/pull/4043)) - WASI: Add all `_SC_*` sysconf constants ([#5023](https://github.com/rust-lang/libc/pull/5023)) ### Deprecated The remaining fixed-width integer aliases, `__uint128_t`, `__uint128`, `__int128_t`, and `__int128`, have been deprecated. Use `i128` and `u128` instead. ([#4343](https://github.com/rust-lang/libc/pull/4343)) ### Fixed - **breaking** Redox: Fix signal action constant types ([#5009](https://github.com/rust-lang/libc/pull/5009)) - EspIDF: Correct the value of `DT_*` constants ([#5034](https://github.com/rust-lang/libc/pull/5034)) - Redox: Fix locale values and add `RTLD_NOLOAD`, some TCP constants ([#5025](https://github.com/rust-lang/libc/pull/5025)) - Various: Use `Padding::new()` rather than `Padding::uninit()` ([#5036](https://github.com/rust-lang/libc/pull/5036)) ### Changed - **potentially breaking** Linux: Add new fields to `struct ptrace_syscall_info` ([#4966](https://github.com/rust-lang/libc/pull/4966)) - Re-export `core::ffi` integer types rather than redefining ([#5015](https://github.com/rust-lang/libc/pull/5015)) - Redox: Update `F_DUPFD`, `IP`, and `TCP` constants to match relibc ([#4990](https://github.com/rust-lang/libc/pull/4990)) ## [0.2.183](https://github.com/rust-lang/libc/compare/0.2.182...0.2.183) - 2026-03-08 ### Added - ESP-IDF: Add `SOMAXCONN` ([#4993](https://github.com/rust-lang/libc/pull/4993)) - Linux: Add `name_to_handle_at` and `open_by_handle_at` ([#4988](https://github.com/rust-lang/libc/pull/4988)) - NetBSD: Add `kinfo_file`, `kinfo_pcb`, and related constants ([#4985](https://github.com/rust-lang/libc/pull/4985)) - OpenBSD: Add `kinfo_file` and related constants ([#4991](https://github.com/rust-lang/libc/pull/4991)) - VxWorks: Add additional structs and defines ([#5003](https://github.com/rust-lang/libc/pull/5003)) - Various: Implement `Default` for `timeval` and `timespec` ([#4976](https://github.com/rust-lang/libc/pull/4976)) ### Fixed - Hexagon musl: Enable unstable 64-bit `time_t` support and `musl_v1_2_3` ([#4992](https://github.com/rust-lang/libc/pull/4992)) - Nintendo Switch: Fix target support ([#4982](https://github.com/rust-lang/libc/pull/4982)) - OpenBSD: Wrap an unused field in `Padding` ([#4997](https://github.com/rust-lang/libc/pull/4997)) - Redox: Change `sigaction.sa_flags` to `c_int` ([#4986](https://github.com/rust-lang/libc/pull/4986)) - Redox: Fix `blkcnt_t` type ([#4994](https://github.com/rust-lang/libc/pull/4994)) ## [0.2.182](https://github.com/rust-lang/libc/compare/0.2.181...0.2.182) - 2026-02-13 ### Added - Android, Linux: Add `tgkill` ([#4970](https://github.com/rust-lang/libc/pull/4970)) - Redox: Add `RENAME_NOREPLACE` ([#4968](https://github.com/rust-lang/libc/pull/4968)) - Redox: Add `renameat2` ([#4968](https://github.com/rust-lang/libc/pull/4968)) ## [0.2.181](https://github.com/rust-lang/libc/compare/0.2.180...0.2.181) - 2026-02-09 ### Added - Apple: Add `MADV_ZERO` ([#4924](https://github.com/rust-lang/libc/pull/4924)) - Redox: Add `makedev`, `major`, and `minor` ([#4928](https://github.com/rust-lang/libc/pull/4928)) - GLibc: Add `PTRACE_SET_SYSCALL_INFO` ([#4933](https://github.com/rust-lang/libc/pull/4933)) - OpenBSD: Add more kqueue related constants for ([#4945](https://github.com/rust-lang/libc/pull/4945)) - Linux: add CAN error types ([#4944](https://github.com/rust-lang/libc/pull/4944)) - OpenBSD: Add siginfo_t::si_status ([#4946](https://github.com/rust-lang/libc/pull/4946)) - QNX NTO: Add `max_align_t` ([#4927](https://github.com/rust-lang/libc/pull/4927)) - Illumos: Add `_CS_PATH` ([#4956](https://github.com/rust-lang/libc/pull/4956)) - OpenBSD: add `ppoll` ([#4957](https://github.com/rust-lang/libc/pull/4957)) ### Fixed - **breaking**: Redox: Fix the type of dev_t ([#4928](https://github.com/rust-lang/libc/pull/4928)) - AIX: Change 'tv_nsec' of 'struct timespec' to type 'c_long' ([#4931](https://github.com/rust-lang/libc/pull/4931)) - AIX: Use 'struct st_timespec' in 'struct stat{,64}' ([#4931](https://github.com/rust-lang/libc/pull/4931)) - Glibc: Link old version of `tc{g,s}etattr` ([#4938](https://github.com/rust-lang/libc/pull/4938)) - Glibc: Link the correct version of `cf{g,s}et{i,o}speed` on mips{32,64}r6 ([#4938](https://github.com/rust-lang/libc/pull/4938)) - OpenBSD: Fix constness of tm.tm_zone ([#4948](https://github.com/rust-lang/libc/pull/4948)) - OpenBSD: Fix the definition of `ptrace_thread_state` ([#4947](https://github.com/rust-lang/libc/pull/4947)) - QuRT: Fix type visibility and defs ([#4932](https://github.com/rust-lang/libc/pull/4932)) - Redox: Fix values for `PTHREAD_MUTEX_{NORMAL, RECURSIVE}` ([#4943](https://github.com/rust-lang/libc/pull/4943)) - Various: Mark additional fields as private padding ([#4922](https://github.com/rust-lang/libc/pull/4922)) ### Changed - Fuchsia: Update `SO_*` constants ([#4937](https://github.com/rust-lang/libc/pull/4937)) - Revert "musl: convert inline timespecs to timespec" (resolves build issues on targets only supported by Musl 1.2.3+ ) ([#4958](https://github.com/rust-lang/libc/pull/4958)) ## [0.2.180](https://github.com/rust-lang/libc/compare/0.2.179...0.2.180) - 2026-01-08 ### Added - QNX: Add missing BPF and ifreq structures ([#4769](https://github.com/rust-lang/libc/pull/4769)) ### Fixed - Linux, L4Re: address soundness issues of `CMSG_NXTHDR` ([#4903](https://github.com/rust-lang/libc/pull/4903)) - Linux-like: Handle zero-sized payload differences in `CMSG_NXTHDR` ([#4903](https://github.com/rust-lang/libc/pull/4903)) - Musl: Fix incorrect definitions of struct stat on some 32-bit architectures ([#4914](https://github.com/rust-lang/libc/pull/4914)) - NetBSD: RISC-V 64: Correct `mcontext` type definitions ([#4886](https://github.com/rust-lang/libc/pull/4886)) - uClibc: Re-enable `__SIZEOF_PTHREAD_COND_T` on non-L4Re uclibc ([#4915](https://github.com/rust-lang/libc/pull/4915)) - uClibc: Restructure Linux `netlink` module to resolve build errors ([#4915](https://github.com/rust-lang/libc/pull/4915)) ## [0.2.179](https://github.com/rust-lang/libc/compare/0.2.178...0.2.179) - 2025-01-03 With this release, we now have _unstable_ support for 64-bit `time_t` on 32-bit platforms with both Musl and Glibc. Testing is appreciated! For now, these can be enabled by setting environment variables during build: ```text RUST_LIBC_UNSTABLE_MUSL_V1_2_3=1 RUST_LIBC_UNSTABLE_GNU_TIME_BITS=64 ``` Note that the exact configuration will change in the future. Setting the `MUSL_V1_2_3` variable also enables some newer API unrelated to `time_t`. ### Added - L4Re: Add uclibc aarch64 support ([#4479](https://github.com/rust-lang/libc/pull/4479)) - Linux, Android: Add a generic definition for `XCASE` ([#4847](https://github.com/rust-lang/libc/pull/4847)) - Linux-like: Add `NAME_MAX` ([#4888](https://github.com/rust-lang/libc/pull/4888)) - Linux: Add `AT_EXECVE_CHECK` ([#4422](https://github.com/rust-lang/libc/pull/4422)) - Linux: Add the `SUN_LEN` macro ([#4269](https://github.com/rust-lang/libc/pull/4269)) - Linux: add `getitimer` and `setitimer` ([#4890](https://github.com/rust-lang/libc/pull/4890)) - Linux: add `pthread_tryjoin_n` and `pthread_timedjoin_np` ([#4887](https://github.com/rust-lang/libc/pull/4887)) - Musl: Add unstable support for 64-bit `time_t` on 32-bit platforms ([#4463](https://github.com/rust-lang/libc/pull/4463)) - NetBSD, OpenBSD: Add interface `LINK_STATE_*` definitions from `sys/net/if.h` ([#4751](https://github.com/rust-lang/libc/pull/4751)) - QuRT: Add support for Qualcomm QuRT ([#4845](https://github.com/rust-lang/libc/pull/4845)) - Types: Add Padding::uninit() ([#4862](https://github.com/rust-lang/libc/pull/4862)) ### Fixed - Glibc: Link old version of `cf{g,s}et{i,o}speed` ([#4882](https://github.com/rust-lang/libc/pull/4882)) - L4Re: Fixes for `pthread` ([#4479](https://github.com/rust-lang/libc/pull/4479)) - L4re: Fix a wide variety of incorrect definitions ([#4479](https://github.com/rust-lang/libc/pull/4479)) - Musl: Fix the value of `CPU_SETSIZE` on musl 1.2+ ([#4865](https://github.com/rust-lang/libc/pull/4865)) - Musl: RISC-V: fix public padding fields in `stat/stat64` ([#4463](https://github.com/rust-lang/libc/pull/4463)) - Musl: s390x: Fix definition of `SIGSTKSZ`/`MINSIGSTKSZ` ([#4884](https://github.com/rust-lang/libc/pull/4884)) - NetBSD: Arm: Fix `PT_{GET,SET}FPREGS`, `_REG_TIPDR`, and `_REG_{LR,SP}` ([#4899](https://github.com/rust-lang/libc/pull/4899)) - NetBSD: Fix `if_msghdr` alignment ([#4902](https://github.com/rust-lang/libc/pull/4902)) - NetBSD: Fix `siginfo_t` layout on 32-bit platforms ([#4904](https://github.com/rust-lang/libc/pull/4904)) - NetBSD: change definition of `pthread_spin_t` to allow arch redefinition. ([#4899](https://github.com/rust-lang/libc/pull/4899)) - Newlib: Fix ambiguous glob exports and other warnings for Vita and 3DS ([#4875](https://github.com/rust-lang/libc/pull/4875)) - QNX: Fix build error ([#4879](https://github.com/rust-lang/libc/pull/4879)) ### Changed - CI: Update CI images to FreeBSD 15.0-release ([#4857](https://github.com/rust-lang/libc/pull/4857)) - L4Re: Make `pthread` struct fields private ([#4876](https://github.com/rust-lang/libc/pull/4876)) - Linux, Fuchsia: Mark mq_attr padding area as such ([#4858](https://github.com/rust-lang/libc/pull/4858)) - Types: Wrap a number of private fields in the `Padding` type ([#4862](https://github.com/rust-lang/libc/pull/4862)) ### Removed - Build: Remove `RUST_LIBC_UNSTABLE_LINUX_TIME_BITS64` ([#4865](https://github.com/rust-lang/libc/pull/4865)) - WASI: Remove nonexistent clocks ([#4880](https://github.com/rust-lang/libc/pull/4880)) ## [0.2.178](https://github.com/rust-lang/libc/compare/0.2.177...0.2.178) - 2025-12-01 ### Added - BSD: Add `issetugid` ([#4744](https://github.com/rust-lang/libc/pull/4744)) - Cygwin: Add missing utmp/x.h, grp.h, and stdio.h interfaces ([#4827](https://github.com/rust-lang/libc/pull/4827)) - Linux s390x musl: Add `__psw_t`/`fprefset_t`/`*context_t` ([#4726](https://github.com/rust-lang/libc/pull/4726)) - Linux, Android: Add definition for IUCLC ([#4846](https://github.com/rust-lang/libc/pull/4846)) - Linux, FreeBSD: Add `AT_HWCAP{3,4}` ([#4734](https://github.com/rust-lang/libc/pull/4734)) - Linux: Add definitions from linux/can/bcm.h ([#4683](https://github.com/rust-lang/libc/pull/4683)) - Linux: Add syscalls 451-469 for m68k ([#4850](https://github.com/rust-lang/libc/pull/4850)) - Linux: PowerPC: Add 'ucontext.h' definitions ([#4696](https://github.com/rust-lang/libc/pull/4696)) - NetBSD: Define `eventfd` ([#4830](https://github.com/rust-lang/libc/pull/4830)) - Newlib: Add missing constants from `unistd.h` ([#4811](https://github.com/rust-lang/libc/pull/4811)) - QNX NTO: Add `cfmakeraw` ([#4704](https://github.com/rust-lang/libc/pull/4704)) - QNX NTO: Add `cfsetspeed` ([#4704](https://github.com/rust-lang/libc/pull/4704)) - Redox: Add `getresgid` and `getresuid` ([#4752](https://github.com/rust-lang/libc/pull/4752)) - Redox: Add `setresgid` and `setresuid` ([#4752](https://github.com/rust-lang/libc/pull/4752)) - VxWorks: Add definitions from `select.h`, `stat.h`, `poll.h`, `ttycom.h`, `utsname.h`, `resource.h`, `mman.h`, `udp.h`, `in.h`, `in6.h`, `if.h`, `fnmatch.h`, and `sioLibCommon.h` ([#4781](https://github.com/rust-lang/libc/pull/4781)) - VxWorks: Add missing defines/functions needed by rust stdlib ([#4779](https://github.com/rust-lang/libc/pull/4779)) - WASI: Add more definitions for libstd ([#4747](https://github.com/rust-lang/libc/pull/4747)) ### Deprecated - Apple: Deprecate `TIOCREMOTE` ([#4764](https://github.com/rust-lang/libc/pull/4764)) ### Fixed Note that there were a large number of fixes on NetBSD for this `libc` release, some of which include minor breakage. - AIX: Change errno `EWOULDBLOCK` to make it an alias of `EAGAIN` ([#4790](https://github.com/rust-lang/libc/pull/4790)) - AIX: Resolve function comparison and `unnecessary_transmutes` warnings ([#4780](https://github.com/rust-lang/libc/pull/4780)) - Apple: Correct the value of `SF_SETTABLE` ([#4764](https://github.com/rust-lang/libc/pull/4764)) - DragonflyBSD: Fix the type of `mcontext_t.mc_fpregs` ([#]()) - EspIDF: Fix the duplicate definition of `gethostname` ([#4773](https://github.com/rust-lang/libc/pull/4773)) - L4Re: Update available pthread API ([#4836](https://github.com/rust-lang/libc/pull/4836)) - Linux: Correct the value of `NFT_MSG_MAX` ([#4761](https://github.com/rust-lang/libc/pull/4761)) - Linux: Remove incorrect `repr(align(8))` for `canxl_frame` ([#4760](https://github.com/rust-lang/libc/pull/4760)) - Make `eventfd` argument names match OS docs/headers ([#4830](https://github.com/rust-lang/libc/pull/4830)) - NetBSD: Account for upstream changes to ptrace with LWP ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Correct `ipc_perm`, split from OpenBSD as `ipc.rs` ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Correct a number of symbol link names ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Correct the type of `kinfo_vmentry.kve_path` ([#]()) - NetBSD: Fix `uucred.cr_ngroups` from `int` to `short` ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Fix the type of `kevent.udata` ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Fix the type of `mcontext_t.__fpregs` ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Fix the value of `PT_SUSPEND` ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Fix the values of FNM_* constants ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Increase the size of `sockaddr_dl.sdl_data` from 12 to 24 ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Introduce `if_.rs`, fix the definition of `ifreq` ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Introduce `time.rs`, fix the values of `CLOCK_*_CPUTIME_ID` ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Introduce `timex.rs` ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Introduce `types.rs`, correct the definition of `lwpid_t` ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Introduce `utmp_.rs`, correct the definition of `lastlog` ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Introduce `utmpx_.rs`, correct utmpx definitions ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Make `_cpuset` an extern type ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: RISC-V 64: Fix the `mcontext` types ([#4782](https://github.com/rust-lang/libc/pull/4782)) - Nuttx: Resolve warnings ([#4773](https://github.com/rust-lang/libc/pull/4773)) - OHOS: Don't emit duplicate lfs64 definitions ([#4804](https://github.com/rust-lang/libc/pull/4804)) - Redox: Fix the type of `pid_t` ([#4825](https://github.com/rust-lang/libc/pull/4825)) - WASI: Gate `__wasilibc_register_preopened_fd` ([#4837](https://github.com/rust-lang/libc/pull/4837)) - Wali: Fix unknown config ([#4773](https://github.com/rust-lang/libc/pull/4773)) ### Changed - AIX: Declare field 'tv_nsec' of structure 'timespec' as 'i32' in both 32-bit and 64-bit modes ([#4750](https://github.com/rust-lang/libc/pull/4750)) - DragonFly: Avoid usage of `thread_local` ([#3653](https://github.com/rust-lang/libc/pull/3653)) - Linux: Update the definition for `ucontext_t` and unskip its tests ([#4760](https://github.com/rust-lang/libc/pull/4760)) - MinGW: Set `L_tmpnam` and `TMP_MAX` to the UCRT value ([#4566](https://github.com/rust-lang/libc/pull/4566)) - WASI: More closely align pthread type reprs ([#4747](https://github.com/rust-lang/libc/pull/4747)) - Simplify rustc-check-cfg emission in build.rs ([#4724](https://github.com/rust-lang/libc/pull/4724)) - Transition a number of definitions to the new source structure (internal change) ### Removed - MIPS Musl: Remove rogue definition of `SIGSTKFLT` ([#4749](https://github.com/rust-lang/libc/pull/4749)) - NetBSD: Make `statvfs.f_spare` non-public ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Remove BPF constants ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Remove `*_MAXID` constants and `AT_SUN_LDPGSIZE` ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Remove `IFF_NOTRAILERS` ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Remove `vm_size_t` ([#4782](https://github.com/rust-lang/libc/pull/4782)) - NetBSD: Replace REG_ENOSYS with REG_ILLSEQ ([#4782](https://github.com/rust-lang/libc/pull/4782)) ## [0.2.177](https://github.com/rust-lang/libc/compare/0.2.176...0.2.177) - 2025-10-09 ### Added - Apple: Add `TIOCGETA`, `TIOCSETA`, `TIOCSETAW`, `TIOCSETAF` constants ([#4736](https://github.com/rust-lang/libc/pull/4736)) - Apple: Add `pthread_cond_timedwait_relative_np` ([#4719](https://github.com/rust-lang/libc/pull/4719)) - BSDs: Add `_CS_PATH` constant ([#4738](https://github.com/rust-lang/libc/pull/4738)) - Linux-like: Add `SIGEMT` for mips* and sparc* architectures ([#4730](https://github.com/rust-lang/libc/pull/4730)) - OpenBSD: Add `elf_aux_info` ([#4729](https://github.com/rust-lang/libc/pull/4729)) - Redox: Add more sysconf constants ([#4728](https://github.com/rust-lang/libc/pull/4728)) - Windows: Add `wcsnlen` ([#4721](https://github.com/rust-lang/libc/pull/4721)) ### Changed - WASIP2: Invert conditional to include p2 APIs ([#4733](https://github.com/rust-lang/libc/pull/4733)) ## [0.2.176](https://github.com/rust-lang/libc/compare/0.2.175...0.2.176) - 2025-09-23 ### Support - The default FreeBSD version has been raised from 11 to 12. This matches `rustc` since 1.78. ([#2406](https://github.com/rust-lang/libc/pull/2406)) - `Debug` is now always implemented, rather than being gated behind the `extra_traits` feature. ([#4624](https://github.com/rust-lang/libc/pull/4624)) ### Added - AIX: Restore some non-POSIX functions guarded by the `_KERNEL` macro. ([#4607](https://github.com/rust-lang/libc/pull/4607)) - FreeBSD 14: Add `st_fileref` to `struct stat` ([#4642](https://github.com/rust-lang/libc/pull/4642)) - Haiku: Add the `accept4` POSIX call ([#4586](https://github.com/rust-lang/libc/pull/4586)) - Introduce a wrapper for representing padding ([#4632](https://github.com/rust-lang/libc/pull/4632)) - Linux: Add `EM_RISCV` ([#4659](https://github.com/rust-lang/libc/pull/4659)) - Linux: Add `MS_NOSYMFOLLOW` ([#4389](https://github.com/rust-lang/libc/pull/4389)) - Linux: Add `backtrace_symbols(_fd)` ([#4668](https://github.com/rust-lang/libc/pull/4668)) - Linux: Add missing `SOL_PACKET` optnames ([#4669](https://github.com/rust-lang/libc/pull/4669)) - Musl s390x: Add `SYS_mseal` ([#4549](https://github.com/rust-lang/libc/pull/4549)) - NuttX: Add `__errno` ([#4687](https://github.com/rust-lang/libc/pull/4687)) - Redox: Add `dirfd`, `VDISABLE`, and resource consts ([#4660](https://github.com/rust-lang/libc/pull/4660)) - Redox: Add more `resource.h`, `fcntl.h` constants ([#4666](https://github.com/rust-lang/libc/pull/4666)) - Redox: Enable `strftime` and `mkostemp[s]` ([#4629](https://github.com/rust-lang/libc/pull/4629)) - Unix, Windows: Add `qsort_r` (Unix), and `qsort(_s)` (Windows) ([#4677](https://github.com/rust-lang/libc/pull/4677)) - Unix: Add `dlvsym` for Linux-gnu, FreeBSD, and NetBSD ([#4671](https://github.com/rust-lang/libc/pull/4671)) - Unix: Add `sigqueue` ([#4620](https://github.com/rust-lang/libc/pull/4620)) ### Changed - FreeBSD 15: Mark `kinfo_proc` as non-exhaustive ([#4553](https://github.com/rust-lang/libc/pull/4553)) - FreeBSD: Set the ELF symbol version for `readdir_r` ([#4694](https://github.com/rust-lang/libc/pull/4694)) - Linux: Correct the config for whether or not `epoll_event` is packed ([#4639](https://github.com/rust-lang/libc/pull/4639)) - Tests: Replace the old `ctest` with the much more reliable new implementation ([#4655](https://github.com/rust-lang/libc/pull/4655) and many related PRs) ### Fixed - AIX: Fix the type of the 4th arguement of `getgrnam_r` ([#4656](https://github.com/rust-lang/libc/pull/4656 - FreeBSD: Limit `P_IDLEPROC` to FreeBSD 15 ([#4640](https://github.com/rust-lang/libc/pull/4640)) - FreeBSD: Limit `mcontext_t::mc_tlsbase` to FreeBSD 15 ([#4640](https://github.com/rust-lang/libc/pull/464)) - FreeBSD: Update gating of `mcontext_t.mc_tlsbase` ([#4703](https://github.com/rust-lang/libc/pull/4703)) - Musl s390x: Correct the definition of `statfs[64]` ([#4549](https://github.com/rust-lang/libc/pull/4549)) - Musl s390x: Make `fpreg_t` a union ([#4549](https://github.com/rust-lang/libc/pull/4549)) - Redox: Fix the types of `gid_t` and `uid_t` ([#4689](https://github.com/rust-lang/libc/pull/4689)) - Redox: Fix the value of `MAP_FIXED` ([#4684](https://github.com/rust-lang/libc/pull/4684)) ### Deprecated - Apple: Correct the `deprecated` attribute for `iconv` ([`a97a0b53`](https://github.com/rust-lang/libc/commit/a97a0b53fb7faf5f99cd720ab12b1b8a5bf9f950)) - FreeBSD: Deprecate `TIOCMGDTRWAIT` and `TIOCMSDTRWAIT` ([#4685](https://github.com/rust-lang/libc/pull/4685)) ### Removed - FreeBSD: Remove `JAIL_{GET,SET}_MASK`, `_MC_FLAG_MASK` ([#4691](https://github.com/rust-lang/libc/pull/4691)) ## [0.2.175](https://github.com/rust-lang/libc/compare/0.2.174...0.2.175) - 2025-08-10 ### Added - AIX: Add `getpeereid` ([#4524](https://github.com/rust-lang/libc/pull/4524)) - AIX: Add `struct ld_info` and friends ([#4578](https://github.com/rust-lang/libc/pull/4578)) - AIX: Retore `struct winsize` ([#4577](https://github.com/rust-lang/libc/pull/4577)) - Android: Add UDP socket option constants ([#4619](https://github.com/rust-lang/libc/pull/4619)) - Android: Add `CLONE_CLEAR_SIGHAND` and `CLONE_INTO_CGROUP` ([#4502](https://github.com/rust-lang/libc/pull/4502)) - Android: Add more `prctl` constants ([#4531](https://github.com/rust-lang/libc/pull/4531)) - FreeBSD Add further TCP stack-related constants ([#4196](https://github.com/rust-lang/libc/pull/4196)) - FreeBSD x86-64: Add `mcontext_t.mc_tlsbase ` ([#4503](https://github.com/rust-lang/libc/pull/4503)) - FreeBSD15: Add `kinfo_proc.ki_uerrmsg` ([#4552](https://github.com/rust-lang/libc/pull/4552)) - FreeBSD: Add `in_conninfo` ([#4482](https://github.com/rust-lang/libc/pull/4482)) - FreeBSD: Add `xinpgen` and related types ([#4482](https://github.com/rust-lang/libc/pull/4482)) - FreeBSD: Add `xktls_session` ([#4482](https://github.com/rust-lang/libc/pull/4482)) - Haiku: Add functionality from `libbsd` ([#4221](https://github.com/rust-lang/libc/pull/4221)) - Linux: Add `SECBIT_*` ([#4480](https://github.com/rust-lang/libc/pull/4480)) - NetBSD, OpenBSD: Export `ioctl` request generator macros ([#4460](https://github.com/rust-lang/libc/pull/4460)) - NetBSD: Add `ptsname_r` ([#4608](https://github.com/rust-lang/libc/pull/4608)) - RISCV32: Add time-related syscalls ([#4612](https://github.com/rust-lang/libc/pull/4612)) - Solarish: Add `strftime*` ([#4453](https://github.com/rust-lang/libc/pull/4453)) - linux: Add `EXEC_RESTRICT_*` and `EXEC_DENY_*` ([#4545](https://github.com/rust-lang/libc/pull/4545)) ### Changed - AIX: Add `const` to signatures to be consistent with other platforms ([#4563](https://github.com/rust-lang/libc/pull/4563)) ### Fixed - AIX: Fix the type of `struct statvfs.f_fsid` ([#4576](https://github.com/rust-lang/libc/pull/4576)) - AIX: Fix the type of constants for the `ioctl` `request` argument ([#4582](https://github.com/rust-lang/libc/pull/4582)) - AIX: Fix the types of `stat{,64}.st_*tim` ([#4597](https://github.com/rust-lang/libc/pull/4597)) - AIX: Use unique `errno` values ([#4507](https://github.com/rust-lang/libc/pull/4507)) - Build: Fix an incorrect `target_os` -> `target_arch` check ([#4550](https://github.com/rust-lang/libc/pull/4550)) - FreeBSD: Fix the type of `xktls_session_onedir.ifnet` ([#4552](https://github.com/rust-lang/libc/pull/4552)) - Mips64 musl: Fix the type of `nlink_t` ([#4509](https://github.com/rust-lang/libc/pull/4509)) - Mips64 musl: Use a special MIPS definition of `stack_t` ([#4528](https://github.com/rust-lang/libc/pull/4528)) - Mips64: Fix `SI_TIMER`, `SI_MESGQ` and `SI_ASYNCIO` definitions ([#4529](https://github.com/rust-lang/libc/pull/4529)) - Musl Mips64: Swap the order of `si_errno` and `si_code` in `siginfo_t` ([#4530](https://github.com/rust-lang/libc/pull/4530)) - Musl Mips64: Use a special MIPS definition of `statfs` ([#4527](https://github.com/rust-lang/libc/pull/4527)) - Musl: Fix the definition of `fanotify_event_metadata` ([#4510](https://github.com/rust-lang/libc/pull/4510)) - NetBSD: Correct `enum fae_action` to be `#[repr(C)]` ([#60a8cfd5](https://github.com/rust-lang/libc/commit/60a8cfd564f83164d45b9533ff7a0d7371878f2a)) - PSP: Correct `char` -> `c_char` ([eaab4fc3](https://github.com/rust-lang/libc/commit/eaab4fc3f05dc646a953d4fd5ba46dfa1f8bd6f6)) - PowerPC musl: Fix `termios` definitions ([#4518](https://github.com/rust-lang/libc/pull/4518)) - PowerPC musl: Fix the definition of `EDEADLK` ([#4517](https://github.com/rust-lang/libc/pull/4517)) - PowerPC musl: Fix the definition of `NCCS` ([#4513](https://github.com/rust-lang/libc/pull/4513)) - PowerPC musl: Fix the definitions of `MAP_LOCKED` and `MAP_NORESERVE` ([#4516](https://github.com/rust-lang/libc/pull/4516)) - PowerPC64 musl: Fix the definition of `shmid_ds` ([#4519](https://github.com/rust-lang/libc/pull/4519)) ### Deprecated - Linux: `MAP_32BIT` is only defined on x86 on non-x86 architectures ([#4511](https://github.com/rust-lang/libc/pull/4511)) ### Removed - AIX: Remove duplicate constant definitions `FIND` and `ENTER` ([#4588](https://github.com/rust-lang/libc/pull/4588)) - s390x musl: Remove `O_FSYNC` ([#4515](https://github.com/rust-lang/libc/pull/4515)) - s390x musl: Remove `RTLD_DEEPBIND` ([#4515](https://github.com/rust-lang/libc/pull/4515)) ## [0.2.174](https://github.com/rust-lang/libc/compare/0.2.173...0.2.174) - 2025-06-17 ### Added - Linux: Make `pidfd_info` fields pub ([#4487](https://github.com/rust-lang/libc/pull/4487)) ### Fixed - Gnu x32: Add missing `timespec.tv_nsec` ([#4497](https://github.com/rust-lang/libc/pull/4497)) - NuttX: Use `nlink_t` type for `st_nlink` in `struct stat` definition ([#4483](https://github.com/rust-lang/libc/pull/4483)) ### Other - Allow new `unpredictable_function_pointer_comparisons` lints ([#4489](https://github.com/rust-lang/libc/pull/4489)) - OpenBSD: Fix some clippy warnings to use `pointer::cast`. ([#4490](https://github.com/rust-lang/libc/pull/4490)) - Remove unessecary semicolons from definitions of `CMSG_NXTHDR`. ([#4492](https://github.com/rust-lang/libc/pull/4492)) ## [0.2.173](https://github.com/rust-lang/libc/compare/0.2.172...0.2.173) - 2025-06-09 ### Added - AIX: Add an AIX triple to Cargo.toml for doc ([#4475](https://github.com/rust-lang/libc/pull/4475)) - FreeBSD: Add the `SO_SPLICE` socket option support for FreeBSD >= 14.2 ([#4451](https://github.com/rust-lang/libc/pull/4451)) - Linux GNU: Prepare for supporting `_TIME_BITS=64` ([#4433](https://github.com/rust-lang/libc/pull/4433)) - Linux: Add constant PACKET_IGNORE_OUTGOING ([#4319](https://github.com/rust-lang/libc/pull/4319)) - Linux: Add constants and types for `nsfs` ioctls ([#4436](https://github.com/rust-lang/libc/pull/4436)) - Linux: Add constants for Memory-Deny-Write-Execute `prctls` ([#4400](https://github.com/rust-lang/libc/pull/4400)) - Linux: Add constants from `linux/cn_proc.h` and `linux/connector.h` ([#4434](https://github.com/rust-lang/libc/pull/4434)) - Linux: Add new flags for `pwritev2` and `preadv2` ([#4452](https://github.com/rust-lang/libc/pull/4452)) - Linux: Add pid_type enum values ([#4403](https://github.com/rust-lang/libc/pull/4403)) - Linux: Update pidfd constants and types (Linux 6.9-6.15) ([#4402](https://github.com/rust-lang/libc/pull/4402)) - Loongarch64 musl: Define the `MADV_SOFT_OFFLINE` constant ([#4448](https://github.com/rust-lang/libc/pull/4448)) - Musl: Add new fields since 1.2.0/1.2.2 to `struct tcp_info` ([#4443](https://github.com/rust-lang/libc/pull/4443)) - Musl: Prepare for supporting v1.2.3 ([#4443](https://github.com/rust-lang/libc/pull/4443)) - NuttX: Add `arc4random` and `arc4random_buf` ([#4464](https://github.com/rust-lang/libc/pull/4464)) - RISC-V Musl: Add `MADV_SOFT_OFFLINE` definition ([#4447](https://github.com/rust-lang/libc/pull/4447)) - Redox: Define SCM_RIGHTS ([#4440](https://github.com/rust-lang/libc/pull/4440)) - VxWorks: Add missing UTIME defines and TASK_RENAME_LENGTH ([#4407](https://github.com/rust-lang/libc/pull/4407)) - Windows: Add more `time.h` functions ([#4427](https://github.com/rust-lang/libc/pull/4427)) ### Changed - Redox: Update `SA_` constants. ([#4426](https://github.com/rust-lang/libc/pull/4426)) - Redox: make `CMSG_ALIGN`, `CMSG_LEN`, and `CMSG_SPACE` const functions ([#4441](https://github.com/rust-lang/libc/pull/4441)) ### Fixed - AIX: Enable libc-test and fix definitions/declarations. ([#4450](https://github.com/rust-lang/libc/pull/4450)) - Emscripten: Fix querying emcc on windows (use emcc.bat) ([#4248](https://github.com/rust-lang/libc/pull/4248)) - Hurd: Fix build from missing `fpos_t` ([#4472](https://github.com/rust-lang/libc/pull/4472)) - Loongarch64 Musl: Fix the `struct ipc_perm` bindings ([#4384](https://github.com/rust-lang/libc/pull/4384)) - Musl: Fix the `O_LARGEFILE` constant value. ([#4443](https://github.com/rust-lang/libc/pull/4443)) ## [0.2.172](https://github.com/rust-lang/libc/compare/0.2.171...0.2.172) - 2025-04-14 ### Added - Android: Add `getauxval` for 32-bit targets ([#4338](https://github.com/rust-lang/libc/pull/4338)) - Android: Add `if_tun.h` ioctls ([#4379](https://github.com/rust-lang/libc/pull/4379)) - Android: Define `SO_BINDTOIFINDEX` ([#4391](https://github.com/rust-lang/libc/pull/4391)) - Cygwin: Add `posix_spawn_file_actions_add[f]chdir[_np]` ([#4387](https://github.com/rust-lang/libc/pull/4387)) - Cygwin: Add new socket options ([#4350](https://github.com/rust-lang/libc/pull/4350)) - Cygwin: Add statfs & fcntl ([#4321](https://github.com/rust-lang/libc/pull/4321)) - FreeBSD: Add `filedesc` and `fdescenttbl` ([#4327](https://github.com/rust-lang/libc/pull/4327)) - Glibc: Add unstable support for _FILE_OFFSET_BITS=64 ([#4345](https://github.com/rust-lang/libc/pull/4345)) - Hermit: Add `AF_UNSPEC` ([#4344](https://github.com/rust-lang/libc/pull/4344)) - Hermit: Add `AF_VSOCK` ([#4344](https://github.com/rust-lang/libc/pull/4344)) - Illumos, NetBSD: Add `timerfd` APIs ([#4333](https://github.com/rust-lang/libc/pull/4333)) - Linux: Add `_IO`, `_IOW`, `_IOR`, `_IOWR` to the exported API ([#4325](https://github.com/rust-lang/libc/pull/4325)) - Linux: Add `tcp_info` to uClibc bindings ([#4347](https://github.com/rust-lang/libc/pull/4347)) - Linux: Add further BPF program flags ([#4356](https://github.com/rust-lang/libc/pull/4356)) - Linux: Add missing INPUT_PROP_XXX flags from `input-event-codes.h` ([#4326](https://github.com/rust-lang/libc/pull/4326)) - Linux: Add missing TLS bindings ([#4296](https://github.com/rust-lang/libc/pull/4296)) - Linux: Add more constants from `seccomp.h` ([#4330](https://github.com/rust-lang/libc/pull/4330)) - Linux: Add more glibc `ptrace_sud_config` and related `PTRACE_*ET_SYSCALL_USER_DISPATCH_CONFIG`. ([#4386](https://github.com/rust-lang/libc/pull/4386)) - Linux: Add new netlink flags ([#4288](https://github.com/rust-lang/libc/pull/4288)) - Linux: Define ioctl codes on more architectures ([#4382](https://github.com/rust-lang/libc/pull/4382)) - Linux: Add missing `pthread_attr_setstack` ([#4349](https://github.com/rust-lang/libc/pull/4349)) - Musl: Add missing `utmpx` API ([#4332](https://github.com/rust-lang/libc/pull/4332)) - Musl: Enable `getrandom` on all platforms ([#4346](https://github.com/rust-lang/libc/pull/4346)) - NuttX: Add more signal constants ([#4353](https://github.com/rust-lang/libc/pull/4353)) - QNX: Add QNX 7.1-iosock and 8.0 to list of additional cfgs ([#4169](https://github.com/rust-lang/libc/pull/4169)) - QNX: Add support for alternative Neutrino network stack `io-sock` ([#4169](https://github.com/rust-lang/libc/pull/4169)) - Redox: Add more `sys/socket.h` and `sys/uio.h` definitions ([#4388](https://github.com/rust-lang/libc/pull/4388)) - Solaris: Temporarily define `O_DIRECT` and `SIGINFO` ([#4348](https://github.com/rust-lang/libc/pull/4348)) - Solarish: Add `secure_getenv` ([#4342](https://github.com/rust-lang/libc/pull/4342)) - VxWorks: Add missing `d_type` member to `dirent` ([#4352](https://github.com/rust-lang/libc/pull/4352)) - VxWorks: Add missing signal-related constsants ([#4352](https://github.com/rust-lang/libc/pull/4352)) - VxWorks: Add more error codes ([#4337](https://github.com/rust-lang/libc/pull/4337)) ### Deprecated - FreeBSD: Deprecate `TCP_PCAP_OUT` and `TCP_PCAP_IN` ([#4381](https://github.com/rust-lang/libc/pull/4381)) ### Fixed - Cygwin: Fix member types of `statfs` ([#4324](https://github.com/rust-lang/libc/pull/4324)) - Cygwin: Fix tests ([#4357](https://github.com/rust-lang/libc/pull/4357)) - Hermit: Make `AF_INET = 3` ([#4344](https://github.com/rust-lang/libc/pull/4344)) - Musl: Fix the syscall table on RISC-V-32 ([#4335](https://github.com/rust-lang/libc/pull/4335)) - Musl: Fix the value of `SA_ONSTACK` on RISC-V-32 ([#4335](https://github.com/rust-lang/libc/pull/4335)) - VxWorks: Fix a typo in the `waitpid` parameter name ([#4334](https://github.com/rust-lang/libc/pull/4334)) ### Removed - Musl: Remove `O_FSYNC` on RISC-V-32 (use `O_SYNC` instead) ([#4335](https://github.com/rust-lang/libc/pull/4335)) - Musl: Remove `RTLD_DEEPBIND` on RISC-V-32 ([#4335](https://github.com/rust-lang/libc/pull/4335)) ### Other - CI: Add matrix env variables to the environment ([#4345](https://github.com/rust-lang/libc/pull/4345)) - CI: Always deny warnings ([#4363](https://github.com/rust-lang/libc/pull/4363)) - CI: Always upload successfully created artifacts ([#4345](https://github.com/rust-lang/libc/pull/4345)) - CI: Install musl from source for loongarch64 ([#4320](https://github.com/rust-lang/libc/pull/4320)) - CI: Revert "Also skip `MFD_EXEC` and `MFD_NOEXEC_SEAL` on sparc64" ([#]()) - CI: Use `$PWD` instead of `$(pwd)` in run-docker ([#4345](https://github.com/rust-lang/libc/pull/4345)) - Solarish: Restrict `openpty` and `forkpty` polyfills to Illumos, replace Solaris implementation with bindings ([#4329](https://github.com/rust-lang/libc/pull/4329)) - Testing: Ensure the makedev test does not emit unused errors ([#4363](https://github.com/rust-lang/libc/pull/4363)) ## [0.2.171](https://github.com/rust-lang/libc/compare/0.2.170...0.2.171) - 2025-03-11 ### Added - Android: Add `if_nameindex`/`if_freenameindex` support ([#4247](https://github.com/rust-lang/libc/pull/4247)) - Apple: Add missing proc types and constants ([#4310](https://github.com/rust-lang/libc/pull/4310)) - BSD: Add `devname` ([#4285](https://github.com/rust-lang/libc/pull/4285)) - Cygwin: Add PTY and group API ([#4309](https://github.com/rust-lang/libc/pull/4309)) - Cygwin: Add support ([#4279](https://github.com/rust-lang/libc/pull/4279)) - FreeBSD: Make `spawn.h` interfaces available on all FreeBSD-like systems ([#4294](https://github.com/rust-lang/libc/pull/4294)) - Linux: Add `AF_XDP` structs for all Linux environments ([#4163](https://github.com/rust-lang/libc/pull/4163)) - Linux: Add SysV semaphore constants ([#4286](https://github.com/rust-lang/libc/pull/4286)) - Linux: Add `F_SEAL_EXEC` ([#4316](https://github.com/rust-lang/libc/pull/4316)) - Linux: Add `SO_PREFER_BUSY_POLL` and `SO_BUSY_POLL_BUDGET` ([#3917](https://github.com/rust-lang/libc/pull/3917)) - Linux: Add `devmem` structs ([#4299](https://github.com/rust-lang/libc/pull/4299)) - Linux: Add socket constants up to `SO_DEVMEM_DONTNEED` ([#4299](https://github.com/rust-lang/libc/pull/4299)) - NetBSD, OpenBSD, DragonflyBSD: Add `closefrom` ([#4290](https://github.com/rust-lang/libc/pull/4290)) - NuttX: Add `pw_passwd` field to `passwd` ([#4222](https://github.com/rust-lang/libc/pull/4222)) - Solarish: define `IP_BOUND_IF` and `IPV6_BOUND_IF` ([#4287](https://github.com/rust-lang/libc/pull/4287)) - Wali: Add bindings for `wasm32-wali-linux-musl` target ([#4244](https://github.com/rust-lang/libc/pull/4244)) ### Changed - AIX: Use `sa_sigaction` instead of a union ([#4250](https://github.com/rust-lang/libc/pull/4250)) - Make `msqid_ds.__msg_cbytes` public ([#4301](https://github.com/rust-lang/libc/pull/4301)) - Unix: Make all `major`, `minor`, `makedev` into `const fn` ([#4208](https://github.com/rust-lang/libc/pull/4208)) ### Deprecated - Linux: Deprecate obsolete packet filter interfaces ([#4267](https://github.com/rust-lang/libc/pull/4267)) ### Fixed - Cygwin: Fix strerror_r ([#4308](https://github.com/rust-lang/libc/pull/4308)) - Cygwin: Fix usage of f! ([#4308](https://github.com/rust-lang/libc/pull/4308)) - Hermit: Make `stat::st_size` signed ([#4298](https://github.com/rust-lang/libc/pull/4298)) - Linux: Correct values for `SI_TIMER`, `SI_MESGQ`, `SI_ASYNCIO` ([#4292](https://github.com/rust-lang/libc/pull/4292)) - NuttX: Update `tm_zone` and `d_name` fields to use `c_char` type ([#4222](https://github.com/rust-lang/libc/pull/4222)) - Xous: Include the prelude to define `c_int` ([#4304](https://github.com/rust-lang/libc/pull/4304)) ### Other - Add labels to FIXMEs ([#4231](https://github.com/rust-lang/libc/pull/4231), [#4232](https://github.com/rust-lang/libc/pull/4232), [#4234](https://github.com/rust-lang/libc/pull/4234), [#4235](https://github.com/rust-lang/libc/pull/4235), [#4236](https://github.com/rust-lang/libc/pull/4236)) - CI: Fix "cannot find libc" error on Sparc64 ([#4317](https://github.com/rust-lang/libc/pull/4317)) - CI: Fix "cannot find libc" error on s390x ([#4317](https://github.com/rust-lang/libc/pull/4317)) - CI: Pass `--no-self-update` to `rustup update` ([#4306](https://github.com/rust-lang/libc/pull/4306)) - CI: Remove tests for the `i586-pc-windows-msvc` target ([#4311](https://github.com/rust-lang/libc/pull/4311)) - CI: Remove the `check_cfg` job ([#4322](https://github.com/rust-lang/libc/pull/4312)) - Change the range syntax that is giving `ctest` problems ([#4311](https://github.com/rust-lang/libc/pull/4311)) - Linux: Split out the stat struct for gnu/b32/mips ([#4276](https://github.com/rust-lang/libc/pull/4276)) ### Removed - NuttX: Remove `pthread_set_name_np` ([#4251](https://github.com/rust-lang/libc/pull/4251)) ## [0.2.170](https://github.com/rust-lang/libc/compare/0.2.169...0.2.170) - 2025-02-23 ### Added - Android: Declare `setdomainname` and `getdomainname` - FreeBSD: Add `evdev` structures - FreeBSD: Add the new `st_filerev` field to `stat32` ([#4254](https://github.com/rust-lang/libc/pull/4254)) - Linux: Add `SI_*`` and `TRAP_*`` signal codes - Linux: Add experimental configuration to enable 64-bit time in kernel APIs, set by `RUST_LIBC_UNSTABLE_LINUX_TIME_BITS64`. - Linux: Add recent socket timestamping flags - Linux: Added new CANFD_FDF flag for the flags field of canfd_frame - Musl: add CLONE_NEWTIME - Solarish: add the posix_spawn family of functions ### Deprecated - Linux: deprecate kernel modules syscalls ### Changed - Emscripten: Assume version is at least 3.1.42 ### Fixed - BSD: Correct the definition of `WEXITSTATUS` - Hurd: Fix CMSG_DATA on 64bit systems ([#4240](https://github.com/rust-lang/libc/pull/424)) - NetBSD: fix `getmntinfo` ([#4265](https://github.com/rust-lang/libc/pull/4265) - VxWorks: Fix the size of `time_t` ### Other - Add labels to FIXMEs , , - CI: Bump FreeBSD CI to 13.4 and 14.2 - Copy definitions from core::ffi and centralize them - Define c_char at top-level and remove per-target c_char definitions - Port style.rs to syn and add tests for the style checker ## [0.2.169](https://github.com/rust-lang/libc/compare/0.2.168...0.2.169) - 2024-12-18 ### Added - FreeBSD: add more socket TCP stack constants - Fuchsia: add a `sockaddr_vm` definition ### Fixed **Breaking**: [rust-lang/rust#132975](https://github.com/rust-lang/rust/pull/132975) corrected the signedness of `core::ffi::c_char` on various Tier 2 and Tier 3 platforms (mostly Arm and RISC-V) to match Clang. This release contains the corresponding changes to `libc`, including the following specific pull requests: - ESP-IDF: Replace arch-conditional `c_char` with a reexport - Fix `c_char` on various targets - Mirror `c_char` configuration from `rust-lang/rust` ### Cleanup - Do not re-export `c_void` in target-specific code ## [0.2.168](https://github.com/rust-lang/libc/compare/0.2.167...0.2.168) - 2024-12-09 ### Added - Linux: Add new process flags ([#4174](https://github.com/rust-lang/libc/pull/4174)) - Linux: Make `IFA_*` constants available on all Linux targets - Linux: add `MAP_DROPPABLE` - Solaris, Illumos: add `SIGRTMIN` and `SIGRTMAX` - Unix, Linux: adding POSIX `memccpy` and `mempcpy` GNU extension - CI: Upload artifacts created by libc-test - CI: Use workflow commands to group output by target - CI: add caching ## [0.2.167](https://github.com/rust-lang/libc/compare/0.2.166...0.2.167) - 2024-11-28 ### Added - Solarish: add `st_fstype` to `stat` - Trusty: Add `intptr_t` and `uintptr_t` ([#4161](https://github.com/rust-lang/libc/pull/4161)) ### Fixed - Fix the build with `rustc-dep-of-std` - Wasi: Add back unsafe block for `clockid_t` static variables ([#4157](https://github.com/rust-lang/libc/pull/4157)) ### Cleanup - Create an internal prelude - Fix `unused_qualifications` ### Other - CI: Check various FreeBSD versions ([#4159](https://github.com/rust-lang/libc/pull/4159)) - CI: add a timeout for all jobs - CI: verify MSRV for `wasm32-wasi` - Migrate to the 2021 edition ### Removed - Remove one unused import after the edition 2021 bump ## [0.2.166](https://github.com/rust-lang/libc/compare/0.2.165...0.2.166) - 2024-11-26 ### Fixed This release resolves two cases of unintentional breakage from the previous release: - Revert removal of array size hacks [#4150](https://github.com/rust-lang/libc/pull/4150) - Ensure `const extern` functions are always enabled [#4151](https://github.com/rust-lang/libc/pull/4151) ## [0.2.165](https://github.com/rust-lang/libc/compare/0.2.164...0.2.165) - 2024-11-25 ### Added - Android: add `mkostemp`, `mkostemps` - Android: add a few API 30 calls - Android: add missing syscall constants - Apple: add `in6_ifreq` - Apple: add missing `sysctl` net types (before release: remove `if_family_id` ([#4137](https://github.com/rust-lang/libc/pulls/4137))) - Freebsd: add `kcmp` call support - Hurd: add `MAP_32BIT` and `MAP_EXCL` - Hurd: add `domainname` field to `utsname` ([#4089](https://github.com/rust-lang/libc/pulls/4089)) - Linux GNU: add `f_flags` to struct `statfs` for arm, mips, powerpc and x86 - Linux GNU: add `malloc_stats` - Linux: add ELF relocation-related structs - Linux: add `ptp_*` structs - Linux: add `ptp_clock_caps` - Linux: add `ptp_pin_function` and most `PTP_` constants - Linux: add missing AF_XDP structs & constants - Linux: add missing netfilter consts ([#3734](https://github.com/rust-lang/libc/pulls/3734)) - Linux: add struct and constants for the `mount_setattr` syscall - Linux: add wireless API - Linux: expose the `len8_dlc` field of `can_frame` - Musl: add `utmpx` API - Musl: add missing syscall constants - NetBSD: add `mcontext`-related data for RISCV64 - Redox: add new `netinet` constants ) - Solarish: add `_POSIX_VDISABLE` ([#4103](https://github.com/rust-lang/libc/pulls/4103)) - Tests: Add a test that the `const extern fn` macro works - Tests: Add test of primitive types against `std` - Unix: Add `htonl`, `htons`, `ntohl`, `ntohs` - Unix: add `aligned_alloc` - Windows: add `aligned_realloc` ### Fixed - **breaking** Hurd: fix `MAP_HASSEMAPHORE` name ([#4127](https://github.com/rust-lang/libc/pulls/4127)) - **breaking** ulibc Mips: fix `SA_*` mismatched types ([#3211](https://github.com/rust-lang/libc/pulls/3211)) - Aix: fix an enum FFI safety warning - Haiku: fix some typos ([#3664](https://github.com/rust-lang/libc/pulls/3664)) - Tests: fix `Elf{32,64}_Relr`-related tests - Tests: fix libc-tests for `loongarch64-linux-musl` - Tests: fix some clippy warnings - Tests: fix tests on `riscv64gc-unknown-freebsd` ### Deprecated - Apple: deprecate `iconv_open` - Apple: deprecate `mach_task_self` - Apple: update `mach` deprecation notices for things that were removed in `main` ### Cleanup - Adjust the `f!` macro to be more flexible - Aix: remove duplicate constants - CI: make scripts more uniform - Drop the `libc_align` conditional - Drop the `libc_cfg_target_vendor` conditional - Drop the `libc_const_size_of` conditional - Drop the `libc_core_cvoid` conditional - Drop the `libc_int128` conditional - Drop the `libc_non_exhaustive` conditional - Drop the `libc_packedN` conditional - Drop the `libc_priv_mod_use` conditional - Drop the `libc_union` conditional - Drop the `long_array` conditional - Drop the `ptr_addr_of` conditional - Drop warnings about deprecated cargo features - Eliminate uses of `struct_formatter` - Fix a few other array size hacks - Glibc: remove redundant definitions ([#3261](https://github.com/rust-lang/libc/pulls/3261)) - Musl: remove redundant definitions ([#3261](https://github.com/rust-lang/libc/pulls/3261)) - Musl: unify definitions of `siginfo_t` ([#3261](https://github.com/rust-lang/libc/pulls/3261)) - Musl: unify definitions of statfs and statfs64 ([#3261](https://github.com/rust-lang/libc/pulls/3261)) - Musl: unify definitions of statvfs and statvfs64 ([#3261](https://github.com/rust-lang/libc/pulls/3261)) - Musl: unify statx definitions ([#3978](https://github.com/rust-lang/libc/pulls/3978)) - Remove array size hacks for Rust < 1.47 - Remove repetitive words - Use #[derive] for Copy/Clone in s! and friends - Use some tricks to format macro bodies ### Other - Apply formatting to macro bodies - Bump libc-test to Rust 2021 Edition - CI: Add a check that semver files don't contain duplicate entries - CI: Add `fanotify_event_info_fid` to FAM-exempt types - CI: Allow rustfmt to organize imports ([#4136](https://github.com/rust-lang/libc/pulls/4136)) - CI: Always run rustfmt - CI: Change 32-bit Docker images to use EOL repos - CI: Change 64-bit Docker images to ubuntu:24.10 - CI: Disable the check for >1 s! invocation - CI: Ensure build channels get run even if FILTER is unset - CI: Ensure there is a fallback for no_std - CI: Fix cases where unset variables cause errors - CI: Naming adjustments and cleanup - CI: Only invoke rustup if running in CI - CI: Remove the logic to handle old rust versions - CI: Set -u (error on unset) in all script files - CI: add support for `loongarch64-unknown-linux-musl` - CI: make `aarch64-apple-darwin` not a nightly-only target - CI: run shellcheck on all scripts - CI: update musl headers to Linux 6.6 - CI: use qemu-sparc64 to run sparc64 tests - Drop the `libc_const_extern_fn` conditional - Drop the `libc_underscore_const_names` conditional - Explicitly set the edition to 2015 - Introduce a `git-blame-ignore-revs` file - Tests: Ignore fields as required on Ubuntu 24.10 - Tests: skip `ATF_*` constants for OpenBSD - Triagebot: Add an autolabel for CI ## [0.2.164](https://github.com/rust-lang/libc/compare/0.2.163...0.2.164) - 2024-11-16 ### MSRV This release increases the MSRV of `libc` to 1.63. ### Other - CI: remove tests with rust < 1.63 - MSRV: document the MSRV of the stable channel to be 1.63 - MacOS: move ifconf to s_no_extra_traits ## [0.2.163](https://github.com/rust-lang/libc/compare/0.2.162...0.2.163) - 2024-11-16 ### Added - Aix: add more `dlopen` flags - Android: add group calls - FreeBSD: add `TCP_FUNCTION_BLK` and `TCP_FUNCTION_ALIAS` - Linux: add `confstr` - Solarish: add `aio` - Solarish: add `arc4random*` ### Changed - Emscripten: upgrade emsdk to 3.1.68 - Hurd: use more standard types - Hurd: use the standard `ssize_t = isize` - Solaris: fix `confstr` and `ucontext_t` ### Other - CI: add Solaris - CI: add `i686-unknown-freebsd` - CI: ensure that calls to `sort` do not depend on locale - Specify `rust-version` in `Cargo.toml` ## [0.2.162](https://github.com/rust-lang/libc/compare/0.2.161...0.2.162) - 2024-11-07 ### Added - Android: fix the alignment of `uc_mcontext` on arm64 - Apple: add `host_cpu_load_info` - ESP-IDF: add a time flag - FreeBSD: add the `CLOSE_RANGE_CLOEXEC` flag - FreeBSD: fix test errors regarding `__gregset_t` - FreeBSD: fix tests on x86 FreeBSD 15 - FreeBSD: make `ucontext_t` and `mcontext_t` available on all architectures - Haiku: add `getentropy` - Illumos: add `syncfs` - Illumos: add some recently-added constants - Linux: add `ioctl` flags - Linux: add epoll busy polling parameters - NuttX: add `pthread_[get/set]name_np` - RTEMS: add `arc4random_buf` - Trusty OS: add initial support - WASIp2: expand socket support ### Fixed - Emscripten: don't pass `-lc` - Hurd: change `st_fsid` field to `st_dev` - Hurd: fix the definition of `utsname` - Illumos/Solaris: fix `FNM_CASEFOLD` definition - Solaris: fix all tests ### Other - CI: Add loongarch64 - CI: Check that semver files are sorted - CI: Re-enable the FreeBSD 15 job - Clean up imports and `extern crate` usage - Convert `mode_t` constants to octal - Remove the `wasm32-wasi` target that has been deleted upstream ## [0.2.161](https://github.com/rust-lang/libc/compare/0.2.160...0.2.161) - 2024-10-17 ### Fixed - OpenBSD: fix `FNM_PATHNAME` and `FNM_NOESCAPE` values ## [0.2.160](https://github.com/rust-lang/libc/compare/0.2.159...0.2.160) - 2024-10-17 ### Added - Android: add `PR_GET_NAME` and `PR_SET_NAME` - Apple: add `F_TRANSFEREXTENTS` - Apple: add `mach_error_string` - Apple: add additional `pthread` APIs - Apple: add the `LOCAL_PEERTOKEN` socket option - BSD: add `RTF_*`, `RTA_*`, `RTAX_*`, and `RTM_*` definitions - Emscripten: add `AT_EACCESS` - Emscripten: add `getgrgid`, `getgrnam`, `getgrnam_r` and `getgrgid_r` - Emscripten: add `getpwnam_r` and `getpwuid_r` - FreeBSD: add `POLLRDHUP` - Haiku: add `arc4random` - Illumos: add `ptsname_r` - Linux: add `fanotify` interfaces - Linux: add `tcp_info` - Linux: add additional AF_PACKET options - Linux: make Elf constants always available - Musl x86: add `iopl` and `ioperm` - Musl: add `posix_spawn` chdir functions - Musl: add `utmpx.h` constants - NetBSD: add `sysctlnametomib`, `CLOCK_THREAD_CPUTIME_ID` and `CLOCK_PROCESS_CPUTIME_ID` - Nuttx: initial support - RTEMS: add `getentropy` - RTEMS: initial support - Solarish: add `POLLRDHUP`, `POSIX_FADV_*`, `O_RSYNC`, and `posix_fallocate` - Unix: add `fnmatch.h` - VxWorks: add riscv64 support - VxWorks: update constants related to the scheduler ### Changed - Redox: change `ino_t` to be `c_ulonglong` ### Fixed - ESP-IDF: fix mismatched constants and structs - FreeBSD: fix `struct stat` on FreeBSD 12+ ### Other - CI: Fix CI for FreeBSD 15 - Docs: link to `windows-sys` ## [0.2.159](https://github.com/rust-lang/libc/compare/0.2.158...0.2.159) - 2024-09-24 ### Added - Android: add more `AT_*` constants in - Apple: add missing `NOTE_*` constants in - Hermit: add missing error numbers in - Hurd: add `__timeval` for 64-bit support in - Linux: add `epoll_pwait2` in - Linux: add `mq_notify` in - Linux: add missing `NFT_CT_*` constants in - Linux: add the `fchmodat2` syscall in - Linux: add the `mseal` syscall in - OpenBSD: add `sendmmsg` and `recvmmsg` in - Unix: add `IN6ADDR_ANY_INIT` and `IN6ADDR_LOOPBACK_INIT` in - VxWorks: add `S_ISVTX` in - VxWorks: add `vxCpuLib` and `taskLib` functions - WASIp2: add definitions for `std::net` support in ### Fixed - Correctly handle version checks when `clippy-driver` is used ### Changed - EspIdf: change signal constants to c_int in - HorizonOS: update network definitions in - Linux: combine `ioctl` APIs in - WASI: enable CI testing in - WASIp2: enable CI testing in ## [0.2.158](https://github.com/rust-lang/libc/compare/0.2.157...0.2.158) - 2024-08-19 ### Other - WASI: fix missing `Iterator` with `rustc-dep-of-std` in ## [0.2.157](https://github.com/rust-lang/libc/compare/0.2.156...0.2.157) - 2024-08-17 ### Added - Apple: add `_NSGetArgv`, `_NSGetArgc` and `_NSGetProgname` in - Build: add `RUSTC_WRAPPER` support in - FreeBSD: add `execvpe` support from 14.1 release in - Fuchsia: add `SO_BINDTOIFINDEX` - Linux: add `klogctl` in - MacOS: add `fcntl` OFD commands in - NetBSD: add `_lwp_park` in - Solaris: add missing networking support in - Unix: add `pthread_equal` in - WASI: add `select`, `FD_SET`, `FD_ZERO`, `FD_ISSET ` in ### Fixed - TEEOS: fix octal notation for `O_*` constants in ### Changed - FreeBSD: always use freebsd12 when `rustc_dep_of_std` is set in ## [0.2.156](https://github.com/rust-lang/libc/compare/v0.2.155...v0.2.156) - 2024-08-15 ### Added - Apple: add `F_ALLOCATEPERSIST` in - Apple: add `os_sync_wait_on_address` and related definitions in - BSD: generalise `IPV6_DONTFRAG` to all BSD targets in - FreeBSD/DragonFly: add `IP_RECVTTL`/`IPV6_RECVHOPLIMIT` in - Hurd: add `XATTR_CREATE`, `XATTR_REPLACE` in - Linux GNU: `confstr` API and `_CS_*` in - Linux musl: add `preadv2` and `pwritev2` (1.2.5 min.) in - VxWorks: add the constant `SOMAXCONN` in - VxWorks: add a few errnoLib related constants in ### Fixed - Solaris/illumos: Change `ifa_flags` type to u64 in - QNX 7.0: Disable `libregex` in ### Changed - QNX NTO: update platform support in - `addr_of!(EXTERN_STATIC)` is now considered safe in ### Removed - Apple: remove `rmx_state` in ### Other - Update or remove CI tests that have been failing dbus 1.14.4 (2022-10-05) ======================== This is a security update for the dbus 1.14.x stable branch, fixing denial-of-service issues (CVE-2022-42010, -42011, -42012) and applying security hardening (dbus#416). Behaviour changes: • On Linux, dbus-daemon and other uses of DBusServer now create a path-based Unix socket, unix:path=..., when asked to listen on a unix:tmpdir=... address. This makes unix:tmpdir=... equivalent to unix:dir=... on all platforms. Previous versions would have created an abstract socket, unix:abstract=..., in this situation. This change primarily affects the well-known session bus when run via dbus-launch(1) or dbus-run-session(1). The user bus, enabled by configuring dbus with --enable-user-session and running it on a systemd system, already used path-based Unix sockets and is unaffected by this change. This behaviour change prevents a sandbox escape via the session bus socket in sandboxing frameworks that can share the network namespace with the host system, such as Flatpak. This change might cause a regression in situations where the abstract socket is intentionally shared between the host system and a chroot or container, such as some use-cases of schroot(1). That regression can be resolved by using a bind-mount to share either the D-Bus socket, or the whole /tmp directory, with the chroot or container. (dbus#416, Simon McVittie) Denial of service fixes: Evgeny Vereshchagin discovered several ways in which an authenticated local attacker could cause a crash (denial of service) in dbus-daemon --system or a custom DBusServer. In uncommon configurations these could potentially be carried out by an authenticated remote attacker. • An invalid array of fixed-length elements where the length of the array is not a multiple of the length of the element would cause an assertion failure in debug builds or an out-of-bounds read in production builds. This was a regression in version 1.3.0. (dbus#413, CVE-2022-42011; Simon McVittie) • A syntactically invalid type signature with incorrectly nested parentheses and curly brackets would cause an assertion failure in debug builds. Similar messages could potentially result in a crash or incorrect message processing in a production build, although we are not aware of a practical example. (dbus#418, CVE-2022-42010; Simon McVittie) • A message in non-native endianness with out-of-band Unix file descriptors would cause a use-after-free and possible memory corruption in production builds, or an assertion failure in debug builds. This was a regression in version 1.3.0. (dbus#417, CVE-2022-42012; Simon McVittie) dbus 1.14.2 (2022-09-26) ======================== Fixes: • Fix build failure on FreeBSD (dbus!277, Alex Richardson) • Fix build failure on macOS with launchd enabled (dbus!287, Dawid Wróbel) • Preserve errno on failure to open /proc/self/oom_score_adj (dbus!285, Gentoo#834725; Mike Gilbert) • On Linux, don't log warnings if oom_score_adj is read-only but does not need to be changed (dbus!291, Simon McVittie) • Slightly improve error-handling for inotify (dbus!235, Simon McVittie) • Don't crash if dbus-daemon is asked to watch more than 128 directories for changes (dbus!302, Jan Tojnar) • Autotools build system fixes: · Don't treat --with-x or --with-x=yes as a request to disable X11, fixing a regression in 1.13.20. Instead, require X11 libraries and fail if they cannot be detected. (dbus!263, Lars Wendler) · When a CMake project uses an Autotools-built libdbus in a non-standard prefix, find dbus-arch-deps.h successfully (dbus#314, Simon McVittie) · Don't include generated XML catalog in source releases (dbus!317, Jan Tojnar) · Improve robustness of detecting gcc __sync atomic builtins (dbus!320, Alex Richardson) • CMake build system fixes: · Detect endianness correctly, fixing interoperability with other D-Bus implementations on big-endian systems (dbus#375, Ralf Habacker) · When building for Unix, install session and system bus setup in the intended locations (dbus!267, dbus!297; Ralf Habacker, Alex Richardson) · Detect setresuid() and getresuid() (dbus!319, Alex Richardson) · Detect backtrace() on FreeBSD (dbus!281, Alex Richardson) · Don't include headers from parent directory (dbus!282, Alex Richardson) · Distinguish between host and target TMPDIR when cross-compiling (dbus!279, Alex Richardson) · Fix detection of atomic operations (dbus!306, Alex Richardson) Tests and CI enhancements: • On Unix, skip tests that switch uid if run in a container that is unable to do so, instead of failing (dbus#407, Simon McVittie) • Use the latest MSYS2 packages for CI (Ralf Habacker, Simon McVittie) dbus 1.14.0 (2022-02-28) ======================== 1.14.x is a new stable branch, superseding 1.12.x. Summary of major changes between 1.12.x and 1.14.0 -------------------------------------------------- Dependencies: • dbus now requires at least a basic level of support for C99 variadic macros, as implemented in gcc >= 3, all versions of Clang, and MSVC >= 2005. In practice this requirement has existed since version 1.9.2, but it is now official. • dbus now requires a C99-compatible va_copy() macro (or a __va_copy() macro with the same behaviour), except when building for Windows using MSVC and CMake. • On Unix platforms, if getpwnam_r() and getgrnam_r() are implemented, they must be POSIX-conformant. The non-POSIX signature seen in ancient Solaris versions will no longer work. • All Windows builds now require Windows Vista or later. (Note that we do not recommend or support use of dbus on operating systems outside their vendor's security support lifetime, such as Vista.) • GLib >= 2.38 is required if full test coverage is enabled (reduced from 2.40 in dbus 1.12.x.) • Building using CMake now requires CMake 3.4. • Building documentation using CMake now requires xsltproc, Docbook DTDs (for example docbook-xml on Debian derivatives), and Docbook XSLT stylesheets (for example docbook-xsl on Debian derivatives). Using KDE's meinproc4 documentation processor is no longer supported. Build-time configuration changes: • Move CMake build system to top level, matching normal practice for CMake projects Deprecations: • Third-party software should install default dbus policies for the system bus into ${datadir}/dbus-1/system.d (this has been supported since dbus 1.10, released in August 2015). Installing default dbus policies in ${sysconfdir}/dbus-1/system.d is now considered to be deprecated. Policy files in ${sysconfdir}/dbus-1/system.d continue to be read, but this directory should only be used by system administrators wishing to override the default policies. The ${datadir} applicable to dbus is usually /usr/share and the ${sysconfdir} is usually /etc. • A similar pattern applies to the session bus policies in session.d. • The dbus-send(1) man page now documents --bus and --peer instead of the old --address synonym for --peer, which has been deprecated since the introduction of --bus and --peer in 1.7.6 • The dbus-daemon man page now has scarier warnings about and non-local TCP, which are insecure and should not be used, particularly for the standard system and session buses • DBusServer (and hence the dbus-daemon) no longer accepts usernames (login names) for the recommended EXTERNAL authentication mechanism, only numeric user IDs or the empty string. See 1.13.0 release notes for full details. New features: • On Linux 4.13 or later when built against a suitable glibc version, GetConnectionCredentials() now includes UnixGroupIDs, the effective group IDs of the initiator of the connection, taken from SO_PEERGROUPS. • On Linux 4.13 or later, now uses the SO_PEERGROUPS credentials-passing socket option to get the effective group IDs of the initiator of the connection. See 1.13.4 release notes for details. • Add a --sender option to dbus-send, which requests a name and holds it until the signal has been sent • dbus-daemon and rules can now specify a send_destination_prefix attribute, which is like a combination of send_destination and the arg0namespace keyword in match rules. See 1.13.12 release notes for more details • The dbus-daemon now filters the messages that it relays, removing header fields that it does not understand. Clients must not rely on this behaviour unless they have confirmed that they are connected to a suitable message bus implementation, for example by querying its Features property. • The dbus-daemon now emits a signal, ActivatableServicesChanged, when the list of activatable services may have changed. Support for this signal can be discovered by querying the Features property. • It is now possible to disable traditional (non-systemd) service activation at build-time (Autotools: --disable-traditional-activation, CMake: -DENABLE_TRADITIONAL_ACTIVATION=OFF). See 1.13.10 release notes for details. • The API reference manual can be built as a Qt compiled help file if qhelpgenerator(-qt5) is available. See 1.13.16 release notes for details. Miscellaneous behaviour changes: • When using the "user bus" (--enable-user-session), put the dbus-daemon in the session slice • Several environment variables set by systemd are no longer passed on to activated services • If the dbus-daemon is compiled for Linux with systemd support, it now informs systemd that it is ready for use via the sd_notify() mechanism • Tarball releases no longer contain pre-2007 changelogs and are now compressed with xz, making them around 35% smaller. Changes since 1.13.22 --------------------- • On Windows, consistently use msvcrt.dll-style printf formats, fixing builds with mingw-w64 8.0.0 (dbus#380, Simon McVittie) • Fix some broken links in the API design document (dbus!257, Michael Nosthoff) • CI updates · Enable -Werror for the CMake builds · Use https to download MSYS packages · Use Debian 11 for most builds · Stop testing on Debian 9, which is EOL · Stop testing on Ubuntu 16.04, which is EOL · Remove workarounds for missing/outdated packages in Debian 8, Debian 9 and Ubuntu 16.04 (dbus#380, dbus!260; Simon McVittie) dbus 1.13.22 (2022-02-23) ========================= This is a release candidate for a new dbus 1.14.x stable branch. Enhancements: • D-Bus Specification 0.38: · Add ActivatableServicesChanged signal and feature flag (dbus#376, Ralf Habacker) · Document * as optionally-escaped in D-Bus addresses, matching the implementation (dbus!248, Kir Kolyshkin) • Emit the new ActivatableServicesChanged signal when configuration and/or activatable services are reloaded (dbus#376, Ralf Habacker) • Add an XML catalog file for the DTDs we install (dbus!202, Jan Tojnar) Bug fixes: • On Linux, when using traditional (non-systemd) service activation, don't log warnings about failing to reset OOM score adjustment if the process is already more susceptible to the OOM killer, as user processes usually are with systemd ≥ 250. (dbus#374, Simon McVittie) • On Linux, when using traditional (non-systemd) system bus activation, reset the OOM score adjustment to 0 as intended. If the system dbus-daemon is protected from the OOM killer, this avoids that protection unintentionally being inherited by every system service. (dbus#378, Simon McVittie) • Fix a code path that could result in a crash on out-of-memory (dbus#246, Marc-André Lureau) • Fix compilation if embedded tests are enabled but verbose mode and stats are both disabled (Marc-André Lureau) • CMake: Improve support for Windows with MSVC and add CI coverage (dbus!218, Marc-André Lureau) • CMake: Improve Docbook documentation-generation (dbus#377, Ralf Habacker) • On Linux, fix a race condition in the integration test for transient services (Debian#1005889, dbus!256; Simon McVittie) dbus 1.13.20 (2021-12-17) ========================= The “not how anyone wanted to learn the Greek alphabet” release. Dependencies: • Building using CMake now requires CMake 3.4. Enhancements: • D-Bus Specification 0.37: · Update recommendations for DBUS_COOKIE_SHA1 timeouts (dbus!171, Simon McVittie) · Clarify padding requirements for arrays and variants (dbus!203, Zeeshan Ali) · Describe where the interoperable machine ID comes from (dbus!198, Thomas Kluyver) · Clarify use of dictionary (array of dict-entry) types (dbus#347, Ralf Habacker) • When using the "user bus" (--enable-user-session), put the dbus-daemon in the session slice (dbus!219, David Redondo) Feature removal: • Disable the experimental Containers1 interface that was added in 1.13.0. It is incomplete and not ready for production use, so we're disabling it in preparation for a new 1.14.x stable branch; the code remains present and will be re-enabled later, but there is no longer a build-time configuration option to enable it. (dbus!236, Simon McVittie) Bug fixes: • Avoid malloc() after fork on non-GNU libc (dbus!181, Jean-Louis Fuchs) • Don't return successfully from RemoveMatch if the match rule didn't exist (dbus#351, Simon McVittie) • On Windows, fix a race condition where dbus-run-session could start the wrapped application before the dbus-daemon was ready (dbus#297, Ralf Habacker) • Fix build with clang 13 by using Standard C offsetof where available (dbus!237, Simon McVittie) • Fix build of tests on FreeBSD (dbus!167, Simon McVittie) • Various CMake build improvements (dbus#310, dbus!213, dbus#319, dbus!217, dbus#346, dbus#356; Ralf Habacker) • Set IMPORTED_IMPLIB property in CMake metadata installed via Autotools with mingw toolchain (dbus!172, Julien Schueller) • Make documentation build more reproducible (dbus!189, dbus!238; Arnout Engelen, Simon McVittie) • On Unix, make X11 autolaunch cope with slashes in DISPLAY (dbus#8, dbus#311; William Earley) • Don't try to raise RLIMIT_NOFILE beyond OPEN_MAX on macOS (dbus#309, William Earley) • Improve SELinux audit messages (dbus!173, Chris PeBenito) • Validate various strings in dbus-send to avoid client-side assertion failures on invalid input (dbus#338, Simon McVittie) • Fix a memory leak in a unit test (dbus!208, David King) • In Autotools builds, use pkg-config in preference to AC_PATH_XTRA (dbus!212, Scott Hamilton) • On Windows, prevent (theoretical?) stack buffer overflow with very long paths (dbus!221, Ralf Habacker) • Fix build with newer mingw compilers (dbus#355, Ralf Habacker) • Various Windows error-handling fixes (dbus!229, dbus#357, dbus#279, dbus#360, dbus#365; Ralf Habacker, Simon McVittie) • Clearer diagnostics when tests are skipped (dbus#363, Simon McVittie) • CI improvements (dbus#318, dbus!197, dbus!187, dbus!196, dbus!201, dbus#359; Simon McVittie, Ralf Habacker, Arnout Engelen, Marc-André Lureau) • Typo fixes, etc. (dbus!183, dbus!182; Chigozirim Chukwu, Samy Mahmoudi) dbus 1.13.18 (2020-07-02) ========================= The “carnivorous border” release. Maybe security fixes: • On Unix, avoid a use-after-free if two usernames have the same numeric uid. In older versions this could lead to a crash (denial of service) or other undefined behaviour, possibly including incorrect authorization decisions if is used. Like Unix filesystems, D-Bus' model of identity cannot distinguish between users of different names with the same numeric uid, so this configuration is not advisable on systems where D-Bus will be used. Thanks to Daniel Onaca. (dbus#305, dbus!166, CVE-2020-35512; Simon McVittie) Other fixes: • On Solaris and its derivatives, if a cmsg header is truncated, ensure that we do not overrun the buffer used for fd-passing, even if the kernel tells us to. (dbus#304, dbus!165; Andy Fiddaman) • When built with CMake, use GNUInstallDirs' special-cases for prefixes /, /usr and /opt/* (dbus!155, Ralf Habacker) • When built with CMake on Linux, allow systemd-specific features to be enabled, for feature parity with Autotools (dbus!155, Ralf Habacker) • When built with CMake, install the same example files as with Autotools (dbus!155, Ralf Habacker) • Correct the doc-comment for DBUS_ERROR_SPAWN_NO_MEMORY (dbus!163, Marc-André Lureau) dbus 1.13.16 (2020-06-02) ========================= The “ominous mushroom hat” release. Denial of service fixes: • CVE-2020-12049: If a message contains more file descriptors than can be sent, close those that did get through before reporting error. Previously, a local attacker could cause the system dbus-daemon (or another system service with its own DBusServer) to run out of file descriptors, by repeatedly connecting to the server and sending fds that would get leaked. Thanks to Kevin Backhouse of GitHub Security Lab. (dbus#294, GHSL-2020-057; Simon McVittie) Enhancements: • The API reference manual can be built as a Qt compiled help file if qhelpgenerator(-qt5) is available. This is controlled by --enable-qt-help and --with-qchdir in the Autotools build, or -DENABLE_QT_HELP and -DINSTALL_QCH_DIR in CMake. (dbus!150, Ralf Habacker) Fixes: • When built for Windows, return all autolaunch error information in the DBusError rather than printing some of it to stderr (dbus#191, dbus!131; Ralf Habacker) • When built for Windows, don't truncate long log messages (dbus!134, Ralf Habacker) • When built using CMake for a Unix platform, dbus-cleanup-sockets and dbus-uuidgen are now included (dbus!154, Ralf Habacker) • When built for Windows with verbose mode enabled, don't print debugging messages related to poll() emulation into a fixed-size buffer that could overflow (dbus!125, Ralf Habacker) • Adjust .desktop file parser to avoid a Coverity false positive (dbus!146, Coverity CID 354884; Ralf Habacker) • Print shell-test diagnostics to stderr, avoiding warnings or errors from strict TAP parsers (dbus!157, Félix Piédallu) Tests and CI enhancements: • When the CI cross-builds Windows binaries on Linux, run unit tests using Wine (dbus#296, dbus!158; Ralf Habacker) • Really build x86_64 Windows binaries in Gitlab-CI, instead of building i686 binaries a second time (Ralf Habacker) • When tests will be run using Wine, use STABS debug symbol format so that Wine can display backtraces (dbus#133, dbus!104; Ralf Habacker) dbus 1.13.14 (2020-04-21) ========================= The “mystery allium” release. Dependencies: • On Unix platforms, if getpwnam_r() and getgrnam_r() are implemented, they must be POSIX-conformant. The non-POSIX signature seen in ancient Solaris versions will no longer work. (dbus!11, Simon McVittie) Enhancements: • D-Bus Specification 0.36: · Fix a typo in an annotated hexdump of part of a message (dbus!152, Zygmunt Krynicki) • On Linux, use getrandom(2) in preference to /dev/urandom (dbus!147, Natanael Copa) • Add a --sender option to dbus-send, which requests a name and holds it until the signal has been sent. (dbus!116, Christopher Morin) Fixes: • Fix a crash when the dbus-daemon is terminated while one or more monitors are active (dbus#291, dbus!140; Simon McVittie) • Fix several test failures if the build-time tests were run as uid 0. Note that running the tests with elevated privileges is likely to be insecure, and should only be attempted in an expendable container or virtual machine. (dbus!117, Simon McVittie) • Fix an assertion failure if a client encounters an out-of-memory condition while sending its response to the "OK" authentication message, and processing of the "OK" message is subsequently retried when more memory is available (dbus!119, Simon McVittie) • Don't leak struct addrinfo if we run out of memory during a TCP connect() (dbus!143, dbus!144, Coverity CID 354880; Ralf Habacker, Simon McVittie) • On Linux with SELinux, don't assume that the system policy has the "dbus" security class or the associated AV (dbus#198, dbus!128; Laurent Bigonville) • Handle dbus_connection_set_change_sigpipe() in a thread-safe way (dbus!132; Simon McVittie, Ralf Habacker) • On Unix, use POSIX in preference to (dbus!148, Natanael Copa) • When building with CMake, cope with libX11 in a non-standard location (dbus!129, Tuomo Rinne) • On Windows with verbose mode enabled and outputting to the debug port, use a dynamically-allocated buffer to avoid potential stack buffer overflows in long messages (dbus#45, dbus!133; Ralf Habacker) • The dbus-send(1) man page now documents --bus and --peer instead of the old --address synonym for --peer, which has been deprecated since the introduction of --bus and --peer in 1.7.6 (fd.o #48816, dbus!115; Chris Morin) • Fix a wrong environment variable name in dbus-daemon(1) (dbus#275, dbus!122; Mubin, Philip Withnall) • Fix formatting of dbus_message_append_args example (dbus!126, Felipe Franciosi) Internal changes: • Move more test-only code from dbus/ to tests/ (dbus!120, dbus!121, dbus!153; Simon McVittie) • Improve diagnostics if memory or fd leaks are detected (dbus!118, dbus!120; Simon McVittie) • Move from Debian 9 to Debian 10 for most continuous integration jobs (dbus!151, Simon McVittie) • On Windows, improve embedded version information (dbus!136, dbus!138, dbus!139; Ralf Habacker) • Indentation fixes (dbus!149, Taras Zaporozhets) dbus 1.13.12 (2019-06-11) ========================= The “patio squirrel” release. Security fixes: • CVE-2019-12749: Do not attempt to carry out DBUS_COOKIE_SHA1 authentication for identities that differ from the user running the DBusServer. Previously, a local attacker could manipulate symbolic links in their own home directory to bypass authentication and connect to a DBusServer with elevated privileges. The standard system and session dbus-daemons in their default configuration were immune to this attack because they did not allow DBUS_COOKIE_SHA1, but third-party users of DBusServer such as Upstart could be vulnerable. Thanks to Joe Vennix of Apple Information Security. (dbus#269, Simon McVittie) Enhancements: • dbus-daemon and rules can now specify a send_destination_prefix attribute, which is like a combination of send_destination and the arg0namespace keyword in match rules: a rule with send_destination_prefix="com.example.Foo" matches messages sent to any destination that is in the queue to own well-known names like com.example.Foo or com.example.Foo.A.B (but not com.example.Foobar). (dbus!85, Adrian Szyndela) dbus 1.13.10 (2019-05-13) ========================= The “engineering brick” release. Dependencies: • GLib >= 2.38 is required if full test coverage is enabled (reduced from 2.40 in dbus 1.12.x.) Deprecations: • Third-party software should install default dbus policies for the system bus into ${datadir}/dbus-1/system.d (this has been supported since dbus 1.10, released in August 2015). Installing default dbus policies in ${sysconfdir}/dbus-1/system.d is now considered to be deprecated. Policy files in ${sysconfdir}/dbus-1/system.d continue to be read, but this directory should only be used by system administrators wishing to override the default policies. The ${datadir} applicable to dbus is usually /usr/share and the ${sysconfdir} is usually /etc. • A similar pattern applies to the session bus policies in session.d. Enhancements: • D-Bus Specification 0.35: · Add UnixGroupIDs to GetConnectionCredentials() (dbus#196, dbus!105; Matthijs van Duin) · Remove some redundancies from the spec for interface names (dbus!102, Felipe Gasper) • Raise soft fd limit to match hard limit, even if unprivileged. This makes session buses with many clients, or with clients that make heavy use of fd-passing, less likely to suffer from fd exhaustion. (dbus!103, Simon McVittie) • On Linux 4.13 or later when built against a suitable glibc version, GetConnectionCredentials() now includes UnixGroupIDs, the effective group IDs of the initiator of the connection, taken from SO_PEERGROUPS. (dbus#196, dbus!105; Matthijs van Duin) • Embedded/special-purpose builds of dbus can now be configured with --disable-traditional-activation, to disable services being launched as a subprocess of the dbus-daemon. This allows the system dbus-daemon to be run in a more tightly restricted security profile (an example "drop-in" for systemd is provided). If systemd support is enabled, then services with a SystemdService configured can still be activated in these builds, via IPC to systemd. Otherwise, services will not be activatable at all. Please note that this option is not suitable for general-purpose Linux distributions that are intended to support running third-party D-Bus services. (dbus!107, Topi Miettinen) • Move CMake build system to top level, matching normal practice for CMake projects (dbus!84, Ralf Habacker) • Reformat CMake files (dbus#252, dbus!82, dbus!91; Ralf Habacker) • Avoid GLib 2.40 dependencies (dbus!79, Ralf Habacker) • Officially deprecate packaged XML policies in ${sysconfdir}, and document how to install system services correctly (dbus!76, Simon McVittie) • Add AddressSanitizer and ubsan support (dbus!57, Simon McVittie) Fixes: • If a privileged dbus-daemon has a hard fd limit greater than 64K, don't reduce it to 64K, ensuring that we can put back the original fd limits when carrying out traditional (non-systemd) activation. This fixes a regression with systemd >= 240 in which system services inherited dbus-daemon's hard and soft limit of 64K fds, instead of the intended soft limit of 1K and hard limit of 512K or 1M. (dbus!103, Debian#928877; Simon McVittie) • Fix build failures caused by an AX_CODE_COVERAGE API change in newer autoconf-archive versions (dbus#249, dbus!88; Simon McVittie) • Fix build failures with newer autoconf-archive versions that include AX_-prefixed shell variable names (dbus#249, dbus!86; Simon McVittie) • Avoid possible memory corruption in certain DBusHashTableIter use patterns, which in practice were never used (dbus!44, Simon McVittie) • Avoid a test failure on Linux when built in a container as uid 0, but without the necessary privileges to increase resource limits (dbus!58, Debian #908092; Simon McVittie) • Don't overwrite PKG_CONFIG_PATH and related environment variables when the pkg-config-based version of DBus1Config is used in a CMake project (dbus#267, dbus!96; Clemens Lang) • In CMake builds, respect GNUInstallDirs variables (dbus!77, Ralf Habacker) • In CMake builds, don't rebuild documentation every time (dbus!94, Ralf Habacker) • In CMake builds for Windows, don't require libiconv (dbus#262, dbus!100; Ralf Habacker) • Fix intermittent build failures with parallel CMake (dbus#266, dbus!113; Simon McVittie) • Don't assume we can set permissions on a directory, for the benefit of MSYS and Cygwin builds (dbus#216, dbus!110; Simon McVittie) • Avoid test failures with non-trivial NSS modules (dbus#256, dbus!93; Simon McVittie) • Fix test failures in test-syslog and test-sysdeps under Windows (dbus#238, dbus#243, dbus!61, dbus!62; Simon McVittie) • Ensure that CTest build-time tests on Windows use the just-built libdbus-1-3.dll (dbus!83, Ralf Habacker) • Don't take so long to run test-refs on Windows (dbus#244, dbus!65; Ralf Habacker) • Fix memory leaks in tests (dbus!68, Simon McVittie) • Avoid casting user-supplied pointers to DBusBasicValue *, which is formally undefined behaviour (dbus!69, Simon McVittie) • Fix a non-exploitable stack array overrun in dbus-run-session on Windows (Ralf Habacker) Tests and CI enhancements: • Verify that the result of an Autotools `make dist` can be used for a successful CMake build (dbus#255, dbus!87; Simon McVittie) • Rewrite Python tests into C to reduce circular dependencies and facilitate use of AddressSanitizer (dbus!37, Simon McVittie) • Refactor tests to extract most of their code from the bus/ and dbus/ directories, and break them up into smaller modules (dbus#223, dbus#240, dbus!1, dbus!99, dbus!73, dbus!74, dbus!75; Simon McVittie, Ralf Habacker) • Do CI builds in a more minimal environment (dbus!63, Simon McVittie) • Improve test coverage with CMake (dbus#135, dbus!23; Ralf Habacker) • Avoid firewall exception requests when running build-time tests on Windows (dbus!64, Ralf Habacker) • Allow use of Wine to run cross-compiled Windows tests on Linux (dbus!60, Ralf Habacker) Internal changes: • Rename DBusSocketSet to the more accurate DBusPollableSet (dbus!81, Ralf Habacker) • Refactor Windows implementation of dbus-spawn (dbus!80; Ralf Habacker, Simon McVittie) • Delete unused code from userdb module (dbus!92, Simon McVittie) • Remove unnecessary _dbus_threads_init_debug() (dbus!72, Simon McVittie) dbus 1.13.8 (2018-12-04) ======================== The “demanding dragon” release. dbus version control is now hosted on freedesktop.org's Gitlab installation, and bug reports and feature requests have switched from Bugzilla bugs (indicated by "fd.o #nnn") to Gitlab issues ("dbus#nnn") and merge requests ("dbus!nnn"). See README and CONTRIBUTING.md for more details. Dependencies: • dbus now requires at least a basic level of support for C99 variadic macros, as implemented in gcc >= 3, all versions of Clang, and MSVC >= 2005. In practice this requirement has existed since version 1.9.2, but it is now official. • dbus now requires a C99-compatible va_copy() macro (or a __va_copy() macro with the same behaviour), except when building for Windows using MSVC and CMake. • Building documentation using CMake now requires xsltproc, Docbook DTDs (for example docbook-xml on Debian derivatives), and Docbook XSLT stylesheets (for example docbook-xsl on Debian derivatives). Using KDE's meinproc4 documentation processor is no longer supported. Enhancements: • Rewrite CONTRIBUTING.md to reflect the current setup (dbus!8, Simon McVittie) • D-Bus Specification v0.34: · Fix an incorrect AddMatch() call in sample code (dbus#221, dbus!56; Philip Withnall) • Tarball releases no longer contain pre-2007 changelogs and are now compressed with xz, so they should be somewhat smaller (fd.o #107630; Francesco Turco, Simon McVittie) • Reference the freedesktop.org Code of Conduct (Simon McVittie) • Build an implementation of dbus-run-session for Windows (dbus#135, dbus!22; Ralf Habacker) • On Linux with SELinux, use avc_open() and monitor the AVC netlink fd in the main event loop, instead of using the deprecated avc_init() and a thread (dbus#134, dbus!31; Laurent Bigonville) • On Linux with SELinux, use the SELINUX_CB_POLICYRELOAD callback to detect policy reloads, instead of monitoring the access vector cache with AVC_CALLBACK_RESET (dbus#134, dbus!31; Laurent Bigonville) • Avoid double slashes in pkg-config paths (dbus!30, Ralf Habacker) • Improve test coverage and clean up dead code (fd.o #107739, dbus#222; Simon McVittie) • Allow --enable-relocation in combination with absolute paths for --exec-prefix, --libdir (fd.o #107662, Simon McVittie) • Don't run a test program to check how to copy a va_list, which is awkward for cross-compiling; instead require that va_copy() or __va_copy() exists, except in older MSVC versions where we already know that simple assignment is enough (dbus!35, Simon McVittie) • Simplify configure checks (dbus!10, Simon McVittie) • Improve CMake build system parity with Autotools, including: · Detect inotify, prctl() and getpwnam_r() correctly on Linux · Use xsltproc instead of meinproc4 for documentation (dbus#57, dbus#117, dbus#193, dbus#227, dbus!18, dbus!39; Ralf Habacker, Simon McVittie) Fixes: • Stop the dbus-daemon leaking memory (an error message) if delivering the message that triggered auto-activation is forbidden. This is technically a denial of service because the dbus-daemon will run out of memory eventually, but it's a very slow and noisy one, because all the rejected messages are also very likely to have been logged to the system log, and its scope is typically limited by the finite number of activatable services available. (dbus#234, Simon McVittie) • Remove __attribute__((__malloc__)) attribute on dbus_realloc(), which does not meet the criteria for that attribute in gcc 4.7+, potentially leading to miscompilation (fd.o #107741, Simon McVittie) • Parse section/group names in .service files according to the syntax from the Desktop Entry Specification: · reject control characters and non-ASCII in section/group names · backslash escapes are not interpreted in section/group names (dbus#208; David King, Simon McVittie) • Always use select()-based poll() emulation on Darwin-based OSs (macOS, etc.) and on Interix, similar to what libcurl does (dbus#232, dbus!19; Simon McVittie) • Avoid undefined integer shifts when generating random tokens for the DBUS_COOKIE_SHA1 mechanism (dbus!45, Simon McVittie) • Document the max-connections-per-user limit as unimplemented on Windows, and don't fail tests when it isn't enforced there (dbus!54, Simon McVittie) • Avoid unnecessary file descriptors being inherited by dbus-daemon and dbus-launch subprocesses (dbus!50, Simon McVittie) • Fix some minor memory leaks (fd.o #107320, dbus!41, dbus!42; Simon McVittie) • Don't fail tests if GetConnectionUnixProcessID() succeeds on Windows, which it normally will since 1.7.x (dbus#239, dbus!55; Simon McVittie) • Extend a test timeout to avoid spurious failures in CI (dbus!26, Simon McVittie) • Avoid undefined signed integer operations when generating random message content during regression tests (dbus!46, Simon McVittie) • Fix build warnings with recent gcc (dbus#208, dbus#225; David King) • Fix build warnings without libX11 (dbus#228, Simon McVittie) • Fix whitespace and error behaviour for _dbus_command_from_pid() (dbus#222, dbus!28; Simon McVittie) • Fix a race condition in the containers test (dbus!47, Simon McVittie) • When built with CMake, install dbus-daemon-launch-helper to ${CMAKE_INSTALL_LIBEXECDIR}, analogous to ${libexecdir} in Autotools (dbus!9, Simon McVittie) • When built with CMake and disabling tests, still install dbus-daemon-launch-helper (dbus!9, Simon McVittie) Tests and CI: • Add Travis-CI builds for 64-bit Windows using mingw-w64 (fd.o #105662, Ralf Habacker) • Add Gitlab-CI integration (fd.o #108177, Simon McVittie) dbus 1.13.6 (2018-08-02) ======================== The “vine cutting” release. Fixes: • Prevent reading up to 3 bytes beyond the end of a truncated message. This could in principle be an information leak or denial of service on the system bus, but is not believed to be exploitable to crash the system bus or leak interesting information in practice. (fd.o #107332, Simon McVittie) • Fix build with gcc 8 -Werror=cast-function-type (fd.o #107349, Simon McVittie) • Fix warning from gcc 8 about suspicious use of strncpy() when populating struct sockaddr_un (fd.o #107350, Simon McVittie) • Fix a minor memory leak when a DBusServer listens on a new address (fd.o #107194, Simon McVittie) • Fix an invalid NULL argument to rmdir() if a nonce-tcp DBusServer runs out of memory (fd.o #107194, Simon McVittie) • Fix various memory leaks during unit tests (fd.o #107194, Simon McVittie) • Don't use misleading errno-derived error names if getaddrinfo() or getnameinfo() fails with a code other than EAI_SYSTEM (fd.o #106395, Simon McVittie) • Skip tests that require working TCP if we are in a container environment where 127.0.0.1 cannot be resolved (fd.o #106812, Simon McVittie) dbus 1.13.4 (2018-04-30) ======================== The “parsimonious topping” release. Dependencies: • All Windows builds now require Windows Vista or later. (Note that we do not recommend or support use of dbus on operating systems outside their vendor's security support lifetime, such as Vista.) Enhancements: • D-Bus Specification v0.33 · Be clearer about the security properties of TCP transports, which have no integrity or confidentiality protection and so should not normally be used, except via the loopback interface on Windows (fd.o #106004, Simon McVittie) • On Linux 4.13 or later, now uses the SO_PEERGROUPS credentials-passing socket option to get the effective group IDs of the initiator of the connection. On platforms where that socket option is not available, dbus-daemon continues to look up the connection's user ID in the system user and group databases and assume that it has the groups that would have been granted by initgroups(). (fd.o #103737, #97821; Simon McVittie) • If the dbus-daemon is compiled for Linux with systemd support, it now informs systemd that it is ready for use via the sd_notify() mechanism. (fd.o #104641; Michal Sekletar, Simon McVittie) • Several environment variables set by systemd are no longer passed on to activated services (fd.o #104641, Simon McVittie) • Failing to bind a TCP socket to an address produces better error messages. (fd.o #61922; Simon McVittie, Ralf Habacker) • Windows builds now set the SO_REUSEADDR and TCP_NODELAY options on TCP sockets (as Unix builds already did), which should improve robustness and performance (fd.o #61922, Ralf Habacker) • Windows executables built with cmake have version information. When building for Windows with Autotools, only libdbus-1-3.dll has version information, matching previous behaviour with cmake. (fd.o #103387, Ralf Habacker) • The Devhelp documentation index is now in version 2 format (fd.o #106186, Simon McVittie) • Give the dbus-daemon man page some scarier warnings about and non-local TCP, which are insecure and should not be used, particularly for the standard system and session buses (fd.o #106004, Simon McVittie) Fixes: • Listening on TCP sockets copes better with IPv6 being disabled (fd.o #61922; Ralf Habacker, Simon McVittie) • Fix installation of Ducktype documentation with newer yelp-build versions (fd.o #106171, Simon McVittie) • Fix printf formats for pointer-sized integers on 64-bit Windows (fd.o #105662, Ralf Habacker) Internal changes: • The _DBUS_GNUC_WARN_UNUSED_RESULT macro has been replaced with _DBUS_WARN_UNUSED_RESULT, which is effective with gcc, clang and MSVC (with cl.exe /analyze). Note that for MSVC compatibility, it must appear before the return type in function declarations, whereas the older macro could also have appeared after the arguments. (fd.o #105460; Daniel Wendt, Ralf Habacker) dbus 1.13.2 (2018-03-01) ======================== The “can break a man's arm” release. Enhancements: • When a container manager creates an extra server at runtime, services can now request that messages from connections to that server are tagged with the container instance ID, providing a fast-path for identifying such connections. (fd.o #101899, Simon McVittie) Fixes: • Increase system dbus-daemon's RLIMIT_NOFILE rlimit before it drops privileges, because it won't have permission afterwards. This fixes a regression in dbus 1.10.18 and 1.11.0 which made the standard system bus more susceptible to deliberate or accidental denial of service. (fd.o #105165, David King) dbus 1.13.0 (2018-02-08) ======================== The “Citispeed Eco 75” release. This is a new development branch for the adventurous, and comes with a risk of regressions. OS distributions should stay with the 1.12.x branch, unless they can commit to following the 1.13.x branch until it reaches a 1.14.0 stable release at an unspecified point in the future. In particular, the new Containers API is subject to change and shouldn't be enabled in distributions yet, even those aimed at early adopters (hello, Arch Linux). Behaviour changes: • DBusServer (and hence the dbus-daemon) no longer accepts usernames (login names) for the recommended EXTERNAL authentication mechanism, only numeric user IDs or the empty string. This is not believed to affect real D-Bus clients in practice, because most D-Bus clients send numeric user IDs: the only known client implementation that sends usernames is dbus-java, and that only when run on a system where the com.sun.security.auth.module.UnixSystem.getUid() method is not available. (fd.o #104588, Simon McVittie) Enhancements: • D-Bus Specification v0.32 · Deprecate hyphen/minus in reversed domain names, recommending underscores instead. Recommend prepending an underscore to domain components that start with a digit, which would not be allowed. (fd.o #103914, Simon McVittie) · Clarify how the SASL authentication handshake works (fd.o #104224, Simon McVittie) · Recommend that the message bus should remove message header fields that it does not understand. The new item "HeaderFiltering" in the message bus' Features property indicates that it promises to do so. (fd.o #100317, Simon McVittie) • Add experimental support for creating extra servers at runtime, to be used by app containers like Flatpak or Snap. This API is still subject to change and is not compiled in by default. (fd.o #101354, Simon McVittie) • Improve automated test logging (fd.o #103601, Simon McVittie) • The dbus-daemon now filters the messages that it relays, removing header fields that it does not understand. Clients must not rely on this behaviour unless they have confirmed that they are connected to a suitable message bus implementation, for example by querying its Features property. (fd.o #100317, Simon McVittie) Fixes: • When iterating the DBusConnection while blocking on a pending call, don't wait for I/O if that pending call already has a result; and make sure that whether it has a result is propagated in a thread-safe way. This prevents certain multi-threaded calling patterns from blocking until their timeout even when they should have succeeded sooner. (fd.o #102839; Manish Narang, Michael Searle) • Do not look up client-supplied strings in the system user database (NSS or equivalent) when using the recommended EXTERNAL auth mechanism. This could previously lead to a deadlock or timeout in the presence of slow or network-dependent NSS modules. (fd.o #104588, Simon McVittie) • Report the correct error if OOM is reached while trying to listen on a TCP socket (fd.o #89104, Simon McVittie) • Fix a crash and an assertion failure in the server side of the nonce-tcp: transport under error conditions (fd.o #89104, Simon McVittie) • Fix assertion failures in recovery from OOM while setting up a DBusServer (fd.o #89104, Simon McVittie) • Don't leak a file descriptor if setting up a launchd server fails (fd.o #89104, Simon McVittie) • Add a missing space to a warning message (fd.o #103729, Thomas Zajic) • Fix some memory leaks in automated tests (fd.o #103600, Simon McVittie) • Expand ${bindir} correctly when pkg-config is asked for dbus_daemondir (fd.o #104265, Benedikt Heine) • On Linux systems with systemd < 237, if ${localstatedir}/lib/dbus doesn't exist, create it before trying to create ${localstatedir}/lib/dbus/machine-id (fd.o #104577, Chris Lesiak) • Fix escaping in dbus-api-design document (fd.o #104925, Philip Withnall) Internal changes: • Harden the nonce-tcp: transport against resource leaks and use-after-free (fd.o #103597, Simon McVittie) • Make _DBUS_STRING_DEFINE_STATIC more consistent with _dbus_string_init_const() (fd.o #89104, Simon McVittie) • Add _DBUS_STRING_INIT_INVALID, analogous to NULL, and use it to simplify error unwinding code paths (fd.o #89104, Simon McVittie) • Make the behaviour of _dbus_string_init_const()/_dbus_string_free() consistent with _dbus_string_init()/_dbus_string_free(): it now clears the string to _DBUS_STRING_INIT_INVALID, whereas previously it left the string untouched (fd.o #89104, Simon McVittie) • Remove automated test data for wire protocol version 0, which has not been supported since 2005 (fd.o #103758, Simon McVittie) • Simplify method calls in automated tests (fd.o #103600, Simon McVittie) dbus 1.12.2 (2017-11-13) ======================== The “spider pumpkin” release. Enhancements: • Log a warning if a new connection cannot be accepted due to an out-of-memory condition or failure to identify its AppArmor or SELinux context (fd.o #103592, Simon McVittie) Fixes: • Make use of $(MKDIR_P) compatible with install-sh, fixing build when a GNU-compatible `mkdir -p` is not available (fd.o #103521, ilovezfs) • When building for Windows with Autotools, avoid `echo -e`, fixing cross-compilation on non-GNU platforms like macOS (fd.o #103493, Tony Theodore) • Fix crashes in the server side of the nonce-tcp: transport under various error conditions. This transport should normally only be used on Windows, where AF_UNIX sockets are unavailable; the unix: transport is the only one recommended for production use on Unix platforms. (fd.o #103597, Simon McVittie) Internal changes: • Improve test coverage on Travis-CI (Simon McVittie) dbus 1.12.0 (2017-10-30) ======================== The “gingerbread skull” release. 1.12.x is a new stable branch, recommended for use in OS distributions. Summary of major changes between 1.10.x and 1.12.0 -------------------------------------------------- Dependencies: • Expat >= 2.1.0 is required. • GLib >= 2.40 is required if full test coverage is enabled. • [Linux] libselinux >= 2.0.86 is required if SELinux support is enabled. • [Unix] dbus now requires an that defines C99 constants such as PRId64 and PRIu64, except when building for Windows. • [Autotools] Building from git (but not from tarballs) with Autotools now requires macros from the GNU Autoconf Archive. • [CMake] Builds done using CMake now require CMake 3.0.2. Build-time configuration changes: • Expat is now found using pkg-config. See the release notes for 1.11.14. • The --disable-compiler-optimisations and --enable-compiler-coverage options no longer exist. See the release notes for 1.11.4 and 1.11.8. • [Unix] The --enable-abstract-sockets and --disable-abstract-sockets options no longer exist. See the release notes for 1.11.20. • [Unix] Flag files in /var/run/console/${username} are no longer checked for at_console by default. See the release notes for 1.11.18. • [Unix, Cygwin] Init scripts are no longer provided by upstream dbus, and packagers will now need to add these downstream (most already do). See the release notes for 1.11.18. • [Unix] The process ID file no longer has a different default location on Red Hat derivatives. See the release notes for 1.11.18. • [Unix] ${runstatedir} is now independent of ${localstatedir} with recent Autotools versions. See the release notes for 1.11.16. • [Windows] The WINDRES variable is no longer used. See the release notes for 1.11.22. Deprecations: • Eavesdropping is officially deprecated in favour of BecomeMonitor. See the release notes for spec version 0.31 (in dbus 1.11.14). • [Unix] Flag files in /var/run/console/${username} are deprecated. See the release notes for 1.11.18. New APIs: • and rules in dbus-daemon configuration can now include send_broadcast="true", send_broadcast="false", max_unix_fds="N", min_unix_fds="N" (for some integer N). See the release notes for 1.11.18. • dbus_try_get_local_machine_id() is like dbus_get_local_machine_id(), but returns a DBusError. • New APIs around DBusMessageIter to simplify cleanup. See the release notes for 1.11.16. • The message bus daemon now implements the standard Introspectable, Peer and Properties interfaces. See the release notes for dbus 1.11.14 and spec version 0.31. • DTDs for introspection XML and bus configuration are installed. • dbus can be compiled to be relocatable, making it more suitable for binary bundling with other software. On Windows, this is on by default. • [Unix] A new unix:dir=… address family resembles unix:tmpdir=… but never uses Linux abstract sockets, which is advantageous for containers. On non-Linux it is equivalent to unix:tmpdir=…. See the release notes for dbus 1.11.14 and spec version 0.31. • [Unix] New option "dbus-launch --exit-with-x11". • [Unix] Session managers can create transient .service files in $XDG_RUNTIME_DIR/dbus-1/services. See the release notes for 1.11.12. • [Unix] A sysusers.d snippet can create the messagebus user on-demand. Miscellaneous behaviour changes: • [Unix] The session bus now logs to syslog if it was started by dbus-launch. • [Unix] Internal warnings are logged to syslog if configured. • [Unix] Exceeding an anti-DoS limit is logged to syslog if configured, or to stderr. Changes since 1.11.22 release candidate --------------------------------------- Standard stable-branch changes: • Disable warnings about use of deprecated functions (Simon McVittie) Fixes: • Don't distribute files generated by ./configure in the source tarball (fd.o #103420, Simon McVittie) Internal changes: • Remove some unused files from the git repository (fd.o #103420, Simon McVittie) D-Bus 1.11.22 (2017-10-23) ========================== The “fire surface” release. This is the first release-candidate for the 1.12.0 stable release. Build-time configuration changes: • When building for Windows with Autotools, setting the WINDRES variable no longer works to select a non-standard resource compiler. Use libtool's standard RC variable instead, for example "./configure RC=i686-w64-mingw32-windres" Dependencies: • Builds done using CMake now require CMake 3.0.2. Enhancements: • When building for Windows, improve quality of metadata in libdbus-1-3.dll (fd.o #103015, Ralf Habacker) Fixes: • Fix a typo "uint 16" in dbus-send(1) man page (fd.o #103075, David King) • When building for Windows, libdbus-1-3.dll always includes version information. Previously, this was missing if using CMake and any non-MSVC compiler. (fd.o #103015, Ralf Habacker) • Fix the build with MSVC, which regressed with the #102558 fix in 1.11.20. (fd.o #102558, Ralf Habacker) Internal changes: • Simplify Windows resource embedding (fd.o #103015, Simon McVittie) D-Bus 1.11.20 (2017-10-03) == The “wraith stun” release. Build-time configuration changes: • The --enable-abstract-sockets and --disable-abstract-sockets options no longer exist. Support for Linux's abstract AF_UNIX sockets is now unconditionally enabled on Linux and disabled everywhere else. (fd.o #34905, Simon McVittie) Enhancements: • Make slower tests less likely to time out, and improve diagnostics if tests do time out (fd.o #103009, Simon McVittie) • On Windows, don't compile an unused stub implementation of _dbus_set_signal_handler() (fd.o #103010, Simon McVittie) Fixes: • Be more careful to save and restore errno in POSIX async signal handlers (fd.o #103010, Simon McVittie) • On Windows, embed a manifest in dbus-update-activation-environment.exe so that the heuristics used for UAC do not assume it needs elevated privileges due to its name containing "update" (fd.o #102558, Ralf Habacker) • On Windows with Automake, embed version information in libdbus-1, as was meant to happen in all versions since 2009 (fd.o #103015, Simon McVittie) D-Bus 1.11.18 (2017-09-25) == The “vampire conquistador” release. Build-time configuration changes: • By default, dbus-daemon on Unix no longer checks for flag files /var/run/console/${username} created by the obsolete pam_console and pam_foreground PAM modules when deciding whether ${username} is currently at the console. The old default behaviour can be restored by specifying --with-console-auth-dir=/var/run/console in the recommended Autotools build system, or -DDBUS_CONSOLE_AUTH_DIR=/var/run/console in CMake. This feature is now deprecated, and will be removed in dbus 1.13 unless feedback via fd.o #101629 indicates that this would be problematic. (fd.o #101629, Simon McVittie) • LSB-style init scripts for Red Hat and Slackware, and a non-LSB init script for Cygwin, are no longer provided in the upstream dbus source. We recommend that distributors who support non-systemd service management should maintain their own init scripts or other service manager integration as part of their downstream packaging, similar to the way Debian distributes a Debian-specific LSB init script for dbus. The systemd unit continues to be maintained as part of the upstream dbus source, because it receives regular testing and maintenance. (fd.o #101706, Simon McVittie) • The process ID file created by the system bus is no longer influenced by the --with-init-scripts=redhat configure option or the presence of /etc/redhat-release at build time. If your OS's init script or other service management relies on the Red Hat-style pid file, it can be restored by specifying --with-system-pid-file=/run/messagebus.pid at configure time or using the directive in bus configuration. Note that the upstream-supplied systemd unit runs dbus-daemon with the --nopidfile option, so it does not normally write a pid file, regardless of whether the OS is Red-Hat-derived or not. (fd.o #101706, Simon McVittie) Enhancements: • and rules in dbus-daemon configuration can now include send_broadcast="true" or send_broadcast="false", which make the rule only match broadcast signals, or only match messages that are not broadcast signals, respectively. (fd.o #29853, Simon McVittie) • and rules can now be configured to apply only to messages with or without Unix file descriptors attached. This would typically be used in rules like these: but can also be used to set a nonzero upper limit on the number of file descriptors: (fd.o #101848, Simon McVittie) • On Unix platforms, the DBUS_COOKIE_SHA1 authentication mechanism now respects the HOME environment variable on the client side, and on the server side when the uid attempting to connect is the same as the uid of the server. This allows the automated tests to pass in environments where the user's "official" home directory in /etc/passwd is nonexistent, such as Debian autobuilders. (fd.o #101960, Simon McVittie) Fixes: • When parsing dbus-daemon configuration, tell Expat not to use cryptographic-quality entropy as a salt for its hash tables: we trust the configuration files, so we are not concerned about algorithmic complexity attacks via hash table collisions. This prevents dbus-daemon --system from holding up the boot process (and causing early-boot system services like systemd, logind, networkd to time out) on entropy-starved embedded systems. (fd.o #101858, Simon McVittie) • Avoid a -Werror=declaration-after-statement build failure on Solaris (fd.o #102145, Alan Coopersmith) • On Unix platform, drop DBUS_SYSTEM_LOG_INFO messages from LOG_NOTICE to LOG_INFO, matching how we use this log level in practice (fd.o #102686, Simon McVittie) D-Bus 1.11.16 (2017-07-27) == The “south facing garden” release. Build-time configuration changes: • The Autotools build system now supports varying ${runstatedir} independently of ${localstatedir}, if using an Autoconf version that has that feature; version 2.70 will eventually have this, but many Linux distributions add it to version 2.69 as a patch. A typical use is to set prefix=/usr, sysconfdir=/etc, localstatedir=/var and runstatedir=/run. (fd.o #101569, Simon McVittie) Enhancements: • New APIs DBUS_MESSAGE_ITER_INIT_CLOSED, dbus_message_iter_init_closed() and dbus_message_iter_abandon_container_if_open() simplify the single-exit-point ("goto out") style of resource cleanup. The API documentation around DBusMessageIter and containers has also been clarified. (fd.o #101568, Simon McVittie) Fixes: • Fix the implementation of re-enabling a timeout (again) so that its countdown is always restarted as intended. (fd.o #95619, Michal Koutný) • Make the dbus-daemon's Properties interface, as introduced in 1.11.14, available to all users on the system bus (fd.o #101700, Simon McVittie) • dbus_message_iter_append_basic() no longer leaks memory if it fails to append a file descriptor to a message. (fd.o #101568, Simon McVittie) • dbus_message_iter_open_container() no longer leaks memory if it runs out of memory. (fd.o #101568, Simon McVittie) • dbus_message_append_args_valist() no longer leaks memory if given an unsupported type. This situation is still considered to be a programming error which needs to be corrected by the user of libdbus. (fd.o #101568, Simon McVittie) • dbus_message_iter_append_basic() and dbus_message_iter_open_container() will no longer report that their arguments were invalid if they run out of memory at exactly the wrong time. (fd.o #101568, Simon McVittie) • Ensure that tests fail if they would otherwise have tried to connect to the real session bus (fd.o #101698, Simon McVittie) • Make build-time tests cope with finding Python 3, but not Python 2 (fd.o #101716, Simon McVittie) Internal changes relevant to dbus developers: • DBusVariant is a new mechanism to copy single values from a message into a buffer without copying the entire message (fd.o #101568, Simon McVittie) • DBUS_SYSTEM_LOG_FATAL has been replaced by DBUS_SYSTEM_LOG_ERROR. Logging an ERROR message does not make the process exit; the caller is responsible for calling abort() or exit(), whichever is more appropriate. (fd.o #101568, Simon McVittie) • Better test coverage (fd.o #101568, Simon McVittie) D-Bus 1.11.14 (2017-06-29) == The “irrational fear of bees” release. Dependencies: • Expat >= 2.1.0 is always required • libselinux >= 2.0.86 is required if SELinux support is enabled • GLib >= 2.40 is required if full test coverage is enabled Build-time configuration changes: • We now use pkg-config to find libexpat in Autotools builds. This requires Expat 2.1.0 (March 2012) or later. In particular, this should remove the need to configure with LDFLAGS=-L/usr/local/lib on OpenBSD, which can itself cause compilation failures. As with all pkg-config-based configure checks, you can use PKG_CONFIG_PATH=/whatever/lib/pkgconfig to find expat.pc in a non-standard prefix, or EXPAT_CFLAGS="-I/whatever/include" and EXPAT_LIBS="-L/whatever/lib -lexpat" to avoid needing a .pc file at all. (fd.o #69801, Simon McVittie) • Similarly, we now use pkg-config to find libselinux. Version 2.0.86 is required due to the removal of explicit refcounting for SIDs. (fd.o #100912, Laurent Bigonville) Behaviour changes: • Previously, /etc/machine-id could be copied to /var/lib/dbus/machine-id as a side-effect of a sufficiently privileged process merely reading the machine ID. It is no longer copied as a side-effect of reading. Running dbus-uuidgen --ensure, which should be done after installing dbus, continues to copy /etc/machine-id to /var/lib/dbus/machine-id if the former exists and the latter does not. (fd.o #101257, Simon McVittie) • The undocumented Verbose interface, and the GetAllMatchRules method on the undocumented Stats interface, must now be used via the object path /org/freedesktop/DBus. Previously, they existed on all object paths. (fd.o #101257, Simon McVittie) • AddMatch() with a match rule containing eavesdrop='true' will now fail unless called by either the same user as the dbus-daemon, or Unix uid 0 (root), matching the restrictions applied to the newer BecomeMonitor() method. On the session bus this has no practical effect. On the system bus this will prevent certain configurations that already did not work well in practice. (fd.o #101567, Simon McVittie) Enhancements: • D-Bus Specification version 0.31 · Don't require implementation-specific search paths to be lowest priority · Correct regex syntax for optionally-escaped bytes in addresses so it includes hyphen-minus, forward slash and underscore as intended · Describe all message bus methods in the same section · Clarify the correct object path for method calls to the message bus (/org/freedesktop/DBus, DBUS_PATH_DBUS in the reference implementation) · Document that the message bus implements Introspectable, Peer and Properties · Add new Features and Interfaces properties for message bus feature-discovery · Add unix:dir=..., which resembles unix:tmpdir=... but never uses abstract sockets · Don't require eavesdrop='true' to be accepted from connections not sufficiently privileged to use it successfully · Formally deprecate eavesdropping in favour of BecomeMonitor (fd.o #99825, #100686, #100795, #101256, #101257, #101567; Simon McVittie, Tom Gundersen) • Implement the Properties and Peer interfaces in dbus-daemon (fd.o #101257, Simon McVittie) • New function dbus_try_get_local_machine_id() is like dbus_get_local_machine_id(), but returning a DBusError. Other code that needs the machine ID will now report a recoverable error (instead of logging to stderr and aborting) if no machine ID is available. Generating a machine ID is still considered to be a required part of installing dbus correctly. (fd.o #13194, Simon McVittie) • Implement GetConnectionSELinuxSecurityContext("org.freedesktop.DBus") (fd.o #101315, Laurent Bigonville) • Avoid deprecated API calls when using SELinux (fd.o #100912, Laurent Bigonville) • Switch a test from the deprecated g_test_trap_fork() to g_test_trap_subprocess(), for Windows support and better robustness on Unix (fd.o #101362, Simon McVittie) • On systemd systems, if ${localstatedir}/lib/dbus/machine-id doesn't exist, instruct systemd-tmpfiles to make it a symbolic link to /etc/machine-id. This prevents the two files from going out of sync on stateless or live images without needing to run dbus-uuidgen, and supports older D-Bus implementations that do not necessarily read /etc/machine-id themselves. (fd.o #101570, Simon McVittie) • Implement unix:dir=..., which resembles unix:tmpdir=... but never uses abstract sockets. This is preferable when used with Linux containers. (fd.o #101567, Simon McVittie) Fixes: • Fix a reference leak when blocking on a pending call on a connection that has been disconnected (fd.o #101481, Shin-ichi MORITA) • Don't put timestamps in the Doxygen-generated documentation, or hard-code the build directory into builds with embedded tests, for reproducible builds (fd.o #100692, Simon McVittie) • Fix some integration test issues (fd.o #100686, Simon McVittie) • Fix memory leaks in the tests (fd.o #101257, Simon McVittie) • If we somehow get an autolaunch address with multiple semicolon-separated components, and they don't work, don't invalidly "pile up" errors (fd.o #101257, Simon McVittie) Documentation: • Update git URIs in HACKING document to sync up with cgit.freedesktop.org (fd.o #100715, Simon McVittie) D-Bus 1.11.12 (2017-04-07) == The “it's something humans do” release. Enhancements: • The session dbus-daemon now supports transient .service files in $XDG_RUNTIME_DIR/dbus-1/services. Unlike the other standard service directories, this directory is not monitored with inotify or similar, and the service files must be named exactly ${bus_name}.service. (fd.o #99825, Simon McVittie) • dbus can be configured with --enable-relocation when building with Autotools, or with -DDBUS_RELOCATABLE=ON when building with cmake, to make the pkg-config metadata relocatable. This is useful for non-standard prefixes, and in particular for Windows installations. However, it is not recommended for system-wide installations into /usr, because it interferes with pkg-config's ability to filter out compiler default linker directories. With Autotools, the default is --enable-relocation when building for Windows or --disable-relocation otherwise. With CMake, the default is -DDBUS_RELOCATABLE=ON. (fd.o #99721; Ralf Habacker, Simon McVittie) • Users of CMake ≥ 2.6 can now link to libdbus without providing their own FindDBus.cmake macros, whether dbus was compiled with Autotools or with CMake. See the end of README.cmake for more information. (fd.o #99721; Ralf Habacker, Simon McVittie) Fixes: • Always read service file directories in the intended order (fd.o #99825, Simon McVittie) • When tests are skipped, don't try to kill nonexistent process 0 (fd.o #99825, Simon McVittie) • Avoid valgrind false positives (fd.o #88808, Philip Withnall) • Fix a harmless read overflow and some memory leaks in a unit test (fd.o #100568, Philip Withnall) • Fix some typos in test code (fd.o #99999, Coverity #141876, #141877; Philip Withnall) • Clarify the roles of /etc/dbus-1/s*.d and /usr/share/dbus-1/s*.d in documentation (fd.o #99901, Philip Withnall) • Fix and enable compiler warnings related to -Wswitch (fd.o #98191; Thomas Zimmermann, Simon McVittie) • Fix writing off the end of a fd_set when testing with valgrind (fd.o #99839, Philip Withnall) D-Bus 1.11.10 (2017-02-16) == The “purple hair gives you telekinesis?” release. Dependencies: • AppArmor support requires at least libapparmor 2.8.95, reduced from 2.10 in previous versions. One test requires 2.10 and is skipped if building with an older version. Enhancements: • Do the Travis-CI build in Docker containers for Ubuntu LTS, Debian stable and Debian testing in addition to the older Ubuntu that is the default (fd.o #98889, Simon McVittie) • Avoid some deprecated CMake functions (fd.o #99586, Ralf Habacker) • Silence many -Wswitch-enum and -Wswitch-default warnings (fd.o #98191; Thomas Zimmermann, Simon McVittie) • Install a sysusers.d snippet so `dbus-daemon --system` can be used with an unpopulated /etc (fd.o #99162, Lennart Poettering) • Install pkg-config metadata on Unix even if building with CMake (fd.o #99752, Ralf Habacker) • Exclude auth mechanisms from REJECTED message if they are supported in the code but but configured to be disallowed (fd.o #99621, Ralf Habacker) Fixes: • Prevent symlink attacks in the nonce-tcp transport on Unix that could allow an attacker to overwrite a file named "nonce", in a directory that the user running dbus-daemon can write, with a random value known only to the user running dbus-daemon. This is unlikely to be exploitable in practice, particularly since the nonce-tcp transport is really only useful on Windows. On Unix systems we strongly recommend using only the unix: and systemd: transports, together with EXTERNAL authentication. These are the only transports and authentication mechanisms enabled by default. (fd.o #99828, Simon McVittie) • Avoid symlink attacks in the "embedded tests", which are not enabled by default and should never be enabled in production builds of dbus. (fd.o #99828, Simon McVittie) • Fix the implementation of re-enabling a timeout so that its countdown is restarted as intended, instead of continually decreasing. (fd.o #95619; Michal Koutný, Simon McVittie) • When receiving a message with file descriptors, do not start reading the beginning of the next message, so that only one such message is processed at a time. In conjunction with the fix for #95619 this means that processes sending many file descriptors, such as systemd-logind on a system that receives very rapid ssh connections, are not treated as abusive and kicked off the bus. Revert the previous workaround that special-cased uid 0. (fd.o #95263, LP#1591411; Simon McVittie) • Do not require TMPDIR, TEMP or TMP to be set when cross-compiling for Windows with CMake (fd.o #99586, Ralf Habacker) • Do not set Unix-specific variables when targeting Windows (fd.o #99586, Ralf Habacker) • Install Unix executables to ${CMAKE_INSTALL_PREFIX}/bin as intended, not ${CMAKE_INSTALL_PREFIX}/lib (fd.o #99752, Ralf Habacker) • Use relative install locations in CMake on Unix to respect DESTDIR, and use GNU-style install layout (fd.o #99721, #99752; Ralf Habacker) • Install dbus-arch-deps.h correctly when using CMake (fd.o #99586, #99721; Ralf Habacker) • Improve argument validation for `dbus-test-tool spam` (ffd.o #99693, Coverity #54759; Philip Withnall) • Don't shift by a negative integer if a hash table becomes monstrously large (fd.o #99641, Coverity #54682; Philip Withnall) • Don't leak LSM label if dbus-daemon runs out of memory when dealing with a new connection (fd.o #99612, Coverity #141058; Philip Withnall) • Remove an unnecessary NULL check (fd.o #99642, Coverity #141062; Philip Withnall) • Improve error handling in unit tests and dbus-send (fd.o #99643, #99694, #99712, #99722, #99723, #99724, #99758, #99759, #99793, Coverity #54688, #54692, #54693, #54697, #54701, #54710, #54711, #54714, #54715, #54718, #54721, #54724, #54726, #54730, #54740, #54822, #54823, #54824, #54825; Philip Withnall) • Do not print verbose messages' timestamps to stderr if the actual message has been redirected to the Windows debug port (fd.o #99749, Ralf Habacker) D-Bus 1.11.8 (2016-11-28) == The “panics in the face of breakfast foods” release. Build-time configuration: • The new --enable-debug configure option provides an easy way to enable debug symbols, disable optimization and/or enable profiling. • The --enable-compile-warnings configure option can be used to control compiler warnings. • The --disable-compiler-optimisations configure option is no longer supported. Use --enable-debug=yes or CFLAGS=-O0 instead. Enhancements: • D-Bus Specification version 0.30 · Define the jargon term "activation" more clearly · Define the jargon term "auto-starting", which is one form of activation · Document the optional SystemdService key in service files · Use versioned interface and bus names in most examples · Clarify intended behaviour of Properties.GetAll (fd.o #36190, fd.o #98671; Philip Withnall, Simon McVittie) • Fix and enable a lot of compiler warnings to improve future code quality. This might incidentally also fix some environment variable accesses on OS X. · In particular, printf-style functions in the libdbus API are now annotated with __attribute__((__format__(__printf__, *, *))) when compiling with gcc or clang. This might make printf bugs in other software visible at compile time. (fd.o #97357, fd.o #98192, fd.o #98195, fd.o #98658; Thomas Zimmermann, Simon McVittie) • When running with AppArmor mediation (for example using Ubuntu's patched Linux kernel), clients can no longer auto-start services unless they would have been able to send the auto-starting message to the service after it starts. StartServiceByName() is unaffected, and continues to be allowed by default in AppArmor's and . (fd.o #98666, Simon McVittie) Fixes: • Work around an undesired effect of the fix for CVE-2014-3637 (fd.o #80559), in which processes that frequently send fds, such as logind during a flood of new PAM sessions, can get disconnected for continuously having at least one fd "in flight" for too long; dbus-daemon interprets that as a potential denial of service attack. The workaround is to disable that check for uid 0 process such as logind, with a message in the system log. The bug remains open while we look for a more general solution. (fd.o #95263, LP#1591411; Simon McVittie) • Don't run the test test-dbus-launch-x11.sh if X11 autolaunching was disabled at compile time. That test is not expected to work in that configuration. (fd.o #98665, Simon McVittie) D-Bus 1.11.6 (2016-10-10) == The “darkly whimsical” release. Security fixes: • Do not treat ActivationFailure message received from root-owned systemd name as a format string. In principle this is a security vulnerability, but we do not believe it is exploitable in practice, because only privileged processes can own the org.freedesktop.systemd1 bus name, and systemd does not appear to send activation failures that contain "%". Please note that this probably *was* exploitable in dbus versions older than 1.6.30, 1.8.16 and 1.9.10 due to a missing check which at the time was only thought to be a denial of service vulnerability (CVE-2015-0245). If you are still running one of those versions, patch or upgrade immediately. (fd.o #98157, Simon McVittie) Enhancements: • D-Bus Specification version 0.29 · Recommend not using '/' for object paths (fd.o #37095, Philip Withnall) · Allow in elements (fd.o #86162, Philip Withnall) • Log to syslog when we exceed various anti-DoS limits, and add test coverage for them (fd.o #86442, Simon McVittie) • Improve syslog handling so that _dbus_warn() and similar warnings go to syslog, add dbus-daemon --syslog|--nosyslog|--syslog-only options, and log to syslog (instead of /dev/null) when dbus-daemon is started by dbus-launch. (fd.o #97009, Simon McVittie) • Install introspect.dtd and busconfig.dtd to ${datadir}/xml/dbus-1 (fd.o #89011, Philip Withnall) • When logging messages about service activation, mention which peer requested the activation (fd.o #68212, Philip Withnall) • On Linux, mention the LSM label (if available) whenever we print debug information about a peer (fd.o #68212, Philip Withnall) Other fixes: • Harden dbus-daemon against malicious or incorrect ActivationFailure messages by rejecting them if they do not come from a privileged process, or if systemd activation is not enabled (fd.o #98157, Simon McVittie) • Avoid undefined behaviour when setting reply serial number without going via union DBusBasicValue (fd.o #98035, Marc Mutz) • Fix CMake build for Unix platforms that do not have -lrt, such as Android, or that do need -lsocket, such as QNX (fd.o #94096, Ralf Habacker) • autogen.sh: fail cleanly if autoconf fails (Simon McVittie) D-Bus 1.11.4 (2016-08-15) == The “copper pickaxe” release. Dependencies: • Building from git (but not from tarballs) now requires macros from the GNU Autoconf Archive, for example the autoconf-archive package in Debian or Fedora derivatives. Build-time configuration: • The option to enable coverage instrumentation has changed from --enable-compiler-coverage to --enable-code-coverage. Enhancements: • D-Bus Specification version 0.28 · Clarify some details of serialization (fd.o #93382, Philip Withnall) • Increase listen() backlog of AF_UNIX sockets to the maximum possible, minimizing failed connections under heavy load (fd.o #95264, Lennart Poettering) • Add a new dbus-launch --exit-with-x11 option (fd.o #39197, Simon McVittie) • Use the same regression tests for subprocess starting on Unix and Windows (fd.o #95191, Ralf Habacker) • Print timestamps and thread IDs in verbose messages (fd.o #95191, Ralf Habacker) • On Unix, unify the various places that reopen stdin, stdout and/or stderr pointing to /dev/null (fd.o #97008, Simon McVittie) • Use AX_CODE_COVERAGE instead of our own COMPILER_COVERAGE (fd.o #88922, Thomas Zimmermann) Fixes: • On Windows, fix a memory leak in replacing the installation prefix (fd.o #95191, Ralf Habacker) • On Linux, when dbus-daemon is run with reduced susceptibility to the OOM killer (typically via systemd), do not let child processes inherit that setting (fd.o #32851; Kimmo Hämäläinen, WaLyong Cho) • On Unix, make dbus-launch and dbus-daemon --fork work as intended even if a parent process incorrectly starts them with stdin, stdout and/or stderr closed (fd.o #97008, Simon McVittie) • Output valid shell syntax in ~/.dbus/session-bus/ if the bus address contains a semicolon (fd.o #94746, Thiago Macieira) • Fix memory leaks and thread safety in subprocess starting on Windows (fd.o #95191, Ralf Habacker) • Stop test-dbus-daemon incorrectly failing on platforms that cannot discover the process ID of clients (fd.o #96653, Руслан Ижбулатов) • In tests that exercise correct handling of crashing D-Bus services, suppress Windows crash handler (fd.o #95155; Yiyang Fei, Ralf Habacker) • Explicitly check for stdint.h (Ioan-Adrian Ratiu) • In tests, add an invalid DBusAuthState to avoid undefined behaviour in some test cases (fd.o #93909, Nick Lewycky) • Add assertions to reassure a static analysis tool (fd.o #93210, Deepika Aggarwal) • Be explicit about enum comparison when loading XML (fd.o #93205, Deepika Aggarwal) • update-activation-environment: produce better diagnostics on error (fd.o #96653, Simon McVittie) • Avoid various compiler warnings with gcc 6 (fd.o #97282; Thomas Zimmermann, Simon McVittie) • On Unix when configured to use the system log, report as "dbus-daemon", not as "dbus" (fd.o #97009, Simon McVittie) • During unit tests, reduce the amount we write to the system log (fd.o #97009, Simon McVittie) D-Bus 1.11.2 (2016-03-07) == The “pneumatic drill vs. Iron Maiden” release. Fixes: • Enable "large file support" on systems where it exists: dbus-daemon is not expected to open large files, but it might need to stat files that happen to have large inode numbers (fd.o #93545, Hongxu Jia) • Eliminate padding inside DBusMessageIter on 64-bit platforms, which might result in a pedantic C compiler not copying the entire contents of a DBusMessageIter; statically assert that this is not an ABI change in practice (fd.o #94136, Simon McVittie) • Document dbus-test-tool echo --sleep-ms=N instead of incorrect --sleep=N (fd.o #94244, Dmitri Iouchtchenko) • Correctly report test failures in C tests from run-test.sh (fd.o #93379; amit tewari, Simon McVittie) • When tests are enabled, run all the marshal-validate tests, not just the even-numbered ones (fd.o #93908, Nick Lewycky) • Correct the expected error from one marshal-validate test, which was previously not run due to the above bug (fd.o #93908, Simon McVittie) • Fix compilation under CMake when embedded tests are disabled (fd.o #94094, eric.hyer) Internal changes: • Fix all -Wpointer-sign (signed/unsigned mismatch) warnings, and enable the warning (fd.o #93069; Ralf Habacker, Simon McVittie) • When building with CMake, use the same gcc/clang warnings as under Autotools, or MSVC warnings that are broadly similar (fd.o #93069, Ralf Habacker) • test/name-test: make C tests produce TAP output and run them directly, not via run-test.sh (fd.o #92899, Simon McVittie) • Under CMake when cross-compiling for Windows on Unix, run the tests under Wine even if binfmt_misc support is not available (fd.o #88966, Ralf Habacker) • The DBUS_USE_TEST_BINARY environment variable is no longer used by builds with embedded tests; DBUS_TEST_DBUS_LAUNCH replaces it (fd.o #92899, Simon McVittie) • Factor out some functions that will be needed in future for a Windows implementation of dbus-run-session (fd.o #92899, Ralf Habacker) D-Bus 1.11.0 (2015-12-02) == The “peppermint deer” release. Dependencies: • On non-Windows platforms, dbus now requires an that defines C99 constants such as PRId64 and PRIu64. Enhancements: • D-Bus Specification version 0.27 · Specify that services should not reply if NO_REPLY_EXPECTED was used (fd.o #75749, Lars Uebernickel) • Add a script to do continuous-integration builds, and metadata to run it on travis-ci.org. To use this, clone the dbus git repository on GitHub and set it up with travis-ci.org; the only special setting needed is "only build branches with a .travis.yml". (fd.o #93194, Simon McVittie) • If dbus-daemon is run with --systemd-activation, do not require org.freedesktop.systemd1.service to exist (fd.o #93194, Simon McVittie) Fixes: • Re-order dbus-daemon startup so that on SELinux systems, the thread that reads AVC notifications retains the ability to write to the audit log (fd.o #92832, Laurent Bigonville) • Print 64-bit integers on non-GNU Unix platforms (fd.o #92043, Natanael Copa) • When using the Monitoring interface, match messages' destinations (fd.o #92074, Simon McVittie) • On Linux with systemd, stop installing a reference to the obsolete dbus.target, and enable dbus.socket statically (fd.o #78412, #92402; Simon McVittie) • On Windows, when including configuration files with or , apply the same relocation as for the Exec paths in .service files (fd.o #92028, Simon McVittie) • Add support for backtraces on Windows (fd.o #92721, Ralf Habacker) • Fix many -Wpointer-sign warnings (fd.o #93069, Ralf Habacker) D-Bus 1.10.6 (2015-12-01) == The “marzipan beetles” release. Fixes: • On Unix when running tests as root, don't assert that root and the dbus-daemon user can still call UpdateActivationEnvironment; assert that those privileged users can call BecomeMonitor instead (fd.o #93036, Simon McVittie) • On Windows, fix a memory leak in the autolaunch transport (fd.o #92899, Simon McVittie) • On Windows Autotools builds, don't run tests that rely on dbus-run-session and other Unix-specifics (fd.o #92899, Simon McVittie) D-Bus 1.10.4 (2015-11-17) == The “Frostburn Canyon” release. Enhancements: • GetConnectionCredentials, GetConnectionUnixUser and GetConnectionUnixProcessID with argument "org.freedesktop.DBus" will now return details of the dbus-daemon itself. This is required to be able to call SetEnvironment on systemd. (fd.o #92857, Jan Alexander Steffens) Fixes: • Make UpdateActivationEnvironment always fail with AccessDenied on the system bus. Previously, it was possible to configure it so root could call it, but the environment variables were not actually used, because the launch helper would discard them. (fd.o #92857, Jan Alexander Steffens) • On Unix with --systemd-activation on a user bus, make UpdateActivationEnvironment pass on its arguments to systemd's SetEnvironment method, solving inconsistency between the environments used for traditional activation and systemd user-service activation. (fd.o #92857, Jan Alexander Steffens) • On Windows, don't crash if or --syslog is used (fd.o #92538, Ralf Habacker) • On Windows, fix a memory leak when setting a DBusError from a Windows error (fd.o #92721, Ralf Habacker) • On Windows, don't go into infinite recursion if we abort the process with backtraces enabled (fd.o #92721, Ralf Habacker) • Fix various failing tests, variously on Windows and cross-platform: · don't test system.conf features (users, groups) that only make sense on the system bus, which is not supported on Windows · don't call _dbus_warn() when we skip a test, since it is fatal · fix computation of expected · when running TAP tests, translate newlines to Unix format, fixing cross-compiled tests under Wine on Linux · don't stress-test refcounting under Wine, where it's really slow · stop assuming that a message looped-back to the test will be received immediately · skip some system bus tests on Windows since they make no sense there (fd.o #92538, fd.o #92721; Ralf Habacker, Simon McVittie) D-Bus 1.10.2 (2015-10-26) == The “worst pies in London” release. Fixes: • Correct error handling for activation: if there are multiple attempts to activate the same service and it fails immediately, the first attempt would get the correct reply, but the rest would time out. We now send the same error reply to each attempt. (fd.o #92200, Simon McVittie) • If BecomeMonitor is called with a syntactically invalid match rule, don't crash with an assertion failure, fixing a regression in 1.9.10. This was not exploitable as a denial of service, because the check for a privileged user is done first. (fd.o #92298, Simon McVittie) • On Linux with --enable-user-session, add the bus address to the environment of systemd services for better backwards compatibility (fd.o #92612, Jan Alexander Steffens) • On Windows, fix the logic for replacing the installation prefix in service files' Exec lines (fd.o #83539; Milan Crha, Simon McVittie) • On Windows, if installed in the conventional layout with ${prefix}/etc and ${prefix}/share, use relative paths between bus configuration files to allow the tree to be relocated (fd.o #92028, Simon McVittie) • Make more of the regression tests pass in Windows builds (fd.o #92538, Simon McVittie) D-Bus 1.10.0 (2015-08-25) == The “0x20” release. This is a new stable branch, recommended for use in OS distributions. Fixes since 1.9.20: • distribute test/tap-test.sh.in, even if the tarball was built without tests enabled (fd.o #91684, Simon McVittie) • work around a fd leak in libcap-ng < 0.7.7 (fd.o #91684, Simon McVittie) Summary of major changes since 1.8.0: • The basic setup for the well-known system and session buses is now done in read-only files in ${datadir} (normally /usr/share). See the NEWS entry for 1.9.18 for details. • AppArmor integration has been merged, with features similar to the pre-existing SELinux integration. It is mostly compatible with the patches previously shipped by Ubuntu, with one significant change: Ubuntu's GetConnectionAppArmorSecurityContext method has been superseded by GetConnectionCredentials and was not included. • The --enable-user-session configure option can be enabled by OS integrators intending to use systemd to provide a session bus per user (in effect, treating all concurrent graphical and non-graphical login sessions as one large session). • The new listenable address mode "unix:runtime=yes" listens on $XDG_RUNTIME_DIR/bus, the same AF_UNIX socket used by the systemd user session. libdbus and "dbus-launch --autolaunch" will connect to this address by default. GLib ≥ 2.45.3 and sd-bus ≥ 209 have a matching default. • All executables are now dynamically linked to libdbus-1. Previously, some executables, most notably dbus-daemon, were statically linked to a specially-compiled variant of libdbus. This results in various private functions in the _dbus namespace being exposed by the shared library. These are not API, and must not be used outside the dbus source tree. • On platforms with ELF symbol versioning, all public symbols are versioned LIBDBUS_1_3. New bus APIs: • org.freedesktop.DBus.GetConnectionCredentials returns LinuxSecurityLabel where supported • org.freedesktop.DBus.Monitoring interface (privileged) · BecomeMonitor method supersedes match rules with eavesdrop=true, which are now deprecated • org.freedesktop.DBus.Stats interface (semi-privileged) · now enabled by default · new GetAllMatchRules method • org.freedesktop.DBus.Verbose interface (not normally compiled) · toggles the effect of DBUS_VERBOSE New executables: • dbus-test-tool • dbus-update-activation-environment New optional dependencies: • The systemd: pseudo-transport requires libsystemd or libsd-daemon • Complete documentation requires Ducktype and yelp-tools • Full test coverage requires GLib 2.36 and PyGI • AppArmor integration requires libapparmor and optionally libaudit Dependencies removed: • dbus-glib D-Bus 1.9.20 (2015-08-06) == The “Remember Tomorrow” release. This is a release-candidate for D-Bus 1.10.0. OS distribution vendors should test it. Fixes: • Don't second-guess what the ABI of poll() is, allowing it to be used on Integrity RTOS and other unusual platforms (fd.o #90314; Rolland Dudemaine, Simon McVittie) • Don't duplicate audit subsystem integration if AppArmor and SELinux are both enabled (fd.o #89225, Simon McVittie) • Log audit events for AppArmor/SELinux policy violations whenever we have CAP_AUDIT_WRITE, even if not the system bus (fd.o #83856, Laurent Bigonville) D-Bus 1.9.18 (2015-07-21) == The “Pirate Elite” release. Configuration changes: • The basic setup for the well-known system and session buses is now done in read-only files in ${datadir}, moving a step closer to systems that can operate with an empty /etc directory. In increasing order of precedence: · ${datadir}/dbus-1/s*.conf now perform the basic setup such as setting the default message policies. · ${sysconfdir}/dbus-1/s*.conf are now optional. By default dbus still installs a trivial version of each, for documentation purposes; putting configuration directives in these files is deprecated. · ${datadir}/dbus-1/s*.d/ are now available for third-party software to install "drop-in" configuration snippets (any packages using those directories should explicitly depend on at least this version of dbus). · ${sysconfdir}/dbus-1/s*.d/ are also still available for sysadmins or third-party software to install "drop-in" configuration snippets · ${sysconfdir}/dbus-1/s*-local.conf are still available for sysadmins' overrides ${datadir} is normally /usr/share, ${sysconfdir} is normally /etc, and "s*" refers to either system or session as appropriate. (fd.o #89280, Dimitri John Ledkov) Fixes: • Fix a memory leak when GetConnectionCredentials() succeeds (fd.o #91008, Jacek Bukarewicz) • Ensure that dbus-monitor does not reply to messages intended for others, resulting in its own disconnection (fd.o #90952, Simon McVittie) D-Bus 1.9.16 (2015-05-14) == The “titanium barns” release. Dependencies: • Automake 1.13 is now required when compiling from git or modifying the build system. Security hardening: • On Unix platforms, change the default configuration for the session bus to only allow EXTERNAL authentication (secure kernel-mediated credentials-passing), as was already done for the system bus. This avoids falling back to DBUS_COOKIE_SHA1, which relies on strongly unpredictable pseudo-random numbers. If you are using D-Bus over the (unencrypted!) tcp: or nonce-tcp: transport, in conjunction with DBUS_COOKIE_SHA1 and a shared home directory using NFS or similar, you will need to reconfigure the session bus to accept DBUS_COOKIE_SHA1 by commenting out the element. This configuration is not recommended. (fd.o #90414, Simon McVittie) • When asked for random numbers for DBUS_COOKIE_SHA1, the nonce-tcp: transport, UUIDs or any other reason, fail if we cannot obtain entropy (from /dev/urandom or CryptGenRandom()) or an out-of-memory condition occurs, instead of silently falling back to low-entropy pseudorandom numbers from rand(). (fd.o #90414; Simon McVittie, Ralf Habacker) Enhancements: • Add dbus_message_iter_get_element_count() (fd.o #30350; Christian Dywan, Simon McVittie) • Introduce new internal DBusSocket and DBusPollable types so we can stop treating the Windows SOCKET type as if it was int. DBusSocket is specifically a socket, cross-platform. DBusPollable is whatever _dbus_poll() can act on, i.e. a fd on Unix or a SOCKET on Windows. (fd.o #89444; Ralf Habacker, Simon McVittie) • All regression tests now output TAP (fd.o #89846, Simon McVittie) • Internal APIs consistently use signed values for timestamps (fd.o #18494, Peter McCurdy) • Improve diagnostics when UpdateActivationEnvironment calls are rejected (fd.o #88812, Simon McVittie) • Clean up a lot of compiler warnings (fd.o #17289, fd.o #89284; Ralf Habacker, Simon McVittie) Fixes: • Add locking to DBusCounter's reference count and notify function (fd.o #89297, Adrian Szyndela) • Ensure that DBusTransport's reference count is protected by the corresponding DBusConnection's lock (fd.o #90312, Adrian Szyndela) • Correctly release DBusServer mutex before early-return if we run out of memory while copying authentication mechanisms (fd.o #90021, Ralf Habacker) • Make dbus-test-tool and dbus-update-activation-environment portable to Windows (fd.o #90089, Ralf Habacker) • Correctly initialize all fields of DBusTypeReader (fd.o #90021; Ralf Habacker, Simon McVittie) • Fix some missing \n in verbose (debug log) messages (fd.o #90004, Ralf Habacker) • Clean up some memory and fd leaks in test code and tools (fd.o #90021, Ralf Habacker) • Fix a NULL dereference if the dbus-daemon cannot read a configuration directory for a reason that is not ENOENT (fd.o #90021, Ralf Habacker) • CMake generates a versioned shared library even if the revision is 0, as it usually is on the development branch. (fd.o #89450, Ralf Habacker) D-Bus 1.9.14 (2015-03-02) == The “don't stand in the poison cloud” release. Dependencies: • dbus-daemon and dbus-daemon-launch-helper now require libdbus. They were previously linked to a static version of libdbus. • The tests no longer require dbus-glib in order to exercise the libdbus shared library; they are always linked to libdbus now. Build-time configuration: • The new --enable-user-session option, off by default, can be enabled by OS integrators intending to use systemd to provide a session bus per user (in effect, treating all concurrent graphical and non-graphical login sessions as one large session) Enhancements: • All executables are now linked dynamically to libdbus. (fd.o #83115; Bertrand SIMONNET, Simon McVittie, Ralf Habacker) • On platforms that support them (GNU libc and possibly others), libdbus now has versioned symbols for its public API. All public symbols (visible in the header files) are currently versioned as LIBDBUS_1_3; private symbols starting with _dbus or dbus_internal have a version that changes with each release, and must not be used by applications. (also fd.o #83115) • New listenable address mode "unix:runtime=yes" which listens on a real filesystem (non-abstract) socket $XDG_RUNTIME_DIR/bus (fd.o #61303; Colin Walters, Alexander Larsson, Simon McVittie) • Add optional systemd units for a per-user bus listening on $XDG_RUNTIME_DIR/bus (fd.o #61301; Simon McVittie, Colin Walters) • On Unix platforms, both libdbus and "dbus-launch --autolaunch" default to connecting to $XDG_RUNTIME_DIR/bus if it is a socket (also fd.o #61301) • New dbus-update-activation-environment tool uploads environment variables to "dbus-daemon --session" and optionally "systemd --user", primarily as a way to keep the per-user bus compatible with distributions' existing X11 login scripts (also fd.o #61301) • elements in dbus-daemon configuration are now silently ignored if the directory does not exist. (fd.o #89280, Dimitri John Ledkov) • Add microsecond-resolution timestamps to the default output of dbus-monitor and dbus-send (fd.o #88896; Ralf Habacker, Simon McVittie) Fixes: • Fix a race condition in the 'monitor' test introduced in 1.9.10 (fd.o #89222, Simon McVittie) D-Bus 1.9.12 (2015-02-19) == The “monster lasagna” release. Dependencies: • Ducktype and yelp-tools are now required to build complete documentation (they are optional for normal builds). Enhancements: • D-Bus Specification version 0.26 · GetConnectionCredentials can return LinuxSecurityLabel or WindowsSID · document the BecomeMonitor method • On Linux, add LinuxSecurityLabel to GetConnectionCredentials (fd.o #89041; Tyler Hicks, Simon McVittie) • On Linux, add support for AppArmor mediation of message sending and receiving and name ownership (paralleling existing SELinux mediation support), and eavesdropping (a new check, currently AppArmor-specific) (fd.o #75113; John Johansen, Tyler Hicks, Simon McVittie) • In dbus-send and dbus-monitor, pretty-print \0-terminated bytestrings that have printable ASCII contents; we previously only did this for unterminated bytestrings (fd.o #89109, Simon McVittie) • Add a guide to designing good D-Bus APIs (fd.o #88994, Philip Withnall) • On Windows, add WindowsSID to GetConnectionCredentials (fd.o #54445, Ralf Habacker) • Improve clarity of dbus-monitor --profile output and add more columns (fd.o #89165, Ralf Habacker) • Add a man page for dbus-test-tool, and build it under CMake as well as Autotools (fd.o#89086, Simon McVittie) • If dbus-daemon was compiled with --enable-verbose, add a D-Bus API to control it at runtime, overriding the DBUS_VERBOSE environment variable (fd.o #88896, Ralf Habacker) Fixes: • Reduce the number of file descriptors used in the fd-passing test, avoiding failure under the default Linux fd limit, and automatically skip it if the rlimit is too small (fd.o #88998, Simon McVittie) D-Bus 1.9.10 (2015-02-09) == The “sad cyborgs” release. Security fixes merged from 1.8.16: • Do not allow non-uid-0 processes to send forged ActivationFailure messages. On Linux systems with systemd activation, this would allow a local denial of service: unprivileged processes could flood the bus with these forged messages, winning the race with the actual service activation and causing an error reply to be sent back when service auto-activation was requested. This does not prevent the real service from being started, so the attack only works while the real service is not running. (CVE-2015-0245, fd.o #88811; Simon McVittie) Enhancements: • The new Monitoring interface in the dbus-daemon lets dbus-monitor and similar tools receive messages without altering the security properties of the system bus, by calling the new BecomeMonitor method on a private connection. This bypasses the normal and rules entirely, so to preserve normal message-privacy assumptions, only root is allowed to do this on the system bus. Restricted environments, such as Linux with LSMs, should lock down access to the Monitoring interface. (fd.o #46787, Simon McVittie) • dbus-monitor uses BecomeMonitor to capture more traffic, if the dbus-daemon supports it and access permissions allow it. It still supports the previous approach ("eavesdropping" match rules) for compatibility with older bus daemons. (fd.o #46787, Simon) • dbus-monitor can now log the message stream as binary data for later analysis, with either no extra framing beyond the normal D-Bus headers, or libpcap-compatible framing treating each D-Bus message as a captured packet. (fd.o #46787, Simon) Other fixes: • Fix some CMake build regressions (fd.o #88964, Ralf Habacker) • On Unix, forcibly terminate regression tests after 60 seconds to prevent them from blocking continuous integration frameworks (fd.o #46787, Simon) D-Bus 1.9.8 (2015-02-03) == The “all the types of precipitation” release. Dependencies: • full test coverage now requires GLib 2.36 • full test coverage now requires PyGI (PyGObject 3, "import gi.repository.GObject") instead of the obsolete PyGObject 2 ("import gobject") Enhancements: • add GLib-style "installed tests" (fd.o #88810, Simon McVittie) • better regression test coverage, including systemd activation (fd.o #57952, #88810; Simon McVittie) Fixes: • fatal errors correctly make the dbus-daemon exit even if is turned off (fd.o #88808, Simon McVittie) • TCP sockets on Windows no longer fail to listen approximately 1 time in 256, caused by a logic error that should have always made it fail but was mitigated by incorrect endianness for the port number (fd.o #87999, Ralf Habacker) • fix some Windows build failures (fd.o #88009, #88010; Ralf Habacker) • on Windows, allow up to 8K connections to the dbus-daemon instead of the previous 64, completing a previous fix which only worked under Autotools (fd.o #71297, Ralf Habacker) • on Windows, if the IP family is unspecified only use IPv4, to mitigate IPv6 not working correctly (fd.o #87999, Ralf Habacker) • fix some unlikely memory leaks on OOM (fd.o #88087, Simon McVittie) • lcov code coverage analysis works again (fd.o #88808, Simon McVittie) • fix an unused function error with --disable-embedded-tests (fd.o #87837, Thiago Macieira) D-Bus 1.9.6 (2015-01-05) == The “I do have a bread knife” release. Security hardening: • Do not allow calls to UpdateActivationEnvironment from uids other than the uid of the dbus-daemon. If a system service installs unsafe security policy rules that allow arbitrary method calls (such as CVE-2014-8148) then this prevents memory consumption and possible privilege escalation via UpdateActivationEnvironment. We believe that in practice, privilege escalation here is avoided by dbus-daemon-launch-helper sanitizing its environment; but it seems better to be safe. • Do not allow calls to UpdateActivationEnvironment or the Stats interface on object paths other than /org/freedesktop/DBus. Some system services install unsafe security policy rules that allow arbitrary method calls to any destination, method and interface with a specified object path; while less bad than allowing arbitrary method calls, these security policies are still harmful, since dbus-daemon normally offers the same API on all object paths and other system services might behave similarly. Other fixes: • Add missing initialization so GetExtendedTcpTable doesn't crash on Windows Vista SP0 (fd.o #77008, Илья А. Ткаченко) D-Bus 1.9.4 (2014-11-24) == The “extra-sturdy caramel” release. Fixes: • Partially revert the CVE-2014-3639 patch by increasing the default authentication timeout on the system bus from 5 seconds back to 30 seconds, since this has been reported to cause boot regressions for some users, mostly with parallel boot (systemd) on slower hardware. On fast systems where local users are considered particularly hostile, administrators can return to the 5 second timeout (or any other value in milliseconds) by saving this as /etc/dbus-1/system-local.conf: 5000 (fd.o #86431, Simon McVittie) • Add a message in syslog/the Journal when the auth_timeout is exceeded (fd.o #86431, Simon McVittie) • Send back an AccessDenied error if the addressed recipient is not allowed to receive a message (and in builds with assertions enabled, don't assert under the same conditions). (fd.o #86194, Jacek Bukarewicz) D-Bus 1.9.2 (2014-11-10) == The “structurally unsound flapjack” release. Security fixes: • Increase dbus-daemon's RLIMIT_NOFILE rlimit to 65536 so that CVE-2014-3636 part A cannot exhaust the system bus' file descriptors, completing the incomplete fix in 1.8.8. (CVE-2014-7824, fd.o #85105; Simon McVittie, Alban Crequy) Enhancements: • D-Bus Specification version 0.25 · new value 'const' for EmitsChangedSignal annotation (fd.o #72958, Lennart Poettering) · new ALLOW_INTERACTIVE_AUTHORIZATION flag, for PolicyKit and similar (fd.o #83449; Lennart Poettering, Simon McVittie) · annotate table of types with reserved/basic/container, and for basic types, fixed/string-like · clarify arbitrary limits by quoting them in mebibytes • New API: add accessors for the ALLOW_INTERACTIVE_AUTHORIZATION flag (fd.o #83449, Simon McVittie) • Add dbus-test-tool, a D-Bus swiss army knife with multiple subcommands, useful for debugging and performance testing: · dbus-test-tool spam: send repeated messages · dbus-test-tool echo: send an empty reply for all method calls · dbus-test-tool black-hole: do not reply to method calls (fd.o #34140; Alban Crequy, Simon McVittie, Will Thompson) • Add support for process ID in credentials-passing on NetBSD (fd.o #69702, Patrick Welche) • Add an example script to find potentially undesired match rules (fd.o #84598, Alban Crequy) • Document the central assumption that makes our use of credentials-passing secure (fd.o #83499, Simon McVittie) • Replace the dbus-glib section of the tutorial with a GDBus recommendation, and add some links to GDBus and QtDBus documentation (fd.o #25140, Simon McVittie) Fixes: • Use a less confusing NoReply message when disconnected with a reply pending (fd.o #76112, Simon McVittie) • Make the .pc file relocatable by letting pkg-config do all variable expansion itself (fd.o #75858, Руслан Ижбулатов) • Fix a build failure on platforms with kqueue, which regressed in 1.9.0 (fd.o #85563, Patrick Welche) • Consistently save errno after socket calls (fd.o #83625, Simon McVittie) • In dbus-spawn, when the grandchild process exits due to a failed exec(), do not lose the exec() errno (fd.o #24821, Simon McVittie) • Do not fail the tests if a parent process has leaked non-close-on-exec file descriptors to us (fd.o #73689, fd.o #83899; Simon McVittie) • Do not fail the tests on Unix platforms with incomplete credentials-passing support, but do fail if we can't pass credentials on a platform where it is known to work: Linux, FreeBSD, OpenBSD, NetBSD (fd.o #69702, Simon McVittie) • Detect accept4, dirfd, inotify_init1, pipe2, and Unix fd passing when building with cmake, and expand test coverage there (fd.o #73689; Ralf Habacker, Simon McVittie) D-Bus 1.9.0 (2014-10-01) == The “tiered cheeses” release. Requirements: • Support for the systemd: (LISTEN_FDS) pseudo-transport on Linux now requires either the libsystemd or libsd-daemon shared library, dropping the embedded convenience copy of sd-daemon (fd.o #71818, Simon) Build-time configuration changes: • The Stats interface is now enabled by default, and locked-down to root-only on the system bus. Configure with --disable-stats to disable it altogether on memory- or disk-constrained systems, or see ${docdir}/examples/ to open it up to non-root users on the system bus or restrict access on the session bus. (fd.o #80759; Simon McVittie, Alban Crequy) • The CMake build system now builds the same shared library name as Autotools on at least Linux and Windows: - on Linux (and perhaps other Unix platforms), it previously built libdbus-1.so, but now builds libdbus-1.so.3.* with development symlink libdbus-1.so and SONAME/symlink libdbus-1.so.3 - on Windows, it previously built either libdbus-1.dll (release) or libdbus-1d.dll (debug), but now builds libdbus-1-3.dll, copied to libdbus-1.dll for compatibility with older applications. (fd.o #74117, Ralf Habacker) Enhancements: • D-Bus Specification version 0.24 · document how to quote match rules (fd.o #24307, Simon McVittie) · explicitly say that most message types never expect a reply regardles of whether they have NO_REPLY_EXPECTED (fd.o #75749, Simon McVittie) • on Unix platforms, disable Nagle's algorithm on TCP connections to improve initial latency (fd.o #75544, Matt Hoosier) • use backtrace() if it is in -lexecinfo instead of libc, as on NetBSD (fd.o #69702, Patrick Welche) • in dbus-monitor, print more information about file descriptors (fd.o #80603, Alban Crequy) • do not install system bus configuration if built for Windows (fd.o #83583; Ralf Habacker, Simon McVittie) • Add GetAllMatchRules to the Stats interface (fd.o #24307, Alban Crequy) • Add a regression test for file descriptor passing (fd.o #83622, Simon McVittie) Fixes: • fix an incorrect error message if a Unix socket path is too long (fd.o #73887, Antoine Jacoutot) • in an MSYS/Cygwin environment, pass Unix-style filenames to xmlto, fixing documentation generation (fd.o #75860, Руслан Ижбулатов) • in Unix with X11, avoid giving dbus-launch a misleading argv[0] in ps(1) (fd.o #69716, Chengwei Yang) • avoid calling poll() with timeout < -1, which is considered invalid on FreeBSD and NetBSD (fd.o #78480, Jaap Boender) • be portable to BSD-derived platforms where O_CLOEXEC is unavailable in libc (like Mac OS X 10.6), or available in libc but unsupported by the kernel (fd.o #77032; rmvsxop, OBATA Akio, Patrick Welche) • Fix include path for test/internal/*.c with cmake (Ralf Habacker) • Documentation improvements (fd.o #80795, #84313; Thomas Haller, Sebastian Rasmussen) • in dbus-monitor, do not leak file descriptors that we have monitored (fd.o #80603, Alban Crequy) • Set the close-on-exec flag for the inotify file descriptor, even if built with CMake or older libc (fd.o #73689, Simon McVittie) • Remove some LGPL code from the Windows dbus-daemon (fd.o #57272, Ralf Habacker) D-Bus 1.8.8 (2014-09-16) == The "smashy smashy egg man" release. Security fixes: • Do not accept an extra fd in the padding of a cmsg message, which could lead to a 4-byte heap buffer overrun. (CVE-2014-3635, fd.o #83622; Simon McVittie) • Reduce default for maximum Unix file descriptors passed per message from 1024 to 16, preventing a uid with the default maximum number of connections from exhausting the system bus' file descriptors under Linux's default rlimit. Distributors or system administrators with a more restrictive fd limit may wish to reduce these limits further. Additionally, on Linux this prevents a second denial of service in which the dbus-daemon can be made to exceed the maximum number of fds per sendmsg() and disconnect the process that would have received them. (CVE-2014-3636, fd.o #82820; Alban Crequy) • Disconnect connections that still have a fd pending unmarshalling after a new configurable limit, pending_fd_timeout (defaulting to 150 seconds), removing the possibility of creating an abusive connection that cannot be disconnected by setting up a circular reference to a connection's file descriptor. (CVE-2014-3637, fd.o #80559; Alban Crequy) • Reduce default for maximum pending replies per connection from 8192 to 128, mitigating an algorithmic complexity denial-of-service attack (CVE-2014-3638, fd.o #81053; Alban Crequy) • Reduce default for authentication timeout on the system bus from 30 seconds to 5 seconds, avoiding denial of service by using up all unauthenticated connection slots; and when all unauthenticated connection slots are used up, make new connection attempts block instead of disconnecting them. (CVE-2014-3639, fd.o #80919; Alban Crequy) Other fixes: • Check for libsystemd from systemd >= 209, falling back to the older separate libraries if not found (Umut Tezduyar Lindskog, Simon McVittie) • On Linux, use prctl() to disable core dumps from a test executable that deliberately raises SIGSEGV to test dbus-daemon's handling of that condition (fd.o #83772, Simon McVittie) • Fix compilation with --enable-stats (fd.o #81043, Gentoo #507232; Alban Crequy) • Improve documentation for running tests on Windows (fd.o #41252, Ralf Habacker) D-Bus 1.8.6 (2014-06-02) == Security fixes: • On Linux ≥ 2.6.37-rc4, if sendmsg() fails with ETOOMANYREFS, silently drop the message. This prevents an attack in which a malicious client can make dbus-daemon disconnect a system service, which is a local denial of service. (fd.o #80163, CVE-2014-3532; Alban Crequy) • Track remaining Unix file descriptors correctly when more than one message in quick succession contains fds. This prevents another attack in which a malicious client can make dbus-daemon disconnect a system service. (fd.o #79694, fd.o #80469, CVE-2014-3533; Alejandro Martínez Suárez, Simon McVittie, Alban Crequy) Other fixes: • When dbus-launch --exit-with-session starts a dbus-daemon but then cannot attach to a session, kill the dbus-daemon as intended (fd.o #74698, Роман Донченко) D-Bus 1.8.4 (2014-06-10) == Security fix: • Alban Crequy at Collabora Ltd. discovered and fixed a denial-of-service flaw in dbus-daemon, part of the reference implementation of D-Bus. Additionally, in highly unusual environments the same flaw could lead to a side channel between processes that should not be able to communicate. (CVE-2014-3477, fd.o #78979) D-Bus 1.8.2 (2014-04-30) == The “nobody wants red” release. Enhancements: • in the CMake build system, add some hints for Linux users cross-compiling Windows D-Bus binaries to be able to run tests under Wine (fd.o #41252, Ralf Habacker) • add Documentation key to dbus.service (fd.o #77447, Cameron Norman) Fixes: • in "dbus-uuidgen --ensure", try to copy systemd's /etc/machine-id to /var/lib/dbus/machine-id instead of generating an entirely new ID (fd.o #77941, Simon McVittie) • if dbus-launch receives an X error very quickly, do not kill unrelated processes (fd.o #74698, Роман Донченко) • on Windows, allow up to 8K connections to the dbus-daemon, instead of the previous 64 (fd.o #71297; Cristian Onet, Ralf Habacker) • cope with \r\n newlines in regression tests, since on Windows, dbus-daemon.exe uses text mode (fd.o #75863, Руслан Ижбулатов) D-Bus 1.8.0 (2014-01-20) == The “Wolverine distrusts my printer” release. This starts a new stable branch. The 1.6.x branch is now considered to be outdated, and will only receive fixes for serious bugs such as security flaws. The 1.4.x and 1.2.x branches no longer have upstream support and are unlikely to get any more releases, but if distributors still need to support them, please share security patches via upstream. Summary of changes since 1.6.x: • libdbus always behaves as if dbus_threads_init_default() had been called (thread-safety by default) • new dbus-run-session tool, replacing certain misuses of dbus-launch • dbus-monitor can talk to outdated versions of dbus-daemon again • new org.freedesktop.DBus.GetConnectionCredentials method • GetConnectionUnixProcessID also works correctly on Windows, returning the Windows process ID • GetConnectionWindowsSID returns the correct SID on Windows • expat is required, libxml2 can no longer be used as a substitute • the userDB cache is required, and cannot be disabled • a 64-bit integer type (either int, long, long long or _int64) is required • better systemd-journald integration on Linux • fixed long-standing fd and array leaks when failing to parse a message • fixed referenced-but-never-freed parent nodes (effectively memory leaks) when using certain object-path allocation patterns, notably in Avahi • better defaults for Windows support • better CMake support • better portability to mingw32, FreeBSD, NetBSD, QNX and Hurd • the source language for the man pages is now Docbook XML Enhancements since 1.7.10: • Enhance the CMake build system to check for GLib and compile/run a subset of the regression tests (fd.o #41252, #73495; Ralf Habacker) Fixes since 1.7.10: • don't rely on va_copy(), use DBUS_VA_COPY() wrapper (fd.o #72840, Ralf Habacker) • fix compilation of systemd journal support on older systemd versions where sd-journal.h doesn't include syslog.h (fd.o #73455, Ralf Habacker) • fix compilation on older MSVC versions by including stdlib.h (fd.o #73455, Ralf Habacker) • Allow to appear in an included configuration file (fd.o #73475, Matt Hoosier) Test behaviour changes since 1.7.10: • If the tests crash with an assertion failure, they no longer default to blocking for a debugger to be attached. Set DBUS_BLOCK_ON_ABORT in the environment if you want the old behaviour. • To improve debuggability, the dbus-daemon and dbus-daemon-eavesdrop tests can be run with an external dbus-daemon by setting DBUS_TEST_DAEMON_ADDRESS in the environment. Test-cases that require an unusually-configured dbus-daemon are skipped. D-Bus 1.7.10 (2014-01-06) == The “weighted companion cube” release. This is a release candidate for D-Bus 1.8. D-Bus Specification 0.23: • don't require messages with no INTERFACE to be dispatched (fd.o #68597, Simon McVittie) • document "tcp:bind=..." and "nonce-tcp:bind=..." (fd.o #72301, Chengwei Yang) • define "listenable" and "connectable" addresses, and discuss the difference (fd.o #61303, Simon McVittie) Enhancements: • support printing Unix file descriptors in dbus-send, dbus-monitor (fd.o #70592, Robert Ancell) • don't install systemd units if --disable-systemd is given (fd.o #71818, Chengwei Yang) Fixes: • don't leak memory on out-of-memory while listing activatable or active services (fd.o #71526, Radoslaw Pajak) • fix undefined behaviour in a regression test (fd.o #69924, DreamNik) • escape Unix socket addresses correctly (fd.o #46013, Chengwei Yang) • on SELinux systems, don't assume that SECCLASS_DBUS, DBUS__ACQUIRE_SVC and DBUS__SEND_MSG are numerically equal to their values in the reference policy (fd.o #88719, osmond sun) • define PROCESS_QUERY_LIMITED_INFORMATION if missing from MinGW < 4 headers (fd.o #71366, Matt Fischer) • define WIN32_LEAN_AND_MEAN to avoid conflicts between winsock.h and winsock2.h (fd.o #71405, Matt Fischer) • do not return failure from _dbus_read_nonce() with no error set, preventing a potential crash (fd.o #72298, Chengwei Yang) • on BSD systems, avoid some O(1)-per-process memory and fd leaks in kqueue, preventing test failures (fd.o #69332, fd.o #72213; Chengwei Yang) • fix warning spam on Hurd by not trying to set SO_REUSEADDR on Unix sockets, which doesn't do anything anyway on at least Linux and FreeBSD (fd.o #69492, Simon McVittie) • fix use of TCP sockets on FreeBSD and Hurd by tolerating EINVAL from sendmsg() with SCM_CREDS (retrying with plain send()), and looking for credentials more correctly (fd.o #69492, Simon McVittie) • ensure that tests run with a temporary XDG_RUNTIME_DIR to avoid getting mixed up in XDG/systemd "user sessions" (fd.o #61301, Simon McVittie) • refresh cached policy rules for existing connections when bus configuration changes (fd.o #39463, Chengwei Yang) D-Bus 1.7.8 (2013-11-01) == The “extreme hills” release. Dependencies: • If systemd support is enabled, libsystemd-journal is now required. Enhancements: • When activating a non-systemd service under systemd, annotate its stdout/stderr with its bus name in the Journal. Known limitation: because the socket is opened before forking, the process will still be logged as if it had dbus-daemon's process ID and user ID. (fd.o #68559, Chengwei Yang) • Document more configuration elements in dbus-daemon(1) (fd.o #69125, Chengwei Yang) Fixes: • Don't leak string arrays or fds if dbus_message_iter_get_args_valist() unpacks them and then encounters an error (fd.o #21259, Chengwei Yang) • If compiled with libaudit, retain CAP_AUDIT_WRITE so we can write disallowed method calls to the audit log, fixing a regression in 1.7.6 (fd.o #49062, Colin Walters) • path_namespace='/' in match rules incorrectly matched nothing; it now matches everything. (fd.o #70799, Simon McVittie) D-Bus 1.7.6 (2013-10-09) == The “CSI Shrewsbury” release. Build-time configuration changes: • Directory change notification via dnotify on Linux is no longer supported; it hadn't compiled successfully since 2010 in any case. If you don't have inotify (Linux) or kqueue (*BSD), you will need to send SIGHUP to the dbus-daemon when its configuration changes. (fd.o #33001, Chengwei Yang) • Compiling with --disable-userdb-cache is no longer supported; it didn't work since at least 2008, and would lead to an extremely slow dbus-daemon even it worked. (fd.o #15589, #17133, #66947; Chengwei Yang) • The DBUS_DISABLE_ASSERTS CMake option didn't actually disable most assertions. It has been renamed to DBUS_DISABLE_ASSERT to be consistent with the Autotools build system. (fd.o #66142, Chengwei Yang) • --with-valgrind=auto enables Valgrind instrumentation if and only if valgrind headers are available. The default is still --with-valgrind=no. (fd.o #56925, Simon McVittie) Dependencies: • Platforms with no 64-bit integer type are no longer supported. (fd.o #65429, Simon McVittie) • GNU make is now (documented to be) required. (fd.o #48277, Simon McVittie) • Full test coverage no longer requires dbus-glib, although the tests do not exercise the shared library (only a static copy) if dbus-glib is missing. (fd.o #68852, Simon McVittie) Enhancements: • D-Bus Specification 0.22 · Document GetAdtAuditSessionData() and GetConnectionSELinuxSecurityContext() (fd.o #54445, Simon) · Fix example .service file (fd.o #66481, Chengwei Yang) · Don't claim D-Bus is "low-latency" (lower than what?), just give factual statements about it supporting async use (fd.o #65141, Justin Lee) · Document the contents of .service files, and the fact that system services' filenames are constrained (fd.o #66608; Simon McVittie, Chengwei Yang) • Be thread-safe by default on all platforms, even if dbus_threads_init_default() has not been called. For compatibility with older libdbus, library users should continue to call dbus_threads_init_default(): it is harmless to do so. (fd.o #54972, Simon McVittie) • Add GetConnectionCredentials() method (fd.o #54445, Simon) • New API: dbus_setenv(), a simple wrapper around setenv(). Note that this is not thread-safe. (fd.o #39196, Simon) • Add dbus-send --peer=ADDRESS (connect to a given peer-to-peer connection, like --address=ADDRESS in previous versions) and dbus-send --bus=ADDRESS (connect to a given bus, like dbus-monitor --address=ADDRESS). dbus-send --address still exists for backwards compatibility, but is no longer documented. (fd.o #48816, Andrey Mazo) • Windows-specific: · "dbus-daemon --nofork" is allowed on Windows again. (fd.o #68852, Simon McVittie) Fixes: • Avoid an infinite busy-loop if a signal interrupts waitpid() (fd.o #68945, Simon McVittie) • Clean up memory for parent nodes when objects are unexported (fd.o #60176, Thomas Fitzsimmons) • Make dbus_connection_set_route_peer_messages(x, FALSE) behave as documented. Previously, it assumed its second parameter was TRUE. (fd.o #69165, Chengwei Yang) • Escape addresses containing non-ASCII characters correctly (fd.o #53499, Chengwei Yang) • Document search order correctly (fd.o #66994, Chengwei Yang) • Don't crash on "dbus-send --session / x.y.z" which regressed in 1.7.4. (fd.o #65923, Chengwei Yang) • If malloc() returns NULL in _dbus_string_init() or similar, don't free an invalid pointer if the string is later freed (fd.o #65959, Chengwei Yang) • If malloc() returns NULL in dbus_set_error(), don't va_end() a va_list that was never va_start()ed (fd.o #66300, Chengwei Yang) • fix build failure with --enable-stats (fd.o #66004, Chengwei Yang) • fix a regression test on platforms with strict alignment (fd.o #67279, Colin Walters) • Avoid calling function parameters "interface" since certain Windows headers have a namespace-polluting macro of that name (fd.o #66493, Ivan Romanov) • Assorted Doxygen fixes (fd.o #65755, Chengwei Yang) • Various thread-safety improvements to static variables (fd.o #68610, Simon McVittie) • Make "make -j check" work (fd.o #68852, Simon McVittie) • Fix a NULL pointer dereference on an unlikely error path (fd.o #69327, Sviatoslav Chagaev) • Improve valgrind memory pool tracking (fd.o #69326, Sviatoslav Chagaev) • Don't over-allocate memory in dbus-monitor (fd.o #69329, Sviatoslav Chagaev) • dbus-monitor can monitor dbus-daemon < 1.5.6 again (fd.o #66107, Chengwei Yang) • Unix-specific: · If accept4() fails with EINVAL, as it can on older Linux kernels with newer glibc, try accept() instead of going into a busy-loop. (fd.o #69026, Chengwei Yang) · If socket() or socketpair() fails with EINVAL or EPROTOTYPE, for instance on Hurd or older Linux with a new glibc, try without SOCK_CLOEXEC. (fd.o #69073; Pino Toscano, Chengwei Yang) · Fix a file descriptor leak on an error code path. (fd.o #69182, Sviatoslav Chagaev) · dbus-run-session: clear some unwanted environment variables (fd.o #39196, Simon) · dbus-run-session: compile on FreeBSD (fd.o #66197, Chengwei Yang) · Don't fail the autolaunch test if there is no DISPLAY (fd.o #40352, Simon) · Use dbus-launch from the builddir for testing, not the installed copy (fd.o #37849, Chengwei Yang) · Fix compilation if writev() is unavailable (fd.o #69409, Vasiliy Balyasnyy) · Remove broken support for LOCAL_CREDS credentials passing, and document where each credential-passing scheme is used (fd.o #60340, Simon McVittie) · Make autogen.sh work on *BSD by not assuming GNU coreutils functionality (fd.o #35881, #69787; Chengwei Yang) · dbus-monitor: be portable to NetBSD (fd.o #69842, Chengwei Yang) · dbus-launch: stop using non-portable asprintf (fd.o #37849, Simon) · Improve error reporting from the setuid activation helper (fd.o #66728, Chengwei Yang) • Windows-specific: · Remove unavailable command-line options from 'dbus-daemon --help' (fd.o #42441, Ralf Habacker) · Add support for looking up local TCPv4 clients' credentials on Windows XP via the undocumented AllocateAndGetTcpExTableFromStack function (fd.o #66060, Ralf Habacker) · Fix insufficient dependency-tracking (fd.o #68505, Simon McVittie) · Don't include wspiapi.h, fixing a compiler warning (fd.o #68852, Simon McVittie) • Internal changes: · add DBUS_ENABLE_ASSERT, DBUS_ENABLE_CHECKS for less confusing conditionals (fd.o #66142, Chengwei Yang) · improve verbose-mode output (fd.o #63047, Colin Walters) · consolidate Autotools and CMake build (fd.o #64875, Ralf Habacker) · fix various unused variables, unusual build configurations etc. (fd.o #65712, #65990, #66005, #66257, #69165, #69410, #70218; Chengwei Yang, Vasiliy Balyasnyy) D-Bus 1.7.4 (2013-06-13) == The “but is your thread-safety thread-safe?” release. Security fixes: • CVE-2013-2168: Fix misuse of va_list that could be used as a denial of service for system services. Vulnerability reported by Alexandru Cornea. (Simon) Dependencies: • The Windows version of libdbus now contains a C++ source file, used to provide global initialization when the library is loaded. gcc (mingw*) users should ensure that g++ is also installed. • The libxml2-based configuration reader (which hasn't worked for 2.5 years, and was never the recommended option) has been removed. Expat is now a hard dependency. Enhancements: • It should now be safe to call dbus_threads_init_default() from any thread, at any time. Authors of loadable modules and plugins that use libdbus should consider doing so during initialization. (fd.o #54972, Simon McVittie) • Improve dbus-send documentation and command-line parsing (fd.o #65424, Chengwei Yang) Unix-specific: · dbus-run-session: experimental new tool to start a temporary D-Bus session, e.g. for regression tests or a text console, replacing certain uses of dbus-launch which weren't really correct (fd.o #39196, Simon) Other fixes: • In dbus-daemon, don't crash if a .service file starts with key=value (fd.o #60853, Chengwei Yang) • Unix-specific: · Fix a crash similar to CVE-2013-2168 the first time we try to use syslog on a platform not defining LOG_PERROR, such as Solaris or QNX. This regressed in 1.7.0. (Simon) · Fix an assertion failure if we try to activate systemd services before systemd connects to the bus (fd.o #50199, Chengwei Yang) · Avoid compiler warnings for ignoring the return from write() (Chengwei Yang) • Windows-specific: · Under cmake, install runtime libraries (DLLs) into bin/ instead of lib/ so that Windows finds them (fd.o #59733, Ralf Habacker) D-Bus 1.7.2 (2013-04-25) == The “only partially opaque” release. Configuration changes: • On non-QNX Unix platforms, the default limit on fds per message in the session bus configuration has reduced from 4096 to 1024. The default limit used on the system bus was already 1024. On QNX, both limits are reduced further, to 128. Enhancements: • D-Bus Specification 0.21 · Following Unicode Corrigendum #9, the noncharacters U+nFFFE, U+nFFFF, U+FDD0..U+FDEF are allowed in UTF-8 strings again. (fd.o #63072, Simon McVittie) Fixes: • Diagnose incorrect use of dbus_connection_get_data() with negative slot (i.e. before allocating the slot) rather than returning junk (fd.o #63127, Dan Williams) • Fix a cmake build regression since 1.7.0 (fd.o #63682; Ralf Habacker, Simon McVittie) • Unix-specific: · On Linux, link successfully with glibc 2.17 (fd.o #63166, Simon McVittie)   · Under systemd, log to syslog only, not stderr, avoiding duplication (fd.o #61399, #39987; Colin Walters, Dagobert Michelsen) · Under systemd, remove unnecessary dependency on syslog.socket (fd.o #63531, Cristian Rodríguez) · Include alloca.h for alloca() if available, fixing compilation on Solaris 10 (fd.o #63071, Dagobert Michelsen) · Allow use of systemd-logind without the rest of systemd (fd.o #62585, Martin Pitt) · When built with CMake, link to librt and use the right path for meinproc's XSLT stylesheets (fd.o #61637, Ralf Habacker) · Reduce the default limit on number of fds per message to 128 under QNX, working around an arbitrary OS limit (fd.o #61176, Matt Fischer) • Windows-specific: · Do not claim that all bus clients have the dbus-daemon's credentials; pick up local TCPv4 clients' credentials (process ID and security identifier, i.e. user) using GetExtendedTcpTable() (fd.o #61787, Ralf Habacker) D-Bus 1.7.0 (2013-02-22) == The "Disingenuous Assertions" release. This is a new development release, starting the 1.7.x branch. D-Bus 1.6 remains the recommended version for long-term-supported distributions or the upcoming GNOME 3.8 release. Build-time configuration changes: • The --with-dbus-session-bus-default-address configure option is no longer supported. Use the new --with-dbus-session-bus-connect-address and --with-dbus-session-bus-listen-address options instead. On Windows, you usually want them to have the same argument; on Unix, the defaults are usually correct. • Similarly, the DBUS_SESSION_BUS_DEFAULT_ADDRESS CMake variable is no longer supported; use the new DBUS_SESSION_BUS_LISTEN_ADDRESS and DBUS_SESSION_BUS_CONNECT_ADDRESS variables instead. • cmake/cross-compile.sh has been removed. Instead, please use a cross-toolchain file (-DCMAKE_TOOLCHAIN_FILE) as documented at ; or use Autotools as documented in "info automake Cross-Compilation", and set PKG_CONFIG_PATH appropriately. Requirements: • Man pages now require xmlto (or either xmlto or meinproc, if using CMake). • man2html is no longer used. Enhancements: • D-Bus Specification 0.20 · actually say that /org/freedesktop/DBus is the object that implements o.fd.DBus (fd.o #51865, Colin Walters) · various reorganisation for better clarity (fd.o #38252, Simon McVittie) · stop claiming that all basic types work just like INT32 (strings don't!) • The "source code" for the man pages is now Docbook XML, eliminating the outdated duplicate copies used when building with CMake. (fd.o #59805; Ralf Habacker, Simon McVittie) Fixes: • In the activation helper, when compiled for tests, do not reset the system bus address, fixing the regression tests. (fd.o #52202, Simon) • Fix building with Valgrind 3.8, at the cost of causing harmless warnings with Valgrind 3.6 on some compilers (fd.o #55932, Arun Raghavan) • Merge from system-local.conf if necessary (fd.o #51560, Krzysztof Konopko) • Under CMake, prefer xmlto over meinproc (fd.o #59733, Ralf Habacker) • Stop duplicating CMake's own logic to find libexpat (fd.o #59733, Ralf Habacker) • Don't assume CMake host and build system are the same (fd.o #59733, Ralf Habacker) • Avoid deprecation warnings for GLib 2.35 (fd.o #59971, Simon McVittie) • Unix-specific: · Check for functions in libpthread correctly, fixing compilation on (at least) OpenBSD (fd.o #47239, Simon) · Don't leak temporary fds pointing to /dev/null (fd.o #56927, Michel HERMIER) · Update sd-daemon.[ch] from systemd (fd.o #60681) · Add partial support for QNX (fd.o #60339, fd.o #61176; Matt Fischer) • Windows-specific: · The default session bus listening and connecting address is now "autolaunch:", which makes D-Bus on Windows interoperate with itself and GDBus "out of the box". Use the configure options and cmake variables described above if you require a different autolaunch scope. (fd.o #38201, Simon McVittie) · Avoid a CMake warning under Cygwin (fd.o #59401, Ralf Habacker) • Create session.d, system.d directories under CMake (fd.o #41319, Ralf Habacker) D-Bus 1.6.8 (2012-09-28) == The "Fix one thing, break another" release. • Follow up to CVE-2012-3524: The additional hardening work to use __secure_getenv() as a followup to bug #52202 broke certain configurations of gnome-keyring. Given the difficulty of making this work without extensive changes to gnome-keyring, use of __secure_getenv() is deferred. D-Bus 1.6.6 (2012-09-28) == The "Clear the environment in your setuid binaries, please" release. • CVE-2012-3524: Don't access environment variables (fd.o #52202) Thanks to work and input from Colin Walters, Simon McVittie, Geoffrey Thomas, and others. • Unix-specific: · Fix compilation on Solaris (fd.o #53286, Jonathan Perkin) · Work around interdependent headers on OpenBSD by including sys/types.h before each use of sys/socket.h (fd.o #54418, Brad Smith) D-Bus 1.6.4 (2012-07-18) == • Detect that users are "at the console" correctly when configured with a non-default path such as --enable-console-auth-dir=/run/console (fd.o #51521, Dave Reisner) • Remove an incorrect assertion from DBusTransport (fd.o #51657, Simon McVittie) • Make --enable-developer default to "no" (regression in 1.6.2; fd.o #51657, Simon McVittie) • Windows-specific: · Launch dbus-daemon correctly if its path contains a space (fd.o #49450, Wolfgang Baron) D-Bus 1.6.2 (2012-06-27) == The "Ice Cabbage" release. • Change how we create /var/lib/dbus so it works under Automake >= 1.11.4 (fd.o #51406, Simon McVittie) • Don't return from dbus_pending_call_set_notify with a lock held on OOM (fd.o #51032, Simon McVittie) • Disconnect "developer mode" (assertions, verbose mode etc.) from Automake maintainer mode. D-Bus developers should now configure with --enable-developer. Automake maintainer mode is now on by default; distributions can disable it with --disable-maintainer-mode. (fd.o #34671, Simon McVittie) • Automatically define DBUS_STATIC_BUILD in static-only Autotools builds, fixing linking when targeting Windows (fd.o #33973; william, Simon McVittie) • Unix-specific: · Check for libpthread under CMake on Unix (fd.o #47237, Simon McVittie) D-Bus 1.6.0 (2012-06-05) == The “soul of this machine has improved” release. This version starts a new stable branch of D-Bus: only bug fixes will be accepted into 1.6.x. Other changes will now go to the 1.7.x branch. Summary of changes since 1.4.x: • New requirements · PTHREAD_MUTEX_RECURSIVE on Unix · compiler support for 64-bit integers (int64_t or equivalent) • D-Bus Specification v0.19 • New dbus-daemon features · rules allow the service to own names like com.example.Service.Instance3 · optional systemd integration when checking at_console policies · --nopidfile option, mainly for use by systemd · path_namespace and arg0namespace may appear in match rules · eavesdropping is disabled unless the match rule contains eavesdrop=true • New public API · functions to validate various string types (dbus_validate_path() etc.) · dbus_type_is_valid() · DBusBasicValue, a union of every basic type • Bug fixes · removed an unsafe reimplementation of recursive mutexes · dbus-daemon no longer busy-loops if it has far too many file descriptors · dbus-daemon.exe --print-address works on Windows · all the other bug fixes from 1.4.20 • Other major implementation changes · on Linux, dbus-daemon uses epoll if supported, for better scalability · dbus_threads_init() ignores its argument and behaves like dbus_threads_init_default() instead · removed the per-connection link cache, improving dbus-daemon performance • Developer features · optional Valgrind instrumentation (--with-valgrind) · optional Stats interface on the dbus-daemon (--enable-stats) · optionally abort whenever malloc() fails (--enable-embedded-tests and export DBUS_MALLOC_CANNOT_FAIL=1) Changes since 1.5.12: • Be more careful about monotonic time vs. real time, fixing DBUS_COOKIE_SHA1 spec-compliance (fd.o #48580, David Zeuthen) • Don't use install(1) within the source/build trees, fixing the build as non-root when using OpenBSD install(1) (fd.o #48217, Antoine Jacoutot) • Add missing commas in some tcp and nonce-tcp addresses, and remove an unused duplicate copy of the nonce-tcp transport in Windows builds (fd.o #45896, Simon McVittie) D-Bus 1.5.12 (2012-03-27) == The “Big Book of Science” release. • Add public API to validate various string types: dbus_validate_path(), dbus_validate_interface(), dbus_validate_member(), dbus_validate_error_name(), dbus_validate_bus_name(), dbus_validate_utf8() (fd.o #39549, Simon McVittie) • Turn DBusBasicValue into public API so bindings don't need to invent their own "union of everything" type (fd.o #11191, Simon McVittie) • Enumerate data files included in the build rather than using find(1) (fd.o #33840, Simon McVittie) • Add support for policy rules like in dbus-daemon (fd.o #46273, Alban Crequy) • Windows-specific: · make dbus-daemon.exe --print-address (and --print-pid) work again on Win32, but not on WinCE (fd.o #46049, Simon McVittie) · fix duplicate case value when compiling against mingw-w64 (fd.o #47321, Andoni Morales Alastruey) D-Bus 1.5.10 (2012-02-21) == The "fire in Delerium" release. On Unix platforms, PTHREAD_MUTEX_RECURSIVE (as specified in POSIX 2008 Base and SUSv2) is now required. • D-Bus Specification 0.19: · Formally define unique connection names and well-known bus names, and document best practices for interface, bus, member and error names, and object paths (fd.o #37095, Simon McVittie) · Document the search path for session and system services on Unix, and where they should be installed by build systems (fd.o #21620, fd.o #35306; Simon McVittie) · Document the systemd transport (fd.o #35232, Lennart Poettering) • Make dbus_threads_init() use the same built-in threading implementation as dbus_threads_init_default(); the user-specified primitives that it takes as a parameter are now ignored (fd.o #43744, Simon McVittie) • Allow all configured auth mechanisms, not just one (fd.o #45106, Pavel Strashkin) • Improve cmake build system (Ralf Habacker): · simplify XML parser dependencies (fd.o #41027) · generate build timestamp (fd.o #41029) · only create batch files on Windows · fix option and cache syntax · add help-options target · share dbus-arch-deps.h.in with autotools rather than having our own version (fd.o #41033) • Build tests successfully with older GLib, as found in e.g. Debian 6 (fd.o #41219, Simon McVittie) • Avoid use of deprecated GThread API (fd.o #44413, Martin Pitt) • Build documentation correctly if man2html doesn't support filenames on its command-line (fd.o #43875, Jack Nagel) • Improve test coverage. To get even more coverage, run the tests with DBUS_TEST_SLOW=1 (fd.o #38285, #42811; Simon McVittie) • Reduce the size of the shared library by moving functionality only used by dbus-daemon, tests etc. into their internal library and deleting unused code (fd.o #34976, #39759; Simon McVittie) • Add dbus-daemon --nopidfile option, overriding the configuration, for setups where the default configuration must include to avoid breaking traditional init, but the pid file is in fact unnecessary; use it under systemd to improve startup time a bit (fd.o #45520, Lennart Poettering) • Optionally (if configured --with-valgrind) add instrumentation to debug libdbus and associated tools more meaningfully under Valgrind (fd.o #37286, Simon McVittie) • Improve the dbus-send(1) man page (fd.o #14005, Simon McVittie) • Make dbus-protocol.h compatible with C++11 (fd.o #46147, Marc Mutz) • If tests are enabled and DBUS_MALLOC_CANNOT_FAIL is set in the environment, abort on failure to malloc() (like GLib does), to turn runaway memory leaks into a debuggable core-dump if a resource limit is applied (fd.o #41048, Simon McVittie) • Don't crash if realloc() returns NULL in a debug build (fd.o #41048, Simon McVittie) • Unix-specific: · Replace our broken reimplementation of recursive mutexes, which has been broken since 2006, with an ordinary pthreads recursive mutex (fd.o #43744; Sigmund Augdal, Simon McVittie) · Use epoll(7) for a more efficient main loop in Linux; equivalent patches welcomed for other OSs' equivalents like kqueue, /dev/poll, or Solaris event ports (fd.o #33337; Simon McVittie, Ralf Habacker) · When running under systemd, use it instead of ConsoleKit to check whether to apply at_console policies (fd.o #39609, Lennart Poettering) · Avoid a highly unlikely fd leak (fd.o #29881, Simon McVittie) · Don't close invalid fd -1 if getaddrinfo fails (fd.o #37258, eXeC001er)   · Don't touch ~/.dbus and ~/.dbus-keyrings when running 'make installcheck' (fd.o #41218, Simon McVittie) · Stop pretending we respect XDG_DATA_DIRS for system services: the launch helper doesn't obey environment variables to avoid privilege escalation attacks, so make the system bus follow the same rules (fd.o #21620, Simon McVittie) • Windows-specific: · Find the dbus-daemon executable next to the shared library (fd.o #41558; Jesper Dam, Ralf Habacker) · Remove the faulty implementation of _dbus_condvar_wake_all (fd.o #44609, Simon McVittie) D-Bus 1.5.8 (2011-09-21) == The "cross-metering" release. In addition to dead code removal and refactoring, this release contains all of the bugfixes from 1.4.16. • Clean up dead code, and make more warnings fatal in development builds (fd.o #39231, fd.o #41012; Simon McVittie) • If full test coverage is requested via --enable-tests, strictly require Python, pygobject and dbus-python, which are required by some tests; if not, and Python is missing, skip those tests rather than failing (fd.o #37847, Simon McVittie) • When using cmake, provide the same version-info API in the installed headers as for autotools (DBUS_VERSION, etc.) (fd.o #40905, Ralf Habacker) • Add a regression test for fd.o #38005 (fd.o #39836, Simon McVittie) • Make "NOCONFIGURE=1 ./autogen.sh" not run configure (Colin Walters) • Add _DBUS_STATIC_ASSERT and use it to check invariants (fd.o #39636, Simon McVittie) • Fix duplicates in authors list (Ralf Habacker) • Fix broken links from dbus-tutorial.html if $(htmldir) != $(docdir) (fd.o #39879, Chris Mayo) • Fix a small memory leak, and a failure to report errors, when updating a service file entry for activation (fd.o #39230, Simon McVittie) • Unix-specific: · Clean up (non-abstract) Unix sockets on bus daemon exit (fd.o #38656; Brian Cameron, Simon McVittie) · On systems that use libcap-ng but not systemd, drop supplemental groups when switching to the daemon user (Red Hat #726953, Steve Grubb) · Make the cmake build work again on GNU platforms (fd.o #29228, Simon McVittie) · Fix compilation on non-C99 systems that have inttypes.h but not stdint.h, like Solaris (fd.o #40313, Dagobert Michelsen) · Define CMSG_ALIGN, CMSG_LEN, CMSG_SPACE on Solaris < 10 (fd.o #40235, Simon McVittie) · Cope with Unixes that don't have LOG_PERROR, like Solaris 10 (fd.o #39987, Simon McVittie) · Cope with platforms whose vsnprintf violates both POSIX and C99, like Tru64, IRIX and HP-UX (fd.o #11668, Simon McVittie) • Windows-specific: · Fix compilation on MSVC, which doesn't understand "inline" with its C99 meaning (fd.o #40000; Ralf Habacker, Simon McVittie) · Fix misuse of GPid in test/dbus-daemon.c (fd.o #40003, Simon McVittie) · Fix cross-compilation to Windows with Automake (fd.o #40003, Simon McVittie) D-Bus 1.5.6 (2011-07-29) == The "weird, gravy-like aftertaste" release. In addition to new features and refactoring, this release contains all of the bugfixes from 1.4.14. Potentially incompatible (Bustle and similar debugging tools will need changes to work as intended): • Do not allow match rules to "eavesdrop" (receive messages intended for a different recipient) by mistake: eavesdroppers must now opt-in to this behaviour by putting "eavesdrop='true'" in the match rule, which will not have any practical effect on buses where eavesdropping is not allowed (fd.o #37890, Cosimo Alfarano) Other changes: • D-Bus Specification version 0.18 (fd.o #37890, fd.o #39450, fd.o #38252; Cosimo Alfarano, Simon McVittie) · add the "eavesdrop" keyword to match rules · define eavesdropping, unicast messages and broadcast messages · stop claiming that match rules are needed to match unicast messages to you · promote the type system to be a top-level section • Use DBUS_ERROR_OBJECT_PATH_IN_USE if dbus_connection_try_register_object_path or dbus_connection_try_register_fallback fails, not ...ADDRESS_IN_USE, and simplify object-path registration (fd.o #38874, Jiří Klimeš) • Consistently use atomic operations on everything that is ever manipulated via atomic ops, as was done for changes to DBusConnection's refcount in 1.4.12 (fd.o #38005, Simon McVittie) • Fix a file descriptor leak when connecting to a TCP socket (fd.o #37258, Simon McVittie) • Make "make check" in a clean tree work, by not running tests until test data has been set up (fd.o #34405, Simon McVittie) • The dbus-daemon no longer busy-loops if it has a very large number of file descriptors (fd.o #23194, Simon McVittie) • Refactor message flow through dispatching to avoid locking violations if the bus daemon's message limit is hit; remove the per-connection link cache, which was meant to improve performance, but now reduces it (fd.o #34393, Simon McVittie) • Some cmake fixes (Ralf Habacker) • Remove dead code, mainly from DBusString (fd.o #38570, fd.o #39610; Simon McVittie, Lennart Poettering) • Stop storing two extra byte order indicators in each D-Bus message (fd.o #38287, Simon McVittie) • Add an optional Stats interface which can be used to get statistics from a running dbus-daemon if enabled at configure time with --enable-stats (fd.o #34040, Simon McVittie) • Fix various typos (fd.o #27227, fd.o #38284; Sascha Silbe, Simon McVittie) • Documentation (fd.o #36156, Simon McVittie): · let xsltproc be overridden as usual: ./configure XSLTPROC=myxsltproc · install more documentation automatically, including man2html output · put dbus.devhelp in the right place (it must go in ${htmldir}) • Unix-specific: · look for system services in /lib/dbus-1/system-services in addition to all the other well-known locations; note that this should always be /lib, even on platforms where shared libraries on the root FS would go in /lib64, /lib/x86_64-linux-gnu or similar (fd.o #35229, Lennart Poettering) · opt-in to fd passing on Solaris (fd.o #33465, Simon McVittie) • Windows-specific (Ralf Habacker): · fix use of a mutex for autolaunch server detection · don't crash on malloc failure in _dbus_printf_string_upper_bound D-Bus 1.5.4 (2011-06-10) == Security (local denial of service): • Byte-swap foreign-endian messages correctly, preventing a long-standing local DoS if foreign-endian messages are relayed through the dbus-daemon (backporters: this is git commit c3223ba6c401ba81df1305851312a47c485e6cd7) (CVE-2011-2200, fd.o #38120, Debian #629938; Simon McVittie) New things: • The constant to use for an infinite timeout now has a name, DBUS_TIMEOUT_INFINITE. It is numerically equivalent to 0x7fffffff (INT32_MAX) which can be used for source compatibility with older versions of libdbus. • If GLib and DBus-GLib are already installed, more tests will be built, providing better coverage. The new tests can also be installed via ./configure --enable-installed-tests for system integration testing, if required. (fd.o #34570, Simon McVittie) Changes: • Consistently use atomic operations for the DBusConnection's refcount, fixing potential threading problems (fd.o #38005, Simon McVittie) • Don't use -Wl,--gc-sections by default: in practice the size decrease is small (300KiB on x86-64) and it frequently doesn't work in unusual toolchains. To optimize for minimum installed size, you should benchmark various possibilities for CFLAGS and LDFLAGS, and set the best flags for your particular toolchain at configure time. (fd.o #33466, Simon McVittie) • Use #!/bin/sh for run-with-tmp-session-bus.sh, making it work on *BSD (fd.o #35880, Timothy Redaelli) • Use ln -fs to set up dbus for systemd, which should fix reinstallation when not using a DESTDIR (fd.o #37870, Simon McVittie) • Windows-specific changes: · don't try to build dbus-daemon-launch-helper (fd.o #37838, Mark Brand) D-Bus 1.5.2 (2011-06-01) == The "Boar Hunter" release. Notes for distributors: This version of D-Bus no longer uses -fPIE by default. Distributions wishing to harden the dbus-daemon and dbus-launch-helper can re-enable this if their toolchain supports it reliably, via something like: ./configure CFLAGS=-fPIE LDFLAGS="-pie -Wl,-z,relro" or by using distribution-specific wrappers such as Debian's hardening-wrapper. Changes: • D-Bus Specification v0.17 · Reserve the extra characters used in signatures by GVariant (fd.o #34529, Simon McVittie) · Define the ObjectManager interface (fd.o #34869, David Zeuthen) • Don't force -fPIE: distributions and libtool know better than we do whether it's desirable (fd.o #16621, fd.o #27215; Simon McVittie) • Allow --disable-gc-sections, in case your toolchain offers the -ffunction-sections, -fdata-sections and -Wl,--gc-sections options but they're broken, as seen on Solaris (fd.o #33466, Simon McVittie) • Install dbus-daemon and dbus-daemon-launch-helper in a more normal way (fd.o #14512; Simon McVittie, loosely based on a patch from Luca Barbato) • Ensure that maintainers upload documentation with the right permissions (fd.o #36130, Simon McVittie) • Don't force users of libdbus to be linked against -lpthread, -lrt (fd.o #32827, Simon McVittie) • Log system-bus activation information to syslog (fd.o #35705, Colin Walters) • Log messages dropped due to quotas to syslog (fd.o #35358, Simon McVittie) • Make the nonce-tcp transport work on Unix (fd.o #34569, Simon McVittie) • On Unix, if /var/lib/dbus/machine-id cannot be read, try /etc/machine-id (fd.o #35228, Lennart Poettering) • In the regression tests, don't report fds as "leaked" if they were open on startup (fd.o #35173, Simon McVittie) • Make dbus-monitor bail out if asked to monitor more than one bus, rather than silently using the last one (fd.o #26548, Will Thompson) • Clarify documentation (fd.o #35182, Simon McVittie) • Clean up minor dead code and some incorrect error handling (fd.o #33128, fd.o #29881; Simon McVittie) • Check that compiler options are supported before using them (fd.o #19681, Simon McVittie) • Windows: • Remove obsolete workaround for winioctl.h (fd.o #35083, Ralf Habacker) D-Bus 1.5.0 (2011-04-11) == The "you never know when you need to tow something from your giant flying shark" release. • D-Bus Specification v0.16 · Add support for path_namespace and arg0namespace in match rules (fd.o #24317, #34870; Will Thompson, David Zeuthen, Simon McVittie) · Make argNpath support object paths, not just object-path-like strings, and document it better (fd.o #31818, Will Thompson) • Let the bus daemon implement more than one interface (fd.o #33757, Simon McVittie) • Optimize _dbus_string_replace_len to reduce waste (fd.o #21261, Roberto Guido) • Require user intervention to compile with missing 64-bit support (fd.o #35114, Simon McVittie) • Add dbus_type_is_valid as public API (fd.o #20496, Simon McVittie) • Raise UnknownObject instead of UnknownMethod for calls to methods on paths that are not part of the object tree, and UnknownInterface for calls to unknown interfaces in the bus daemon (fd.o #34527, Lennart Poettering) D-Bus 1.4.8 (2011-04-08) == The "It's like the beginning of a lobster" release. • Rename configure.in to configure.ac, and update it to modern conventions (fd.o #32245; Javier Jardón, Simon McVittie) • Correctly give XDG_DATA_HOME priority over XDG_DATA_DIRS (fd.o #34496, Anders Kaseorg) • Prevent X11 autolaunching if $DISPLAY is unset or empty, and add --disable-x11-autolaunch configure option to prevent it altogether in embedded environments (fd.o #19997, NB#219964; Simon McVittie) • Install the documentation, and an index for Devhelp (fd.o #13495, Debian #454142; Simon McVittie, Matthias Clasen) • If checks are not disabled, check validity of string-like types and booleans when sending them (fd.o #16338, NB#223152; Simon McVittie) • Add UnknownObject, UnknownInterface, UnknownProperty and PropertyReadOnly errors to dbus-shared.h (fd.o #34527, Lennart Poettering) • Break up a huge conditional in config-parser so gcov can produce coverage data (fd.o #10887, Simon McVittie) • List which parts of the Desktop Entry specification are applicable to .service files (fd.o #19159, Sven Herzberg) • Don't suppress service activation if two services have the same Exec= (fd.o #35750, Colin Walters) • Windows: · Avoid the name ELEMENT_TYPE due to namespace-pollution from winioctl.h (Andre Heinecke) · Include _dbus_path_is_absolute in libdbus on Windows, fixing compilation (fd.o #32805, Mark Brand) D-Bus 1.4.6 (2010-02-17) == The "1, 2, miss a few, 99, 100" release. • Remove unfinished changes intended to support GTest-based tests, which were mistakenly included in 1.4.4 D-Bus 1.4.4 (2010-02-17) == • Switch back to using even micro versions for stable releases; 1.4.1 should have been called 1.4.2, so skip that version number • Don't leave bad file descriptors being watched when spawning processes, which could result in a busy-loop (fd.o #32992, NB#200248; possibly also LP#656134, LP#680444, LP#713157) • Check for MSG_NOSIGNAL correctly • Fix failure to detect abstract socket support (fd.o #29895) • Make _dbus_system_logv actually exit with DBUS_SYSTEM_LOG_FATAL (fd.o #32262, NB#180486) • Improve some error code paths (fd.o #29981, fd.o #32264, fd.o #32262, fd.o #33128, fd.o #33277, fd.o #33126, NB#180486) • Avoid possible symlink attacks in /tmp during compilation (fd.o #32854) • Tidy up dead code (fd.o #25306, fd.o #33128, fd.o #34292, NB#180486) • Improve gcc malloc annotations (fd.o #32710) • If the system bus is launched via systemd, protect it from the OOM killer • Documentation improvements (fd.o #11190) • Avoid readdir_r, which is difficult to use correctly (fd.o #8284, fd.o #15922, LP#241619) • Cope with invalid files in session.d, system.d (fd.o #19186, Debian #230231) • Don't distribute generated files that embed our builddir (fd.o #30285, fd.o #34292) • Raise the system bus's fd limit to be sufficient for its configuration (fd.o #33474, LP#381063) • Fix syslog string processing • Ignore -Waddress • Remove broken gcov parsing code and --enable-gcov, and replace them with lcov HTML reports and --enable-compiler-coverage (fd.o #10887) • Windows: · avoid live-lock in Windows CE due to unfair condition variables • OpenBSD: · support credentials-passing (fd.o #32542) • Solaris: · opt-in to thread safety (fd.o #33464) D-Bus 1.4.1 (20 December 2010) == • Fix for CVE-2010-4352: sending messages with excessively-nested variants can crash the bus. The existing restriction to 64-levels of nesting previously only applied to the static type signature; now it also applies to dynamic nesting using variants. Thanks to Rémi Denis-Courmont for discoving this issue. • OS X portability fixes, including launchd support. • Windows autolaunch improvements. • Various bug fixes. D-Bus 1.4.0 (6 Sep 2010) == - systemd hookup D-Bus 1.3.1 (23 June 2010) == - New standardized PropertiesChanged signal in the properties interface - Various portability fixes, in particular to Windows platforms - Support forking bus services, for compatibility D-Bus 1.3.0 (29 July 2009) == - ability for dbus-send to send to any bus (--address) - file descriptor passing on Unix socket transports - use of GCC atomic intrinsics for better processor support (requires -march=i486 or above for x86 compilation) - thread-safe FD_CLOEXEC setting on recent Linux kernels (2.6.24-27 and up) and glibc (2.9 for pipe2 and 2.10 for accept4) - feature negotiation in the bus daemon D-Bus 1.0.0 (08 November 2006) == - Documents updated with API/ABI garuntees - Added missing patch FreeBSD need to run out of the box - dbus-monitor now has a profile mode - AUTHORS file updated with names from the ChangeLog Thanks to everyone who helped get us here D-Bus 1.0 RC 3 (0.95) (02 November 2006) == - DBUS_API_SUBJECT_TO_CHANGE no longer needs to be defined when building apps - ./configure checks now work when cross compiling - dbus-uuidgen --ensure is now run in the init script so there is no need to run it in a post script - dbus-uuidgen now writes out to /var/lib/dbus to work with systems that do not have a writable /etc. Packages should install and own the /var/lib/dbus directory - recursive locks are now used when dbus_threads_init_default is called - standard_session_servicedirs tag added to the session.conf under a normal build this specifies these service directories: /usr/local/share/dbus-1/services /usr/share/dbus-1/services $HOME/.local/share/dbus-1/services - fixed crash when a service directory is specified more than once - fixed a crash in *BSD when watching config directories for changes - fixed Irix build by using dirp->__dd_fd to get the file descriptor - cleaned up the LOCAL_CREDS vs CMGCRED credential code so *BSD's don't crash here anymore - dbus_message_iter_get_array_len deprecated - cleanup-man-pages.sh added so packagers can clean up Doxygen man page output from 7 to 2 megs - large documentation improvements - numerous bug fixes D-Bus 1.0 RC 2 (0.94) (14 October 2006) == - dbus-uuidgen binary added for future remote machine identification packagers should call dbus-uuidgen --ensure in their post - GetMachineId peer method added to the bus API - dbus_connection_set_route_peer_messages API added to let the bus send peer messages directly to an app - Autolaunch abilities added to dbus-launch with the --autolaunch flag This feature allows libdbus to start a session bus if none can be found This is an internal feature and should not be used by scripts DBUS_SESSION_BUS_ADDRESS is still the correct way to specify a session bus - dbus-launch now prints out a simple key value pairs instead of shell scripts if one of the shell flags aren't used - support DBUS_BLOCK_ON_ABORT env variable to cause blocking waiting for gdb - weak ref are now held for shared connections so the right things happen this fixes some pretty major bugs with the way connections were handled - Some refactoring for Windows (doesn't effect Unix) - Solaris build fixes - MacOSX build fixes - Cross compile build fixes. We now assume getpwnam_r is posix and va_lists can be copied by value since we can't check this in a cross compile. If this is not true for a particular target is up to the developer to patch. - Bug fixing all around D-Bus 1.0 RC 1 (0.93) (14 September 2006) == - dbus_threads_init_default added for initalizing threads without the need for bindings - Filters are now properly removed - dbus_connection_open now holds a hard ref to shared connections - We now print out a warning and do nothing when someone tries to close a shared connection - The --introspect switch has been added to the bus for printing out introspection data without actually running the bus - LOCAL_CREDS socket credentials are now supported for systems which support it such as NetBSD - Generalize kqueue support so it works with NetBSD as well as FreeBSD - Numerous bug fixes and memory leaks patched D-Bus 0.92 (18 August 2006) == - Proper thread locking added to pending calls - Threading semantics changed from init early to init before the second thread is started - Correctly error out when an application tries to acquire or release the org.freedesktop.DBus name instead of sending false result codes - kqueue directory watching code can now be used to monitor config file changes on FreeBSD - --with-dbus-daemondir configure switch added so the daemon can be installed separate from the user binaries - Makefiles fixed for cygwin - Various fixes for the ongoing Windows port - Fixed docs and comments to use the D-Bus spelling instead of D-BUS - Many memleaks and bugs fixed D-Bus 0.91 (24 July 2006) == - Remove some lingering bits left over from the bindings split - Fix assertion causing D-Bus applications to crash when checks are enabled - Fix a timeout bug which would block applications from being auto started D-Bus 0.90 (17 July 2006) == - API/ABI freeze for 1.0 - Bindings are now split out into seperate packages - ListActivatableNames added as a method on the bus - Removed deprecated dbus_connection_disconnect (use dbus_connection_close) - Shared connections are now unreffed on disconnect - Fixed pending calls for threaded enviornments - Pending calls get timed out on connection disconnect - dbus_connection_send_with_reply returns TRUE and a NULL pending call if you call it on a connection object which has been disconnected already (it returns FALSE on Out of Memory errors only) - dbus-monitor now correctly catches methods, not just signals - dbus-monitor now prints object paths D-BUS 0.62 (12 June 2006) == - Doc fixes - Added support for all data-types for the dbus tools - Fixed eavesdropping on method calls (dbus-monitor) - Fixed silent dropping of method calls with interface=NULL - Fixed console ownership problems in Solaris - Fixed installation of dbus-signature.h and #include it in dbus/dbus.h - Flush the user database cache on config reload - GLib bindings: - Fix memory leaks - Fix properties in DBusGProxy so that they can be given in any order - Added lots of assertions to ensure correct use - Remove duplicated code - Fix static string pointer uses in GPtrArray-based collections - Python bindings: - Remove reference to sys/cdefs.h - Qt4 bindings: - Code reorganized - Added the dbusidl2cpp, dbuscpp2xml and dbus tools - Added example programs (ping-pong, complex ping-pong, listnames, chat) - Updated selftests - Fixed compilation and .moc- and .ui-file processing and cleaning - Made central classes derive from QObject - Enhance error reporting - Many bugfixes - Mono bindings: - Minor bugfixes D-BUS 0.61 (24 Febuary 2006) == - Documentation all around - dbus-launch now produces correct sh and csh syntax - Nested arrays now work correctly - GLib bindings: - Inheriting from DBusGProxy is now possible - GPtrArrays can now be marshalled - org.freedesktop.DBus.GLib.ClientCSymbol annotation added - Openning connections to arbitrary addresses now supported - Python bindings: - sender_keyword and path_keyword keywords added to signal listener API - Byte types now demarshal to unsigned char - calling methods now do the correct thing - Qt bindings: - both Qt3 and Qt4 bindings can be built at the same time - Use the standard org.freedesktop.DBus.Method.NoReply annotation for the "async" calls instead of creating one for us. - Mono bindings: - 64bit arch fixes - Massive bug fixing all around D-BUS 0.60 (30 November 2005) == - major ABI/API changes - sonames changed - RequestName queuing behavior has changed (refer to dbus-specification) - DBUS_NAME_FLAG_PROHIBIT_REPLACEMENT has been removed and DBUS_NAME_FLAG_ALLOW_REPLACEMENT has been added to the flags - signals emitted by the bus now show up in the introspect data - auth EXTERNAL now supported on BSD varients - ReleaseName method added to the bus to allow a service to remove itself as owner of a bus name - dbus_connection_read_write added for getting messages off the bus in the absence of a mainloop - Qt4 bindings added and the Qt3 bindings have been depricated - python bindings: - marshal using introspect data if available - better exception handling and propigation - private connections are now supported - UTF-8 cleanups - out_signature added to method decorators for specifying how the return values should be marshaled - sender_keyword added to method decorators for specifying and argument to provide the unique name of the method caller - async_callbacks added to method decorators - multiple inheritance of classes now supported - GLib bindings: - respect NoReply annotations - dbus_g_method_return_get_reply and dbus_g_method_return_send_reply added to the lowlevel code for use when the dbus-glib marshalling code is not adiquate - numerous bug fixes all around D-BUS 0.50 (06 September 2005) === This is a minor release from 0.36.2. The series number has changed not because of any technical reasons but as an indication that we are moving closer to 1.0. It is hoped that this will be the last series to see major changes, most of which will be isolated to the GLib and Python bindings, as we transition to concentrate more on bug busting and code auditing. - D-Bus builds on the Cygwin platform - Makefile cleanups - Various bug fixes - Optimization of the dbus object tree - Memleaks and GIL crasher bugs have been fixed in the Python bindings D-BUS 0.36.2 (29 August 2005) === - Security: Restrict other users from connecting to another users session bus D-BUS 0.36.1 (24 August 2005) === - Python Bindings: - fixed to work with hal-device-manager - For 64bit builds everything is installed to lib64/python2.4/ since Python can't handle multilib D-BUS 0.36 (23 August 2005) === - Maximum sized of cached messages have been reduced to 10K - Match rules now allow matching on arguments inside the message - introspect.xsl XSLT style sheet added for formatting introspection data into XHTML for analysis - Python bindings: - now have working type objects for explicit typecasting - Variant type has been added - Dictionaries, Variants and Arrays can all be passed the signiture or type(s) of their children - the optional timeout= keyword has been added when making method calls - match on args has been implemented - a .pth file has been added for dealing with libraries and python files being in different directories such as in 64bit installs - various bug fixes - GLib bindings: - deeply recursive types now supported - many symbols are no longer exported as part of the public API - various memleak and other bug fixes D-BUS 0.35.2 (17 July 2005) === - Rename Unix Security Context to SELinux Security Context in API - Fixed more dist errors that distcheck didn't pick up on - Fixed various bugs in the python bindings that prevented them from working D-BUS 0.35.1 (16 July 2005) === - Fixed dist error where python/dbus_bindings.pxd was being shipped instead of dbus_bindings.pxd.in - Use this instead of the 0.35 tarball D-BUS 0.35 (15 July 2005) === - --with-dbus-user added to the configure scripts for configuring the user the system bus runs on - --with-console-auth-dir added to configure scripts for configuring the directory to look in for console user locks - service files for auto-starting D-Bus services now has the ability to pass in command line arguments to the executable - Huge auto-start bug squashed which caused some services not to start when requested in rapid succession - SE-Linux security contexts can now be appended to messages for inspection by services that enforce their own security policies - Colin says the GLib binding are ready for general consumption - New GLib tutorial - New GLib example code - Python bindings are now version (0,42,0) - Python bindings API has changed on the service side - dbus.service has been split out as a seperate module - dbus.service.Service is renamed to dbus.service.BusName - dbus.service.Object has swapped the bus_name and object_path constructor parameters to make it easier to do inheritance over the bus - dbus.glib has been seperated out in order to lessen the dependency on glib and to allow other mainloops to be integrated with the bindings including a planned generic mainloop for non-gui apps. - Python bindings now aquire the GIL when calling back into the python interpreter. Fixes crashes when using threading and other random segfaults. - New Python tutorial - Numerous D-Bus bug fixes all around D-BUS 0.34 (15 June 2005) === - dbus_connection_disconnect is deprecated in favor of dbus_connection_close - The bus can now use D_NOTIFY (if available) to check when configuration files have changed and reload them - New dbus_message_has_path/member/interface API added - The Ping message from the org.freedesktop.DBus.Peer interface is now handled - Complete glib bindings overhaul (and are still under construction) - Tutorial now has an updated GLib section - GLib bindings can now send/receive hash tables, arrays and other complex types - Python bindings overhaul (most public facing API's done) - Python bindings have been split up into separate files - Python added new type classes for hinting to the marshaler what type to send over the wire - Python bindings now have decorators for specifying exported methods and signals - Numerous bug fixes D-BUS 0.33 (25 Apr 2005) === - downgrade requirement from GTK+-2.6 to 2.4 for building gtk components - python binding API's have been overhalled to be more "pythonic" and cleaner - python bindings now export dbus.version which is set to (0,40,0) - python bindings now implement the org.freedesktop.DBus.Introspectable interface - python binding match rules are now more flexable - make check has been fixed - many, many major bug fixes D-BUS 0.32 (29 Mar 2005) === - mono bindings now compiles correctly - mono binding cleanups - glib bindings generates wrappers for bus methods in dbus-glib-bindings.h - glib binding cleanus - users and groups can now be specified by UID and GID in config files - numerous memory leak fixes - various other fixes D-BUS 0.31 (07 Mar 2005) === - land the new message args API and recursive type system - add docs and fixed Doxygen warnings throught source - split out some functions not needed in libdbus to *-util.c source files - take out type convienience functions - libdbus now back below 150K - booleans are now 32-bit instead of 8-bit - specification updated - grand renaming to strip out the use of "service" just say "name" instead (or "bus name" when ambiguous) - rename dbus-daemon-1 to dbus-daemon throughout - rename activation to auto-start - auto-start on by default now - note that libdbus is the low-level API - python bindings updated to the new API - mono bindings updated to the new API - add 16 bit types - dictionaries are now ARRAYS of DICT_ENTRY - dbus-glib-tool renamed to dbus-binding-tool - massive rewrite of the glib bindings - saner names for the dbus interface, object path and service defines - new functions for handling type signitures - bump sonames for libdbus and libdbus-glib - various small fixes D-BUS 0.23 (11 Jan 2005) === - add setgroups() to drop supplementary groups - updated SELinux support - add an "at console" security policy - fix a bug where org.freedesktop.DBus wasn't recognized as an existing service. - error out if --enable-mono is explicitly set and mono libs can't be found - set the max_match_rules_per_connection limit from the config file. - removed dbus_bug_get_with_g_main since it's been replaced by dbus_g_bus_get - fix fd leaks in socket code - lots and lots of mono binding updates, including fixes to make it compatible with Mono 1.1.3 - added --nofork option to override config file setting at runtime - added support for int64 and uint64 to the python bindings - lots of python binding updates - config file DTD updates - use SerivceOwnerChanges signal instead of ServiceCreated and ServiceDeleted - fixes to the authentication code - new init script for Slackware - print out the pid even when --fork is passed - increase preallocation sizes in DBusMessage to heavily reduce reallocs - lots of performance enhancements - lots more small bug fixes D-BUS 0.22 === - add --reply-timeout to dbus-send - fix a memleak - fix Solaris/Forte build - switch to AFL 2.1 rather than 2.0 to address patent termination clause concerns - add SELinux support - mostly repair libxml backend for config parser, still doesn't pass out of memory tests - fix distcheck to include language bindings - add GetConnectionUnixUser method on bus driver - also for UnixProcessID - lots of Python, Mono, other binding fixes - change GLib bindings to not include dbus/dbus.h (fully encapsulate libdbus) - pass paths as strings, not arrays of string - add message signature header field - cleanups to marshaling code - clean up authentication code - reload conf files on SIGHUP - rename SERVICE/SENDER_SERVICE to DESTINATION/SENDER - fix circular conf file inclusion - allow empty arrays - tons of other small bugfixes D-BUS 0.21 === - implement "auto activation" flag on messages, so the destination service can be launched automatically - fix a bug in custom type marshaling - optimize case where multiple apps activate the same service (avoid "thundering herd") - add dynamic service file discovery/reloading - fix a busy loop when blocking for a reply - fix a 64-bit crash involving varargs - fix a bus crash when processing an AcquireService - allow appending TYPE_BYTE via append_args_valist - fix dicts-inside-dicts - enhancements to Python and Qt bindings D-BUS 0.20 === This release lands some very large API changes and numerous bugfixes. The list of changes is too large to fully document here; please refer to the documentation, and message-bus-list archives. D-BUS 0.13 === This is probably the last release before landing the large API changes on the "dbus-object-names" branch. - fix system bus to always use filesystem socket; anyone can create any abstract socket, which isn't secure since if you can crash the system bus you'd be able to replace it. - add DTD for configuration file - improve specification a bit D-BUS 0.12 === - fix "service messagebus status" on Red Hat - fix demarshaling of DBUS_TYPE_NAMED - fix "eval `dbus-launch --exit-with-session`" to exit properly - fix build without --prefix - useless fooling with Mono bindings - useless fooling with gcj bindings - fix srcdir != builddir - fix various compiler warnings and other issues - add get/set data to DBusMessage - fix headers for C++ - OS X build fixes - abstract domain sockets support (Linux only) - add dbus-cleanup-sockets utility for people not using linux - be consistent about defaulting to --session/--system with command line tools - merge in policies from included config files - fix build on non-x86 - docs updates - lots of other bugfixes D-BUS 0.11 === - add --enable-docs to turn off/on the docbook stuff (doesn't cover doxygen stuff yet) - make people define DBUS_API_SUBJECT_TO_CHANGE and read warning in README so they don't expect the API to be frozen already - rename .pc files to "dbus-1.pc" instead of "dbus-1.0.pc" etc. - this will require changing pkg-config invocations - some docs cleanups - add man pages for all executables - allow send to/from bus driver in the default system.conf - fix user lookup bug - implement dbus-launch to launch the session message bus - fix some thread deadlocks - some performance profiling/optimization - add dbus_bus_activate_service() function - fix some minor bugs here and there - install Red Hat initscript in the right place D-BUS 0.10 === - reversed order of args to dbus_message_new() - renamed dbus_message_name_is() and some other functions - change DBusWatch to have dbus_watch_handle() similar to dbus_timeout_handle(), drop connection/server-specific handle routines - change message serials to be unsigned - implemented // features for config file; system bus now has a deny-all policy by default. - system.conf has system.d so packages can install additions to the default policy to the messages they need. e.g. CUPS might install a cups.conf - see test/data/valid-config-files/system.d/test.conf for an example. - add timeouts for authentication, activation - add glib-style "checks" on public API, enable those by default, disable assertions by default - add GMainContext argument to GLib setup functions, can be NULL for default context. Needed for threads. - add 64-bit integer type - validate type of standard message header fields - consider messages in the org.freedesktop.Local namespace to be invalid (to avoid fake disconnect messages for example) - fix assorted memory leaks and other bugs in the SHA-1 auth mechanism - cache user database information (groups user is in, etc.) helps a lot with NIS - always store uid_t, pid_t, gid_t in "ulong" rather than "int" - implement config file settings for which users can connect - SHA-1 unit test - dbus-send, dbus-monitor command line utilities - fixed lots of misc crashes and other bugs D-BUS 0.9 === - implemented a test case for service activation, and fixed many bugs exposed by that - implemented recursive argument marshaling/demarshaling for messages, allowing multidimensional arrays - fixed up integration of message dispatch with main loop by adding a callback on change of dispatch status - add a pidfile feature to daemon - some build fixes - clean up unix domain sockets on exit - add --print-address and the ability to create a random server address in a temporary directory D-BUS 0.8 === - fix dumb bug in 0.7 D-BUS 0.7 === - implement configuration file used to control bus characteristics - implement daemon mode, changing user ID, and other system bus features - add init scripts for systemwide bus - add "make check-coverage" target to check test coverage - more test suite additions - many, many bugfixes - many API changes/fixes D-BUS 0.6 === - Vastly improved bus daemon test suite - Lots of misc. bugfixes and memory leak fixes - Support for marshalling key/value data - Activation improvements. D-BUS 0.5 === - Specification updates - port to OS X and other BSD variants - port to Solaris - Partial work on cookie-based authentication - Thread safety fixes - Lots of misc. bugfixes - Support for more array types - Add data slots to DBusServer - DBusString security audit fixes - Fix for systems (or valgrind) with unaligned malloc blocks D-BUS 0.4 === - Preliminary activation support. - Better authentication test suite - Bus test program - Specification updates - Thread safety - Bug fixes D-BUS 0.3 === - Preliminary limitations - Message sending works - Bus client - Array marshalling/demarshalling - Services - Better OOM handling in the bus - In-proc debug transport - Transport/server address support D-BUS 0.2 === - Include test code in the tarball. D-BUS 0.1 === - Initial release. D-Bus 1.2.1 (04 April) == - Due to issues putting the re-licensing effort on hold indefinitely, it has been decided to move to 1.2.x versioning scheme. Being that 1.1.20 is considered to also be 1.2.0 and this being the second release in the 1.2.x stable series we have versioned this release 1.2.1. This release contains a number of bug fixes identified after 1.1.20. - compiles under some older versions of glibc - compiles without X support once again - fix stuck server grab if dbus-launch is run in an existing D-Bus X session - various Mac OSX build fixes added - don't use the broken poll call on Mac OSX - better checks for linker flag support should allow D-Bus to link under various linkers - exit_on_disconnect is set after the connection registers with a bus so we don't exit if we get a disconnect during the handshake - dicts now work correctly with dbus-send - inotify backend is now less aggressive - pending calls expire correctly - memleak of uuid when the bus is autolaunched fixed D-Bus 1.1.20 - "Conisten Water" (27 Febuary) == - This is the next generation supported STABLE release of D-Bus. For all intents and purposes this is the 1.2.0 release WITHOUT the planned X11/MIT license change due to a couple of license holders who have yet to respond. For the most part this license change is being persued to simplify licensing issues and fix a couple of licensing courner cases. When this happens D-Bus will be released under the 1.2.0 version. - D-Bus 1.0.x effectively goes into security fix mode and will only be updated for major issues. - Fixed CVE-2008-0595 - security policy of the type work as an implicit allow for messages sent without an interface bypassing the default deny rules and potentially allowing restricted methods exported on the bus to be executed by unauthorized users. - Fixes dbus-launch so the session bus goes away so does D-Bus - Builds against latest gcc/glibc changes - Correctly unref connections without guids during shutdown - About the name: Submitted by Greg K Nicholson, Conisten Water is a lake in Cumbria, England where several water speed records have been broken. Between 1956 and 1959 Sir Malcolm's son Donald Campbell set four successive records on the lake in Bluebird K7, a hydroplane. (Wikipedia http://en.wikipedia.org/wiki/Coniston_Water#Waterspeed_record) D-Bus 1.1.4 - 1.2.0RC2 (17 January 2007) == - Fixes inotify support D-Bus 1.1.3 - 1.2.0RC1 (15 January 2007) == - This release is intended to be Release Candidate 1 of major release D-Bus 1.2.0. If nothing is found to be wrong with this release it will become 1.2.0 within a week. If we need to make major changes we will release an RC2 and start the process over again. - This is a development release, so API's may still change if problems are found (though this is extreamly unlikely). - DTD for the introspection format is fixed and uploaded to the servers - Sources now reside in a git repository at http://gitweb.freedesktop.org/?p=dbus/dbus.git;a=summary - Argument path matching of the type arg0path='/aa/bb/' is now supported (see the specification for more information) - New error org.freedesktop.DBus.Error.ObjectPathInUse added - Autolaunched busses now save their parameters in X11 if possible making them behave closer to busses launched through the normal mechanisms - inotify is now the default backend for watching configuration file changes - More support for the AIX platform has been added - Numerous bug fixes and performance enhancements D-Bus 1.1.2 (27 July 2007) == - This release is intended to be a feature complete beta for stable release 1.2.0, please test it. 1.2.0 will follow pretty soon if no major problems are found. We'll do more betas if significant changes are made. - This is a development release, so API's may still change if problems are found (though we will try hard not to). - The system bus now supports starting services on demand. This uses a setuid helper program because system bus daemon runs as a nobody user, while services it launches may need to run as a different user. ***Extra eyes auditing the setuid helper are encouraged and would be timely right now, before 1.2.0*** A design doc is available in doc/system-activation.txt - The TCP address format has been enhanced, such that TCP may be actually usable. The dbus-daemon man page describes the new elements in the address format. 1.1.1 had added an all_interfaces flag to the format, which has been removed in favor of a cleaner approach. - Some thread-related bugs have been fixed, these are important fixes if you are using multiple threads with libdbus, and not important otherwise. D-Bus 1.1.1 (18 June 2007) == - This is a development release, unless you need specific functionality please use the stable releases as API's may change (though we will try hard not to) - The bus daemon now generates a globally-unique ID for itself, which is available using the convenience function dbus_bus_get_id(). Use this as a unique ID for a user's session, for example. - dbus_server_get_id(), dbus_connection_get_server_id() now available to access the unique ID of a particular address - dbus_watch_get_fd() deprecated since it had unclear cross-platform semantics. dbus_watch_get_unix_fd() and dbus_watch_get_socket() replace it. - support ANONYMOUS mechanism for authentication, which allows a client to authenticate as nobody in particular - add API dbus_connection_set_allow_anonymous() which will allow the message stream to begin if the client auths as anonymous (otherwise, the client will be dropped unless they auth as a user). - the ANONYMOUS support means you can now use D-Bus (without a bus daemon) as a protocol for a network service provided to anonymous Internet or LAN clients - many internal changes to better support the Windows port, though the port is still not complete in this release - some improved documentation and return_if_fail checks - some small bug fixes D-Bus 1.1.0 (25 May 2007) == - first release in the development series, unless you need specific functionality please use the stable releases as API's may change (though we will try hard not to) - better eavesdropping support now picks up reply messages for debugging - .pc file now lists the directory the daemon is installed into (daemondir) - GetAll call added to the properties interface - support for message serialization added for use with external transports like TUBES!!! - many bugs fixed The old NEWS file. NEWS is now generated from git and put into the release tarballs. libssh2 1.11.1 Deprecation notices: - Starting October 2024, the following algos go deprecated and will be disabled in default builds (with an option to enable them): - DSA: `ssh-dss` hostkeys. You can enable it now with `-DLIBSSH2_DSA_ENABLE`. Disabled by default in OpenSSH 7.0 (2015-08-11). Support to be removed by early 2025 from OpenSSH. - MD5-based MACs and hashes: `hmac-md5`, `hmac-md5-96`, `LIBSSH2_HOSTKEY_HASH_MD5` You can disable it now with `-DLIBSSH2_NO_MD5`. Disabled by default since OpenSSH 7.2 (2016-02-29). - 3DES cipher: `3des-cbc` You can disable it now with `-DLIBSSH2_NO_3DES`. Disabled by default since OpenSSH 7.4 (2016-12-19). - RIPEMD-160 MACs: `hmac-ripemd160`, `hmac-ripemd160@openssh.com` You can disable it now with `-DLIBSSH2_NO_HMAC_RIPEMD`. Removed in OpenSSH 7.6 (2017-10-03). - Blowfish cipher: `blowfish-cbc` You can disable it now with `-DLIBSSH2_NO_BLOWFISH`. Removed in OpenSSH 7.6 (2017-10-03). - RC4 ciphers: `arcfour`, `arcfour128` You can disable it now with `-DLIBSSH2_NO_RC4`. Removed in OpenSSH 7.6 (2017-10-03). - CAST cipher: `cast128-cbc` You can disable it now with `-DLIBSSH2_NO_CAST`. Removed in OpenSSH 7.6 (2017-10-03). - Starting April 2025, above options will be deleted from the libssh2 codebase. - Default builds will also disable support for old-style, MD5-based encrypted private keys. You can disable it now with `-DLIBSSH2_NO_MD5_PEM`. This release includes the following enhancements and bugfixes: - autotools: fix to update `LDFLAGS` for each detected dependency (d19b6190 #1384 #1381 #1377) - autotools: delete `--disable-tests` option, fix CI tests (e051ae34 #1271 #715 revert: 7483edfa) - autotools: show the default for `hidden-symbols` option (a3f5594a #1269) - autotools: enable `-Wunused-macros` with gcc (ecdf5199 #1262 #1227 #1224) - autotools: fix dotless gcc and Apple clang version detections (89ccc83c #1232 #1187) - autotools: show more clang/gcc version details (fb580161 #1230) - autotools: avoid warnings in libtool stub code (96682bd5 #1227 #1224) - autotools: sync warning enabler code with curl (5996fefe #1223) - autotools: rename variable (ce5f208a #1222) - autotools: picky warning options tidy-up (cdca8cff #1221) - autotools: fix `cp` to preserve attributes and timestamp in `Makefile.am` (f64e6318) - autotools: fix selecting WinCNG in cross-builds (and more) (00a3b88c #1187 #1186) - autotools: use comma separator in `Requires.private` of `libssh2.pc` (7f83de14 #1124) - autotools: remove `AB_INIT` from `configure.ac` (f4f52ccc) - autotools: improve libz position (c89174a7 #1077 #941 #1075 #1013 regr: 4f0f4bff) - autotools: skip tests requiring static lib if `--disable-static` (572c57c9 #1072 #663 #1056 regr: 83853f8a) - build: stop detecting `sys/param.h` header (2677d3b0 #1418 #1415) - build: silence warnings inside `FD_SET()`/`FD_ISSET()` macros (323a14b2 #1379) - build: drop `-Wformat-nonliteral` warning suppressions (c452c5cc #1342) - build: enable `-pedantic-errors` (3ec53f3e #1286) - build: add mingw-w64 support to `LIBSSH2_PRINTF()` attribute (f8c45794 #1287) - build: add `LIBSSH2_NO_DEPRECATED` option (b1414503 #1267 #1266 #1260 #1259) - build: enable missing OpenSSF-recommended warnings, with fixes (afa6b865 #1257) - build: enable more compiler warnings and fix them (7ecc309c #1224) - build: picky warning updates (328a96b3 #1219) - build: revert: respect autotools `DLL_EXPORT` in `libssh2.h` (481be044 #1141 #917 revert: fb1195cf) - build: stop requiring libssl from openssl (c84745e3 #1128) - build: tidy-up `libssh2.pc.in` variable names (5720dd9f #1125) - build: add/fix `Requires.private` packages in `libssh2.pc` (ef538069 #1123) - buildconf: drop (814a850c #1441 follow: fc5d7788) - checksrc: update, check all sources, fix fallouts (1117b677 #1457) - checksrc: sync with curl (8cd473c9 #1272) - checksrc: fix spelling in comment (a95d401f) - checksrc: modernise Perl file open (3d309f9b) - checksrc: switch to dot file (d67a91aa #1052) - ci: use Ninja with cmake (20ad047d #1458) - ci: disable dependency tracking in autotools builds (e44f0418 #1396) - ci: fix mbedtls runners on macOS (84411539 #1381) - ci: enable Unity mode for most CMake builds (1bfae57b #1367 #1034) - ci: add shellcheck job and script (d88b9bcd) - ci: verify build and install from tarball (a86e27e8 #1362) - ci: add reproducibility test for `maketgz` (2d765e45 #1360) - ci: use Linux runner for BSDs, add arm64 FreeBSD 14 job (6f86b196 #1343) - ci: do not parallelize `distcheck` job (5e65dd87 #1339) - ci: add FreeBSD 14 job, fix issues (46333adf #1277) - ci: add OmniOS job, fix issues (5e0ec991) - ci: show compiler in cross/cygwin job names (c9124088) - ci: add OpenBSD (v7.4) job + fix build error in example (0c9a8e35 #1250) - ci: add NetBSD (v9.3) job (65c7a7a5) - ci: update and speed up FreeBSD job (eee4e805) - ci: use absolute path in `CMAKE_INSTALL_PREFIX` (74948816 #1247) - ci: boost mbedTLS build speed (236e79a1 #1245) - ci: add BoringSSL job (cmake, gcc, amd64) (c9dd3566 #1233) - ci: fixup FreeBSD version, bump mbedTLS (fea6664e #1217) - ci: add FreeBSD 13.2 job (a7d2a573 #1215) - ci: mbedTLS 3.5.0 (5e190442 #1202) - ci: update actions, use shallow clones with appveyor (d468a33f #1199) - ci: replace `mv` + `chmod` with `install` in `Dockerfile` (5754fed6 #1175) - ci: set file mode early in `appveyor_docker.yml` (633db55f) - ci: add spellcheck (codespell) (a79218d3) - ci: add MSYS builds (autotools and cmake) (d43b8d9b #1162) - ci: add Cygwin builds (autotools and cmake) (f1e96e73 #1161) - ci: add mingw-w64 UWP build (1215aa5f #1155 #1147) - ci: add missing timeout to 'autotools distcheck' step (6265ffdb) - ci: add non-static autotools i386 build, ignore GHA updates on AppVeyor (c6e137f7 #1074 #1072) - ci: prefer `=` operator in shell snippets (e5c03043 #1073) - ci: drop redundant/unused vars, sync var names (ab8e95bc #1059) - ci: add i386 Linux build (with mbedTLS) (abdf40c7 #1057 #1053) - ci/appveyor: reduce test runs (workaround for infrastructure permafails) (b5e68bdc #1461) - ci/appveyor: increase wait for SSH server on GHA (bf3af90b) - ci/appveyor: bump to OpenSSL 3.2.1 (53d9c1a6 #1363 #1348) - ci/appveyor: re-enable parallel mode (e190e5b2 #1294 #884 #867) - ci/appveyor: delete UWP job broken since Visual Studio upgrade (d0a7f1da #1275) - ci/appveyor: YAML/PowerShell formatting, shorten variable name (06fd721f #1200) - ci/appveyor: move to pure PowerShell (8a081fd9 #1197) - ci/GHA: revert concurrency and improve permissions (e4c042f6) - ci/GHA: FreeBSD 14.1, actions bump (ae04b1b9 #1424) - ci/GHA: fix wolfSSL-from-source AES-GCM tests (1c0b07a7 #1409 #1408) - ci/GHA: add Linux job with latest wolfSSL built from source (d4cea53f #1408 #1299 #1020) - ci/GHA: tidy up build-from-source steps (2c633033) - ci/GHA: show configure logs on failure and other tidy-ups (dab48398 #1403) - ci/GHA: bump parallel jobs to nproc+1 (6f3d3bc8 #1402) - ci/GHA: show test logs on failure (b8ffa7a5 #1401) - ci/GHA: fix `Dockerfile` failing after Ubuntu package update (839bb84e #1400) - ci/GHA: use ubuntu-latest with OmniOS job (50143d58) - ci/GHA: shell syntax tidy-up (3b23e039 #1390) - ci/GHA: bump NetBSD/OpenBSD, add NetBSD arm64 job (e980af72 #1388) - ci/GHA: tidy up wolfSSL autotools config on macOS (5953c1f1 #1383) - ci/GHA: shorter mbedTLS autotools workaround (736e3d7d #1382 #1381) - ci/GHA: fix gcrypt with autotools/macOS/Homebrew/ARM64 (ae2770de #1377) - ci/GHA: fix verbose option for autotools jobs (499b27ae #1376) - ci/GHA: dump `config.log` on failure for macOS autotools jobs (4fa69214 #1375) - ci/GHA: fix `autoreconf` failure on macOS/Homebrew (0b64b30b #1374) - ci/GHA: fixup Homebrew location (for ARM runners) (6128aee0 #1373) - ci/GHA: review/fixup auto-cancel settings (b08cfbc9 #1292) - ci/GHA: restore curly braces in `if` (36748270 #1145) - ci/GHA: simplify `if` strings (cab3db58 #1140) - cmake: sync and improve Find modules, add `pkg-config` native detection (45064137 #1445 #1420) - cmake: generate `LIBSSH2_PC_LIBS_PRIVATE` dynamically (c87f1296 #1466) - cmake: add comment about `ibssh2.pc.in` variables (14b1b9d0) - cmake: support absolute `CMAKE_INSTALL_INCLUDEDIR`/`CMAKE_INSTALL_LIBDIR` (d70cee36 #1465) - cmake: rename two variables and initialize them (0fce9dcc #1464) - cmake: prefer `find_dependency()` in `libssh2-config.cmake` (d9c2e550 #1460) - cmake: tidy up syntax, minor improvements (9d9ee780 #1446) - cmake: rename mbedTLS and wolfSSL Find modules (570de0f2) - cmake: fixup version detection in mbedTLS Find module (8e3c40b2 #1444) - cmake: mbedTLS detection tidy-ups (6d1d13c2 #1438) - cmake: add quotes, delete ending dirseps (2bb46d44 #1437 #1166) - cmake: sync formatting in `cmake/Find*` modules (a0310699) - cmake: tidy up function name casing in `CopyRuntimeDependencies.cmake` (03547cb8) - cmake: use the imported target of FindOpenSSL module (82b09f9b #1322) - cmake: rename picky warnings script (64d6789f #1225) - cmake: fix multiple include of libssh2 package (932d6a32 #1216) - cmake: show crypto backend in feature summary (20387285 #1211) - cmake: simplify showing CMake version (fc00bdd7 #1203) - cmake: cleanup mbedTLS version detection more (4c241d5c #1196 #1192) - cmake: delete duplicate `include()` (30eef0a6) - cmake: improve/fix mbedTLS detection (41594675 #1192 #1191) - cmake: tidy-up `foreach()` syntax (4a64ca14 #1180) - cmake: verify `libssh2_VERSION` in integration tests (a20572e9) - cmake: show cmake versions in ci (87f5769b) - cmake: quote more strings (e9c7d3af #1173) - cmake: add `ExternalProject` integration test (aeaefaf6 #1171) - cmake: add integration tests (8715c3d5 #1170) - cmake: (re-)add aliases for `add_subdirectory()` builds (4ff64ae3 #1169) - cmake: style tidy-up (3fa5282d #1166) - cmake: add `LIB_NAME` variable (5453fc80 #1159) - cmake: tidy-up concatenation in `CMAKE_MODULE_PATH` (ae7d5108 #1157) - cmake: replace `libssh2` literals with `PROJECT_NAME` variable (72fd2595 #1152) - cmake: fix `STREQUAL` check in error branch (42d3bf13 #1151) - cmake: cache more config values on Windows (11a03690 #1142) - cmake: streamline invocation (f58f77b5 #1138) - cmake: merge `set_target_properties()` calls (a9091007 #1132) - cmake: (re-)add zlib to `Libs.private` in `libssh2.pc` (64643018 #1131) - cmake: use `wolfssl/options.h` for detection, like autotools (c5ec6c49 #1130) - cmake: add openssl libs to `Libs.private` in `libssh2.pc` (5cfa59d3 #1127) - cmake: bump minimum CMake version to v3.7.0 (9cd18f45 #1126) - cmake: CMAKE_SOURCE_DIR -> PROJECT_SOURCE_DIR (0f396aa9 #1121) - cmake: tidy-ups (2fc36790 #1122) - cmake: re-add `Libssh2:libssh2` for compatibility + lowercase namespace (2da13c13 #1104 #731 #1103) - copyright: remove years from copyright headers (187d89bb #1082) - disable DSA by default (b7ab0faa #1435 #1433) - docs: update `INSTALL_AUTOTOOLS` (2f0efde3 #1316) - docs: replace SHA1 with SHA256 in CMake example (766bde9f) - example: restore `sys/time.h` for AIX (24503cb9 #1340 #1335 #1334 #1001 regr: e53aae0e) - example: use `libssh2_socket_t` in X11 example (3f60ccb7) - example: replace remaining libssh2_scp_recv with libssh2_scp_recv2 in output messages (8d69e63d #1258 follow: 6c84a426) - example: fix regression in `ssh2_exec.c` (279a2e57 #1106 #861 #846 #1105 regr: b13936bd) - example, tests: call `WSACleanup()` for each `WSAStartup()` (94b6bad3 #1283) - example, tests: fix/silence `-Wformat-truncation=2` gcc warnings (744e059f) - hostkey: do not advertise ssh-rsa when SHA1 is disabled (82d1b8ff #1093 #1092) - kex: prevent possible double free of hostkey (b3465418 #1452) - kex: always check for null pointers before calling _libssh2_bn_set_word (9f23a3bb #1423) - kex: fix a memory leak in key exchange (19101843 #1412 #1404) - kex: always add extension indicators to kex_algorithms (00e2a07e #1327 #1326) - libssh2.h: add deprecated function warnings (9839ebe5 #1289 #1260) - libssh2.h: add portable `LIBSSH2_SOCKET_CLOSE()` macro (28dbf016 #1278) - libssh2.h: use `_WIN32` for Windows detection instead of rolling our own (631e7734 #1238) - libssh2.pc: reference mbedcrypto pkgconfig (c149a127 #1405) - libssh2.pc: re-add & extend support for static-only libssh2 builds (624abe27 #1119 #1114) - libssh2.pc: don't put `@LIBS@` in pc file (1209c16d) - mac: add empty hash functions for `mac_method_hmac_aesgcm` to not crash when e.g. setting `LIBSSH2_METHOD_CRYPT_CS` (b2738391 #1321) - mac: handle low-level errors (f64885b6 #1297) - Makefile.mk: delete Windows-focused raw GNU Make build (43485579 #1204) - maketgz: reproducible tarballs/zip, display tarball hashes (d52fe1b4 #1357 #1359) - maketgz: `set -eu`, reproducibility, improve zip, add CI test (cba7f975 #1353) - man: improve `libssh2_userauth_publickey_from*` manpages (581b72aa #1347 #1308 #652) - man: fix double spaces and dash escaping (a3ffc422 #1210) - man: add description to `libssh2_session_get_blocking.3` (67e39091 #1185) - mbedtls: always init ECDSA mbedtls_pk_context (a50d7deb #1430) - mbedtls: correctly initialize values (ECDSA) (1701d5c0 #1428 #1421) - mbedtls: expose `mbedtls_pk_load_file()` for our use (1628f6ca #1421 #1393 #1349 follow: e973493f) - mbedtls: add workaround + FIXME to build with 3.6.0 (2e4c5ec4 #1349) - mbedtls: improve disabling `-Wredundant-decls` (ecec68a2 #1226 #1224) - mbedtls: include `version.h` for `MBEDTLS_VERSION_NUMBER` (9d7bc253 #1095 #1094) - mbedtls: use more `size_t` to sync up with `crypto.h` (1153ebde #1054 #879 #846 #1053) - md5: allow disabling old-style encrypted private keys at build-time (eb9f9de2 #1181) - mingw: fix printf mask for 64-bit integers (36c1e1d1 #1091 #876 #846 #1090) - misc: flatten `_libssh2_explicit_zero` if tree (74e74288 #1149) - NMakefile: delete (c515eed3 #1134 #1129) - openssl: free allocated resources when using openssl3 (b942bad1 #1459) - openssl: fix memory leaks in `_libssh2_ecdsa_curve_name_with_octal_new` and `_libssh2_ecdsa_verify` (8d3bc19b #1449) - openssl: fix calculating DSA public key with OpenSSL 3 (8b3c6e9d #1380) - openssl: initialize BIGNUMs to NULL in `gen_publickey_from_dsa` for OpenSSL 3 (f1133c75 #1320) - openssl: fix cppcheck found NULL dereferences (f2945905 #1304) - openssl: delete internal `read_openssh_private_key_from_memory()` (34aff5ff #1306) - openssl: use OpenSSL 3 HMAC API, add `no-deprecated` CI job (363dcbf4 #1243 #1235 #1207) - openssl: make a function static, add `#ifdef` comments (efee9133 #1246 #248 follow: 03092292) - openssl: fix DSA code to use OpenSSL 3 API (82581941 #1244 #1207) - openssl: fix `EC_KEY` reference with OpenSSL 3 `no-deprecated` build (487152f4 #1236 #1235 #1207) - openssl: use non-deprecated APIs with OpenSSL 3.x (b0ab005f #1207) - openssl: silence `-Wunused-value` warnings (bf285500 #1205) - openssl: use automatic initialization with LibreSSL 2.7.0+ (d79047c9 #1146 #302) - openssl: add missing check for `LIBRESSL_VERSION_NUMBER` before use (4a42f42e #1117 #1115) - os400: drop vsprintf() use (40e817ff #1462 #1457) - os400: Add two recent files to the distribution (e4c65e5b #1364) - os400: fix shellcheck warnings in scripts (fixups) (81341e1e #1366 #1364 #1358) - os400: fix shellcheck warnings in scripts (c6625707 #1358) - os400: maintain up to date (8457c37a #1309) - packet: properly bounds check packet_authagent_open() (88a960a8 #1179) - pem: fix private keys encrypted with AES-GCM methods (e87bdefa #1133) - reuse: upgrade to `REUSE.toml` (70b8bf31 #1419) - reuse: fix duplicate copyright warning (b9a4ed83) - reuse: comply with 3.1 spec and 2.0.0 checker (fe6239a1 #1102 #1101 #1098) - reuse: provide SPDX identifiers (f6aa31f4 #1084) - scp: fix missing cast for targets without large file support (c317e06f #1060 #1057 #1002 regr: 5db836b2) - session: support server banners up to 8192 bytes (was: 256) (1a9e8811 #1443 #1442) - session: add `libssh2_session_callback_set2()` (c0f69548 #1285) - session: handle EINTR from send/recv/poll/select to try again as the error is not fatal (798ed4a7 #1058 #955) - sftp: increase SFTP_HANDLE_MAXLEN back to 4092 (75de6a37 #1422) - sftp: implement posix-rename@openssh.com (fb652746 #1386) - src: implement chacha20-poly1305@openssh.com (492bc543 #1426 #584) - src: use `UINT32_MAX` (dc206408 #1413) - src: fix type warning in `libssh2_sftp_unlink` macro (ac2e8c73 #1406) - src: check the return value from `_libssh2_bn_*()` functions (95c824d5 #1354) - src: support RSA-SHA2 cert-based authentication (rsa-sha2-512_cert and rsa-sha2-256_cert) (3a6ab70d #1314) - src: check hash update/final success (4718ede4 #1303 #1301) - src: check hash init success (2ed9eb92 #1301) - src: add 'strict KEX' to fix CVE-2023-48795 "Terrapin Attack" (d34d9258 #1291 #1290) - src: disable `-Wsign-conversion` warnings, add option to re-enable (6e451669 #1284 #1257) - src: fix gcc 13 `-Wconversion` warning on Darwin (8cca7b77 #1209 follow: 08354e0a) - src: drop a redundant `#include` (1f0174d0 #1153) - src: improve MSVC C4701 warning fix (8b924999 #1086 #876 #1083) - src: bump `hash_len` to `size_t` in `LIBSSH2_HOSTKEY_METHOD` (8b917d76 #1076) - src: bump DSA and ECDSA sign `hash_len` to `size_t` (7b8e0225 #1055) - tests: avoid using `MAXPATHLEN`, for portability (12427f4f #1415 #198 #1414) - tests: fix excluding AES-GCM tests (fbd9d192 #1410) - tests: drop default cygpath option `-u` (38e50aa0) - tests: fix shellcheck issues in `test_sshd.test` (a2ac8c55) - tests: sync port number type with the rest of codebase (eb996af8) - tests: fall back to `$LOGNAME` for username (5326a5ce #1241 #1240) - tests: show cmake version used in integration tests (2cd2f40e #1201) - tests: formatting and tidy-ups (e61987a3) - tests: replace FIXME with comments (1a99a86a) - tests: add aes256-gcm encrypted key test (802336cf #1135 #1133) - tests: trap signals in scripts (b2916b28 #1098) - tests: cast to avoid `-Wchar-subscripts` with Cygwin (43df6a46 #1081 #1080) - test_read: make it run without Docker (57e9d18e #1139) - test_sshd.test: show sshd and test connect logs on harness failure (299c2040 #1097) - test_sshd.test: set a safe PID directory (e8cabdcf #1089) - test_sshd.test: minor cleanups (d29eea1d) - tidy-up: link updates (c905bfd2 #1434) - tidy-up: typo in comment (792e1b6f) - tidy-up: fix typo found by codespell (706ec36d) - tidy-up: bump casts from int to long for large C99 types in printfs (2e5a8719 #1264 #1257) - tidy-up: `unsigned` -> `unsigned int` (b136c379) - tidy-up: stop using leading underscores in macro names (c6589b88 #1248) - tidy-up: around `stdint.h` (bfa00f1b #1212) - tidy-up: fix typo in `readme.vms` (a9a79e7a) - tidy-up: use built-in `_WIN32` macro to detect Windows (6fbc9505 #1195) - tidy-up: drop `www.` from `www.libssh2.org` (6e3e8839 #1172) - tidy-up: delete duplicate word from comment (76307435) - tidy-up: avoid exclamations, prefer single quotes, in outputs (003fb454 #1079) - TODO: disable or drop weak algos (0b4bdc85 #1261) - transport: fix unstable connections over non-blocking sockets (de004875 #1454 #720 #1431 #1397) - transport: check ETM on remote end when receiving (bde10825 #1332 #1331) - transport: fix incorrect byte offset in debug message (2388a3aa #1096) - userauth: avoid oob with huge interactive kbd response (f3a85cad #1337) - userauth: add a new structure to separate memory read and file read (63b4c20e #773) - userauth: check whether `*key_method` is a NULL pointer instead of `key_method` (bec57c40) - wincng: fix `DH_GEX_MAXGROUP` set higher than supported (48584671 #1372 #493) - wincng: add to ci/GHA, add `./configure` option `--enable-ecdsa-wincng` (3f98bfb0 #1368 #1315) - wincng: add ECDSA support for host and user authentication (3e723437 #1315) - wincng: prefer `ULONG`/`DWORD` over `unsigned long` (186c1d63 #1165) - wincng: tidy-ups (7bb669b5 #1164) - wolfssl: drop header path hack (8ae1b2d7 #1439) - wolfssl: fix `EVP_Cipher()` use with v5.6.0 and older (a5b0fac2 #1407 #1394 #797 #1299 #1020) - wolfssl: bump version in upstream issue comment (5cab802c) - wolfssl: require v5.4.0 for AES-GCM (260a721c #1411 #1299 #1020) - wolfssl: enable debug logging in wolfSSL when compiled in (76e7a68a #1310) This release would not have looked like this without help, code, reports and advice from friends like these: Viktor Szakats, Michael Buckley, Patrick Monnerat, Ren Mingshuai, Will Cosgrove, Daniel Stenberg, Josef Cejka, Nicolas Mora, Ryan Kelley, Aaron Stone, Adam, Anders Borum, András Fekete, Andrei Augustin, binary1248, Brian Inglis, brucsc on GitHub, concussious on github, Dan Fandrich, dksslq on github, Haowei Hsu, Harmen Stoppels, Harry Mallon, Jack L, Jakob Egger, Jiwoo Park, João M. S. Silva, Joel Depooter, Johannes Passing, Jose Quaresma, Juliusz Sosinowicz, Kai Pastor, Kenneth Davidson, klux21 on github, Lyndon Brown, Marc Hoersken, mike-jumper, naddy, Nursan Valeyev, Paul Howarth, PewPewPew, Radek Brich, rahmanih on github, rolag on github, Seo Suchan, shubhamhii on github, Steve McIntyre, Tejaswi Kandula, Tobias Stoeckmann, Trzik, Xi Ruoyao #!/usr/bin/env perl # Copyright (C) The libssh2 project and its contributors. # SPDX-License-Identifier: BSD-3-Clause # git log --pretty=fuller --no-color --date=short --decorate=full my @mname = ('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' ); sub nicedate { my ($date)=$_; if($date =~ /(\d\d\d\d)-(\d\d)-(\d\d)/) { return sprintf("%d %s %4d", $3, $mname[$2-1], $1); } return $date; } print ' Changelog for the libssh2 project. Generated with git2news.pl '; my $line; my $tag; while() { my $l = $_; if($l =~/^commit ([[:xdigit:]]*) ?(.*)/) { $co = $1; my $ref = $2; if ($ref =~ /refs\/tags\/(libssh2-|VERSION\.)([0-9._]*)/) { $tag = $2; } else { $tag = ''; } } elsif($l =~ /^Author: *(.*) +` is removed from `Token`, the internal field is still public, so `Token(my_token)` can still be used. ## Changed * Various documentation improvements were made around correct usage of `Poll` and registered event sources. It is recommended to reread the documentation of at least `event::Source` and `Poll`. * Mio now uses Rust 2018 and rustfmt for all code. * `Event` was changed to be a wrapper around the OS event. This means it can be significantly larger on some OSs. * `Ready` was removed and replaced with various `is_*` methods on `Event`. For example instead checking for readable readiness using `Event::ready().is_readable()`, you would call `Event::is_readable()`. * `Ready::is_hup` was removed in favour of `Event::is_read_closed` and `Event::is_write_closed`. * The Iterator implementation of `Events` was changed to return `&Event`. * `Evented` was renamed to `event::Source` and now takes mutable reference to the source. * Minimum supported Rust version was increased to 1.39. * By default Mio now uses a shim implementation. To enable the full implementation, that uses the OS, enable the `os-oll` feature. To enable the network types use `tcp`, `udp` and/or `uds`. For more documentation on the features see the `feature` module in the API documentation (requires the `extra-docs` feature). * The entire Windows implementation was rewritten. * Various optimisation were made to reduce the number of system calls in creating and using sockets, e.g. making use of `accept4(2)`. * The `fmt::Debug` implementation of `Events` is now actually useful as it prints all `Event`s. # 0.6.23 (Dec 01, 2020) ### Changed - **MSRV**: Increased the MSRV from 1.18.0 (Jun 8, 2017) to 1.31.0 (Dec 6, 2018) (https://github.com/tokio-rs/mio/commit/4879e0d32ddfd98e762fc87240e594a3ad8fca30). ### Fixed - Work around Linux kernel < 2.6.37 bug on 32-bits making timeouts longer then ~30 minutes effectively infinite (https://github.com/tokio-rs/mio/commit/e7cba59950e9c9fa6194e29b5b1e72029e3df455). - Update miow and net2 dependencies to get rid of invalid memory layout assumption (https://github.com/tokio-rs/mio/commit/13f02ac0a86d7c0c0001e5ff8960a0b4340d075c). # 0.6.22 (May 01, 2020) ### Added - Add support for illumos target (#1294) # 0.6.21 (November 27, 2019) ### Fixed - remove `=` dependency on `cfg-if`. # 0.6.20 (November 21, 2019) ### Fixed - Use default IOCP concurrency value (#1161). - setting FD_CLOEXEC in pipe (#1095). # 0.6.19 (May 28, 2018) ### Fixed - Do not trigger HUP events on kqueue platforms (#958). # 0.6.18 (May 24, 2018) ### Fixed - Fix compilation on kqueue platforms with 32bit C long (#948). # 0.6.17 (May 15, 2018) ### Fixed - Don't report `RDHUP` as `HUP` (#939) - Fix lazycell related compilation issues. - Fix EPOLLPRI conflicting with READABLE - Abort process on ref count overflows ### Added - Define PRI on all targets # 0.6.16 (September 5, 2018) * Add EPOLLPRI readiness to UnixReady on supported platforms (#867) * Reduce spurious awaken calls (#875) # 0.6.15 (July 3, 2018) * Implement `Evented` for containers (#840). * Fix android-aarch64 build (#850). # 0.6.14 (March 8, 2018) * Add `Poll::poll_interruptible` (#811) * Add `Ready::all` and `usize` conversions (#825) # 0.6.13 (February 5, 2018) * Fix build on DragonFlyBSD. * Add `TcpListener::from_std` that does not require the socket addr. * Deprecate `TcpListener::from_listener` in favor of from_std. # 0.6.12 (January 5, 2018) * Add `TcpStream::peek` function (#773). * Raise minimum Rust version to 1.18.0. * `Poll`: retry select() when interrupted by a signal (#742). * Deprecate `Events` index access (#713). * Add `Events::clear` (#782). * Add support for `lio_listio` (#780). # 0.6.11 (October 25, 2017) * Allow register to take empty interest (#640). * Fix bug with TCP errors on windows (#725). * Add TcpListener::accept_std (#733). * Update IoVec to fix soundness bug -- includes behavior change. (#747). * Minimum Rust version is now 1.14.0. * Fix Android x86_64 build. * Misc API & doc polish. # 0.6.10 (July 27, 2017) * Experimental support for Fuchsia * Add `only_v6` option for UDP sockets * Fix build on NetBSD * Minimum Rust version is now 1.13.0 * Assignment operators (e.g. `|=`) are now implemented for `Ready` # 0.6.9 (June 7, 2017) * More socket options are exposed through the TCP types, brought in through the `net2` crate. # 0.6.8 (May 26, 2017) * Support Fuchia * POSIX AIO support * Fix memory leak caused by Register::new2 * Windows: fix handling failed TCP connections * Fix build on aarch64-linux-android * Fix usage of `O_CLOEXEC` with `SETFL` # 0.6.7 (April 27, 2017) * Ignore EPIPE coming out of `kevent` * Timer thread should exit when timer is dropped. # 0.6.6 (March 22, 2017) * Add send(), recv() and connect() to UDPSocket. * Fix bug in custom readiness queue * Move net types into `net` module # 0.6.5 (March 14, 2017) * Misc improvements to kqueue bindings * Add official support for iOS, Android, BSD * Reimplement custom readiness queue * `Poll` is now `Sync` * Officially deprecate non-core functionality (timers, channel, etc...) * `Registration` now implements `Evented` * Fix bug around error conditions with `connect` on windows. * Use iovec crate for scatter / gather operations * Only support readable and writable readiness on all platforms * Expose additional readiness in a platform specific capacity # 0.6.4 (January 24, 2017) * Fix compilation on musl * Add `TcpStream::from_stream` which converts a std TCP stream to Mio. # 0.6.3 (January 22, 2017) * Implement readv/writev for `TcpStream`, allowing vectored reads/writes to work across platforms * Remove `nix` dependency * Implement `Display` and `Error` for some channel error types. * Optimize TCP on Windows through `SetFileCompletionNotificationModes` # 0.6.2 (December 18, 2016) * Allow registration of custom handles on Windows (like `EventedFd` on Unix) * Send only one byte for the awakener on Unix instead of four * Fix a bug in the timer implementation which caused an infinite loop # 0.6.1 (October 30, 2016) * Update dependency of `libc` to 0.2.16 * Fix channel `dec` logic * Fix a timer bug around timeout cancellation * Don't allocate buffers for TCP reads on Windows * Touched up documentation in a few places * Fix an infinite looping timer thread on OSX * Fix compile on 32-bit OSX * Fix compile on FreeBSD # 0.6.0 (September 2, 2016) * Shift primary API towards `Poll` * `EventLoop` and types to `deprecated` mod. All contents of the `deprecated` mod will be removed by Mio 1.0. * Increase minimum supported Rust version to 1.9.0 * Deprecate unix domain socket implementation in favor of using a version external to Mio. For example: https://github.com/alexcrichton/mio-uds. * Remove various types now included in `std` * Updated TCP & UDP APIs to match the versions in `std` * Enable implementing `Evented` for any type via `Registration` * Rename `IoEvent` -> `Event` * Access `Event` data via functions vs. public fields. * Expose `Events` as a public type that is passed into `Poll` * Use `std::time::Duration` for all APIs that require a time duration. * Polled events are now retrieved via `Events` type. * Implement `std::error::Error` for `TimerError` * Relax `Send` bound on notify messages. * Remove `Clone` impl for `Timeout` (future proof) * Remove `mio::prelude` * Remove `mio::util` * Remove dependency on bytes # 0.5.0 (December 3, 2015) * Windows support (#239) * NetBSD support (#306) * Android support (#295) * Don't re-export bytes types * Renamed `EventLoop::register_opt` to `EventLoop::register` (#257) * `EventLoopConfig` is now a builder instead of having public struct fields. It is also no longer `Copy`. (#259) * `TcpSocket` is no longer exported in the public API (#262) * Integrate with net2. (#262) * `TcpListener` now returns the remote peer address from `accept` as well (#275) * The `UdpSocket::{send_to, recv_from}` methods are no longer generic over `Buf` or `MutBuf` but instead take slices directly. The return types have also been updated to return the number of bytes transferred. (#260) * Fix bug with kqueue where an error on registration prevented the changelist from getting flushed (#276) * Support sending/receiving FDs over UNIX sockets (#291) * Mio's socket types are permanently associated with an EventLoop (#308) * Reduce unnecessary poll wakeups (#314) # 0.4.1 (July 21, 2015) * [BUGFIX] Fix notify channel concurrency bug (#216) # 0.4.0 (July 16, 2015) * [BUGFIX] EventLoop::register requests all events, not just readable. * [BUGFIX] Attempting to send a message to a shutdown event loop fails correctly. * [FEATURE] Expose TCP shutdown * [IMPROVEMENT] Coalesce readable & writable into `ready` event (#184) * [IMPROVEMENT] Rename TryRead & TryWrite function names to avoid conflict with std. * [IMPROVEMENT] Provide TCP and UDP types in Mio (path to windows #155) * [IMPROVEMENT] Use clock_ticks crate instead of time (path to windows #155) * [IMPROVEMENT] Move unix specific features into mio::unix module * [IMPROVEMENT] TcpListener sets SO_REUSEADDR by default # `object` Change Log -------------------------------------------------------------------------------- ## 0.38.1 Released 2026/01/02. ### Changed * Updated `wasmparser` dependency. ### Added * Added basic PowerPC relocation support for Mach-O. [#825](https://github.com/gimli-rs/object/pull/825) * Added more ELF relocations for LoongArch. [#826](https://github.com/gimli-rs/object/pull/826) [#827](https://github.com/gimli-rs/object/pull/827) * Added `RelocationKind::None`. [#828](https://github.com/gimli-rs/object/pull/828) * Added `write::StreamingBuffer::flush`. [#829](https://github.com/gimli-rs/object/pull/829) -------------------------------------------------------------------------------- ## 0.38.0 Released 2025/11/21. ### Breaking changes * Changed the type of `macho::EXPORT_SYMBOL_FLAGS` constants to `u8`. [#817](https://github.com/gimli-rs/object/pull/817) * Fixed the type of the `StringTable` parameter for `read::elf::Dyn::string`. [#812](https://github.com/gimli-rs/object/pull/812) ### Changed * Updated `hashbrown` and `wasmparser` dependencies. [#806](https://github.com/gimli-rs/object/pull/806) * The minimum supported rust version with all features enabled has changed to 1.87.0. Changes to the minimum supported rust version are not considered breaking changes. ### Added * Added more RISC-V constants for ELF. [#809](https://github.com/gimli-rs/object/pull/809) * Added more AArch64 constants for ELF. [#819](https://github.com/gimli-rs/object/pull/819) * Added `macho::LinkeditDataCommand::function_starts` and associated parser. [#814](https://github.com/gimli-rs/object/pull/814) [#816](https://github.com/gimli-rs/object/pull/816) * Added `macho::LinkeditDataCommand::exports_trie` and associated parser. [#817](https://github.com/gimli-rs/object/pull/817) -------------------------------------------------------------------------------- ## 0.37.3 Released 2025/08/13. ### Changed * Fixed MSVC weak extern symbol support in `write::Object` by using `IMAGE_WEAK_EXTERN_SEARCH_ALIAS`. [#803](https://github.com/gimli-rs/object/pull/803) ### Added * Added `elf::SHT_GNU_SFRAME` and `elf::PT_GNU_SFRAME`. [#799](https://github.com/gimli-rs/object/pull/799) * Added `section_flags_mut` and `symbol_flags_mut` to `write::Object`. [#801](https://github.com/gimli-rs/object/pull/801) -------------------------------------------------------------------------------- ## 0.37.2 Released 2025/08/01. ### Added * Added `elf::EF_RISCV_RV64ILP32`. [#779](https://github.com/gimli-rs/object/pull/779) * Added `pe::IMAGE_FILE_MACHINE_POWERPCBE` and associated read support. [#783](https://github.com/gimli-rs/object/pull/783) * Added PowerPC support to `write::coff`. [#795](https://github.com/gimli-rs/object/pull/795) * Added support for COFF auxiliary weak external symbols to `write::Object` and `write::coff::Writer`. [#791](https://github.com/gimli-rs/object/pull/791) * Added methods to `write::Object` to obtain default section and symbol flags. [#789](https://github.com/gimli-rs/object/pull/789) * Added compact relocation support to `read::elf`. [#782](https://github.com/gimli-rs/object/pull/782) [#784](https://github.com/gimli-rs/object/pull/784) [#785](https://github.com/gimli-rs/object/pull/785) [#788](https://github.com/gimli-rs/object/pull/788) * Added `Architecture::Alpha`. [#790](https://github.com/gimli-rs/object/pull/790) * Added `Architecture::Hppa`. [#793](https://github.com/gimli-rs/object/pull/793) ### Changed * Updated `wasmparser` dependency. * Changed `write::Object` to accept undefined symbols of unknown kind for COFF. [#795](https://github.com/gimli-rs/object/pull/795) -------------------------------------------------------------------------------- ## 0.37.1 Released 2025/06/11. ### Changed * Removed `compiler-builtins` from `rustc-dep-of-std` dependencies. [#777](https://github.com/gimli-rs/object/pull/777) * Updated `wasmparser` dependency. -------------------------------------------------------------------------------- ## 0.37.0 Released 2025/06/02. ### Breaking changes * Changed dyld cache definitions and API to support iterating mapping and slide information. [#738](https://github.com/gimli-rs/object/pull/738) [#753](https://github.com/gimli-rs/object/pull/753) [#754](https://github.com/gimli-rs/object/pull/754) [#775](https://github.com/gimli-rs/object/pull/775) * Removed `elf::R_RISCV_GNU_VTINHERIT` and `elf::R_RISCV_GNU_VTENTRY`. [#767](https://github.com/gimli-rs/object/pull/767) * Changed the type of `pe::IMAGE_WEAK_EXTERN_*` constants. [#770](https://github.com/gimli-rs/object/pull/770) ### Added * Added support for generating `ARM_RELOC_VANILLA` in `write::Object`. [#757](https://github.com/gimli-rs/object/pull/757) * Added `size_hint` for `read::archive::ArchiveSymbolIterator`. [#759](https://github.com/gimli-rs/object/pull/759) * Added `Architecture::SuperH`. [#762](https://github.com/gimli-rs/object/pull/762) * Added `Architecture::LoongArch32`. [#765](https://github.com/gimli-rs/object/pull/765) * Added support for Wasm object files to `read::WasmFile`. [#766](https://github.com/gimli-rs/object/pull/766) * Added `elf::R_RISCV_TLSDESC` and `elf::R_RISCV_GOT32_PCREL`. [#767](https://github.com/gimli-rs/object/pull/767) [#768](https://github.com/gimli-rs/object/pull/768) * Added `read::pe::SymbolTable::aux_weak_external` and `read::pe::SymbolTable::has_aux_weak_external`. [#770](https://github.com/gimli-rs/object/pull/770) * Added ELF relocations for LoongArch ABI v2.30. [#773](https://github.com/gimli-rs/object/pull/773) ### Changed * Changed `ReadRef::read_bytes_at` to allow zero size reads at any offset. This allows reading of empty sections in stripped ELF files. [#758](https://github.com/gimli-rs/object/pull/758) * Changed `read::MachOFile::object_map` to include static symbols. [#764](https://github.com/gimli-rs/object/pull/764) * Fixed `read::pe::SymbolTable::has_aux_function` to exclude weak externals. [#772](https://github.com/gimli-rs/object/pull/772) * Updated `wasmparser` and `ruzstd` dependencies. -------------------------------------------------------------------------------- ## 0.36.7 Released 2024/12/21. ### Changed * Included `build.rs` in package. -------------------------------------------------------------------------------- ## 0.36.6 Released 2024/12/21. ### Added * Added `Architecuture::M68k`. [#742](https://github.com/gimli-rs/object/pull/742) [#749](https://github.com/gimli-rs/object/pull/749) * Added `Architecuture::Mips64_N32`. [#743](https://github.com/gimli-rs/object/pull/743) * Added `elf::SHT_RELR`, `read::elf::SectionHeader::relr`, and `write::elf::Writer::write_relative_relocation_section_header`. [#746](https://github.com/gimli-rs/object/pull/746) * Added `core::error::Error` implementation for Rust 1.81 onwards. [#747](https://github.com/gimli-rs/object/pull/747) ### Changed * Changed `build::elf::Builder` to support `.annobin.notes`, `SHT_LLVM_DEPENDENT_LIBRARIES`, and `SHT_RELR` sections. [#735](https://github.com/gimli-rs/object/pull/735) [#737](https://github.com/gimli-rs/object/pull/737) [#746](https://github.com/gimli-rs/object/pull/746) * Changed `write::Object::add_subsection` to omit the subsection name suffix if the subsection name is empty. [#748](https://github.com/gimli-rs/object/pull/748) -------------------------------------------------------------------------------- ## 0.36.5 Released 2024/10/04. ### Added * Added `Architecture::E2K32` and `Architecture::E2K64`. [#727](https://github.com/gimli-rs/object/pull/727) * Added read and write support for `pe::IMAGE_REL_ARM64_BRANCH26`. [#731](https://github.com/gimli-rs/object/pull/731) ### Changed * Fixed decompression of multi-frame Zstandard data in `read::CompressedData::decompress`. [#730](https://github.com/gimli-rs/object/pull/730) -------------------------------------------------------------------------------- ## 0.36.4 Released 2024/08/30. ### Added * Added `pe::IMAGE_FILE_MACHINE_ARM64X` and `pe::IMAGE_FILE_MACHINE_CHPE_X86`. [#717](https://github.com/gimli-rs/object/pull/717) * Added `elf::SHF_GNU_RETAIN` and `elf::SHF_GNU_MBIND`. [#720](https://github.com/gimli-rs/object/pull/720) ### Changed * Fixed the checksum for COFF BSS section symbols in `write::Object`. [#718](https://github.com/gimli-rs/object/pull/718) * Changed `read::CompressedData::decompress` to validate the decompressed size. [#723](https://github.com/gimli-rs/object/pull/723) * Updated `wasmparser` dependency. -------------------------------------------------------------------------------- ## 0.36.3 Released 2024/08/07. ### Added * Added `Iterator` implementations for various types in the low level read API. [#713](https://github.com/gimli-rs/object/pull/713) [#714](https://github.com/gimli-rs/object/pull/714) ### Changed * Changed `from_bytes` constructors for integer endian types to `const`. [#712](https://github.com/gimli-rs/object/pull/712) * Changed `next` methods in the low level read API to fuse after returning an error. [#714](https://github.com/gimli-rs/object/pull/714) * Updated `wasmparser` dependency. [#715](https://github.com/gimli-rs/object/pull/715) -------------------------------------------------------------------------------- ## 0.36.2 Released 2024/07/24. ### Changed * Improved writing of GNU symbol versioning in `build::elf::Builder`. [#705](https://github.com/gimli-rs/object/pull/705) * Fixed alignment of `SHT_HASH`/`SHT_GNU_verdef`/`SHT_GNU_verneed` sections in `write::elf::Writer`. [#706](https://github.com/gimli-rs/object/pull/706) * Fixed writing of GNU hash for absolute symbols in `build::elf::Builder`. [#707](https://github.com/gimli-rs/object/pull/707) * Fixed writing of empty ELF string table in `write::Object`. [#710](https://github.com/gimli-rs/object/pull/710) -------------------------------------------------------------------------------- ## 0.36.1 Released 2024/06/29. ### Added * Added `SectionKind::DebugString`. [#694](https://github.com/gimli-rs/object/pull/694) * Added `Architecture::Sparc` and `Architecture::Sparc32Plus`. [#699](https://github.com/gimli-rs/object/pull/699) [#700](https://github.com/gimli-rs/object/pull/700) * Added more RISC-V ELF relocation constants. [#701](https://github.com/gimli-rs/object/pull/701) ### Changed * Changed `read::ElfFile::imports` to return the library for versioned symbols. [#693](https://github.com/gimli-rs/object/pull/693) * Changed `read::MachOFile` to support Go's debug section compression. [#697](https://github.com/gimli-rs/object/pull/697) * Reversed the order of Mach-O relocations emitted by `write::Object`. [#702](https://github.com/gimli-rs/object/pull/702) -------------------------------------------------------------------------------- ## 0.36.0 Released 2024/05/26. ### Breaking changes * Deleted `data` and `align` parameters for `write::Object::add_subsection`. Use `add_symbol_data` or `add_symbol_bss` instead. [#676](https://github.com/gimli-rs/object/pull/676) * Changed methods in the lower level read API to accept or return `SectionIndex` or `SymbolIndex` instead of `usize`. [#677](https://github.com/gimli-rs/object/pull/677) [#684](https://github.com/gimli-rs/object/pull/684) [#685](https://github.com/gimli-rs/object/pull/685) * Deleted `SymbolKind::Null`. Changed `read::Object::sections` and `read::Object::symbols` to no longer return null entries. This affects ELF and XCOFF. [#679](https://github.com/gimli-rs/object/pull/679) * Changed `read::ObjectMap::object` to return `ObjectMapFile`. This handles splitting the object file name into path and member. [#686](https://github.com/gimli-rs/object/pull/686) * Changed `read::coff::ImageSymbol::address` to only return an address for symbols that have an address. [#689](https://github.com/gimli-rs/object/pull/689) ### Added * Added `pod::slice_from_all_bytes` and `pod::slice_from_all_bytes_mut`. [#672](https://github.com/gimli-rs/object/pull/672) * Added `write::Object::set_subsections_via_symbols`. Changed `write::Object::add_symbol_data` and `write::Object::add_symbol_bss` to correctly handle zero size symbols when subsections are enabled. [#676](https://github.com/gimli-rs/object/pull/676) * Added methods in the unified read API to return the lower level API structures. Some existing methods were deprecated so that naming of these methods is more consistent. [#678](https://github.com/gimli-rs/object/pull/678) * Added methods in the lower level read API to return a `SectionIndex` or `SymbolIndex`. [#684](https://github.com/gimli-rs/object/pull/684) [#689](https://github.com/gimli-rs/object/pull/689) * Implemented `Display` for `read::SymbolIndex` and `read::SectionIndex`. [#684](https://github.com/gimli-rs/object/pull/684) * Added `is_common`, `is_absolute`, `is_local`, and `is_weak` to `read::elf::Sym`. [#685](https://github.com/gimli-rs/object/pull/685) ### Changed * Changed `read::ArchiveFile` to skip the `` member. [#669](https://github.com/gimli-rs/object/pull/669) * Fixed handling of segment data in the dyld shared cache. [#673](https://github.com/gimli-rs/object/pull/673) * Changed `read::RelocationMap` to handle Mach-O section relocations. [#675](https://github.com/gimli-rs/object/pull/675) * Changed `read::elf::RelocationSections` to ignore relocations that apply to relocations. [#680](https://github.com/gimli-rs/object/pull/680) * Removed a lifetime bound from an argument in `read::elf::SectionTable::section_name`, `read::elf::SymbolTable::symbol_name`, and `read::elf::SymbolTable::symbol_section`. [#681](https://github.com/gimli-rs/object/pull/681) -------------------------------------------------------------------------------- ## 0.35.0 Released 2024/04/10. ### Breaking changes * Moved the `'file` lifetime parameter from `read::Object` to its associated types. [#655](https://github.com/gimli-rs/object/pull/655) ### Added * Added support more section kinds in `build::elf`. [#650](https://github.com/gimli-rs/object/pull/650) * Added thin archive support to `read::ArchiveFile`. [#651](https://github.com/gimli-rs/object/pull/651) * Added `read::ReadCacheOps` and changed `read::ReadCache` bound from `Read + Seek` to `ReadCacheOps`. [#652](https://github.com/gimli-rs/object/pull/652) * Added `read::ObjectSection::relocation_map` [#654](https://github.com/gimli-rs/object/pull/654) * Added `read::ArchiveFile::symbols`. [#658](https://github.com/gimli-rs/object/pull/658) * Added `BinaryFormat::native_object`. [#661](https://github.com/gimli-rs/object/pull/661) ### Changed * The minimum supported rust version for the `read` feature and its dependencies has changed to 1.65.0. [#655](https://github.com/gimli-rs/object/pull/655) * Fixed `sh_offset` handling for `SHT_NOBITS` sections in `build::elf`. [#645](https://github.com/gimli-rs/object/pull/645) * Fixed handling of ELF files with dynamic symbols but no dynamic strings. [#646](https://github.com/gimli-rs/object/pull/646) * Fixed potential panics in `read::WasmFile` due to invalid function indices. [#649](https://github.com/gimli-rs/object/pull/649) * Fixed handling of Wasm components in `read::WasmFile`. [#649](https://github.com/gimli-rs/object/pull/649) * Fixed `sh_entsize` for 32-bit hash sections in `write::elf`. [#650](https://github.com/gimli-rs/object/pull/650) * Fixed `sh_size` for attribute sections in `build::elf`. [#650](https://github.com/gimli-rs/object/pull/650) * Fixed `sh_info` for `SHT_DYNSYM` sections in `build::elf`. [#650](https://github.com/gimli-rs/object/pull/650) * Fixed handling of dynamic relocations with invalid `sh_link` in `build::elf`. [#650](https://github.com/gimli-rs/object/pull/650) * Fixed parsing of member names containing '/' in `read::ArchiveFile`. [#657](https://github.com/gimli-rs/object/pull/657) * Fixed handling of load segment alignments in `build::elf::Builder::read`. [#659](https://github.com/gimli-rs/object/pull/659) -------------------------------------------------------------------------------- ## 0.34.0 Released 2024/03/11. ### Breaking changes * Replaced `macho::DyldSubCacheInfo` with `macho::DyldSubCacheEntryV1`. Changed the return type of `macho::DyldCacheHeader::subcaches`. [#642](https://github.com/gimli-rs/object/pull/642) ### Changed * Added `macho::DyldSubCacheEntryV2` and changed `read::macho::DyldCache` to handle both versions. This is needed for macOS 13 and above. [#642](https://github.com/gimli-rs/object/pull/642) -------------------------------------------------------------------------------- ## 0.33.0 Released 2024/03/05. ### Breaking changes * Deleted file format variants in `RelocationKind`. Replaced their usage with `read::Relocation::flags` and `write::Relocation::flags`. [#585](https://github.com/gimli-rs/object/pull/585) * Replaced `kind`, `encoding` and `size` fields in `write::Relocation` with `RelocationFlags::Generic` in the `flags` field. [#585](https://github.com/gimli-rs/object/pull/585) * Replaced `macho::FatHeader::parse`, `macho::FatHeader::parse_arch32`, and `macho::FatHeader::parse_arch64` with `read::macho::MachOFatFile`, `read::macho::MachOFatFile32` and `read::macho::MachOFatFile64`. [#623](https://github.com/gimli-rs/object/pull/623) ### Added * Added `macho::PLATFORM_XROS` and `macho::PLATFORM_XROSSIMULATOR`. [#626](https://github.com/gimli-rs/object/pull/626) * Added `build::elf::Builder` and associated types. Extended `write::elf::Writer` to support this. [#618](https://github.com/gimli-rs/object/pull/618) ### Changed * Changed the lifetime to `'data` for the return value of `ObjectSection::name`, `ObjectSection::name_bytes`, `ObjectComdat::name`, `ObjectComdat::name_bytes`. [#620](https://github.com/gimli-rs/object/pull/620) [#622](https://github.com/gimli-rs/object/pull/622) * Checked that sizes are smaller than the file length in `read::ReadCache`. [#630](https://github.com/gimli-rs/object/pull/630) * Used `Vec::try_reserve_exact` for large allocations. [#632](https://github.com/gimli-rs/object/pull/632) -------------------------------------------------------------------------------- ## 0.32.2 Released 2023/12/24. ### Added * Added ELF relocations for LoongArch ABI v2.20. [#578](https://github.com/gimli-rs/object/pull/578) [#589](https://github.com/gimli-rs/object/pull/589) * Added ELF support for SHARC. [#593](https://github.com/gimli-rs/object/pull/593) * Added `write::coff::Writer`. [#595](https://github.com/gimli-rs/object/pull/595) * Added `SubArchitecture::Arm64EC` support for PE/COFF. [#607](https://github.com/gimli-rs/object/pull/607) * Added `SubArchitecture::Arm64E` support for Mach-O. [#614](https://github.com/gimli-rs/object/pull/614) * Added `read::Object::symbol_by_name` and `read::Object::symbol_by_name_bytes`. [#602](https://github.com/gimli-rs/object/pull/602) * Added more functions to the low level API in `read::xcoff`. [#608](https://github.com/gimli-rs/object/pull/608) * Added more functions to the low level API in `read::macho`. [#584](https://github.com/gimli-rs/object/pull/584) ### Changed * Fixes for AArch64 relocation addends for Mach-O. [#581](https://github.com/gimli-rs/object/pull/581) * Changes to `write::Object` output for Mach-O, including the addition of a `LC_DYSYMTAB` load command. [#584](https://github.com/gimli-rs/object/pull/584) * Changed `write::Object` to always use `R_X86_64_PLT32` for x86-64 branches for ELF. [#590](https://github.com/gimli-rs/object/pull/590) * Fixed `read::ObjectSymbol::kind` for undefined section symbols for COFF. [#592](https://github.com/gimli-rs/object/pull/592) * Fixed `write::Object` to accept undefined section symbols for COFF. [#594](https://github.com/gimli-rs/object/pull/594) * Improved parsing of auxiliary section symbols for COFF. [#603](https://github.com/gimli-rs/object/pull/603) * Improved the selection of symbols for `read::Object::symbol_map`. This includes changes to `read::Symbol::is_definition`. [#601](https://github.com/gimli-rs/object/pull/601) [#606](https://github.com/gimli-rs/object/pull/606) * Changed `read::ObjectSymbol::kind` for ELF `STT_NOTYPE` symbols to `SymbolKind::Unknown`. [#604](https://github.com/gimli-rs/object/pull/604) * Changed `read::ObjectSymbol::scope` for XCOFF `C_HIDEXT` symbols to `SymbolScope::Compilation`. [#605](https://github.com/gimli-rs/object/pull/605) -------------------------------------------------------------------------------- ## 0.32.1 Released 2023/09/03. ### Added * Added `write::Object::set_macho_cpu_subtype`. [#574](https://github.com/gimli-rs/object/pull/574) -------------------------------------------------------------------------------- ## 0.32.0 Released 2023/08/12. ### Breaking changes * Changed `read::elf::Note::name` to exclude all trailing null bytes. [#549](https://github.com/gimli-rs/object/pull/549) * Updated dependencies, and changed some optional dependencies to use the `dep:` feature syntax. [#558](https://github.com/gimli-rs/object/pull/558) [#569](https://github.com/gimli-rs/object/pull/569) ### Changed * The minimum supported rust version for the `read` feature and its dependencies has changed to 1.60.0. * The minimum supported rust version for other features has changed to 1.65.0. * Changed many definitions from `static` to `const`. [#549](https://github.com/gimli-rs/object/pull/549) * Fixed Mach-O section alignment padding in `write::Object`. [#553](https://github.com/gimli-rs/object/pull/553) * Changed `read::File` to an enum. [#564](https://github.com/gimli-rs/object/pull/564) ### Added * Added `elf::ELF_NOTE_GO`, `elf::NT_GO_BUILD_ID`, and `read::elf::Note::name_bytes`. [#549](https://github.com/gimli-rs/object/pull/549) * Added `read::FileKind::CoffImport` and `read::coff::ImportFile`. [#555](https://github.com/gimli-rs/object/pull/555) [#556](https://github.com/gimli-rs/object/pull/556) * Added `Architecture::Csky` and basic ELF support for C-SKY. [#561](https://github.com/gimli-rs/object/pull/561) * Added `read::elf::ElfSymbol::raw_symbol`. [#562](https://github.com/gimli-rs/object/pull/562) -------------------------------------------------------------------------------- ## 0.30.4 Released 2023/06/05. ### Changed * Fixed Mach-O section alignment padding in `write::Object`. [#553](https://github.com/gimli-rs/object/pull/553) -------------------------------------------------------------------------------- ## 0.31.1 Released 2023/05/09. ### Changed * Fixed address for global symbols in `read::wasm`. [#539](https://github.com/gimli-rs/object/pull/539) * Fixed writing of alignment for empty ELF sections. [#540](https://github.com/gimli-rs/object/pull/540) ### Added * Added more `elf::GNU_PROPERTY_*` definitions. Added `read::elf::note::gnu_properties`, `write::StandardSection::GnuProperty`, and `write::Object::add_elf_gnu_property_u32`. [#537](https://github.com/gimli-rs/object/pull/537) [#541](https://github.com/gimli-rs/object/pull/541) * Added Mach-O support for `Architecture::Aarch64_Ilp32`. [#542](https://github.com/gimli-rs/object/pull/542) [#545](https://github.com/gimli-rs/object/pull/545) * Added `Architecture::Wasm64`. [#543](https://github.com/gimli-rs/object/pull/543) -------------------------------------------------------------------------------- ## 0.31.0 Released 2023/04/14. ### Breaking changes * Added a type parameter on existing COFF types to support reading COFF `/bigobj` files. [#502](https://github.com/gimli-rs/object/pull/502) * Changed PE symbols to support COFF `/bigobj`. Changed `pe::IMAGE_SYM_*` to `i32`. Changed `pe::ImageSymbolEx::section_number` to `I32Bytes`. Deleted a number of methods from `pe::ImageSymbol`. Use the `read::pe::ImageSymbol` trait instead. [#502](https://github.com/gimli-rs/object/pull/502) * Changed `pe::Guid` to a single array, and added methods to read the individual fields. [#502](https://github.com/gimli-rs/object/pull/502) * Added `Symbol` type parameter to `SymbolFlags` to support `SymbolFlags::Xcoff`. [#527](https://github.com/gimli-rs/object/pull/527) ### Changed * Fix alignment when reserving zero length sections in `write::elf::Write::reserve`. [#514](https://github.com/gimli-rs/object/pull/514) * Validate command size in `read::macho::LoadCommandIterator`. [#516](https://github.com/gimli-rs/object/pull/516) * Handle invalid alignment in `read::macho::MachoSection::align`. [#516](https://github.com/gimli-rs/object/pull/516) * Accept `SymbolKind::Unknown` in `write::Object::macho_write`. [#519](https://github.com/gimli-rs/object/pull/519) * Updated `wasmparser` dependency. [#528](https://github.com/gimli-rs/object/pull/528) ### Added * Added more `elf::EF_RISCV_*` definitions. [#507](https://github.com/gimli-rs/object/pull/507) * Added `read::elf::SectionHeader::gnu_attributes` and associated types. Added `.gnu.attributes` support to `write::elf::Writer`. [#509](https://github.com/gimli-rs/object/pull/509) [#525](https://github.com/gimli-rs/object/pull/525) * Added `write::Object::set_macho_build_version`. [#524](https://github.com/gimli-rs/object/pull/524) * Added `read::FileKind::Xcoff32`, `read::FileKind::Xcoff64`, `read::XcoffFile`, and associated types. Added XCOFF support to `write::Object`. [#469](https://github.com/gimli-rs/object/pull/469) [#476](https://github.com/gimli-rs/object/pull/476) [#477](https://github.com/gimli-rs/object/pull/477) [#482](https://github.com/gimli-rs/object/pull/482) [#484](https://github.com/gimli-rs/object/pull/484) [#486](https://github.com/gimli-rs/object/pull/486) [#527](https://github.com/gimli-rs/object/pull/527) * Added `read::FileKind::CoffBig`, `read::pe::CoffHeader` and `read::pe::ImageSymbol`. [#502](https://github.com/gimli-rs/object/pull/502) * Added `elf::PT_GNU_PROPERTY`. [#530](https://github.com/gimli-rs/object/pull/530) * Added `elf::ELFCOMPRESS_ZSTD`, `read::CompressionFormat::Zstandard`, and Zstandard decompression in `read::CompressedData::decompress` using the `ruzstd` crate. [#532](https://github.com/gimli-rs/object/pull/532) * Added `read::elf::NoteIterator::new`. [#533](https://github.com/gimli-rs/object/pull/533) -------------------------------------------------------------------------------- ## 0.30.3 Released 2023/01/23. ### Added * Added `SectionKind::ReadOnlyDataWithRel` for writing. [#504](https://github.com/gimli-rs/object/pull/504) -------------------------------------------------------------------------------- ## 0.30.2 Released 2023/01/11. ### Added * Added more ELF constants for AVR flags and relocations. [#500](https://github.com/gimli-rs/object/pull/500) -------------------------------------------------------------------------------- ## 0.30.1 Released 2023/01/04. ### Changed * Changed `read::ElfSymbol::kind` to handle `STT_NOTYPE` and `STT_GNU_IFUNC`. [#498](https://github.com/gimli-rs/object/pull/498) ### Added * Added `read::CoffSymbol::raw_symbol`. [#494](https://github.com/gimli-rs/object/pull/494) * Added ELF support for Solana Binary Format. [#491](https://github.com/gimli-rs/object/pull/491) * Added ELF support for AArch64 ILP32. [#497](https://github.com/gimli-rs/object/pull/497) -------------------------------------------------------------------------------- ## 0.30.0 Released 2022/11/22. ### Breaking changes * The minimum supported rust version for the `read` feature has changed to 1.52.0. [#458](https://github.com/gimli-rs/object/pull/458) * The minimum supported rust version for the `write` feature has changed to 1.61.0. * Fixed endian handling in `read::elf::SymbolTable::shndx`. [#458](https://github.com/gimli-rs/object/pull/458) * Fixed endian handling in `read::pe::ResourceName`. [#458](https://github.com/gimli-rs/object/pull/458) * Changed definitions for LoongArch ELF header flags. [#483](https://github.com/gimli-rs/object/pull/483) ### Changed * Fixed parsing of multiple debug directory entries in `read::pe::PeFile::pdb_info`. [#451](https://github.com/gimli-rs/object/pull/451) * Changed the section name used when writing COFF stub symbols. [#475](https://github.com/gimli-rs/object/pull/475) ### Added * Added `read::pe::DataDirectories::delay_load_import_table`. [#448](https://github.com/gimli-rs/object/pull/448) * Added `read::macho::LoadCommandData::raw_data`. [#449](https://github.com/gimli-rs/object/pull/449) * Added ELF relocations for LoongArch ps ABI v2. [#450](https://github.com/gimli-rs/object/pull/450) * Added PowerPC support for Mach-O. [#460](https://github.com/gimli-rs/object/pull/460) * Added support for reading the AIX big archive format. [#462](https://github.com/gimli-rs/object/pull/462) [#467](https://github.com/gimli-rs/object/pull/467) [#473](https://github.com/gimli-rs/object/pull/473) * Added support for `RelocationEncoding::AArch64Call` when writing Mach-O files. [#465](https://github.com/gimli-rs/object/pull/465) * Added support for `RelocationKind::Relative` when writing RISC-V ELF files. [#470](https://github.com/gimli-rs/object/pull/470) * Added Xtensa architecture support for ELF. [#481](https://github.com/gimli-rs/object/pull/481) * Added `read::pe::ResourceName::raw_data`. [#487](https://github.com/gimli-rs/object/pull/487) -------------------------------------------------------------------------------- ## 0.29.0 Released 2022/06/22. ### Breaking changes * The `write` feature now has a minimum supported rust version of 1.56.1. [#444](https://github.com/gimli-rs/object/pull/444) * Added `os_abi` and `abi_version` fields to `FileFlags::Elf`. [#438](https://github.com/gimli-rs/object/pull/438) [#441](https://github.com/gimli-rs/object/pull/441) ### Changed * Fixed handling of empty symbol tables in `read::elf::ElfFile::symbol_table` and `read::elf::ElfFile::dynamic_symbol_table`. [#443](https://github.com/gimli-rs/object/pull/443) ### Added * Added more `ELF_OSABI_*` constants. [#439](https://github.com/gimli-rs/object/pull/439) -------------------------------------------------------------------------------- ## 0.28.4 Released 2022/05/09. ### Added * Added `read::pe::DataDirectories::resource_directory`. [#425](https://github.com/gimli-rs/object/pull/425) [#427](https://github.com/gimli-rs/object/pull/427) * Added PE support for more ARM relocations. [#428](https://github.com/gimli-rs/object/pull/428) * Added support for `Architecture::LoongArch64`. [#430](https://github.com/gimli-rs/object/pull/430) [#432](https://github.com/gimli-rs/object/pull/432) * Added `elf::EF_MIPS_ABI` and associated constants. [#433](https://github.com/gimli-rs/object/pull/433) -------------------------------------------------------------------------------- ## 0.28.3 Released 2022/01/19. ### Changed * For the Mach-O support in `write::Object`, accept `RelocationKind::MachO` for all architectures, and accept `RelocationKind::Absolute` for ARM64. [#422](https://github.com/gimli-rs/object/pull/422) ### Added * Added `pe::ImageDataDirectory::file_range`, `read::pe::SectionTable::pe_file_range_at` and `pe::ImageSectionHeader::pe_file_range_at`. [#421](https://github.com/gimli-rs/object/pull/421) * Added `write::Object::add_coff_exports`. [#423](https://github.com/gimli-rs/object/pull/423) -------------------------------------------------------------------------------- ## 0.28.2 Released 2022/01/09. ### Changed * Ignored errors for the Wasm extended name section in `read::WasmFile::parse`. [#408](https://github.com/gimli-rs/object/pull/408) * Ignored errors for the COFF symbol table in `read::PeFile::parse`. [#410](https://github.com/gimli-rs/object/pull/410) * Fixed handling of `SectionFlags::Coff` in `write::Object::coff_write`. [#412](https://github.com/gimli-rs/object/pull/412) ### Added * Added `read::ObjectSegment::flags`. [#416](https://github.com/gimli-rs/object/pull/416) [#418](https://github.com/gimli-rs/object/pull/418) -------------------------------------------------------------------------------- ## 0.28.1 Released 2021/12/12. ### Changed * Fixed `read::elf::SymbolTable::shndx_section`. [#405](https://github.com/gimli-rs/object/pull/405) * Fixed build warnings. [#405](https://github.com/gimli-rs/object/pull/405) [#406](https://github.com/gimli-rs/object/pull/406) -------------------------------------------------------------------------------- ## 0.28.0 Released 2021/12/12. ### Breaking changes * `write_core` feature no longer enables `std` support. Use `write_std` instead. [#400](https://github.com/gimli-rs/object/pull/400) * Multiple changes related to Mach-O split dyld cache support. [#398](https://github.com/gimli-rs/object/pull/398) ### Added * Added `write::pe::Writer::write_file_align`. [#397](https://github.com/gimli-rs/object/pull/397) * Added support for Mach-O split dyld cache. [#398](https://github.com/gimli-rs/object/pull/398) * Added support for `IMAGE_SCN_LNK_NRELOC_OVFL` when reading and writing COFF. [#399](https://github.com/gimli-rs/object/pull/399) * Added `write::elf::Writer::reserve_null_symbol_index`. [#402](https://github.com/gimli-rs/object/pull/402) -------------------------------------------------------------------------------- ## 0.27.1 Released 2021/10/22. ### Changed * Fixed build error with older Rust versions due to cargo resolver version. -------------------------------------------------------------------------------- ## 0.27.0 Released 2021/10/17. ### Breaking changes * Changed `read::elf` to use `SectionIndex` instead of `usize` in more places. [#341](https://github.com/gimli-rs/object/pull/341) * Changed some `read::elf` section methods to additionally return the linked section index. [#341](https://github.com/gimli-rs/object/pull/341) * Changed `read::pe::ImageNtHeaders::parse` to return `DataDirectories` instead of a slice. [#357](https://github.com/gimli-rs/object/pull/357) * Deleted `value` parameter for `write:WritableBuffer::resize`. [#369](https://github.com/gimli-rs/object/pull/369) * Changed `write::Object` and `write::Section` to use `Cow` for section data. This added a lifetime parameter, which existing users can set to `'static`. [#370](https://github.com/gimli-rs/object/pull/370) ### Changed * Fixed parsing when PE import directory has zero size. [#341](https://github.com/gimli-rs/object/pull/341) * Fixed parsing when PE import directory has zero for original first thunk. [#385](https://github.com/gimli-rs/object/pull/385) [#387](https://github.com/gimli-rs/object/pull/387) * Fixed parsing when PE export directory has zero number of names. [#353](https://github.com/gimli-rs/object/pull/353) * Fixed parsing when PE export directory has zero number of names and addresses. [#362](https://github.com/gimli-rs/object/pull/362) * Fixed parsing when PE sections are contiguous. [#354](https://github.com/gimli-rs/object/pull/354) * Fixed `std` feature for `indexmap` dependency. [#374](https://github.com/gimli-rs/object/pull/374) * Fixed overflow in COFF section name offset parsing. [#390](https://github.com/gimli-rs/object/pull/390) ### Added * Added `name_bytes` methods to unified `read` traits. [#351](https://github.com/gimli-rs/object/pull/351) * Added `read::Object::kind`. [#352](https://github.com/gimli-rs/object/pull/352) * Added `read::elf::VersionTable` and related helpers. [#341](https://github.com/gimli-rs/object/pull/341) * Added `read::elf::SectionTable::dynamic` and related helpers. [#345](https://github.com/gimli-rs/object/pull/345) * Added `read::coff::SectionTable::max_section_file_offset`. [#344](https://github.com/gimli-rs/object/pull/344) * Added `read::pe::ExportTable` and related helpers. [#349](https://github.com/gimli-rs/object/pull/349) [#353](https://github.com/gimli-rs/object/pull/353) * Added `read::pe::ImportTable` and related helpers. [#357](https://github.com/gimli-rs/object/pull/357) * Added `read::pe::DataDirectories` and related helpers. [#357](https://github.com/gimli-rs/object/pull/357) [#384](https://github.com/gimli-rs/object/pull/384) * Added `read::pe::RichHeaderInfo` and related helpers. [#375](https://github.com/gimli-rs/object/pull/375) [#379](https://github.com/gimli-rs/object/pull/379) * Added `read::pe::RelocationBlocks` and related helpers. [#378](https://github.com/gimli-rs/object/pull/378) * Added `write::elf::Writer`. [#350](https://github.com/gimli-rs/object/pull/350) * Added `write::pe::Writer`. [#382](https://github.com/gimli-rs/object/pull/382) [#388](https://github.com/gimli-rs/object/pull/388) * Added `write::Section::data/data_mut`. [#367](https://github.com/gimli-rs/object/pull/367) * Added `write::Object::write_stream`. [#369](https://github.com/gimli-rs/object/pull/369) * Added MIPSr6 ELF header flag definitions. [#372](https://github.com/gimli-rs/object/pull/372) -------------------------------------------------------------------------------- ## 0.26.2 Released 2021/08/28. ### Added * Added support for 64-bit symbol table names to `read::archive`. [#366](https://github.com/gimli-rs/object/pull/366) -------------------------------------------------------------------------------- ## 0.26.1 Released 2021/08/19. ### Changed * Activate `memchr`'s `rustc-dep-of-std` feature [#356](https://github.com/gimli-rs/object/pull/356) -------------------------------------------------------------------------------- ## 0.26.0 Released 2021/07/26. ### Breaking changes * Changed `ReadRef::read_bytes_at_until` to accept a range parameter. [#326](https://github.com/gimli-rs/object/pull/326) * Added `ReadRef` type parameter to `read::StringTable` and types that contain it. String table entries are now only read as required. [#326](https://github.com/gimli-rs/object/pull/326) * Changed result type of `read::elf::SectionHeader::data` and `data_as_array`. [#332](https://github.com/gimli-rs/object/pull/332) * Moved `pod::WritableBuffer` to `write::WritableBuffer`. Renamed `WritableBuffer::extend` to `write_bytes`. Added more provided methods to `WritableBuffer`. [#335](https://github.com/gimli-rs/object/pull/335) * Moved `pod::Bytes` to `read::Bytes`. [#336](https://github.com/gimli-rs/object/pull/336) * Added `is_mips64el` parameter to `elf::Rela64::r_info/set_r_info`. [#337](https://github.com/gimli-rs/object/pull/337) ### Changed * Removed `alloc` dependency when no features are enabled. [#336](https://github.com/gimli-rs/object/pull/336) ### Added * Added `read::pe::PeFile` methods: `section_table`, `data_directory`, and `data`. [#324](https://github.com/gimli-rs/object/pull/324) * Added more ELF definitions. [#332](https://github.com/gimli-rs/object/pull/332) * Added `read::elf::SectionTable` methods for hash tables and symbol version information. [#332](https://github.com/gimli-rs/object/pull/332) * Added PE RISC-V definitions. [#333](https://github.com/gimli-rs/object/pull/333) * Added `WritableBuffer` implementation for `Vec`. [#335](https://github.com/gimli-rs/object/pull/335) -------------------------------------------------------------------------------- ## 0.25.3 Released 2021/06/12. ### Added * Added `RelocationEncoding::AArch64Call`. [#322](https://github.com/gimli-rs/object/pull/322) -------------------------------------------------------------------------------- ## 0.25.2 Released 2021/06/04. ### Added * Added `Architecture::X86_64_X32`. [#320](https://github.com/gimli-rs/object/pull/320) -------------------------------------------------------------------------------- ## 0.25.1 Released 2021/06/03. ### Changed * write: Fix choice of `SHT_REL` or `SHT_RELA` for most architectures. [#318](https://github.com/gimli-rs/object/pull/318) * write: Fix relocation encoding for MIPS64EL. [#318](https://github.com/gimli-rs/object/pull/318) -------------------------------------------------------------------------------- ## 0.25.0 Released 2021/06/02. ### Breaking changes * Added `non_exhaustive` to most public enums. [#306](https://github.com/gimli-rs/object/pull/306) * `MachHeader::parse` and `MachHeader::load_commands` now require a header offset. [#304](https://github.com/gimli-rs/object/pull/304) * Added `ReadRef::read_bytes_at_until`. [#308](https://github.com/gimli-rs/object/pull/308) * `PeFile::entry`, `PeSection::address` and `PeSegment::address` now return a virtual address instead of a RVA. [#315](https://github.com/gimli-rs/object/pull/315) ### Added * Added `pod::from_bytes_mut`, `pod::slice_from_bytes_mut`, `pod::bytes_of_mut`, and `pod::bytes_of_slice_mut`. [#296](https://github.com/gimli-rs/object/pull/296) [#297](https://github.com/gimli-rs/object/pull/297) * Added `Object::pdb_info`. [#298](https://github.com/gimli-rs/object/pull/298) * Added `read::macho::DyldCache`, other associated definitions, and support for these in the examples. [#308](https://github.com/gimli-rs/object/pull/308) * Added more architecture support. [#303](https://github.com/gimli-rs/object/pull/303) [#309](https://github.com/gimli-rs/object/pull/309) * Derive more traits for enums. [#311](https://github.com/gimli-rs/object/pull/311) * Added `Object::relative_address_base`. [#315](https://github.com/gimli-rs/object/pull/315) ### Changed * Improved performance for string parsing. [#302](https://github.com/gimli-rs/object/pull/302) * `objdump` example allows selecting container members. [#308](https://github.com/gimli-rs/object/pull/308) # `object` Change Log -------------------------------------------------------------------------------- ## 0.39.1 Released 2026/04/21. ### Changed * Changed `read::PeFile::imports` to return an error for empty import names. [#873](https://github.com/gimli-rs/object/pull/873) * Fixed `read::PeFile::imports` to handle import names in a different section. [#881](https://github.com/gimli-rs/object/pull/881) * Fixed the ELF section flags for `write::StandardSection::EhFrame`. [#877](https://github.com/gimli-rs/object/pull/877) * Updated `hashbrown`, `indexmap`, and `wasmparser` dependencies. [#879](https://github.com/gimli-rs/object/pull/879) ### Added * Added Android definitions for ELF. [#875](https://github.com/gimli-rs/object/pull/875) * Updated Mach-O definitions. [#883](https://github.com/gimli-rs/object/pull/883) * Added `read::macho::LoadCommandData::dylib_use_flags`. [#887](https://github.com/gimli-rs/object/pull/887) -------------------------------------------------------------------------------- ## 0.39.0 Released 2026/03/29. ### Breaking changes * Changed `read::NativeFile` to use `NativeEndian` instead of `Endianness`. [#851](https://github.com/gimli-rs/object/pull/851) * Changed the type of `elf::Dyn32/64::d_tag` to signed (`i32`/`i64`). Changed the type of `DT_*` constants to `i64`. Changed `write::elf::Writer::write_dynamic` parameter to match. [#852](https://github.com/gimli-rs/object/pull/852) * Changed parsing to always support unaligned data. The `unaligned` feature now has no effect. [#861](https://github.com/gimli-rs/object/pull/861) * Changed `read::SymbolMapName::new` to accept a `size` parameter. [#863](https://github.com/gimli-rs/object/pull/863) ### Changed * Changed `read::MachOFile::entry` to handle `LC_UNIXTHREAD` load commands. [#837](https://github.com/gimli-rs/object/pull/837) * Reduced the size of `read::elf::CrelIterator`. [#840](https://github.com/gimli-rs/object/pull/840) * Improved debug output for `read::*File` by hiding the raw data bytes. [#853](https://github.com/gimli-rs/object/pull/853) * Removed `DT_SYMBOLIC` from the `read::elf::Dyn::is_address` check. [#854](https://github.com/gimli-rs/object/pull/854) * Changed `read::macho` to treat `ltmp*` symbols as section symbols. [#856](https://github.com/gimli-rs/object/pull/856) * Changed `read::Relocation::encoding` for unknown relocations to `RelocationEncoding::Unknown`. [#857](https://github.com/gimli-rs/object/pull/857) * Changed `read::RelocationMap` to handle `RelocationKind::None` and check for supported `RelocationEncoding`. [#857](https://github.com/gimli-rs/object/pull/857) * Changed `read::elf` to return `RelocationKind::GotRelative` for `elf::R_X86_64_GOTPCRELX` and `elf::R_X86_64_REX_GOTPCRELX`. [#859](https://github.com/gimli-rs/object/pull/859) * Changed `elf::R_X86_64_PLT32` and `macho::X86_64_RELOC_BRANCH` to use `RelocationKind::PltRelative` and `RelocationEncoding::X86Branch`. [#860](https://github.com/gimli-rs/object/pull/860) * Changed `read::macho` and `write::Object` to handle `macho::ARM64_RELOC_BRANCH26`. [#860](https://github.com/gimli-rs/object/pull/860) * Changed `read::SymbolMap` to include symbol sizes. Deprecated `read::SymbolMap::get`. Use `before` or `containing` instead. [#863](https://github.com/gimli-rs/object/pull/863) * Changed `read::elf` to include unsized symbols in `is_definition`. [#866](https://github.com/gimli-rs/object/pull/866) * Changed `pod::slice_from_all_bytes/_mut` to handle zero-sized types. [#868](https://github.com/gimli-rs/object/pull/868) * Updated `wasmparser` dependency. ### Added * Added `read::ObjectSegment::permissions`. [#838](https://github.com/gimli-rs/object/pull/838) * Added `elf::R_X86_64_CODE_*` relocations. [#839](https://github.com/gimli-rs/object/pull/839) * Added `read::macho::Section::reserved1` and `Section::reserved2`. [#846](https://github.com/gimli-rs/object/pull/846) * Added `From` implementations for fixed endian integers. [#850](https://github.com/gimli-rs/object/pull/850) * Added `Native*File` types for each file format. [#851](https://github.com/gimli-rs/object/pull/851) * Added `read::elf::ElfFile::elf_dynamic_table`. [#854](https://github.com/gimli-rs/object/pull/854) * Added `read::Relocation::subtractor` and `write::Object::add_relocation_with_subtractor` to handle `macho::ARM64_RELOC_SUBTRACTOR` and `macho::X86_64_RELOC_SUBTRACTOR`. [#856](https://github.com/gimli-rs/object/pull/856) [#860](https://github.com/gimli-rs/object/pull/860) * Added `write::StandardSection::EhFrame`. [#856](https://github.com/gimli-rs/object/pull/856) * Added `SymbolFlags::elf_visibility`. [#859](https://github.com/gimli-rs/object/pull/859) * Added `read::macho::Section::symbol_stub_size` and `indirect_symbols`. [#862](https://github.com/gimli-rs/object/pull/862) * Added missing `elf::DT_RELR*` constants. [#864](https://github.com/gimli-rs/object/pull/864) * Added `elf::R_AARCH64_PLT32` and `elf::R_AARCH64_GOTPCREL32`. [#865](https://github.com/gimli-rs/object/pull/865) -------------------------------------------------------------------------------- ## 0.38.1 Released 2026/01/02. ### Changed * Updated `wasmparser` dependency. ### Added * Added basic PowerPC relocation support for Mach-O. [#825](https://github.com/gimli-rs/object/pull/825) * Added more ELF relocations for LoongArch. [#826](https://github.com/gimli-rs/object/pull/826) [#827](https://github.com/gimli-rs/object/pull/827) * Added `RelocationKind::None`. [#828](https://github.com/gimli-rs/object/pull/828) * Added `write::StreamingBuffer::flush`. [#829](https://github.com/gimli-rs/object/pull/829) -------------------------------------------------------------------------------- ## 0.38.0 Released 2025/11/21. ### Breaking changes * Changed the type of `macho::EXPORT_SYMBOL_FLAGS` constants to `u8`. [#817](https://github.com/gimli-rs/object/pull/817) * Fixed the type of the `StringTable` parameter for `read::elf::Dyn::string`. [#812](https://github.com/gimli-rs/object/pull/812) ### Changed * Updated `hashbrown` and `wasmparser` dependencies. [#806](https://github.com/gimli-rs/object/pull/806) * The minimum supported rust version with all features enabled has changed to 1.87.0. Changes to the minimum supported rust version are not considered breaking changes. ### Added * Added more RISC-V constants for ELF. [#809](https://github.com/gimli-rs/object/pull/809) * Added more AArch64 constants for ELF. [#819](https://github.com/gimli-rs/object/pull/819) * Added `macho::LinkeditDataCommand::function_starts` and associated parser. [#814](https://github.com/gimli-rs/object/pull/814) [#816](https://github.com/gimli-rs/object/pull/816) * Added `macho::LinkeditDataCommand::exports_trie` and associated parser. [#817](https://github.com/gimli-rs/object/pull/817) -------------------------------------------------------------------------------- ## 0.37.3 Released 2025/08/13. ### Changed * Fixed MSVC weak extern symbol support in `write::Object` by using `IMAGE_WEAK_EXTERN_SEARCH_ALIAS`. [#803](https://github.com/gimli-rs/object/pull/803) ### Added * Added `elf::SHT_GNU_SFRAME` and `elf::PT_GNU_SFRAME`. [#799](https://github.com/gimli-rs/object/pull/799) * Added `section_flags_mut` and `symbol_flags_mut` to `write::Object`. [#801](https://github.com/gimli-rs/object/pull/801) -------------------------------------------------------------------------------- ## 0.37.2 Released 2025/08/01. ### Added * Added `elf::EF_RISCV_RV64ILP32`. [#779](https://github.com/gimli-rs/object/pull/779) * Added `pe::IMAGE_FILE_MACHINE_POWERPCBE` and associated read support. [#783](https://github.com/gimli-rs/object/pull/783) * Added PowerPC support to `write::coff`. [#795](https://github.com/gimli-rs/object/pull/795) * Added support for COFF auxiliary weak external symbols to `write::Object` and `write::coff::Writer`. [#791](https://github.com/gimli-rs/object/pull/791) * Added methods to `write::Object` to obtain default section and symbol flags. [#789](https://github.com/gimli-rs/object/pull/789) * Added compact relocation support to `read::elf`. [#782](https://github.com/gimli-rs/object/pull/782) [#784](https://github.com/gimli-rs/object/pull/784) [#785](https://github.com/gimli-rs/object/pull/785) [#788](https://github.com/gimli-rs/object/pull/788) * Added `Architecture::Alpha`. [#790](https://github.com/gimli-rs/object/pull/790) * Added `Architecture::Hppa`. [#793](https://github.com/gimli-rs/object/pull/793) ### Changed * Updated `wasmparser` dependency. * Changed `write::Object` to accept undefined symbols of unknown kind for COFF. [#795](https://github.com/gimli-rs/object/pull/795) -------------------------------------------------------------------------------- ## 0.37.1 Released 2025/06/11. ### Changed * Removed `compiler-builtins` from `rustc-dep-of-std` dependencies. [#777](https://github.com/gimli-rs/object/pull/777) * Updated `wasmparser` dependency. -------------------------------------------------------------------------------- ## 0.37.0 Released 2025/06/02. ### Breaking changes * Changed dyld cache definitions and API to support iterating mapping and slide information. [#738](https://github.com/gimli-rs/object/pull/738) [#753](https://github.com/gimli-rs/object/pull/753) [#754](https://github.com/gimli-rs/object/pull/754) [#775](https://github.com/gimli-rs/object/pull/775) * Removed `elf::R_RISCV_GNU_VTINHERIT` and `elf::R_RISCV_GNU_VTENTRY`. [#767](https://github.com/gimli-rs/object/pull/767) * Changed the type of `pe::IMAGE_WEAK_EXTERN_*` constants. [#770](https://github.com/gimli-rs/object/pull/770) ### Added * Added support for generating `ARM_RELOC_VANILLA` in `write::Object`. [#757](https://github.com/gimli-rs/object/pull/757) * Added `size_hint` for `read::archive::ArchiveSymbolIterator`. [#759](https://github.com/gimli-rs/object/pull/759) * Added `Architecture::SuperH`. [#762](https://github.com/gimli-rs/object/pull/762) * Added `Architecture::LoongArch32`. [#765](https://github.com/gimli-rs/object/pull/765) * Added support for Wasm object files to `read::WasmFile`. [#766](https://github.com/gimli-rs/object/pull/766) * Added `elf::R_RISCV_TLSDESC` and `elf::R_RISCV_GOT32_PCREL`. [#767](https://github.com/gimli-rs/object/pull/767) [#768](https://github.com/gimli-rs/object/pull/768) * Added `read::pe::SymbolTable::aux_weak_external` and `read::pe::SymbolTable::has_aux_weak_external`. [#770](https://github.com/gimli-rs/object/pull/770) * Added ELF relocations for LoongArch ABI v2.30. [#773](https://github.com/gimli-rs/object/pull/773) ### Changed * Changed `ReadRef::read_bytes_at` to allow zero size reads at any offset. This allows reading of empty sections in stripped ELF files. [#758](https://github.com/gimli-rs/object/pull/758) * Changed `read::MachOFile::object_map` to include static symbols. [#764](https://github.com/gimli-rs/object/pull/764) * Fixed `read::pe::SymbolTable::has_aux_function` to exclude weak externals. [#772](https://github.com/gimli-rs/object/pull/772) * Updated `wasmparser` and `ruzstd` dependencies. -------------------------------------------------------------------------------- ## 0.36.7 Released 2024/12/21. ### Changed * Included `build.rs` in package. -------------------------------------------------------------------------------- ## 0.36.6 Released 2024/12/21. ### Added * Added `Architecuture::M68k`. [#742](https://github.com/gimli-rs/object/pull/742) [#749](https://github.com/gimli-rs/object/pull/749) * Added `Architecuture::Mips64_N32`. [#743](https://github.com/gimli-rs/object/pull/743) * Added `elf::SHT_RELR`, `read::elf::SectionHeader::relr`, and `write::elf::Writer::write_relative_relocation_section_header`. [#746](https://github.com/gimli-rs/object/pull/746) * Added `core::error::Error` implementation for Rust 1.81 onwards. [#747](https://github.com/gimli-rs/object/pull/747) ### Changed * Changed `build::elf::Builder` to support `.annobin.notes`, `SHT_LLVM_DEPENDENT_LIBRARIES`, and `SHT_RELR` sections. [#735](https://github.com/gimli-rs/object/pull/735) [#737](https://github.com/gimli-rs/object/pull/737) [#746](https://github.com/gimli-rs/object/pull/746) * Changed `write::Object::add_subsection` to omit the subsection name suffix if the subsection name is empty. [#748](https://github.com/gimli-rs/object/pull/748) -------------------------------------------------------------------------------- ## 0.36.5 Released 2024/10/04. ### Added * Added `Architecture::E2K32` and `Architecture::E2K64`. [#727](https://github.com/gimli-rs/object/pull/727) * Added read and write support for `pe::IMAGE_REL_ARM64_BRANCH26`. [#731](https://github.com/gimli-rs/object/pull/731) ### Changed * Fixed decompression of multi-frame Zstandard data in `read::CompressedData::decompress`. [#730](https://github.com/gimli-rs/object/pull/730) -------------------------------------------------------------------------------- ## 0.36.4 Released 2024/08/30. ### Added * Added `pe::IMAGE_FILE_MACHINE_ARM64X` and `pe::IMAGE_FILE_MACHINE_CHPE_X86`. [#717](https://github.com/gimli-rs/object/pull/717) * Added `elf::SHF_GNU_RETAIN` and `elf::SHF_GNU_MBIND`. [#720](https://github.com/gimli-rs/object/pull/720) ### Changed * Fixed the checksum for COFF BSS section symbols in `write::Object`. [#718](https://github.com/gimli-rs/object/pull/718) * Changed `read::CompressedData::decompress` to validate the decompressed size. [#723](https://github.com/gimli-rs/object/pull/723) * Updated `wasmparser` dependency. -------------------------------------------------------------------------------- ## 0.36.3 Released 2024/08/07. ### Added * Added `Iterator` implementations for various types in the low level read API. [#713](https://github.com/gimli-rs/object/pull/713) [#714](https://github.com/gimli-rs/object/pull/714) ### Changed * Changed `from_bytes` constructors for integer endian types to `const`. [#712](https://github.com/gimli-rs/object/pull/712) * Changed `next` methods in the low level read API to fuse after returning an error. [#714](https://github.com/gimli-rs/object/pull/714) * Updated `wasmparser` dependency. [#715](https://github.com/gimli-rs/object/pull/715) -------------------------------------------------------------------------------- ## 0.36.2 Released 2024/07/24. ### Changed * Improved writing of GNU symbol versioning in `build::elf::Builder`. [#705](https://github.com/gimli-rs/object/pull/705) * Fixed alignment of `SHT_HASH`/`SHT_GNU_verdef`/`SHT_GNU_verneed` sections in `write::elf::Writer`. [#706](https://github.com/gimli-rs/object/pull/706) * Fixed writing of GNU hash for absolute symbols in `build::elf::Builder`. [#707](https://github.com/gimli-rs/object/pull/707) * Fixed writing of empty ELF string table in `write::Object`. [#710](https://github.com/gimli-rs/object/pull/710) -------------------------------------------------------------------------------- ## 0.36.1 Released 2024/06/29. ### Added * Added `SectionKind::DebugString`. [#694](https://github.com/gimli-rs/object/pull/694) * Added `Architecture::Sparc` and `Architecture::Sparc32Plus`. [#699](https://github.com/gimli-rs/object/pull/699) [#700](https://github.com/gimli-rs/object/pull/700) * Added more RISC-V ELF relocation constants. [#701](https://github.com/gimli-rs/object/pull/701) ### Changed * Changed `read::ElfFile::imports` to return the library for versioned symbols. [#693](https://github.com/gimli-rs/object/pull/693) * Changed `read::MachOFile` to support Go's debug section compression. [#697](https://github.com/gimli-rs/object/pull/697) * Reversed the order of Mach-O relocations emitted by `write::Object`. [#702](https://github.com/gimli-rs/object/pull/702) -------------------------------------------------------------------------------- ## 0.36.0 Released 2024/05/26. ### Breaking changes * Deleted `data` and `align` parameters for `write::Object::add_subsection`. Use `add_symbol_data` or `add_symbol_bss` instead. [#676](https://github.com/gimli-rs/object/pull/676) * Changed methods in the lower level read API to accept or return `SectionIndex` or `SymbolIndex` instead of `usize`. [#677](https://github.com/gimli-rs/object/pull/677) [#684](https://github.com/gimli-rs/object/pull/684) [#685](https://github.com/gimli-rs/object/pull/685) * Deleted `SymbolKind::Null`. Changed `read::Object::sections` and `read::Object::symbols` to no longer return null entries. This affects ELF and XCOFF. [#679](https://github.com/gimli-rs/object/pull/679) * Changed `read::ObjectMap::object` to return `ObjectMapFile`. This handles splitting the object file name into path and member. [#686](https://github.com/gimli-rs/object/pull/686) * Changed `read::coff::ImageSymbol::address` to only return an address for symbols that have an address. [#689](https://github.com/gimli-rs/object/pull/689) ### Added * Added `pod::slice_from_all_bytes` and `pod::slice_from_all_bytes_mut`. [#672](https://github.com/gimli-rs/object/pull/672) * Added `write::Object::set_subsections_via_symbols`. Changed `write::Object::add_symbol_data` and `write::Object::add_symbol_bss` to correctly handle zero size symbols when subsections are enabled. [#676](https://github.com/gimli-rs/object/pull/676) * Added methods in the unified read API to return the lower level API structures. Some existing methods were deprecated so that naming of these methods is more consistent. [#678](https://github.com/gimli-rs/object/pull/678) * Added methods in the lower level read API to return a `SectionIndex` or `SymbolIndex`. [#684](https://github.com/gimli-rs/object/pull/684) [#689](https://github.com/gimli-rs/object/pull/689) * Implemented `Display` for `read::SymbolIndex` and `read::SectionIndex`. [#684](https://github.com/gimli-rs/object/pull/684) * Added `is_common`, `is_absolute`, `is_local`, and `is_weak` to `read::elf::Sym`. [#685](https://github.com/gimli-rs/object/pull/685) ### Changed * Changed `read::ArchiveFile` to skip the `` member. [#669](https://github.com/gimli-rs/object/pull/669) * Fixed handling of segment data in the dyld shared cache. [#673](https://github.com/gimli-rs/object/pull/673) * Changed `read::RelocationMap` to handle Mach-O section relocations. [#675](https://github.com/gimli-rs/object/pull/675) * Changed `read::elf::RelocationSections` to ignore relocations that apply to relocations. [#680](https://github.com/gimli-rs/object/pull/680) * Removed a lifetime bound from an argument in `read::elf::SectionTable::section_name`, `read::elf::SymbolTable::symbol_name`, and `read::elf::SymbolTable::symbol_section`. [#681](https://github.com/gimli-rs/object/pull/681) -------------------------------------------------------------------------------- ## 0.35.0 Released 2024/04/10. ### Breaking changes * Moved the `'file` lifetime parameter from `read::Object` to its associated types. [#655](https://github.com/gimli-rs/object/pull/655) ### Added * Added support more section kinds in `build::elf`. [#650](https://github.com/gimli-rs/object/pull/650) * Added thin archive support to `read::ArchiveFile`. [#651](https://github.com/gimli-rs/object/pull/651) * Added `read::ReadCacheOps` and changed `read::ReadCache` bound from `Read + Seek` to `ReadCacheOps`. [#652](https://github.com/gimli-rs/object/pull/652) * Added `read::ObjectSection::relocation_map` [#654](https://github.com/gimli-rs/object/pull/654) * Added `read::ArchiveFile::symbols`. [#658](https://github.com/gimli-rs/object/pull/658) * Added `BinaryFormat::native_object`. [#661](https://github.com/gimli-rs/object/pull/661) ### Changed * The minimum supported rust version for the `read` feature and its dependencies has changed to 1.65.0. [#655](https://github.com/gimli-rs/object/pull/655) * Fixed `sh_offset` handling for `SHT_NOBITS` sections in `build::elf`. [#645](https://github.com/gimli-rs/object/pull/645) * Fixed handling of ELF files with dynamic symbols but no dynamic strings. [#646](https://github.com/gimli-rs/object/pull/646) * Fixed potential panics in `read::WasmFile` due to invalid function indices. [#649](https://github.com/gimli-rs/object/pull/649) * Fixed handling of Wasm components in `read::WasmFile`. [#649](https://github.com/gimli-rs/object/pull/649) * Fixed `sh_entsize` for 32-bit hash sections in `write::elf`. [#650](https://github.com/gimli-rs/object/pull/650) * Fixed `sh_size` for attribute sections in `build::elf`. [#650](https://github.com/gimli-rs/object/pull/650) * Fixed `sh_info` for `SHT_DYNSYM` sections in `build::elf`. [#650](https://github.com/gimli-rs/object/pull/650) * Fixed handling of dynamic relocations with invalid `sh_link` in `build::elf`. [#650](https://github.com/gimli-rs/object/pull/650) * Fixed parsing of member names containing '/' in `read::ArchiveFile`. [#657](https://github.com/gimli-rs/object/pull/657) * Fixed handling of load segment alignments in `build::elf::Builder::read`. [#659](https://github.com/gimli-rs/object/pull/659) -------------------------------------------------------------------------------- ## 0.34.0 Released 2024/03/11. ### Breaking changes * Replaced `macho::DyldSubCacheInfo` with `macho::DyldSubCacheEntryV1`. Changed the return type of `macho::DyldCacheHeader::subcaches`. [#642](https://github.com/gimli-rs/object/pull/642) ### Changed * Added `macho::DyldSubCacheEntryV2` and changed `read::macho::DyldCache` to handle both versions. This is needed for macOS 13 and above. [#642](https://github.com/gimli-rs/object/pull/642) -------------------------------------------------------------------------------- ## 0.33.0 Released 2024/03/05. ### Breaking changes * Deleted file format variants in `RelocationKind`. Replaced their usage with `read::Relocation::flags` and `write::Relocation::flags`. [#585](https://github.com/gimli-rs/object/pull/585) * Replaced `kind`, `encoding` and `size` fields in `write::Relocation` with `RelocationFlags::Generic` in the `flags` field. [#585](https://github.com/gimli-rs/object/pull/585) * Replaced `macho::FatHeader::parse`, `macho::FatHeader::parse_arch32`, and `macho::FatHeader::parse_arch64` with `read::macho::MachOFatFile`, `read::macho::MachOFatFile32` and `read::macho::MachOFatFile64`. [#623](https://github.com/gimli-rs/object/pull/623) ### Added * Added `macho::PLATFORM_XROS` and `macho::PLATFORM_XROSSIMULATOR`. [#626](https://github.com/gimli-rs/object/pull/626) * Added `build::elf::Builder` and associated types. Extended `write::elf::Writer` to support this. [#618](https://github.com/gimli-rs/object/pull/618) ### Changed * Changed the lifetime to `'data` for the return value of `ObjectSection::name`, `ObjectSection::name_bytes`, `ObjectComdat::name`, `ObjectComdat::name_bytes`. [#620](https://github.com/gimli-rs/object/pull/620) [#622](https://github.com/gimli-rs/object/pull/622) * Checked that sizes are smaller than the file length in `read::ReadCache`. [#630](https://github.com/gimli-rs/object/pull/630) * Used `Vec::try_reserve_exact` for large allocations. [#632](https://github.com/gimli-rs/object/pull/632) -------------------------------------------------------------------------------- ## 0.32.2 Released 2023/12/24. ### Added * Added ELF relocations for LoongArch ABI v2.20. [#578](https://github.com/gimli-rs/object/pull/578) [#589](https://github.com/gimli-rs/object/pull/589) * Added ELF support for SHARC. [#593](https://github.com/gimli-rs/object/pull/593) * Added `write::coff::Writer`. [#595](https://github.com/gimli-rs/object/pull/595) * Added `SubArchitecture::Arm64EC` support for PE/COFF. [#607](https://github.com/gimli-rs/object/pull/607) * Added `SubArchitecture::Arm64E` support for Mach-O. [#614](https://github.com/gimli-rs/object/pull/614) * Added `read::Object::symbol_by_name` and `read::Object::symbol_by_name_bytes`. [#602](https://github.com/gimli-rs/object/pull/602) * Added more functions to the low level API in `read::xcoff`. [#608](https://github.com/gimli-rs/object/pull/608) * Added more functions to the low level API in `read::macho`. [#584](https://github.com/gimli-rs/object/pull/584) ### Changed * Fixes for AArch64 relocation addends for Mach-O. [#581](https://github.com/gimli-rs/object/pull/581) * Changes to `write::Object` output for Mach-O, including the addition of a `LC_DYSYMTAB` load command. [#584](https://github.com/gimli-rs/object/pull/584) * Changed `write::Object` to always use `R_X86_64_PLT32` for x86-64 branches for ELF. [#590](https://github.com/gimli-rs/object/pull/590) * Fixed `read::ObjectSymbol::kind` for undefined section symbols for COFF. [#592](https://github.com/gimli-rs/object/pull/592) * Fixed `write::Object` to accept undefined section symbols for COFF. [#594](https://github.com/gimli-rs/object/pull/594) * Improved parsing of auxiliary section symbols for COFF. [#603](https://github.com/gimli-rs/object/pull/603) * Improved the selection of symbols for `read::Object::symbol_map`. This includes changes to `read::Symbol::is_definition`. [#601](https://github.com/gimli-rs/object/pull/601) [#606](https://github.com/gimli-rs/object/pull/606) * Changed `read::ObjectSymbol::kind` for ELF `STT_NOTYPE` symbols to `SymbolKind::Unknown`. [#604](https://github.com/gimli-rs/object/pull/604) * Changed `read::ObjectSymbol::scope` for XCOFF `C_HIDEXT` symbols to `SymbolScope::Compilation`. [#605](https://github.com/gimli-rs/object/pull/605) -------------------------------------------------------------------------------- ## 0.32.1 Released 2023/09/03. ### Added * Added `write::Object::set_macho_cpu_subtype`. [#574](https://github.com/gimli-rs/object/pull/574) -------------------------------------------------------------------------------- ## 0.32.0 Released 2023/08/12. ### Breaking changes * Changed `read::elf::Note::name` to exclude all trailing null bytes. [#549](https://github.com/gimli-rs/object/pull/549) * Updated dependencies, and changed some optional dependencies to use the `dep:` feature syntax. [#558](https://github.com/gimli-rs/object/pull/558) [#569](https://github.com/gimli-rs/object/pull/569) ### Changed * The minimum supported rust version for the `read` feature and its dependencies has changed to 1.60.0. * The minimum supported rust version for other features has changed to 1.65.0. * Changed many definitions from `static` to `const`. [#549](https://github.com/gimli-rs/object/pull/549) * Fixed Mach-O section alignment padding in `write::Object`. [#553](https://github.com/gimli-rs/object/pull/553) * Changed `read::File` to an enum. [#564](https://github.com/gimli-rs/object/pull/564) ### Added * Added `elf::ELF_NOTE_GO`, `elf::NT_GO_BUILD_ID`, and `read::elf::Note::name_bytes`. [#549](https://github.com/gimli-rs/object/pull/549) * Added `read::FileKind::CoffImport` and `read::coff::ImportFile`. [#555](https://github.com/gimli-rs/object/pull/555) [#556](https://github.com/gimli-rs/object/pull/556) * Added `Architecture::Csky` and basic ELF support for C-SKY. [#561](https://github.com/gimli-rs/object/pull/561) * Added `read::elf::ElfSymbol::raw_symbol`. [#562](https://github.com/gimli-rs/object/pull/562) -------------------------------------------------------------------------------- ## 0.30.4 Released 2023/06/05. ### Changed * Fixed Mach-O section alignment padding in `write::Object`. [#553](https://github.com/gimli-rs/object/pull/553) -------------------------------------------------------------------------------- ## 0.31.1 Released 2023/05/09. ### Changed * Fixed address for global symbols in `read::wasm`. [#539](https://github.com/gimli-rs/object/pull/539) * Fixed writing of alignment for empty ELF sections. [#540](https://github.com/gimli-rs/object/pull/540) ### Added * Added more `elf::GNU_PROPERTY_*` definitions. Added `read::elf::note::gnu_properties`, `write::StandardSection::GnuProperty`, and `write::Object::add_elf_gnu_property_u32`. [#537](https://github.com/gimli-rs/object/pull/537) [#541](https://github.com/gimli-rs/object/pull/541) * Added Mach-O support for `Architecture::Aarch64_Ilp32`. [#542](https://github.com/gimli-rs/object/pull/542) [#545](https://github.com/gimli-rs/object/pull/545) * Added `Architecture::Wasm64`. [#543](https://github.com/gimli-rs/object/pull/543) -------------------------------------------------------------------------------- ## 0.31.0 Released 2023/04/14. ### Breaking changes * Added a type parameter on existing COFF types to support reading COFF `/bigobj` files. [#502](https://github.com/gimli-rs/object/pull/502) * Changed PE symbols to support COFF `/bigobj`. Changed `pe::IMAGE_SYM_*` to `i32`. Changed `pe::ImageSymbolEx::section_number` to `I32Bytes`. Deleted a number of methods from `pe::ImageSymbol`. Use the `read::pe::ImageSymbol` trait instead. [#502](https://github.com/gimli-rs/object/pull/502) * Changed `pe::Guid` to a single array, and added methods to read the individual fields. [#502](https://github.com/gimli-rs/object/pull/502) * Added `Symbol` type parameter to `SymbolFlags` to support `SymbolFlags::Xcoff`. [#527](https://github.com/gimli-rs/object/pull/527) ### Changed * Fix alignment when reserving zero length sections in `write::elf::Write::reserve`. [#514](https://github.com/gimli-rs/object/pull/514) * Validate command size in `read::macho::LoadCommandIterator`. [#516](https://github.com/gimli-rs/object/pull/516) * Handle invalid alignment in `read::macho::MachoSection::align`. [#516](https://github.com/gimli-rs/object/pull/516) * Accept `SymbolKind::Unknown` in `write::Object::macho_write`. [#519](https://github.com/gimli-rs/object/pull/519) * Updated `wasmparser` dependency. [#528](https://github.com/gimli-rs/object/pull/528) ### Added * Added more `elf::EF_RISCV_*` definitions. [#507](https://github.com/gimli-rs/object/pull/507) * Added `read::elf::SectionHeader::gnu_attributes` and associated types. Added `.gnu.attributes` support to `write::elf::Writer`. [#509](https://github.com/gimli-rs/object/pull/509) [#525](https://github.com/gimli-rs/object/pull/525) * Added `write::Object::set_macho_build_version`. [#524](https://github.com/gimli-rs/object/pull/524) * Added `read::FileKind::Xcoff32`, `read::FileKind::Xcoff64`, `read::XcoffFile`, and associated types. Added XCOFF support to `write::Object`. [#469](https://github.com/gimli-rs/object/pull/469) [#476](https://github.com/gimli-rs/object/pull/476) [#477](https://github.com/gimli-rs/object/pull/477) [#482](https://github.com/gimli-rs/object/pull/482) [#484](https://github.com/gimli-rs/object/pull/484) [#486](https://github.com/gimli-rs/object/pull/486) [#527](https://github.com/gimli-rs/object/pull/527) * Added `read::FileKind::CoffBig`, `read::pe::CoffHeader` and `read::pe::ImageSymbol`. [#502](https://github.com/gimli-rs/object/pull/502) * Added `elf::PT_GNU_PROPERTY`. [#530](https://github.com/gimli-rs/object/pull/530) * Added `elf::ELFCOMPRESS_ZSTD`, `read::CompressionFormat::Zstandard`, and Zstandard decompression in `read::CompressedData::decompress` using the `ruzstd` crate. [#532](https://github.com/gimli-rs/object/pull/532) * Added `read::elf::NoteIterator::new`. [#533](https://github.com/gimli-rs/object/pull/533) -------------------------------------------------------------------------------- ## 0.30.3 Released 2023/01/23. ### Added * Added `SectionKind::ReadOnlyDataWithRel` for writing. [#504](https://github.com/gimli-rs/object/pull/504) -------------------------------------------------------------------------------- ## 0.30.2 Released 2023/01/11. ### Added * Added more ELF constants for AVR flags and relocations. [#500](https://github.com/gimli-rs/object/pull/500) -------------------------------------------------------------------------------- ## 0.30.1 Released 2023/01/04. ### Changed * Changed `read::ElfSymbol::kind` to handle `STT_NOTYPE` and `STT_GNU_IFUNC`. [#498](https://github.com/gimli-rs/object/pull/498) ### Added * Added `read::CoffSymbol::raw_symbol`. [#494](https://github.com/gimli-rs/object/pull/494) * Added ELF support for Solana Binary Format. [#491](https://github.com/gimli-rs/object/pull/491) * Added ELF support for AArch64 ILP32. [#497](https://github.com/gimli-rs/object/pull/497) -------------------------------------------------------------------------------- ## 0.30.0 Released 2022/11/22. ### Breaking changes * The minimum supported rust version for the `read` feature has changed to 1.52.0. [#458](https://github.com/gimli-rs/object/pull/458) * The minimum supported rust version for the `write` feature has changed to 1.61.0. * Fixed endian handling in `read::elf::SymbolTable::shndx`. [#458](https://github.com/gimli-rs/object/pull/458) * Fixed endian handling in `read::pe::ResourceName`. [#458](https://github.com/gimli-rs/object/pull/458) * Changed definitions for LoongArch ELF header flags. [#483](https://github.com/gimli-rs/object/pull/483) ### Changed * Fixed parsing of multiple debug directory entries in `read::pe::PeFile::pdb_info`. [#451](https://github.com/gimli-rs/object/pull/451) * Changed the section name used when writing COFF stub symbols. [#475](https://github.com/gimli-rs/object/pull/475) ### Added * Added `read::pe::DataDirectories::delay_load_import_table`. [#448](https://github.com/gimli-rs/object/pull/448) * Added `read::macho::LoadCommandData::raw_data`. [#449](https://github.com/gimli-rs/object/pull/449) * Added ELF relocations for LoongArch ps ABI v2. [#450](https://github.com/gimli-rs/object/pull/450) * Added PowerPC support for Mach-O. [#460](https://github.com/gimli-rs/object/pull/460) * Added support for reading the AIX big archive format. [#462](https://github.com/gimli-rs/object/pull/462) [#467](https://github.com/gimli-rs/object/pull/467) [#473](https://github.com/gimli-rs/object/pull/473) * Added support for `RelocationEncoding::AArch64Call` when writing Mach-O files. [#465](https://github.com/gimli-rs/object/pull/465) * Added support for `RelocationKind::Relative` when writing RISC-V ELF files. [#470](https://github.com/gimli-rs/object/pull/470) * Added Xtensa architecture support for ELF. [#481](https://github.com/gimli-rs/object/pull/481) * Added `read::pe::ResourceName::raw_data`. [#487](https://github.com/gimli-rs/object/pull/487) -------------------------------------------------------------------------------- ## 0.29.0 Released 2022/06/22. ### Breaking changes * The `write` feature now has a minimum supported rust version of 1.56.1. [#444](https://github.com/gimli-rs/object/pull/444) * Added `os_abi` and `abi_version` fields to `FileFlags::Elf`. [#438](https://github.com/gimli-rs/object/pull/438) [#441](https://github.com/gimli-rs/object/pull/441) ### Changed * Fixed handling of empty symbol tables in `read::elf::ElfFile::symbol_table` and `read::elf::ElfFile::dynamic_symbol_table`. [#443](https://github.com/gimli-rs/object/pull/443) ### Added * Added more `ELF_OSABI_*` constants. [#439](https://github.com/gimli-rs/object/pull/439) -------------------------------------------------------------------------------- ## 0.28.4 Released 2022/05/09. ### Added * Added `read::pe::DataDirectories::resource_directory`. [#425](https://github.com/gimli-rs/object/pull/425) [#427](https://github.com/gimli-rs/object/pull/427) * Added PE support for more ARM relocations. [#428](https://github.com/gimli-rs/object/pull/428) * Added support for `Architecture::LoongArch64`. [#430](https://github.com/gimli-rs/object/pull/430) [#432](https://github.com/gimli-rs/object/pull/432) * Added `elf::EF_MIPS_ABI` and associated constants. [#433](https://github.com/gimli-rs/object/pull/433) -------------------------------------------------------------------------------- ## 0.28.3 Released 2022/01/19. ### Changed * For the Mach-O support in `write::Object`, accept `RelocationKind::MachO` for all architectures, and accept `RelocationKind::Absolute` for ARM64. [#422](https://github.com/gimli-rs/object/pull/422) ### Added * Added `pe::ImageDataDirectory::file_range`, `read::pe::SectionTable::pe_file_range_at` and `pe::ImageSectionHeader::pe_file_range_at`. [#421](https://github.com/gimli-rs/object/pull/421) * Added `write::Object::add_coff_exports`. [#423](https://github.com/gimli-rs/object/pull/423) -------------------------------------------------------------------------------- ## 0.28.2 Released 2022/01/09. ### Changed * Ignored errors for the Wasm extended name section in `read::WasmFile::parse`. [#408](https://github.com/gimli-rs/object/pull/408) * Ignored errors for the COFF symbol table in `read::PeFile::parse`. [#410](https://github.com/gimli-rs/object/pull/410) * Fixed handling of `SectionFlags::Coff` in `write::Object::coff_write`. [#412](https://github.com/gimli-rs/object/pull/412) ### Added * Added `read::ObjectSegment::flags`. [#416](https://github.com/gimli-rs/object/pull/416) [#418](https://github.com/gimli-rs/object/pull/418) -------------------------------------------------------------------------------- ## 0.28.1 Released 2021/12/12. ### Changed * Fixed `read::elf::SymbolTable::shndx_section`. [#405](https://github.com/gimli-rs/object/pull/405) * Fixed build warnings. [#405](https://github.com/gimli-rs/object/pull/405) [#406](https://github.com/gimli-rs/object/pull/406) -------------------------------------------------------------------------------- ## 0.28.0 Released 2021/12/12. ### Breaking changes * `write_core` feature no longer enables `std` support. Use `write_std` instead. [#400](https://github.com/gimli-rs/object/pull/400) * Multiple changes related to Mach-O split dyld cache support. [#398](https://github.com/gimli-rs/object/pull/398) ### Added * Added `write::pe::Writer::write_file_align`. [#397](https://github.com/gimli-rs/object/pull/397) * Added support for Mach-O split dyld cache. [#398](https://github.com/gimli-rs/object/pull/398) * Added support for `IMAGE_SCN_LNK_NRELOC_OVFL` when reading and writing COFF. [#399](https://github.com/gimli-rs/object/pull/399) * Added `write::elf::Writer::reserve_null_symbol_index`. [#402](https://github.com/gimli-rs/object/pull/402) -------------------------------------------------------------------------------- ## 0.27.1 Released 2021/10/22. ### Changed * Fixed build error with older Rust versions due to cargo resolver version. -------------------------------------------------------------------------------- ## 0.27.0 Released 2021/10/17. ### Breaking changes * Changed `read::elf` to use `SectionIndex` instead of `usize` in more places. [#341](https://github.com/gimli-rs/object/pull/341) * Changed some `read::elf` section methods to additionally return the linked section index. [#341](https://github.com/gimli-rs/object/pull/341) * Changed `read::pe::ImageNtHeaders::parse` to return `DataDirectories` instead of a slice. [#357](https://github.com/gimli-rs/object/pull/357) * Deleted `value` parameter for `write:WritableBuffer::resize`. [#369](https://github.com/gimli-rs/object/pull/369) * Changed `write::Object` and `write::Section` to use `Cow` for section data. This added a lifetime parameter, which existing users can set to `'static`. [#370](https://github.com/gimli-rs/object/pull/370) ### Changed * Fixed parsing when PE import directory has zero size. [#341](https://github.com/gimli-rs/object/pull/341) * Fixed parsing when PE import directory has zero for original first thunk. [#385](https://github.com/gimli-rs/object/pull/385) [#387](https://github.com/gimli-rs/object/pull/387) * Fixed parsing when PE export directory has zero number of names. [#353](https://github.com/gimli-rs/object/pull/353) * Fixed parsing when PE export directory has zero number of names and addresses. [#362](https://github.com/gimli-rs/object/pull/362) * Fixed parsing when PE sections are contiguous. [#354](https://github.com/gimli-rs/object/pull/354) * Fixed `std` feature for `indexmap` dependency. [#374](https://github.com/gimli-rs/object/pull/374) * Fixed overflow in COFF section name offset parsing. [#390](https://github.com/gimli-rs/object/pull/390) ### Added * Added `name_bytes` methods to unified `read` traits. [#351](https://github.com/gimli-rs/object/pull/351) * Added `read::Object::kind`. [#352](https://github.com/gimli-rs/object/pull/352) * Added `read::elf::VersionTable` and related helpers. [#341](https://github.com/gimli-rs/object/pull/341) * Added `read::elf::SectionTable::dynamic` and related helpers. [#345](https://github.com/gimli-rs/object/pull/345) * Added `read::coff::SectionTable::max_section_file_offset`. [#344](https://github.com/gimli-rs/object/pull/344) * Added `read::pe::ExportTable` and related helpers. [#349](https://github.com/gimli-rs/object/pull/349) [#353](https://github.com/gimli-rs/object/pull/353) * Added `read::pe::ImportTable` and related helpers. [#357](https://github.com/gimli-rs/object/pull/357) * Added `read::pe::DataDirectories` and related helpers. [#357](https://github.com/gimli-rs/object/pull/357) [#384](https://github.com/gimli-rs/object/pull/384) * Added `read::pe::RichHeaderInfo` and related helpers. [#375](https://github.com/gimli-rs/object/pull/375) [#379](https://github.com/gimli-rs/object/pull/379) * Added `read::pe::RelocationBlocks` and related helpers. [#378](https://github.com/gimli-rs/object/pull/378) * Added `write::elf::Writer`. [#350](https://github.com/gimli-rs/object/pull/350) * Added `write::pe::Writer`. [#382](https://github.com/gimli-rs/object/pull/382) [#388](https://github.com/gimli-rs/object/pull/388) * Added `write::Section::data/data_mut`. [#367](https://github.com/gimli-rs/object/pull/367) * Added `write::Object::write_stream`. [#369](https://github.com/gimli-rs/object/pull/369) * Added MIPSr6 ELF header flag definitions. [#372](https://github.com/gimli-rs/object/pull/372) -------------------------------------------------------------------------------- ## 0.26.2 Released 2021/08/28. ### Added * Added support for 64-bit symbol table names to `read::archive`. [#366](https://github.com/gimli-rs/object/pull/366) -------------------------------------------------------------------------------- ## 0.26.1 Released 2021/08/19. ### Changed * Activate `memchr`'s `rustc-dep-of-std` feature [#356](https://github.com/gimli-rs/object/pull/356) -------------------------------------------------------------------------------- ## 0.26.0 Released 2021/07/26. ### Breaking changes * Changed `ReadRef::read_bytes_at_until` to accept a range parameter. [#326](https://github.com/gimli-rs/object/pull/326) * Added `ReadRef` type parameter to `read::StringTable` and types that contain it. String table entries are now only read as required. [#326](https://github.com/gimli-rs/object/pull/326) * Changed result type of `read::elf::SectionHeader::data` and `data_as_array`. [#332](https://github.com/gimli-rs/object/pull/332) * Moved `pod::WritableBuffer` to `write::WritableBuffer`. Renamed `WritableBuffer::extend` to `write_bytes`. Added more provided methods to `WritableBuffer`. [#335](https://github.com/gimli-rs/object/pull/335) * Moved `pod::Bytes` to `read::Bytes`. [#336](https://github.com/gimli-rs/object/pull/336) * Added `is_mips64el` parameter to `elf::Rela64::r_info/set_r_info`. [#337](https://github.com/gimli-rs/object/pull/337) ### Changed * Removed `alloc` dependency when no features are enabled. [#336](https://github.com/gimli-rs/object/pull/336) ### Added * Added `read::pe::PeFile` methods: `section_table`, `data_directory`, and `data`. [#324](https://github.com/gimli-rs/object/pull/324) * Added more ELF definitions. [#332](https://github.com/gimli-rs/object/pull/332) * Added `read::elf::SectionTable` methods for hash tables and symbol version information. [#332](https://github.com/gimli-rs/object/pull/332) * Added PE RISC-V definitions. [#333](https://github.com/gimli-rs/object/pull/333) * Added `WritableBuffer` implementation for `Vec`. [#335](https://github.com/gimli-rs/object/pull/335) -------------------------------------------------------------------------------- ## 0.25.3 Released 2021/06/12. ### Added * Added `RelocationEncoding::AArch64Call`. [#322](https://github.com/gimli-rs/object/pull/322) -------------------------------------------------------------------------------- ## 0.25.2 Released 2021/06/04. ### Added * Added `Architecture::X86_64_X32`. [#320](https://github.com/gimli-rs/object/pull/320) -------------------------------------------------------------------------------- ## 0.25.1 Released 2021/06/03. ### Changed * write: Fix choice of `SHT_REL` or `SHT_RELA` for most architectures. [#318](https://github.com/gimli-rs/object/pull/318) * write: Fix relocation encoding for MIPS64EL. [#318](https://github.com/gimli-rs/object/pull/318) -------------------------------------------------------------------------------- ## 0.25.0 Released 2021/06/02. ### Breaking changes * Added `non_exhaustive` to most public enums. [#306](https://github.com/gimli-rs/object/pull/306) * `MachHeader::parse` and `MachHeader::load_commands` now require a header offset. [#304](https://github.com/gimli-rs/object/pull/304) * Added `ReadRef::read_bytes_at_until`. [#308](https://github.com/gimli-rs/object/pull/308) * `PeFile::entry`, `PeSection::address` and `PeSegment::address` now return a virtual address instead of a RVA. [#315](https://github.com/gimli-rs/object/pull/315) ### Added * Added `pod::from_bytes_mut`, `pod::slice_from_bytes_mut`, `pod::bytes_of_mut`, and `pod::bytes_of_slice_mut`. [#296](https://github.com/gimli-rs/object/pull/296) [#297](https://github.com/gimli-rs/object/pull/297) * Added `Object::pdb_info`. [#298](https://github.com/gimli-rs/object/pull/298) * Added `read::macho::DyldCache`, other associated definitions, and support for these in the examples. [#308](https://github.com/gimli-rs/object/pull/308) * Added more architecture support. [#303](https://github.com/gimli-rs/object/pull/303) [#309](https://github.com/gimli-rs/object/pull/309) * Derive more traits for enums. [#311](https://github.com/gimli-rs/object/pull/311) * Added `Object::relative_address_base`. [#315](https://github.com/gimli-rs/object/pull/315) ### Changed * Improved performance for string parsing. [#302](https://github.com/gimli-rs/object/pull/302) * `objdump` example allows selecting container members. [#308](https://github.com/gimli-rs/object/pull/308) shared-version = true pre-release-commit-message = "Release v{{version}}" tag-message = "Release v{{version}}" tag-name = "v{{version}}" pre-release-replacements = [ { file = "../CHANGELOG.md", search = "Unreleased", replace = "{{version}}" }, { file = "../CHANGELOG.md", search = "ReleaseDate", replace = "{{date}}" }, { file = "../CHANGELOG.md", search = "", replace = "\n\n## [Unreleased] - ReleaseDate", exactly = 1 }, ] # Change Log ## [Unreleased] ## [v0.10.76] - 2026-03-11 ### Added * Added brainpool curve NID constants. * Added `SubjectAlternativeName::dir_name2` for constructing directoryName SAN entries. * Added HKDF and generic KDF support. * Added `UpperHex` implementation for `BigNum` and `BigNumRef`. * Added `add_utf8_string` and `add_int` to `OsslParamBuilder`. * Added `Debug` implementation for `EcGroup`, `EcGroupRef`, `EcdsaSig` and `EcdsaSigRef`. * Enhanced `Debug` implementation for `Nid`. * Constified `PKey::from_raw`. * Exposed `from_str_x509()` for LibreSSL >= 3.6.0. ### Fixed * Fixed use-after-free of error strings on BoringSSL/aws-lc. * Fixed cipher comparison (`is_ccm`, `is_ocb`) to use NID instead of unreliable pointer comparison. Added NID constants for `AES_*_OCB`. * Fixed invalid value parsing of OCSP revocation reason. * Fixed `BIO_METHOD` path for AWS-LC to use BoringSSL codepath. ## [v0.10.75] - 2025-11-07 ### Added * Added support for `set_rsa_oaep_label` on AWS-LC/BoringSSL. * Added `Asn1GeneralizedTime::from_str`. * Added `OcspStatus::next_update` method. ### Fixed * Fixed unsound OCSP `find_status` handling of optional next_update field. If an OCSP response does not have a `nextUpdate`, `OcspStatus::next_update` will store a sentinel value. Use `OcspStatus::next_update()` instead. ### Deprecated * Deprecated `OcspStatus::next_update` field in favor of the `next_update()` method. ## [v0.10.74] - 2025-10-14 ### Added * Added parameter generation support (`PkeyCtx::paramgen` and `PkeyCtx::paramgen_init`). * Added key generation methods for RSA, DSA, DH, and EC via `PkeyCtx`. * Added `Cipher::get_protocol_id`. * Added `EcPointRef::set_affine_coordinates`. * Added `EcGroup::order_bits` on BoringSSL, LibreSSL, and AWS-LC. * Added `X509::append_entry` on BoringSSL and AWS-LC. * Added XOF squeeze support on AWS-LC. * Added argon2d and argon2i KDF variants. ### Changed * Bumped MSRV to 1.70. * The repository has moved to the rust-openssl github organization. ### Fixed * Disabled AES-CFB128 ciphers for BoringSSL. ### Removed * Removed support for OpenSSL <1.0.2. * Removed support for LibreSSL <3.5. ## [v0.10.73] - 2025-05-28 ### Fixed * Fixed building on the latest BoringSSL. ### Changed * Replaced ctest2 with ctest in systest. ## [v0.10.72] - 2025-04-04 ### Fixed * Fixed use-after-free in `Md::fetch` and `Cipher::fetch` when `properties` is `Some(...)`. In practice this use-after-free most likely resulted in OpenSSL treating the `properties` as `b""`. ### Added * Support for building with AWS-LC. ## [v0.10.71] - 2025-02-15 ### Added * Added `Cipher::rc2_cbc` and `Cipher::rc2_40_cbc`. ## [v0.10.70] - 2025-02-02 ### Fixed * Fixed improper lifetime constraints in `ssl::select_next_proto` that allowed a use after free. ### Added * Added `SslMethod::dtls_client` and `SslMethod::dtls_server`. ## [v0.10.69] - 2025-01-25 ### Fixed * Fixed the version constraint on `openssl-macros`. ### Added * Added `SslContextBuilder::load_verify_locations`. * Added `Hasher::squeeze_xof`. * Added `SslContextBuilder::set_alpn_select_callback` support for boringssl. ## [v0.10.68] - 2024-10-16 ### Fixed * Fixed building on Rust 1.63.0 (our MSRV) with OpenSSL 3.2 or newer. ## [v0.10.67] - 2024-10-15 ### Added * Added support for LibreSSL 4.0.x. * Added `argon2id` ### Fixed * Fixed a case where `MdCtxRef::digest_verify_final` could leave an error on the stack. * Fixed a case where `RsaRef::check_key` could leave an error on the stack. ### Changed * `openssl` is now a 2021 edition crate * Explicitly specify the MSRV in `Cargo.toml` ## [v0.10.66] - 2024-07-21 ### Fixed - Fixed undefined behavior in `MemBio::get_buf` when the resulting buffer had a length of 0. ## [v0.10.65] - 2024-07-20 ### Fixed * Ensure we are initialized in `MessageDigest::from_nid`, `Md::from_nid`, `Md::fetch` ### Changed * Expose `SslContextBuilder::set_keylog_callback` on BoringSSL ## [v0.10.64] - 2024-02-19 ### Added * Added `PkeyCtxRef::{nonce_type, set_nonce_type}`. * Added `X509Ref::alias`. ## [v0.10.63] - 2024-01-19 ### Added * Added `Pkcs7Ref::{type_,signed}`. * Added `Pkcs7SignedRef::certificates`. * Added `Cipher::{aes_256_xts,des_ede3_ecb,des_ede3_cfb8,des_ede3_ofb,camellia128_ofb,camellia192_ofb,camellia256_ofb,cast5_ofb,idea_ofb}` * Added `PKey::from_dhx` * Added `PKey::{public_key_from_pem_passphrase,public_key_from_pem_callback}`. ### Changed * `Cipher::aes_128_ofb` is now available on BoringSSL * `Nid::{BRAINPOOL_P256R1,BRAINPOOL_P320R1,BRAINPOOL_P384R1,BRAINPOOL_P512R1}` are now available on LibreSSL. ## [v0.10.62] - 2023-12-22 ### Added * Added `Nid::BRAINPOOL_P320R1` * Added `rand_priv_bytes` ### Fixed * Fixed building on the latest version of BoringSSL ## [v0.10.61] - 2023-12-04 ### Changed * `SslStream` now uses `SSL_read_ex`, `SSL_write_ex`, and `SSL_peek_ex` when available ### Added * Added `SslStream::{read_uninit, ssl_read_uninit}`. ## [v0.10.60] - 2023-11-22 ### Deprecated * Deprecated `X509StoreRef::objects`. It is unsound. All callers should migrate to using `X509StoreRef::all_certificates` instead. ### Fixed * Fixed a memory leak when calling `SslContextBuilder::set_ex_data` and `SslRef::set_ex_data` multiple times with the same index. ### Added * Added `X509StoreRef::all_certificates` * Added `cipher::Cipher::{camellia128_cbc,camellia192_cbc,camellia256_cbc,cast5_cbc,idea_cbc}` * Added `symm::Cipher::{des_ede3_ecb,des_ede3_cfb8,des_ede3_ofb,camellia_128_ecb,camellia_128_ofb,camellia_128_cfb128,camellia_192_ecb,camellia_192_ofb,camellia_192_cfb128,camellia_256_ecb,camellia_256_ofb,camellia_256_cfb128,cast5_ecb,cast5_ofb,cast5_cfb64,idea_ecb,idea_ofb,idea_cfb64}` * Added `Crypter::update_unchecked` * Added `SslRef::{peer_tmp_key,tmp_key}` ### Changed * `cipher::Cipher::chacha20` is now available on LibreSSL * `symm::Cipher::chacha20` is now available on LibreSSL ## [v0.10.59] - 2023-11-03 ### Added * Added `Nid::CHACHA20_POLY1305` ### Changed * Fixed the availability of `Id::RSA_PSS` on OpenSSL ## [v0.10.58] - 2023-11-01 ### Added * Added `Id::{RSA_PSS,DHX}` constants * Added `SslContextBuilder::set_security_level` * Added `SslContextRef::security_level` * Added `SslRef::set_security_level`, `SslRef::security_level` * Added `Cipher::{camellia_128_cbc, camellia_192_cbc, camellia_256_cbc, cast5_cbc, idea_cbc}` * Added `X509CrlRef::extension` * Added `X509PurposeId::CODE_SIGN` ### Changed * `Pkey` HKDF functionality now works on LibreSSL * `BigNum::mod_sqrt` is now available on all OpenSSLs * `MessageDigest::sha3*` are now available on LibreSSL ## [v0.10.57] - 2023-08-27 ### Added * Added `X509VerifyParam::set_email` * `Cipher::chacha20_poly1305` is now available on LibreSSL * Added `CipherCtx::copy` ### Changed * Updated `bitflags` dependency to the 2.x series ## [v0.10.56] - 2023-08-06 ## Added * Added `BigNumRef::mod_sqrt`. * Added `PkeyCtxRef::set_signature_md` and `PkeyCtxRef::set_rsa_pss_saltlen`. * Added `PkeyCtxRef::verify_recover_init` and `PkeyCtxRef::verify_recover`. * Added `BigNumRef::is_even` and `BigNumRef::is_odd`. * Added `EcPointRef::to_hex_str` and `EcPoint::from_hex_str`. * Added support for AES key wrap and wrap pad. ## [v0.10.55] - 2023-06-20 ### Fixed * Fixed compilation with the latest version of BoringSSL. * Fixed compilation when OpenSSL is compiled with `OPENSSL_NO_OCB`. * Fixed a segfault in `X509VerifyParamRef::set_host` when called with an empty string. ### Added * Added `Deriver::set_peer_ex`. * Added `EcGroupRef::asn1_flag`. * Exposed `EcPointRef::affine_coordinates` on BoringSSL and LibreSSL. * Added `Nid::SM2` and `Id::SM2` ## [v0.10.54] - 2023-05-31 ### Fixed * `PKey::private_key_to_pkcs8_passphrase` no longer panics if a `passphrase` contains a NUL byte. ## [v0.10.53] - 2023-05-30 ### Added * Added `Dsa::from_pqg`, `Dsa::generate_key`, and `Dsa::generate_params`. * Added `SslRef::bytes_to_cipher_list`. * Added `SubjectAlternativeName::other_name2` ## [v0.10.52] - 2023-04-24 ### Added * Added `DhRef::check_key`. * Added `Id::POLY1305`. * Added `X509Ref::subject_key_id`, `X509Ref::authority_key_id`, `X509Ref::authority_issuer`, and `X509Ref::authority_serial`. ## [v0.10.51] - 2023-04-20 ### Added * Added `X509RevokedRef::issuer_name` and `X509RevokedRef::reason_code`. * Added `Dh::set_key` and `Dh::set_public_key` * Added `Asn1OctetString` and `Asn1OctetStringRef1` * Added `X509Extension::new_from_der` ### Deprecated * Deprecated `X509Extension::new` and `X509Extension::new_nid` in favor of `X509Extension::new_from_der` and the `extensions` module. * Deprecated `X509Extension::add_alias`, it is not required with `new_from_der` or the `extensions` module. ## [v0.10.50] - 2023-04-09 ### Added * Added `CipherCtxRef::cipher_update_inplace`. ## [v0.10.49] - 2023-04-01 ### Fixed * `SslConnector` no longer sets the SNI extension when connecting to an IP address. ### Added * Implemented `Ord`, `PartialOrd`, `Eq`, and `PartialEq` for `Asn1Integer` and `Asn1IntegerRef`. * Added `X509Ref::crl_distribution_points`, and `DistPoint`. ## [v0.10.48] - 2023-03-23 ### Fixed * Fixed injection vulnerabilities where OpenSSL's configuration mini-language could be used via `x509::extension::SubjectAlternativeName` and `x509::extension::ExtendedKeyUsage`. The mini-language can read arbitrary files amongst other things. * As part of fixing this `SubjectAlternativeName::dir_name` and `SubjectAlternativeName::other_name` are deprecated and their implementations always `panic!`. If you have a use case for these, please file an issue. * Fixed several NULL pointer dereferences in OpenSSL that could be triggered via `x509::X509Extension::new` and `x509::X509Extension::new_nid`. Note that these methods still accept OpenSSL's configuration mini-language, and therefore should not be used with untrusted data. * Fixed a data-race with `x509::X509Name` that are created with `x509::X509NameBuilder` and then used concurrently. * Fixed LibreSSL version checking. More functions should now be correctly available on LibreSSL. ## [v0.10.47] - 2023-03-19 ### Added * Added support for X25519 and Ed25519 on LibreSSL and BoringSSL. * Added `Error::library_code` and `Error::reason_code`. ## [v0.10.46] - 2023-03-14 ### Fixed * Fixed a potential null-pointer deref when parsing a PKCS#12 archive with no identity. * Fixed builds against OpenSSL built with `no-cast`. * Fixed debug formatting of `GeneralName`. ### Deprecated * Deprecated `PKcs12Ref::parse` in favor of `Pkcs12Ref::parse2`. * Deprecated `ParsedPkcs12` in favor of `ParsedPkcs12_2`. * Deprecated `Pkcs12Builder::build` in favor of `Pkcs12Builder::build2`. ### Added * Added `X509VerifyParamRef::set_auth_level`, `X509VerifyParamRef::auth_level`, and `X509VerifyParamRef::set_purpose`. * Added `X509PurposeId` and `X509Purpose`. * Added `X509NameBuilder::append_entry`. * Added `PKeyRef::private_key_to_pkcs8`. * Added `X509LookupRef::load_crl_file`. * Added `Pkcs12Builder::name`, `Pkcs12Builder::pkey`, and `Pkcs12Builder::cert`. * Added `SslRef::set_method`, `SslRef::set_private_key_file`, `SslRef::set_private_key`, `SslRef::set_certificate`, `SslRef::set_certificate_chain_file`, `SslRef::add_client_ca`, `SslRef::set_client_ca_list`, `SslRef::set_min_proto_version`, `SslREf::set_max_proto_version`, `SslRef::set_ciphersuites`, `SslRef::set_cipher_list`, `SslRef::set_verify_cert_store`. * Added `X509NameRef::to_owned`. * Added `SslContextBuilder::set_num_tickets`, `SslContextRef::num_tickets`, `SslRef::set_num_tickets`, and `SslRef::num_tickets`. * Added `CmsContentInfo::verify`. ## [v0.10.45] - 2022-12-20 ### Fixed * Removed the newly added `CipherCtxRef::minimal_output_size` method, which did not work properly. * Added `NO_DEPRECATED_3_0` cfg checks for more APIs. ### Added * Added `SslRef::add_chain_cert`. * Added `PKeyRef::security_bits`. * Added `Provider::set_default_search_path`. * Added `CipherCtxRef::cipher_final_unchecked`. ## [v0.10.44] - 2022-12-06 ### Added * Added `CipherCtxRef::num`, `CipherCtxRef::minimal_output_size`, and `CipherCtxRef::cipher_update_unchecked`. * Improved output buffer size checks in `CipherCtxRef::cipher_update`. * Added `X509Lookup::file` and `X509LookupRef::load_cert_file`. ## [v0.10.43] - 2022-11-23 ### Added * Added `Nid::BRAINPOOL_P256R1`, `Nid::BRAINPOOL_P384R1`, `Nid::BRAINPOOL_P512R1`. * Added `BigNumRef::copy_from_slice`. * Added `Cipher` constructors for Camellia, CAST5, and IDEA ciphers. * Added `DsaSig`. * Added `X509StoreBuilderRef::set_param`. * Added `X509VerifyParam::new`, `X509VerifyParamRef::set_time`, and `X509VerifyParamRef::set_depth`. ## [v0.10.42] - 2022-09-26 ### Added * Added `SslRef::psk_identity_hint` and `SslRef::psk_identity`. * Added SHA-3 constants to `Nid`. * Added `SslOptions::PRIORITIZE_CHACHA`. * Added `X509ReqRef::to_text`. * Added `MdCtxRef::size`. * Added `X509NameRef::try_cmp`. * Added `MdCtxRef::reset`. * Added experimental, unstable support for BoringSSL. ### Fixed * Fixed `MdCtxRef::digest_verify_init` to support `PKey`s with only public components. ## [v0.10.41] - 2022-06-09 ### Fixed * Fixed a use-after-free in `Error::function` and `Error::file` with OpenSSL 3.x. ### Added * Added `MessageDigest::block_size` and `MdRef::block_size`. * Implemented `Ord` and `Eq` for `X509` and `X509Ref`. * Added `X509Extension::add_alias`. * Added SM4 support. * Added `EcGroup::from_components` `EcGropuRef::set_generator`, and `EcPointRef::set_affine_coordinates_gfp`. ## [v0.10.40] - 2022-05-04 ### Fixed * Fixed the openssl-sys dependency version. ## [v0.10.39] - 2022-05-02 ### Deprecated * Deprecated `SslContextBuilder::set_tmp_ecdh_callback` and `SslRef::set_tmp_ecdh_callback`. ### Added * Added `SslRef::extms_support`. * Added `Nid::create`. * Added `CipherCtx`, which exposes a more direct interface to `EVP_CIPHER_CTX`. * Added `PkeyCtx`, which exposes a more direct interface to `EVP_PKEY_CTX`. * Added `MdCtx`, which exposes a more direct interface to `EVP_MD_CTX`. * Added `Pkcs12Builder::mac_md`. * Added `Provider`. * Added `X509Ref::issuer_name_hash`. * Added `Decrypter::set_rsa_oaep_label`. * Added `X509Ref::to_text`. ## [v0.10.38] - 2021-10-31 ### Added * Added `Pkey::ec_gen`. ## [v0.10.37] - 2021-10-27 ### Fixed * Fixed linkage against OpenSSL distributions built with `no-chacha`. ### Added * Added `BigNumRef::to_vec_padded`. * Added `X509Name::from_der` and `X509NameRef::to_der`. * Added `BigNum::new_secure`, `BigNumReef::set_const_time`, `BigNumref::is_const_time`, and `BigNumRef::is_secure`. ## [v0.10.36] - 2021-08-17 ### Added * Added `Asn1Object::as_slice`. * Added `PKeyRef::{raw_public_key, raw_private_key, private_key_to_pkcs8_passphrase}` and `PKey::{private_key_from_raw_bytes, public_key_from_raw_bytes}`. * Added `Cipher::{seed_cbc, seed_cfb128, seed_ecb, seed_ofb}`. ## [v0.10.35] - 2021-06-18 ### Fixed * Fixed a memory leak in `Deriver`. ### Added * Added support for OpenSSL 3.x.x. * Added `SslStream::peek`. ## [v0.10.34] - 2021-04-28 ### Added * Added `Dh::set_private_key` and `DhRef::private_key`. * Added `EcPointRef::affine_coordinates`. * Added `TryFrom` implementations to convert between `PKey` and specific key types. * Added `X509StoreBuilderRef::set_flags`. ## [v0.10.33] - 2021-03-13 ### Fixed * `Dh::generate_params` now uses `DH_generate_params_ex` rather than the deprecated `DH_generated_params` function. ### Added * Added `Asn1Type`. * Added `CmsContentInfoRef::decrypt_without_cert_check`. * Added `EcPointRef::{is_infinity, is_on_curve}`. * Added `Encrypter::set_rsa_oaep_label`. * Added `MessageDigest::sm3`. * Added `Pkcs7Ref::signers`. * Added `Cipher::nid`. * Added `X509Ref::authority_info` and `AccessDescription::{method, location}`. * Added `X509NameBuilder::{append_entry_by_text_with_type, append_entry_by_nid_with_type}`. ## [v0.10.32] - 2020-12-24 ### Fixed * Fixed `Ssl::new` to take a `&SslContextRef` rather than `&SslContext`. ### Added * Added the `encrypt` module to support asymmetric encryption and decryption with `PKey`s. * Added `MessageDigest::from_name`. * Added `ConnectConfiguration::into_ssl`. * Added the ability to create unconnected `SslStream`s directly from an `Ssl` and transport stream without performing any part of the handshake with `SslStream::new`. * Added `SslStream::{read_early_data, write_early_data, connect, accept, do_handshake, stateless}`. * Implemented `ToOwned` for `SslContextRef`. * Added `SslRef::{set_connect_state, set_accept_state}`. ### Deprecated * Deprecated `SslStream::from_raw_parts` in favor of `Ssl::from_ptr` and `SslStream::new`. * Deprecated `SslStreamBuilder` in favor of methods on `Ssl` and `SslStream`. ## [v0.10.31] - 2020-12-09 ### Added * Added `Asn1Object::from_str`. * Added `Dh::from_pgq`, `DhRef::prime_p`, `DhRef::prime_q`, `DhRef::generator`, `DhRef::generate_params`, `DhRef::generate_key`, `DhRef::public_key`, and `DhRef::compute_key`. * Added `Pkcs7::from_der` and `Pkcs7Ref::to_der`. * Added `Id::X25519`, `Id::X448`, `PKey::generate_x25519`, and `PKey::generate_x448`. * Added `SrtpProfileId::SRTP_AEAD_AES_128_GCM` and `SrtpProfileId::SRTP_AEAD_AES_256_GCM`. * Added `SslContextBuilder::verify_param` and `SslContextBuilder::verify_param_mut`. * Added `X509Ref::subject_name_hash` and `X509Ref::version`. * Added `X509StoreBuilderRef::add_lookup`, and the `X509Lookup` type. * Added `X509VerifyFlags`, `X509VerifyParamRef::set_flags`, `X509VerifyParamRef::clear_flags` `X509VerifyParamRef::get_flags`. ## [v0.10.30] - 2020-06-25 ### Fixed * `DsaRef::private_key_to_pem` can no longer be called without a private key. ### Changed * Improved the `Debug` implementations of many types. ### Added * Added `is_empty` implementations for `Asn1StringRef` and `Asn1BitStringRef`. * Added `EcPointRef::{to_pem, to_dir}` and `EcKeyRef::{public_key_from_pem, public_key_from_der}`. * Added `Default` implementations for many types. * Added `Debug` implementations for many types. * Added `SslStream::from_raw_parts`. * Added `SslRef::set_mtu`. * Added `Cipher::{aes_128_ocb, aes_192_ocb, aes_256_ocb}`. ### Deprecated * Deprecated `SslStreamBuilder::set_dtls_mtu_size` in favor of `SslRef::set_mtu`. ## [v0.10.29] - 2020-04-07 ### Fixed * Fixed a memory leak in `X509Builder::append_extension`. ### Added * Added `SslConnector::into_context` and `SslConnector::context`. * Added `SslAcceptor::into_context` and `SslAcceptor::context`. * Added `SslMethod::tls_client` and `SslMethod::tls_server`. * Added `SslContextBuilder::set_cert_store`. * Added `SslContextRef::verify_mode` and `SslRef::verify_mode`. * Added `SslRef::is_init_finished`. * Added `X509Object`. * Added `X509StoreRef::objects`. ## [v0.10.28] - 2020-02-04 ### Fixed * Fixed the mutability of `Signer::sign_oneshot` and `Verifier::verify_oneshot`. This is unfortunately a breaking change, but a necessary soundness fix. ## [v0.10.27] - 2020-01-29 ### Added * Added `MessageDigest::null`. * Added `PKey::private_key_from_pkcs8`. * Added `SslOptions::NO_RENEGOTIATION`. * Added `SslStreamBuilder::set_dtls_mtu_size`. ## [v0.10.26] - 2019-11-22 ### Fixed * Fixed improper handling of the IV buffer in `envelope::{Seal, Unseal}`. ### Added * Added `Asn1TimeRef::{diff, compare}`. * Added `Asn1Time::from_unix`. * Added `PartialEq` and `PartialOrd` implementations for `Asn1Time` and `Asn1TimeRef`. * Added `base64::{encode_block, decode_block}`. * Added `EcGroupRef::order_bits`. * Added `Clone` implementations for `Sha1`, `Sha224`, `Sha256`, `Sha384`, and `Sha512`. * Added `SslContextBuilder::{set_sigalgs_list, set_groups_list}`. ## [v0.10.25] - 2019-10-02 ### Fixed * Fixed a memory leak in `EcdsaSig::from_private_components` when using OpenSSL 1.0.x. ### Added * Added support for Ed25519 and Ed448 keys. * Implemented `ToOwned` for `PKeyRef` and `Clone` for `PKey`. ## [v0.10.24] - 2019-07-19 ### Fixed * Worked around an OpenSSL 1.0.x bug triggered by code calling `SSL_set_app_data`. ### Added * Added `aes::{wrap_key, unwrap_key}`. * Added `CmsContentInfoRef::to_pem` and `CmsContentInfo::from_pem`. * Added `DsaRef::private_key_to_pem`. * Added `EcGroupRef::{cofactor, generator}`. * Added `EcPointRef::to_owned`. * Added a `Debug` implementation for `EcKey`. * Added `SslAcceptor::{mozilla_intermediate_v5, mozilla_modern_v5}`. * Added `Cipher::{aes_128_ofb, aes_192_ecb, aes_192_cbc, aes_192_ctr, aes_192_cfb1, aes_192_cfb128, aes_192_cfb8, aes_192_gcm, aes_192_ccm, aes_192_ofb, aes_256_ofb}`. ## [v0.10.23] - 2019-05-18 ### Fixed * Fixed session callbacks when an `Ssl`'s context is replaced. ### Added * Added `SslContextBuilder::add_client_ca`. ## [v0.10.22] - 2019-05-08 ### Added * Added support for the LibreSSL 2.9.x series. ## [v0.10.21] - 2019-04-30 ### Fixed * Fixed overly conservatifve buffer size checks in `Crypter` when using stream ciphers. ### Added * Added bindings to envelope encryption APIs. * Added `PkeyRef::size`. ## [v0.10.20] - 2019-03-20 ### Added * Added `CmsContentInfo::from_der` and `CmsContentInfo::encrypt`. * Added `X509Ref::verify` and `X509ReqRef::verify`. * Implemented `PartialEq` and `Eq` for `MessageDigest`. * Added `MessageDigest::type_` and `EcGroupRef::curve_name`. ## [v0.10.19] - 2019-03-01 ### Added * The openssl-sys build script now logs the values of environment variables. * Added `ERR_PACK` to openssl-sys. * The `ERR_*` functions in openssl-sys are const functions when building against newer Rust versions. * Implemented `Clone` for `Dsa`. * Added `SslContextRef::add_session` and `SslContextRef::remove_session`. * Added `SslSessionRef::time`, `SslSessionRef::timeout`, and `SslSessionRef::protocol_version`. * Added `SslContextBuilder::set_session_cache_size` and `SslContextRef::session_cache_size`. ## [v0.10.18] - 2019-02-22 ### Fixed * Fixed the return type of `ssl::cipher_name`. ## [v0.10.17] - 2019-02-22 ### Added * Implemented `AsRef` and `AsRef<[u8]>` for `OpenSslString`. * Added `Asn1Integer::from_bn`. * Added `RsaRef::check_key`. * Added `Asn1Time::from_str` and `Asn1Time::from_str_x509`. * Added `Rsa::generate_with_e`. * Added `Cipher::des_ede3_cfb64`. * Added `SslCipherRef::standard_name` and `ssl::cipher_name`. ## [v0.10.16] - 2018-12-16 ### Added * Added SHA3 and SHAKE to `MessageDigest`. * Added `rand::keep_random_devices_open`. * Added support for LibreSSL 2.9.0. ## [v0.10.15] - 2018-10-22 ### Added * Implemented `DoubleEndedIterator` for stack iterators. ## [v0.10.14] - 2018-10-18 ### Fixed * Made some accidentally exposed internal functions private. ### Added * Added support for LibreSSL 2.8. ### Changed * The OpenSSL version used with the `vendored` feature has been upgraded from 1.1.0 to 1.1.1. ## [v0.10.13] - 2018-10-14 ### Fixed * Fixed a double-free in the `SslContextBuilder::set_get_session_callback` API. ### Added * Added `SslContextBuilder::set_client_hello_callback`. * Added support for LibreSSL 2.8.1. * Added `EcdsaSig::from_der` and `EcdsaSig::to_der`. * Added PKCS#7 support. ## [v0.10.12] - 2018-09-13 ### Fixed * Fixed handling of SNI callbacks during renegotiation. ### Added * Added `SslRef::get_shutdown` and `SslRef::set_shutdown`. * Added support for SRTP in DTLS sessions. * Added support for LibreSSL 2.8.0. ## [v0.10.11] - 2018-08-04 ### Added * The new `vendored` cargo feature will cause openssl-sys to compile and statically link to a vendored copy of OpenSSL. * Added `SslContextBuilder::set_psk_server_callback`. * Added `DsaRef::pub_key` and `DsaRef::priv_key`. * Added `Dsa::from_private_components` and `Dsa::from_public_components`. * Added `X509NameRef::entries`. ### Deprecated * `SslContextBuilder::set_psk_callback` has been renamed to `SslContextBuilder::set_psk_client_callback` and deprecated. ## [v0.10.10] - 2018-06-06 ### Added * Added `SslRef::set_alpn_protos`. * Added `SslContextBuilder::set_ciphersuites`. ## [v0.10.9] - 2018-06-01 ### Fixed * Fixed a use-after-free in `CmsContentInfo::sign`. * `SslRef::servername` now returns `None` rather than panicking on a non-UTF8 name. ### Added * Added `MessageDigest::from_nid`. * Added `Nid::signature_algorithms`, `Nid::long_name`, and `Nid::short_name`. * Added early data and early keying material export support for TLS 1.3. * Added `SslRef::verified_chain`. * Added `SslRef::servername_raw` which returns a `&[u8]` rather than `&str`. * Added `SslRef::finished` and `SslRef::peer_finished`. * Added `X509Ref::digest` to replace `X509Ref::fingerprint`. * `X509StoreBuilder` and `X509Store` now implement `Sync` and `Send`. ### Deprecated * `X509Ref::fingerprint` has been deprecated in favor of `X509Ref::digest`. ## [v0.10.8] - 2018-05-20 ### Fixed * `openssl-sys` will now detect Homebrew-installed OpenSSL when installed to a non-default directory. * The `X509_V_ERR_INVALID_CALL`, `X509_V_ERR_STORE_LOOKUP`, and `X509_V_ERR_PROXY_SUBJECT_NAME_VIOLATION` constants in `openssl-sys` are now only present when building against 1.1.0g and up rather than 1.1.0. * `SslContextBuilder::max_proto_version` and `SslContextBuilder::min_proto_version` are only present when building against 1.1.0g and up rather than 1.1.0. ### Added * Added `CmsContentInfo::sign`. * Added `Clone` and `ToOwned` implementations to `Rsa` and `RsaRef` respectively. * The `min_proto_version` and `max_proto_version` methods are available when linking against LibreSSL 2.6.1 and up in addition to OpenSSL. * `X509VerifyParam` is available when linking against LibreSSL 2.6.1 and up in addition to OpenSSL. * ALPN support is available when linking against LibreSSL 2.6.1 and up in addition to OpenSSL. * `Stack` and `StackRef` are now `Sync` and `Send`. ## [v0.10.7] - 2018-04-30 ### Added * Added `X509Req::public_key` and `X509Req::extensions`. * Added `RsaPrivateKeyBuilder` to allow control over initialization of optional components of an RSA private key. * Added DER encode/decode support to `SslSession`. * openssl-sys now provides the `DEP_OPENSSL_VERSION_NUMBER` and `DEP_OPENSSL_LIBRESSL_VERSION_NUMBER` environment variables to downstream build scripts which contains the hex-encoded version number of the OpenSSL or LibreSSL distribution being built against. The other variables are deprecated. ## [v0.10.6] - 2018-03-05 ### Added * Added `SslOptions::ENABLE_MIDDLEBOX_COMPAT`. * Added more `Sync` and `Send` implementations. * Added `PKeyRef::id`. * Added `Padding::PKCS1_PSS`. * Added `Signer::set_rsa_pss_saltlen`, `Signer::set_rsa_mgf1_md`, `Signer::set_rsa_pss_saltlen`, and `Signer::set_rsa_mgf1_md` * Added `X509StoreContextRef::verify` to directly verify certificates. * Added low level ECDSA support. * Added support for TLSv1.3 custom extensions. (OpenSSL 1.1.1 only) * Added AES-CCM support. * Added `EcKey::from_private_components`. * Added CMAC support. * Added support for LibreSSL 2.7. * Added `X509Ref::serial_number`. * Added `Asn1IntegerRef::to_bn`. * Added support for TLSv1.3 stateless handshakes. (OpenSSL 1.1.1 only) ### Changed * The Cargo features previously used to gate access to version-specific OpenSSL APIs have been removed. Those APIs will be available automatically when building against an appropriate OpenSSL version. * Fixed `PKey::private_key_from_der` to return a `PKey` rather than a `PKey`. This is technically a breaking change but the function was pretty useless previously. ### Deprecated * `X509CheckFlags::FLAG_NO_WILDCARDS` has been renamed to `X509CheckFlags::NO_WILDCARDS` and the old name deprecated. ## [v0.10.5] - 2018-02-28 ### Fixed * `ErrorStack`'s `Display` implementation no longer writes an empty string if it contains no errors. ### Added * Added `SslRef::version2`. * Added `Cipher::des_ede3_cbc`. * Added `SslRef::export_keying_material`. * Added the ability to push an `Error` or `ErrorStack` back onto OpenSSL's error stack. Various callback bindings use this to propagate errors properly. * Added `SslContextBuilder::set_cookie_generate_cb` and `SslContextBuilder::set_cookie_verify_cb`. * Added `SslContextBuilder::set_max_proto_version`, `SslContextBuilder::set_min_proto_version`, `SslContextBuilder::max_proto_version`, and `SslContextBuilder::min_proto_version`. ### Changed * Updated `SslConnector`'s default cipher list to match Python's. ### Deprecated * `SslRef::version` has been deprecated. Use `SslRef::version_str` instead. ## [v0.10.4] - 2018-02-18 ### Added * Added OpenSSL 1.1.1 support. * Added `Rsa::public_key_from_pem_pkcs1`. * Added `SslOptions::NO_TLSV1_3`. (OpenSSL 1.1.1 only) * Added `SslVersion`. * Added `SslSessionCacheMode` and `SslContextBuilder::set_session_cache_mode`. * Added `SslContextBuilder::set_new_session_callback`, `SslContextBuilder::set_remove_session_callback`, and `SslContextBuilder::set_get_session_callback`. * Added `SslContextBuilder::set_keylog_callback`. (OpenSSL 1.1.1 only) * Added `SslRef::client_random` and `SslRef::server_random`. (OpenSSL 1.1.0+ only) ### Fixed * The `SslAcceptorBuilder::mozilla_modern` constructor now disables TLSv1.0 and TLSv1.1 in accordance with Mozilla's recommendations. ## [v0.10.3] - 2018-02-12 ### Added * OpenSSL is now automatically detected on FreeBSD systems. * Added `GeneralName` accessors for `rfc822Name` and `uri` variants. * Added DES-EDE3 support. ### Fixed * Fixed a memory leak in `X509StoreBuilder::add_cert`. ## [v0.10.2] - 2018-01-11 ### Added * Added `ConnectConfiguration::set_use_server_name_indication` and `ConnectConfiguration::set_verify_hostname` for use in contexts where you don't have ownership of the `ConnectConfiguration`. ## [v0.10.1] - 2018-01-10 ### Added * Added a `From for ssl::Error` implementation. ## [v0.10.0] - 2018-01-10 ### Compatibility * openssl 0.10 still uses openssl-sys 0.9, so openssl 0.9 and 0.10 can coexist without issue. ### Added * The `ssl::select_next_proto` function can be used to easily implement the ALPN selection callback in a "standard" way. * FIPS mode support is available in the `fips` module. * Accessors for the Issuer and Issuer Alternative Name fields of X509 certificates have been added. * The `X509VerifyResult` can now be set in the certificate verification callback via `X509StoreContextRef::set_error`. ### Changed * All constants have been moved to associated constants of their type. For example, `bn::MSB_ONE` is now `bn::MsbOption::ONE`. * Asymmetric key types are now parameterized over what they contain. In OpenSSL, the same type is used for key parameters, public keys, and private keys. Unfortunately, some APIs simply assume that certain components are present and will segfault trying to use things that aren't there. The `pkey` module contains new tag types named `Params`, `Public`, and `Private`, and the `Dh`, `Dsa`, `EcKey`, `Rsa`, and `PKey` have a type parameter set to one of those values. This allows the `Signer` constructor to indicate that it requires a private key at compile time for example. Previously, `Signer` would simply segfault if provided a key without private components. * ALPN support has been changed to more directly model OpenSSL's own APIs. Instead of a single method used for both the server and client sides which performed everything automatically, the `SslContextBuilder::set_alpn_protos` and `SslContextBuilder::set_alpn_select_callback` handle the client and server sides respectively. * `SslConnector::danger_connect_without_providing_domain_for_certificate_verification_and_server_name_indication` has been removed in favor of new methods which provide more control. The `ConnectConfiguration::use_server_name_indication` method controls the use of Server Name Indication (SNI), and the `ConnectConfiguration::verify_hostname` method controls the use of hostname verification. These can be controlled independently, and if both are disabled, the domain argument to `ConnectConfiguration::connect` is ignored. * Shared secret derivation is now handled by the new `derive::Deriver` type rather than `pkey::PKeyContext`, which has been removed. * `ssl::Error` is now no longer an enum, and provides more direct access to the relevant state. * `SslConnectorBuilder::new` has been moved and renamed to `SslConnector::builder`. * `SslAcceptorBuilder::mozilla_intermediate` and `SslAcceptorBuilder::mozilla_modern` have been moved to `SslAcceptor` and no longer take the private key and certificate chain. Install those manually after creating the builder. * `X509VerifyError` is now `X509VerifyResult` and can now have the "ok" value in addition to error values. * `x509::X509FileType` is now `ssl::SslFiletype`. * Asymmetric key serialization and deserialization methods now document the formats that they correspond to, and some have been renamed to better indicate that. ### Removed * All deprecated APIs have been removed. * NPN support has been removed. It has been supersceded by ALPN, and is hopefully no longer being used in practice. If you still depend on it, please file an issue! * `SslRef::compression` has been removed. * Some `ssl::SslOptions` flags have been removed as they no longer do anything. ## Older Look at the [release tags] for information about older releases. [Unreleased]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.76...master [v0.10.76]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.75...openssl-v0.10.76 [v0.10.75]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.74...openssl-v0.10.75 [v0.10.74]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.73...openssl-v0.10.74 [v0.10.73]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.72...openssl-v0.10.73 [v0.10.72]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.71...openssl-v0.10.72 [v0.10.71]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.70...openssl-v0.10.71 [v0.10.70]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.69...openssl-v0.10.70 [v0.10.69]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.68...openssl-v0.10.69 [v0.10.68]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.67...openssl-v0.10.68 [v0.10.67]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.66...openssl-v0.10.67 [v0.10.66]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.65...openssl-v0.10.66 [v0.10.65]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.64...openssl-v0.10.65 [v0.10.64]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.63...openssl-v0.10.64 [v0.10.63]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.62...openssl-v0.10.63 [v0.10.62]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.61...openssl-v0.10.62 [v0.10.61]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.60...openssl-v0.10.61 [v0.10.60]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.59...openssl-v0.10.60 [v0.10.59]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.58...openssl-v0.10.59 [v0.10.58]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.57...openssl-v0.10.58 [v0.10.57]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.56...openssl-v0.10.57 [v0.10.56]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.55...openssl-v0.10.56 [v0.10.55]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.54...openssl-v0.10.55 [v0.10.54]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.53...openssl-v0.10.54 [v0.10.53]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.52...openssl-v0.10.53 [v0.10.52]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.51...openssl-v0.10.52 [v0.10.51]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.50...openssl-v0.10.51 [v0.10.50]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.49...openssl-v0.10.50 [v0.10.49]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.48...openssl-v0.10.49 [v0.10.48]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.47...openssl-v0.10.48 [v0.10.47]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.46...openssl-v0.10.47 [v0.10.46]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.45...openssl-v0.10.46 [v0.10.45]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.44...openssl-v0.10.45 [v0.10.44]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.43...openssl-v0.10.44 [v0.10.43]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.42...openssl-v0.10.43 [v0.10.42]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.41...openssl-v0.10.42 [v0.10.41]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.40...openssl-v0.10.41 [v0.10.40]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.39...openssl-v0.10.40 [v0.10.39]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.38...openssl-v0.10.39 [v0.10.38]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.37...openssl-v0.10.38 [v0.10.37]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.36...openssl-v0.10.37 [v0.10.36]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.35...openssl-v0.10.36 [v0.10.35]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.34...openssl-v0.10.35 [v0.10.34]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.33...openssl-v0.10.34 [v0.10.33]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.32...openssl-v0.10.33 [v0.10.32]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.31...openssl-v0.10.32 [v0.10.31]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.30...openssl-v0.10.31 [v0.10.30]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.29...openssl-v0.10.30 [v0.10.29]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.28...openssl-v0.10.29 [v0.10.28]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.27...openssl-v0.10.28 [v0.10.27]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.26...openssl-v0.10.27 [v0.10.26]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.25...openssl-v0.10.26 [v0.10.25]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.24...openssl-v0.10.25 [v0.10.24]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.23...openssl-v0.10.24 [v0.10.23]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.22...openssl-v0.10.23 [v0.10.22]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.21...openssl-v0.10.22 [v0.10.21]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.20...openssl-v0.10.21 [v0.10.20]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.19...openssl-v0.10.20 [v0.10.19]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.18...openssl-v0.10.19 [v0.10.18]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.17...openssl-v0.10.18 [v0.10.17]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.16...openssl-v0.10.17 [v0.10.16]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.15...openssl-v0.10.16 [v0.10.15]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.14...openssl-v0.10.15 [v0.10.14]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.13...openssl-v0.10.14 [v0.10.13]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.12...openssl-v0.10.13 [v0.10.12]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.11...openssl-v0.10.12 [v0.10.11]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.10...openssl-v0.10.11 [v0.10.10]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.9...openssl-v0.10.10 [v0.10.9]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.8...openssl-v0.10.9 [v0.10.8]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.7...openssl-v0.10.8 [v0.10.7]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.6...openssl-v0.10.7 [v0.10.6]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.5...openssl-v0.10.6 [v0.10.5]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.4...openssl-v0.10.5 [v0.10.4]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.3...openssl-v0.10.4 [v0.10.3]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.2...openssl-v0.10.3 [v0.10.2]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.1...openssl-v0.10.2 [v0.10.1]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.0...openssl-v0.10.1 [v0.10.0]: https://github.com/rust-openssl/rust-openssl/compare/v0.9.23...openssl-v0.10.0 [release tags]: https://github.com/rust-openssl/rust-openssl/releases # Change Log ## [Unreleased] ## [v0.10.78] - 2026-04-19 ### Added * Added support for OpenSSL 4.x. * Added support for LibreSSL 4.3.x. ### Fixed * Fixed several soundness issues where safe Rust callers could trigger out-of-bounds reads or writes: * `MdCtxRef::digest_final` now returns an error when the output buffer is shorter than the digest size. * `PkeyCtxRef::derive` now checks the output buffer length on OpenSSL 1.1.x and LibreSSL, where some key types (X25519, X448, HKDF-extract) ignore the caller-supplied length. * Callbacks for key-loading passwords and SSL PSK and cookie generation now reject values longer than the length of the slice. * Fixed a dangling stack pointer in the SSL custom extension callback when using a fixed-length array. * Fixed an inverted bounds assertion in AES key unwrap. * `Crypter::new` now panics, as documented, when an IV is required by the cipher but not provided (previously it silently used an all-zero IV). * Avoided a panic when formatting overlong OIDs; the value is now truncated with trailing dots. * Fixed Suite B flag assignments in `X509VerifyParam`. * Handle errors on `OPENSSL_malloc` in `PkeyCtxRef::set_rsa_oaep_label`. ## [v0.10.77] - 2026-04-12 ### Added * Enabled `MdCtxRef::digest_sign`, `MdCtxRef::digest_sign_to_vec`, `MdCtxRef::digest_verify`, and `MdCtxRef::reset` on BoringSSL, LibreSSL, and AWS-LC. ## [v0.10.76] - 2026-03-11 ### Added * Added brainpool curve NID constants. * Added `SubjectAlternativeName::dir_name2` for constructing directoryName SAN entries. * Added HKDF and generic KDF support. * Added `UpperHex` implementation for `BigNum` and `BigNumRef`. * Added `add_utf8_string` and `add_int` to `OsslParamBuilder`. * Added `Debug` implementation for `EcGroup`, `EcGroupRef`, `EcdsaSig` and `EcdsaSigRef`. * Enhanced `Debug` implementation for `Nid`. * Constified `PKey::from_raw`. * Exposed `from_str_x509()` for LibreSSL >= 3.6.0. ### Fixed * Fixed use-after-free of error strings on BoringSSL/aws-lc. * Fixed cipher comparison (`is_ccm`, `is_ocb`) to use NID instead of unreliable pointer comparison. Added NID constants for `AES_*_OCB`. * Fixed invalid value parsing of OCSP revocation reason. * Fixed `BIO_METHOD` path for AWS-LC to use BoringSSL codepath. ## [v0.10.75] - 2025-11-07 ### Added * Added support for `set_rsa_oaep_label` on AWS-LC/BoringSSL. * Added `Asn1GeneralizedTime::from_str`. * Added `OcspStatus::next_update` method. ### Fixed * Fixed unsound OCSP `find_status` handling of optional next_update field. If an OCSP response does not have a `nextUpdate`, `OcspStatus::next_update` will store a sentinel value. Use `OcspStatus::next_update()` instead. ### Deprecated * Deprecated `OcspStatus::next_update` field in favor of the `next_update()` method. ## [v0.10.74] - 2025-10-14 ### Added * Added parameter generation support (`PkeyCtx::paramgen` and `PkeyCtx::paramgen_init`). * Added key generation methods for RSA, DSA, DH, and EC via `PkeyCtx`. * Added `Cipher::get_protocol_id`. * Added `EcPointRef::set_affine_coordinates`. * Added `EcGroup::order_bits` on BoringSSL, LibreSSL, and AWS-LC. * Added `X509::append_entry` on BoringSSL and AWS-LC. * Added XOF squeeze support on AWS-LC. * Added argon2d and argon2i KDF variants. ### Changed * Bumped MSRV to 1.70. * The repository has moved to the rust-openssl github organization. ### Fixed * Disabled AES-CFB128 ciphers for BoringSSL. ### Removed * Removed support for OpenSSL <1.0.2. * Removed support for LibreSSL <3.5. ## [v0.10.73] - 2025-05-28 ### Fixed * Fixed building on the latest BoringSSL. ### Changed * Replaced ctest2 with ctest in systest. ## [v0.10.72] - 2025-04-04 ### Fixed * Fixed use-after-free in `Md::fetch` and `Cipher::fetch` when `properties` is `Some(...)`. In practice this use-after-free most likely resulted in OpenSSL treating the `properties` as `b""`. ### Added * Support for building with AWS-LC. ## [v0.10.71] - 2025-02-15 ### Added * Added `Cipher::rc2_cbc` and `Cipher::rc2_40_cbc`. ## [v0.10.70] - 2025-02-02 ### Fixed * Fixed improper lifetime constraints in `ssl::select_next_proto` that allowed a use after free. ### Added * Added `SslMethod::dtls_client` and `SslMethod::dtls_server`. ## [v0.10.69] - 2025-01-25 ### Fixed * Fixed the version constraint on `openssl-macros`. ### Added * Added `SslContextBuilder::load_verify_locations`. * Added `Hasher::squeeze_xof`. * Added `SslContextBuilder::set_alpn_select_callback` support for boringssl. ## [v0.10.68] - 2024-10-16 ### Fixed * Fixed building on Rust 1.63.0 (our MSRV) with OpenSSL 3.2 or newer. ## [v0.10.67] - 2024-10-15 ### Added * Added support for LibreSSL 4.0.x. * Added `argon2id` ### Fixed * Fixed a case where `MdCtxRef::digest_verify_final` could leave an error on the stack. * Fixed a case where `RsaRef::check_key` could leave an error on the stack. ### Changed * `openssl` is now a 2021 edition crate * Explicitly specify the MSRV in `Cargo.toml` ## [v0.10.66] - 2024-07-21 ### Fixed - Fixed undefined behavior in `MemBio::get_buf` when the resulting buffer had a length of 0. ## [v0.10.65] - 2024-07-20 ### Fixed * Ensure we are initialized in `MessageDigest::from_nid`, `Md::from_nid`, `Md::fetch` ### Changed * Expose `SslContextBuilder::set_keylog_callback` on BoringSSL ## [v0.10.64] - 2024-02-19 ### Added * Added `PkeyCtxRef::{nonce_type, set_nonce_type}`. * Added `X509Ref::alias`. ## [v0.10.63] - 2024-01-19 ### Added * Added `Pkcs7Ref::{type_,signed}`. * Added `Pkcs7SignedRef::certificates`. * Added `Cipher::{aes_256_xts,des_ede3_ecb,des_ede3_cfb8,des_ede3_ofb,camellia128_ofb,camellia192_ofb,camellia256_ofb,cast5_ofb,idea_ofb}` * Added `PKey::from_dhx` * Added `PKey::{public_key_from_pem_passphrase,public_key_from_pem_callback}`. ### Changed * `Cipher::aes_128_ofb` is now available on BoringSSL * `Nid::{BRAINPOOL_P256R1,BRAINPOOL_P320R1,BRAINPOOL_P384R1,BRAINPOOL_P512R1}` are now available on LibreSSL. ## [v0.10.62] - 2023-12-22 ### Added * Added `Nid::BRAINPOOL_P320R1` * Added `rand_priv_bytes` ### Fixed * Fixed building on the latest version of BoringSSL ## [v0.10.61] - 2023-12-04 ### Changed * `SslStream` now uses `SSL_read_ex`, `SSL_write_ex`, and `SSL_peek_ex` when available ### Added * Added `SslStream::{read_uninit, ssl_read_uninit}`. ## [v0.10.60] - 2023-11-22 ### Deprecated * Deprecated `X509StoreRef::objects`. It is unsound. All callers should migrate to using `X509StoreRef::all_certificates` instead. ### Fixed * Fixed a memory leak when calling `SslContextBuilder::set_ex_data` and `SslRef::set_ex_data` multiple times with the same index. ### Added * Added `X509StoreRef::all_certificates` * Added `cipher::Cipher::{camellia128_cbc,camellia192_cbc,camellia256_cbc,cast5_cbc,idea_cbc}` * Added `symm::Cipher::{des_ede3_ecb,des_ede3_cfb8,des_ede3_ofb,camellia_128_ecb,camellia_128_ofb,camellia_128_cfb128,camellia_192_ecb,camellia_192_ofb,camellia_192_cfb128,camellia_256_ecb,camellia_256_ofb,camellia_256_cfb128,cast5_ecb,cast5_ofb,cast5_cfb64,idea_ecb,idea_ofb,idea_cfb64}` * Added `Crypter::update_unchecked` * Added `SslRef::{peer_tmp_key,tmp_key}` ### Changed * `cipher::Cipher::chacha20` is now available on LibreSSL * `symm::Cipher::chacha20` is now available on LibreSSL ## [v0.10.59] - 2023-11-03 ### Added * Added `Nid::CHACHA20_POLY1305` ### Changed * Fixed the availability of `Id::RSA_PSS` on OpenSSL ## [v0.10.58] - 2023-11-01 ### Added * Added `Id::{RSA_PSS,DHX}` constants * Added `SslContextBuilder::set_security_level` * Added `SslContextRef::security_level` * Added `SslRef::set_security_level`, `SslRef::security_level` * Added `Cipher::{camellia_128_cbc, camellia_192_cbc, camellia_256_cbc, cast5_cbc, idea_cbc}` * Added `X509CrlRef::extension` * Added `X509PurposeId::CODE_SIGN` ### Changed * `Pkey` HKDF functionality now works on LibreSSL * `BigNum::mod_sqrt` is now available on all OpenSSLs * `MessageDigest::sha3*` are now available on LibreSSL ## [v0.10.57] - 2023-08-27 ### Added * Added `X509VerifyParam::set_email` * `Cipher::chacha20_poly1305` is now available on LibreSSL * Added `CipherCtx::copy` ### Changed * Updated `bitflags` dependency to the 2.x series ## [v0.10.56] - 2023-08-06 ## Added * Added `BigNumRef::mod_sqrt`. * Added `PkeyCtxRef::set_signature_md` and `PkeyCtxRef::set_rsa_pss_saltlen`. * Added `PkeyCtxRef::verify_recover_init` and `PkeyCtxRef::verify_recover`. * Added `BigNumRef::is_even` and `BigNumRef::is_odd`. * Added `EcPointRef::to_hex_str` and `EcPoint::from_hex_str`. * Added support for AES key wrap and wrap pad. ## [v0.10.55] - 2023-06-20 ### Fixed * Fixed compilation with the latest version of BoringSSL. * Fixed compilation when OpenSSL is compiled with `OPENSSL_NO_OCB`. * Fixed a segfault in `X509VerifyParamRef::set_host` when called with an empty string. ### Added * Added `Deriver::set_peer_ex`. * Added `EcGroupRef::asn1_flag`. * Exposed `EcPointRef::affine_coordinates` on BoringSSL and LibreSSL. * Added `Nid::SM2` and `Id::SM2` ## [v0.10.54] - 2023-05-31 ### Fixed * `PKey::private_key_to_pkcs8_passphrase` no longer panics if a `passphrase` contains a NUL byte. ## [v0.10.53] - 2023-05-30 ### Added * Added `Dsa::from_pqg`, `Dsa::generate_key`, and `Dsa::generate_params`. * Added `SslRef::bytes_to_cipher_list`. * Added `SubjectAlternativeName::other_name2` ## [v0.10.52] - 2023-04-24 ### Added * Added `DhRef::check_key`. * Added `Id::POLY1305`. * Added `X509Ref::subject_key_id`, `X509Ref::authority_key_id`, `X509Ref::authority_issuer`, and `X509Ref::authority_serial`. ## [v0.10.51] - 2023-04-20 ### Added * Added `X509RevokedRef::issuer_name` and `X509RevokedRef::reason_code`. * Added `Dh::set_key` and `Dh::set_public_key` * Added `Asn1OctetString` and `Asn1OctetStringRef1` * Added `X509Extension::new_from_der` ### Deprecated * Deprecated `X509Extension::new` and `X509Extension::new_nid` in favor of `X509Extension::new_from_der` and the `extensions` module. * Deprecated `X509Extension::add_alias`, it is not required with `new_from_der` or the `extensions` module. ## [v0.10.50] - 2023-04-09 ### Added * Added `CipherCtxRef::cipher_update_inplace`. ## [v0.10.49] - 2023-04-01 ### Fixed * `SslConnector` no longer sets the SNI extension when connecting to an IP address. ### Added * Implemented `Ord`, `PartialOrd`, `Eq`, and `PartialEq` for `Asn1Integer` and `Asn1IntegerRef`. * Added `X509Ref::crl_distribution_points`, and `DistPoint`. ## [v0.10.48] - 2023-03-23 ### Fixed * Fixed injection vulnerabilities where OpenSSL's configuration mini-language could be used via `x509::extension::SubjectAlternativeName` and `x509::extension::ExtendedKeyUsage`. The mini-language can read arbitrary files amongst other things. * As part of fixing this `SubjectAlternativeName::dir_name` and `SubjectAlternativeName::other_name` are deprecated and their implementations always `panic!`. If you have a use case for these, please file an issue. * Fixed several NULL pointer dereferences in OpenSSL that could be triggered via `x509::X509Extension::new` and `x509::X509Extension::new_nid`. Note that these methods still accept OpenSSL's configuration mini-language, and therefore should not be used with untrusted data. * Fixed a data-race with `x509::X509Name` that are created with `x509::X509NameBuilder` and then used concurrently. * Fixed LibreSSL version checking. More functions should now be correctly available on LibreSSL. ## [v0.10.47] - 2023-03-19 ### Added * Added support for X25519 and Ed25519 on LibreSSL and BoringSSL. * Added `Error::library_code` and `Error::reason_code`. ## [v0.10.46] - 2023-03-14 ### Fixed * Fixed a potential null-pointer deref when parsing a PKCS#12 archive with no identity. * Fixed builds against OpenSSL built with `no-cast`. * Fixed debug formatting of `GeneralName`. ### Deprecated * Deprecated `PKcs12Ref::parse` in favor of `Pkcs12Ref::parse2`. * Deprecated `ParsedPkcs12` in favor of `ParsedPkcs12_2`. * Deprecated `Pkcs12Builder::build` in favor of `Pkcs12Builder::build2`. ### Added * Added `X509VerifyParamRef::set_auth_level`, `X509VerifyParamRef::auth_level`, and `X509VerifyParamRef::set_purpose`. * Added `X509PurposeId` and `X509Purpose`. * Added `X509NameBuilder::append_entry`. * Added `PKeyRef::private_key_to_pkcs8`. * Added `X509LookupRef::load_crl_file`. * Added `Pkcs12Builder::name`, `Pkcs12Builder::pkey`, and `Pkcs12Builder::cert`. * Added `SslRef::set_method`, `SslRef::set_private_key_file`, `SslRef::set_private_key`, `SslRef::set_certificate`, `SslRef::set_certificate_chain_file`, `SslRef::add_client_ca`, `SslRef::set_client_ca_list`, `SslRef::set_min_proto_version`, `SslREf::set_max_proto_version`, `SslRef::set_ciphersuites`, `SslRef::set_cipher_list`, `SslRef::set_verify_cert_store`. * Added `X509NameRef::to_owned`. * Added `SslContextBuilder::set_num_tickets`, `SslContextRef::num_tickets`, `SslRef::set_num_tickets`, and `SslRef::num_tickets`. * Added `CmsContentInfo::verify`. ## [v0.10.45] - 2022-12-20 ### Fixed * Removed the newly added `CipherCtxRef::minimal_output_size` method, which did not work properly. * Added `NO_DEPRECATED_3_0` cfg checks for more APIs. ### Added * Added `SslRef::add_chain_cert`. * Added `PKeyRef::security_bits`. * Added `Provider::set_default_search_path`. * Added `CipherCtxRef::cipher_final_unchecked`. ## [v0.10.44] - 2022-12-06 ### Added * Added `CipherCtxRef::num`, `CipherCtxRef::minimal_output_size`, and `CipherCtxRef::cipher_update_unchecked`. * Improved output buffer size checks in `CipherCtxRef::cipher_update`. * Added `X509Lookup::file` and `X509LookupRef::load_cert_file`. ## [v0.10.43] - 2022-11-23 ### Added * Added `Nid::BRAINPOOL_P256R1`, `Nid::BRAINPOOL_P384R1`, `Nid::BRAINPOOL_P512R1`. * Added `BigNumRef::copy_from_slice`. * Added `Cipher` constructors for Camellia, CAST5, and IDEA ciphers. * Added `DsaSig`. * Added `X509StoreBuilderRef::set_param`. * Added `X509VerifyParam::new`, `X509VerifyParamRef::set_time`, and `X509VerifyParamRef::set_depth`. ## [v0.10.42] - 2022-09-26 ### Added * Added `SslRef::psk_identity_hint` and `SslRef::psk_identity`. * Added SHA-3 constants to `Nid`. * Added `SslOptions::PRIORITIZE_CHACHA`. * Added `X509ReqRef::to_text`. * Added `MdCtxRef::size`. * Added `X509NameRef::try_cmp`. * Added `MdCtxRef::reset`. * Added experimental, unstable support for BoringSSL. ### Fixed * Fixed `MdCtxRef::digest_verify_init` to support `PKey`s with only public components. ## [v0.10.41] - 2022-06-09 ### Fixed * Fixed a use-after-free in `Error::function` and `Error::file` with OpenSSL 3.x. ### Added * Added `MessageDigest::block_size` and `MdRef::block_size`. * Implemented `Ord` and `Eq` for `X509` and `X509Ref`. * Added `X509Extension::add_alias`. * Added SM4 support. * Added `EcGroup::from_components` `EcGropuRef::set_generator`, and `EcPointRef::set_affine_coordinates_gfp`. ## [v0.10.40] - 2022-05-04 ### Fixed * Fixed the openssl-sys dependency version. ## [v0.10.39] - 2022-05-02 ### Deprecated * Deprecated `SslContextBuilder::set_tmp_ecdh_callback` and `SslRef::set_tmp_ecdh_callback`. ### Added * Added `SslRef::extms_support`. * Added `Nid::create`. * Added `CipherCtx`, which exposes a more direct interface to `EVP_CIPHER_CTX`. * Added `PkeyCtx`, which exposes a more direct interface to `EVP_PKEY_CTX`. * Added `MdCtx`, which exposes a more direct interface to `EVP_MD_CTX`. * Added `Pkcs12Builder::mac_md`. * Added `Provider`. * Added `X509Ref::issuer_name_hash`. * Added `Decrypter::set_rsa_oaep_label`. * Added `X509Ref::to_text`. ## [v0.10.38] - 2021-10-31 ### Added * Added `Pkey::ec_gen`. ## [v0.10.37] - 2021-10-27 ### Fixed * Fixed linkage against OpenSSL distributions built with `no-chacha`. ### Added * Added `BigNumRef::to_vec_padded`. * Added `X509Name::from_der` and `X509NameRef::to_der`. * Added `BigNum::new_secure`, `BigNumReef::set_const_time`, `BigNumref::is_const_time`, and `BigNumRef::is_secure`. ## [v0.10.36] - 2021-08-17 ### Added * Added `Asn1Object::as_slice`. * Added `PKeyRef::{raw_public_key, raw_private_key, private_key_to_pkcs8_passphrase}` and `PKey::{private_key_from_raw_bytes, public_key_from_raw_bytes}`. * Added `Cipher::{seed_cbc, seed_cfb128, seed_ecb, seed_ofb}`. ## [v0.10.35] - 2021-06-18 ### Fixed * Fixed a memory leak in `Deriver`. ### Added * Added support for OpenSSL 3.x.x. * Added `SslStream::peek`. ## [v0.10.34] - 2021-04-28 ### Added * Added `Dh::set_private_key` and `DhRef::private_key`. * Added `EcPointRef::affine_coordinates`. * Added `TryFrom` implementations to convert between `PKey` and specific key types. * Added `X509StoreBuilderRef::set_flags`. ## [v0.10.33] - 2021-03-13 ### Fixed * `Dh::generate_params` now uses `DH_generate_params_ex` rather than the deprecated `DH_generated_params` function. ### Added * Added `Asn1Type`. * Added `CmsContentInfoRef::decrypt_without_cert_check`. * Added `EcPointRef::{is_infinity, is_on_curve}`. * Added `Encrypter::set_rsa_oaep_label`. * Added `MessageDigest::sm3`. * Added `Pkcs7Ref::signers`. * Added `Cipher::nid`. * Added `X509Ref::authority_info` and `AccessDescription::{method, location}`. * Added `X509NameBuilder::{append_entry_by_text_with_type, append_entry_by_nid_with_type}`. ## [v0.10.32] - 2020-12-24 ### Fixed * Fixed `Ssl::new` to take a `&SslContextRef` rather than `&SslContext`. ### Added * Added the `encrypt` module to support asymmetric encryption and decryption with `PKey`s. * Added `MessageDigest::from_name`. * Added `ConnectConfiguration::into_ssl`. * Added the ability to create unconnected `SslStream`s directly from an `Ssl` and transport stream without performing any part of the handshake with `SslStream::new`. * Added `SslStream::{read_early_data, write_early_data, connect, accept, do_handshake, stateless}`. * Implemented `ToOwned` for `SslContextRef`. * Added `SslRef::{set_connect_state, set_accept_state}`. ### Deprecated * Deprecated `SslStream::from_raw_parts` in favor of `Ssl::from_ptr` and `SslStream::new`. * Deprecated `SslStreamBuilder` in favor of methods on `Ssl` and `SslStream`. ## [v0.10.31] - 2020-12-09 ### Added * Added `Asn1Object::from_str`. * Added `Dh::from_pgq`, `DhRef::prime_p`, `DhRef::prime_q`, `DhRef::generator`, `DhRef::generate_params`, `DhRef::generate_key`, `DhRef::public_key`, and `DhRef::compute_key`. * Added `Pkcs7::from_der` and `Pkcs7Ref::to_der`. * Added `Id::X25519`, `Id::X448`, `PKey::generate_x25519`, and `PKey::generate_x448`. * Added `SrtpProfileId::SRTP_AEAD_AES_128_GCM` and `SrtpProfileId::SRTP_AEAD_AES_256_GCM`. * Added `SslContextBuilder::verify_param` and `SslContextBuilder::verify_param_mut`. * Added `X509Ref::subject_name_hash` and `X509Ref::version`. * Added `X509StoreBuilderRef::add_lookup`, and the `X509Lookup` type. * Added `X509VerifyFlags`, `X509VerifyParamRef::set_flags`, `X509VerifyParamRef::clear_flags` `X509VerifyParamRef::get_flags`. ## [v0.10.30] - 2020-06-25 ### Fixed * `DsaRef::private_key_to_pem` can no longer be called without a private key. ### Changed * Improved the `Debug` implementations of many types. ### Added * Added `is_empty` implementations for `Asn1StringRef` and `Asn1BitStringRef`. * Added `EcPointRef::{to_pem, to_dir}` and `EcKeyRef::{public_key_from_pem, public_key_from_der}`. * Added `Default` implementations for many types. * Added `Debug` implementations for many types. * Added `SslStream::from_raw_parts`. * Added `SslRef::set_mtu`. * Added `Cipher::{aes_128_ocb, aes_192_ocb, aes_256_ocb}`. ### Deprecated * Deprecated `SslStreamBuilder::set_dtls_mtu_size` in favor of `SslRef::set_mtu`. ## [v0.10.29] - 2020-04-07 ### Fixed * Fixed a memory leak in `X509Builder::append_extension`. ### Added * Added `SslConnector::into_context` and `SslConnector::context`. * Added `SslAcceptor::into_context` and `SslAcceptor::context`. * Added `SslMethod::tls_client` and `SslMethod::tls_server`. * Added `SslContextBuilder::set_cert_store`. * Added `SslContextRef::verify_mode` and `SslRef::verify_mode`. * Added `SslRef::is_init_finished`. * Added `X509Object`. * Added `X509StoreRef::objects`. ## [v0.10.28] - 2020-02-04 ### Fixed * Fixed the mutability of `Signer::sign_oneshot` and `Verifier::verify_oneshot`. This is unfortunately a breaking change, but a necessary soundness fix. ## [v0.10.27] - 2020-01-29 ### Added * Added `MessageDigest::null`. * Added `PKey::private_key_from_pkcs8`. * Added `SslOptions::NO_RENEGOTIATION`. * Added `SslStreamBuilder::set_dtls_mtu_size`. ## [v0.10.26] - 2019-11-22 ### Fixed * Fixed improper handling of the IV buffer in `envelope::{Seal, Unseal}`. ### Added * Added `Asn1TimeRef::{diff, compare}`. * Added `Asn1Time::from_unix`. * Added `PartialEq` and `PartialOrd` implementations for `Asn1Time` and `Asn1TimeRef`. * Added `base64::{encode_block, decode_block}`. * Added `EcGroupRef::order_bits`. * Added `Clone` implementations for `Sha1`, `Sha224`, `Sha256`, `Sha384`, and `Sha512`. * Added `SslContextBuilder::{set_sigalgs_list, set_groups_list}`. ## [v0.10.25] - 2019-10-02 ### Fixed * Fixed a memory leak in `EcdsaSig::from_private_components` when using OpenSSL 1.0.x. ### Added * Added support for Ed25519 and Ed448 keys. * Implemented `ToOwned` for `PKeyRef` and `Clone` for `PKey`. ## [v0.10.24] - 2019-07-19 ### Fixed * Worked around an OpenSSL 1.0.x bug triggered by code calling `SSL_set_app_data`. ### Added * Added `aes::{wrap_key, unwrap_key}`. * Added `CmsContentInfoRef::to_pem` and `CmsContentInfo::from_pem`. * Added `DsaRef::private_key_to_pem`. * Added `EcGroupRef::{cofactor, generator}`. * Added `EcPointRef::to_owned`. * Added a `Debug` implementation for `EcKey`. * Added `SslAcceptor::{mozilla_intermediate_v5, mozilla_modern_v5}`. * Added `Cipher::{aes_128_ofb, aes_192_ecb, aes_192_cbc, aes_192_ctr, aes_192_cfb1, aes_192_cfb128, aes_192_cfb8, aes_192_gcm, aes_192_ccm, aes_192_ofb, aes_256_ofb}`. ## [v0.10.23] - 2019-05-18 ### Fixed * Fixed session callbacks when an `Ssl`'s context is replaced. ### Added * Added `SslContextBuilder::add_client_ca`. ## [v0.10.22] - 2019-05-08 ### Added * Added support for the LibreSSL 2.9.x series. ## [v0.10.21] - 2019-04-30 ### Fixed * Fixed overly conservatifve buffer size checks in `Crypter` when using stream ciphers. ### Added * Added bindings to envelope encryption APIs. * Added `PkeyRef::size`. ## [v0.10.20] - 2019-03-20 ### Added * Added `CmsContentInfo::from_der` and `CmsContentInfo::encrypt`. * Added `X509Ref::verify` and `X509ReqRef::verify`. * Implemented `PartialEq` and `Eq` for `MessageDigest`. * Added `MessageDigest::type_` and `EcGroupRef::curve_name`. ## [v0.10.19] - 2019-03-01 ### Added * The openssl-sys build script now logs the values of environment variables. * Added `ERR_PACK` to openssl-sys. * The `ERR_*` functions in openssl-sys are const functions when building against newer Rust versions. * Implemented `Clone` for `Dsa`. * Added `SslContextRef::add_session` and `SslContextRef::remove_session`. * Added `SslSessionRef::time`, `SslSessionRef::timeout`, and `SslSessionRef::protocol_version`. * Added `SslContextBuilder::set_session_cache_size` and `SslContextRef::session_cache_size`. ## [v0.10.18] - 2019-02-22 ### Fixed * Fixed the return type of `ssl::cipher_name`. ## [v0.10.17] - 2019-02-22 ### Added * Implemented `AsRef` and `AsRef<[u8]>` for `OpenSslString`. * Added `Asn1Integer::from_bn`. * Added `RsaRef::check_key`. * Added `Asn1Time::from_str` and `Asn1Time::from_str_x509`. * Added `Rsa::generate_with_e`. * Added `Cipher::des_ede3_cfb64`. * Added `SslCipherRef::standard_name` and `ssl::cipher_name`. ## [v0.10.16] - 2018-12-16 ### Added * Added SHA3 and SHAKE to `MessageDigest`. * Added `rand::keep_random_devices_open`. * Added support for LibreSSL 2.9.0. ## [v0.10.15] - 2018-10-22 ### Added * Implemented `DoubleEndedIterator` for stack iterators. ## [v0.10.14] - 2018-10-18 ### Fixed * Made some accidentally exposed internal functions private. ### Added * Added support for LibreSSL 2.8. ### Changed * The OpenSSL version used with the `vendored` feature has been upgraded from 1.1.0 to 1.1.1. ## [v0.10.13] - 2018-10-14 ### Fixed * Fixed a double-free in the `SslContextBuilder::set_get_session_callback` API. ### Added * Added `SslContextBuilder::set_client_hello_callback`. * Added support for LibreSSL 2.8.1. * Added `EcdsaSig::from_der` and `EcdsaSig::to_der`. * Added PKCS#7 support. ## [v0.10.12] - 2018-09-13 ### Fixed * Fixed handling of SNI callbacks during renegotiation. ### Added * Added `SslRef::get_shutdown` and `SslRef::set_shutdown`. * Added support for SRTP in DTLS sessions. * Added support for LibreSSL 2.8.0. ## [v0.10.11] - 2018-08-04 ### Added * The new `vendored` cargo feature will cause openssl-sys to compile and statically link to a vendored copy of OpenSSL. * Added `SslContextBuilder::set_psk_server_callback`. * Added `DsaRef::pub_key` and `DsaRef::priv_key`. * Added `Dsa::from_private_components` and `Dsa::from_public_components`. * Added `X509NameRef::entries`. ### Deprecated * `SslContextBuilder::set_psk_callback` has been renamed to `SslContextBuilder::set_psk_client_callback` and deprecated. ## [v0.10.10] - 2018-06-06 ### Added * Added `SslRef::set_alpn_protos`. * Added `SslContextBuilder::set_ciphersuites`. ## [v0.10.9] - 2018-06-01 ### Fixed * Fixed a use-after-free in `CmsContentInfo::sign`. * `SslRef::servername` now returns `None` rather than panicking on a non-UTF8 name. ### Added * Added `MessageDigest::from_nid`. * Added `Nid::signature_algorithms`, `Nid::long_name`, and `Nid::short_name`. * Added early data and early keying material export support for TLS 1.3. * Added `SslRef::verified_chain`. * Added `SslRef::servername_raw` which returns a `&[u8]` rather than `&str`. * Added `SslRef::finished` and `SslRef::peer_finished`. * Added `X509Ref::digest` to replace `X509Ref::fingerprint`. * `X509StoreBuilder` and `X509Store` now implement `Sync` and `Send`. ### Deprecated * `X509Ref::fingerprint` has been deprecated in favor of `X509Ref::digest`. ## [v0.10.8] - 2018-05-20 ### Fixed * `openssl-sys` will now detect Homebrew-installed OpenSSL when installed to a non-default directory. * The `X509_V_ERR_INVALID_CALL`, `X509_V_ERR_STORE_LOOKUP`, and `X509_V_ERR_PROXY_SUBJECT_NAME_VIOLATION` constants in `openssl-sys` are now only present when building against 1.1.0g and up rather than 1.1.0. * `SslContextBuilder::max_proto_version` and `SslContextBuilder::min_proto_version` are only present when building against 1.1.0g and up rather than 1.1.0. ### Added * Added `CmsContentInfo::sign`. * Added `Clone` and `ToOwned` implementations to `Rsa` and `RsaRef` respectively. * The `min_proto_version` and `max_proto_version` methods are available when linking against LibreSSL 2.6.1 and up in addition to OpenSSL. * `X509VerifyParam` is available when linking against LibreSSL 2.6.1 and up in addition to OpenSSL. * ALPN support is available when linking against LibreSSL 2.6.1 and up in addition to OpenSSL. * `Stack` and `StackRef` are now `Sync` and `Send`. ## [v0.10.7] - 2018-04-30 ### Added * Added `X509Req::public_key` and `X509Req::extensions`. * Added `RsaPrivateKeyBuilder` to allow control over initialization of optional components of an RSA private key. * Added DER encode/decode support to `SslSession`. * openssl-sys now provides the `DEP_OPENSSL_VERSION_NUMBER` and `DEP_OPENSSL_LIBRESSL_VERSION_NUMBER` environment variables to downstream build scripts which contains the hex-encoded version number of the OpenSSL or LibreSSL distribution being built against. The other variables are deprecated. ## [v0.10.6] - 2018-03-05 ### Added * Added `SslOptions::ENABLE_MIDDLEBOX_COMPAT`. * Added more `Sync` and `Send` implementations. * Added `PKeyRef::id`. * Added `Padding::PKCS1_PSS`. * Added `Signer::set_rsa_pss_saltlen`, `Signer::set_rsa_mgf1_md`, `Signer::set_rsa_pss_saltlen`, and `Signer::set_rsa_mgf1_md` * Added `X509StoreContextRef::verify` to directly verify certificates. * Added low level ECDSA support. * Added support for TLSv1.3 custom extensions. (OpenSSL 1.1.1 only) * Added AES-CCM support. * Added `EcKey::from_private_components`. * Added CMAC support. * Added support for LibreSSL 2.7. * Added `X509Ref::serial_number`. * Added `Asn1IntegerRef::to_bn`. * Added support for TLSv1.3 stateless handshakes. (OpenSSL 1.1.1 only) ### Changed * The Cargo features previously used to gate access to version-specific OpenSSL APIs have been removed. Those APIs will be available automatically when building against an appropriate OpenSSL version. * Fixed `PKey::private_key_from_der` to return a `PKey` rather than a `PKey`. This is technically a breaking change but the function was pretty useless previously. ### Deprecated * `X509CheckFlags::FLAG_NO_WILDCARDS` has been renamed to `X509CheckFlags::NO_WILDCARDS` and the old name deprecated. ## [v0.10.5] - 2018-02-28 ### Fixed * `ErrorStack`'s `Display` implementation no longer writes an empty string if it contains no errors. ### Added * Added `SslRef::version2`. * Added `Cipher::des_ede3_cbc`. * Added `SslRef::export_keying_material`. * Added the ability to push an `Error` or `ErrorStack` back onto OpenSSL's error stack. Various callback bindings use this to propagate errors properly. * Added `SslContextBuilder::set_cookie_generate_cb` and `SslContextBuilder::set_cookie_verify_cb`. * Added `SslContextBuilder::set_max_proto_version`, `SslContextBuilder::set_min_proto_version`, `SslContextBuilder::max_proto_version`, and `SslContextBuilder::min_proto_version`. ### Changed * Updated `SslConnector`'s default cipher list to match Python's. ### Deprecated * `SslRef::version` has been deprecated. Use `SslRef::version_str` instead. ## [v0.10.4] - 2018-02-18 ### Added * Added OpenSSL 1.1.1 support. * Added `Rsa::public_key_from_pem_pkcs1`. * Added `SslOptions::NO_TLSV1_3`. (OpenSSL 1.1.1 only) * Added `SslVersion`. * Added `SslSessionCacheMode` and `SslContextBuilder::set_session_cache_mode`. * Added `SslContextBuilder::set_new_session_callback`, `SslContextBuilder::set_remove_session_callback`, and `SslContextBuilder::set_get_session_callback`. * Added `SslContextBuilder::set_keylog_callback`. (OpenSSL 1.1.1 only) * Added `SslRef::client_random` and `SslRef::server_random`. (OpenSSL 1.1.0+ only) ### Fixed * The `SslAcceptorBuilder::mozilla_modern` constructor now disables TLSv1.0 and TLSv1.1 in accordance with Mozilla's recommendations. ## [v0.10.3] - 2018-02-12 ### Added * OpenSSL is now automatically detected on FreeBSD systems. * Added `GeneralName` accessors for `rfc822Name` and `uri` variants. * Added DES-EDE3 support. ### Fixed * Fixed a memory leak in `X509StoreBuilder::add_cert`. ## [v0.10.2] - 2018-01-11 ### Added * Added `ConnectConfiguration::set_use_server_name_indication` and `ConnectConfiguration::set_verify_hostname` for use in contexts where you don't have ownership of the `ConnectConfiguration`. ## [v0.10.1] - 2018-01-10 ### Added * Added a `From for ssl::Error` implementation. ## [v0.10.0] - 2018-01-10 ### Compatibility * openssl 0.10 still uses openssl-sys 0.9, so openssl 0.9 and 0.10 can coexist without issue. ### Added * The `ssl::select_next_proto` function can be used to easily implement the ALPN selection callback in a "standard" way. * FIPS mode support is available in the `fips` module. * Accessors for the Issuer and Issuer Alternative Name fields of X509 certificates have been added. * The `X509VerifyResult` can now be set in the certificate verification callback via `X509StoreContextRef::set_error`. ### Changed * All constants have been moved to associated constants of their type. For example, `bn::MSB_ONE` is now `bn::MsbOption::ONE`. * Asymmetric key types are now parameterized over what they contain. In OpenSSL, the same type is used for key parameters, public keys, and private keys. Unfortunately, some APIs simply assume that certain components are present and will segfault trying to use things that aren't there. The `pkey` module contains new tag types named `Params`, `Public`, and `Private`, and the `Dh`, `Dsa`, `EcKey`, `Rsa`, and `PKey` have a type parameter set to one of those values. This allows the `Signer` constructor to indicate that it requires a private key at compile time for example. Previously, `Signer` would simply segfault if provided a key without private components. * ALPN support has been changed to more directly model OpenSSL's own APIs. Instead of a single method used for both the server and client sides which performed everything automatically, the `SslContextBuilder::set_alpn_protos` and `SslContextBuilder::set_alpn_select_callback` handle the client and server sides respectively. * `SslConnector::danger_connect_without_providing_domain_for_certificate_verification_and_server_name_indication` has been removed in favor of new methods which provide more control. The `ConnectConfiguration::use_server_name_indication` method controls the use of Server Name Indication (SNI), and the `ConnectConfiguration::verify_hostname` method controls the use of hostname verification. These can be controlled independently, and if both are disabled, the domain argument to `ConnectConfiguration::connect` is ignored. * Shared secret derivation is now handled by the new `derive::Deriver` type rather than `pkey::PKeyContext`, which has been removed. * `ssl::Error` is now no longer an enum, and provides more direct access to the relevant state. * `SslConnectorBuilder::new` has been moved and renamed to `SslConnector::builder`. * `SslAcceptorBuilder::mozilla_intermediate` and `SslAcceptorBuilder::mozilla_modern` have been moved to `SslAcceptor` and no longer take the private key and certificate chain. Install those manually after creating the builder. * `X509VerifyError` is now `X509VerifyResult` and can now have the "ok" value in addition to error values. * `x509::X509FileType` is now `ssl::SslFiletype`. * Asymmetric key serialization and deserialization methods now document the formats that they correspond to, and some have been renamed to better indicate that. ### Removed * All deprecated APIs have been removed. * NPN support has been removed. It has been supersceded by ALPN, and is hopefully no longer being used in practice. If you still depend on it, please file an issue! * `SslRef::compression` has been removed. * Some `ssl::SslOptions` flags have been removed as they no longer do anything. ## Older Look at the [release tags] for information about older releases. [Unreleased]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.78...master [v0.10.78]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.77...openssl-v0.10.78 [v0.10.77]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.76...openssl-v0.10.77 [v0.10.76]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.75...openssl-v0.10.76 [v0.10.75]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.74...openssl-v0.10.75 [v0.10.74]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.73...openssl-v0.10.74 [v0.10.73]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.72...openssl-v0.10.73 [v0.10.72]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.71...openssl-v0.10.72 [v0.10.71]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.70...openssl-v0.10.71 [v0.10.70]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.69...openssl-v0.10.70 [v0.10.69]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.68...openssl-v0.10.69 [v0.10.68]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.67...openssl-v0.10.68 [v0.10.67]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.66...openssl-v0.10.67 [v0.10.66]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.65...openssl-v0.10.66 [v0.10.65]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.64...openssl-v0.10.65 [v0.10.64]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.63...openssl-v0.10.64 [v0.10.63]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.62...openssl-v0.10.63 [v0.10.62]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.61...openssl-v0.10.62 [v0.10.61]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.60...openssl-v0.10.61 [v0.10.60]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.59...openssl-v0.10.60 [v0.10.59]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.58...openssl-v0.10.59 [v0.10.58]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.57...openssl-v0.10.58 [v0.10.57]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.56...openssl-v0.10.57 [v0.10.56]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.55...openssl-v0.10.56 [v0.10.55]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.54...openssl-v0.10.55 [v0.10.54]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.53...openssl-v0.10.54 [v0.10.53]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.52...openssl-v0.10.53 [v0.10.52]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.51...openssl-v0.10.52 [v0.10.51]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.50...openssl-v0.10.51 [v0.10.50]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.49...openssl-v0.10.50 [v0.10.49]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.48...openssl-v0.10.49 [v0.10.48]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.47...openssl-v0.10.48 [v0.10.47]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.46...openssl-v0.10.47 [v0.10.46]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.45...openssl-v0.10.46 [v0.10.45]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.44...openssl-v0.10.45 [v0.10.44]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.43...openssl-v0.10.44 [v0.10.43]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.42...openssl-v0.10.43 [v0.10.42]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.41...openssl-v0.10.42 [v0.10.41]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.40...openssl-v0.10.41 [v0.10.40]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.39...openssl-v0.10.40 [v0.10.39]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.38...openssl-v0.10.39 [v0.10.38]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.37...openssl-v0.10.38 [v0.10.37]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.36...openssl-v0.10.37 [v0.10.36]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.35...openssl-v0.10.36 [v0.10.35]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.34...openssl-v0.10.35 [v0.10.34]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.33...openssl-v0.10.34 [v0.10.33]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.32...openssl-v0.10.33 [v0.10.32]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.31...openssl-v0.10.32 [v0.10.31]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.30...openssl-v0.10.31 [v0.10.30]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.29...openssl-v0.10.30 [v0.10.29]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.28...openssl-v0.10.29 [v0.10.28]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.27...openssl-v0.10.28 [v0.10.27]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.26...openssl-v0.10.27 [v0.10.26]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.25...openssl-v0.10.26 [v0.10.25]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.24...openssl-v0.10.25 [v0.10.24]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.23...openssl-v0.10.24 [v0.10.23]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.22...openssl-v0.10.23 [v0.10.22]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.21...openssl-v0.10.22 [v0.10.21]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.20...openssl-v0.10.21 [v0.10.20]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.19...openssl-v0.10.20 [v0.10.19]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.18...openssl-v0.10.19 [v0.10.18]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.17...openssl-v0.10.18 [v0.10.17]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.16...openssl-v0.10.17 [v0.10.16]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.15...openssl-v0.10.16 [v0.10.15]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.14...openssl-v0.10.15 [v0.10.14]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.13...openssl-v0.10.14 [v0.10.13]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.12...openssl-v0.10.13 [v0.10.12]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.11...openssl-v0.10.12 [v0.10.11]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.10...openssl-v0.10.11 [v0.10.10]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.9...openssl-v0.10.10 [v0.10.9]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.8...openssl-v0.10.9 [v0.10.8]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.7...openssl-v0.10.8 [v0.10.7]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.6...openssl-v0.10.7 [v0.10.6]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.5...openssl-v0.10.6 [v0.10.5]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.4...openssl-v0.10.5 [v0.10.4]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.3...openssl-v0.10.4 [v0.10.3]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.2...openssl-v0.10.3 [v0.10.2]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.1...openssl-v0.10.2 [v0.10.1]: https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.0...openssl-v0.10.1 [v0.10.0]: https://github.com/rust-openssl/rust-openssl/compare/v0.9.23...openssl-v0.10.0 [release tags]: https://github.com/rust-openssl/rust-openssl/releases /* * Copyright 2019-2024 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy * in the file LICENSE in the source distribution or at * https://www.openssl.org/source/license.html */ /* * DH low level APIs are deprecated for public use, but still ok for * internal use. */ #include "internal/deprecated.h" #include #include #include #include #include #include #include #include #include "prov/providercommon.h" #include "prov/implementations.h" #include "prov/provider_ctx.h" #include "prov/securitycheck.h" #include "crypto/dh.h" static OSSL_FUNC_keyexch_newctx_fn dh_newctx; static OSSL_FUNC_keyexch_init_fn dh_init; static OSSL_FUNC_keyexch_set_peer_fn dh_set_peer; static OSSL_FUNC_keyexch_derive_fn dh_derive; static OSSL_FUNC_keyexch_freectx_fn dh_freectx; static OSSL_FUNC_keyexch_dupctx_fn dh_dupctx; static OSSL_FUNC_keyexch_set_ctx_params_fn dh_set_ctx_params; static OSSL_FUNC_keyexch_settable_ctx_params_fn dh_settable_ctx_params; static OSSL_FUNC_keyexch_get_ctx_params_fn dh_get_ctx_params; static OSSL_FUNC_keyexch_gettable_ctx_params_fn dh_gettable_ctx_params; /* * This type is only really used to handle some legacy related functionality. * If you need to use other KDF's (such as SSKDF) just use PROV_DH_KDF_NONE * here and then create and run a KDF after the key is derived. * Note that X942 has 2 variants of key derivation: * (1) DH_KDF_X9_42_ASN1 - which contains an ANS1 encoded object that has * the counter embedded in it. * (2) DH_KDF_X941_CONCAT - which is the same as ECDH_X963_KDF (which can be * done by creating a "X963KDF". */ enum kdf_type { PROV_DH_KDF_NONE = 0, PROV_DH_KDF_X9_42_ASN1 }; /* * What's passed as an actual key is defined by the KEYMGMT interface. * We happen to know that our KEYMGMT simply passes DH structures, so * we use that here too. */ typedef struct { OSSL_LIB_CTX *libctx; DH *dh; DH *dhpeer; unsigned int pad : 1; /* DH KDF */ /* KDF (if any) to use for DH */ enum kdf_type kdf_type; /* Message digest to use for key derivation */ EVP_MD *kdf_md; /* User key material */ unsigned char *kdf_ukm; size_t kdf_ukmlen; /* KDF output length */ size_t kdf_outlen; char *kdf_cekalg; OSSL_FIPS_IND_DECLARE } PROV_DH_CTX; static void *dh_newctx(void *provctx) { PROV_DH_CTX *pdhctx; if (!ossl_prov_is_running()) return NULL; pdhctx = OPENSSL_zalloc(sizeof(PROV_DH_CTX)); if (pdhctx == NULL) return NULL; OSSL_FIPS_IND_INIT(pdhctx) pdhctx->libctx = PROV_LIBCTX_OF(provctx); pdhctx->kdf_type = PROV_DH_KDF_NONE; return pdhctx; } #ifdef FIPS_MODULE static int dh_check_key(PROV_DH_CTX *ctx) { int key_approved = ossl_dh_check_key(ctx->dh); if (!key_approved) { if (!OSSL_FIPS_IND_ON_UNAPPROVED(ctx, OSSL_FIPS_IND_SETTABLE0, ctx->libctx, "DH Init", "DH Key", ossl_fips_config_securitycheck_enabled)) { ERR_raise(ERR_LIB_PROV, PROV_R_INVALID_KEY_LENGTH); return 0; } } return 1; } static int digest_check(PROV_DH_CTX *ctx, const EVP_MD *md) { return ossl_fips_ind_digest_exch_check(OSSL_FIPS_IND_GET(ctx), OSSL_FIPS_IND_SETTABLE1, ctx->libctx, md, "DH Set Ctx"); } #endif static int dh_init(void *vpdhctx, void *vdh, const OSSL_PARAM params[]) { PROV_DH_CTX *pdhctx = (PROV_DH_CTX *)vpdhctx; if (!ossl_prov_is_running() || pdhctx == NULL || vdh == NULL || !DH_up_ref(vdh)) return 0; DH_free(pdhctx->dh); pdhctx->dh = vdh; pdhctx->kdf_type = PROV_DH_KDF_NONE; OSSL_FIPS_IND_SET_APPROVED(pdhctx) if (!dh_set_ctx_params(pdhctx, params)) return 0; #ifdef FIPS_MODULE if (!dh_check_key(pdhctx)) return 0; #endif return 1; } /* The 2 parties must share the same domain parameters */ static int dh_match_params(DH *priv, DH *peer) { int ret; FFC_PARAMS *dhparams_priv = ossl_dh_get0_params(priv); FFC_PARAMS *dhparams_peer = ossl_dh_get0_params(peer); ret = dhparams_priv != NULL && dhparams_peer != NULL && ossl_ffc_params_cmp(dhparams_priv, dhparams_peer, 1); if (!ret) ERR_raise(ERR_LIB_PROV, PROV_R_MISMATCHING_DOMAIN_PARAMETERS); return ret; } static int dh_set_peer(void *vpdhctx, void *vdh) { PROV_DH_CTX *pdhctx = (PROV_DH_CTX *)vpdhctx; if (!ossl_prov_is_running() || pdhctx == NULL || vdh == NULL || !dh_match_params(vdh, pdhctx->dh) || !DH_up_ref(vdh)) return 0; DH_free(pdhctx->dhpeer); pdhctx->dhpeer = vdh; return 1; } static int dh_plain_derive(void *vpdhctx, unsigned char *secret, size_t *secretlen, size_t outlen, unsigned int pad) { PROV_DH_CTX *pdhctx = (PROV_DH_CTX *)vpdhctx; int ret; size_t dhsize; const BIGNUM *pub_key = NULL; if (pdhctx->dh == NULL || pdhctx->dhpeer == NULL) { ERR_raise(ERR_LIB_PROV, PROV_R_MISSING_KEY); return 0; } dhsize = (size_t)DH_size(pdhctx->dh); if (secret == NULL) { *secretlen = dhsize; return 1; } if (outlen < dhsize) { ERR_raise(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL); return 0; } DH_get0_key(pdhctx->dhpeer, &pub_key, NULL); if (pad) ret = DH_compute_key_padded(secret, pub_key, pdhctx->dh); else ret = DH_compute_key(secret, pub_key, pdhctx->dh); if (ret <= 0) return 0; *secretlen = ret; return 1; } static int dh_X9_42_kdf_derive(void *vpdhctx, unsigned char *secret, size_t *secretlen, size_t outlen) { PROV_DH_CTX *pdhctx = (PROV_DH_CTX *)vpdhctx; unsigned char *stmp = NULL; size_t stmplen; int ret = 0; if (secret == NULL) { *secretlen = pdhctx->kdf_outlen; return 1; } if (pdhctx->kdf_outlen > outlen) { ERR_raise(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL); return 0; } if (!dh_plain_derive(pdhctx, NULL, &stmplen, 0, 1)) return 0; if ((stmp = OPENSSL_secure_malloc(stmplen)) == NULL) return 0; if (!dh_plain_derive(pdhctx, stmp, &stmplen, stmplen, 1)) goto err; /* Do KDF stuff */ if (pdhctx->kdf_type == PROV_DH_KDF_X9_42_ASN1) { if (!ossl_dh_kdf_X9_42_asn1(secret, pdhctx->kdf_outlen, stmp, stmplen, pdhctx->kdf_cekalg, pdhctx->kdf_ukm, pdhctx->kdf_ukmlen, pdhctx->kdf_md, pdhctx->libctx, NULL)) goto err; } *secretlen = pdhctx->kdf_outlen; ret = 1; err: OPENSSL_secure_clear_free(stmp, stmplen); return ret; } static int dh_derive(void *vpdhctx, unsigned char *secret, size_t *psecretlen, size_t outlen) { PROV_DH_CTX *pdhctx = (PROV_DH_CTX *)vpdhctx; if (!ossl_prov_is_running()) return 0; switch (pdhctx->kdf_type) { case PROV_DH_KDF_NONE: return dh_plain_derive(pdhctx, secret, psecretlen, outlen, pdhctx->pad); case PROV_DH_KDF_X9_42_ASN1: return dh_X9_42_kdf_derive(pdhctx, secret, psecretlen, outlen); default: break; } return 0; } static void dh_freectx(void *vpdhctx) { PROV_DH_CTX *pdhctx = (PROV_DH_CTX *)vpdhctx; OPENSSL_free(pdhctx->kdf_cekalg); DH_free(pdhctx->dh); DH_free(pdhctx->dhpeer); EVP_MD_free(pdhctx->kdf_md); OPENSSL_clear_free(pdhctx->kdf_ukm, pdhctx->kdf_ukmlen); OPENSSL_free(pdhctx); } static void *dh_dupctx(void *vpdhctx) { PROV_DH_CTX *srcctx = (PROV_DH_CTX *)vpdhctx; PROV_DH_CTX *dstctx; if (!ossl_prov_is_running()) return NULL; dstctx = OPENSSL_zalloc(sizeof(*srcctx)); if (dstctx == NULL) return NULL; *dstctx = *srcctx; dstctx->dh = NULL; dstctx->dhpeer = NULL; dstctx->kdf_md = NULL; dstctx->kdf_ukm = NULL; dstctx->kdf_cekalg = NULL; if (srcctx->dh != NULL && !DH_up_ref(srcctx->dh)) goto err; else dstctx->dh = srcctx->dh; if (srcctx->dhpeer != NULL && !DH_up_ref(srcctx->dhpeer)) goto err; else dstctx->dhpeer = srcctx->dhpeer; if (srcctx->kdf_md != NULL && !EVP_MD_up_ref(srcctx->kdf_md)) goto err; else dstctx->kdf_md = srcctx->kdf_md; /* Duplicate UKM data if present */ if (srcctx->kdf_ukm != NULL && srcctx->kdf_ukmlen > 0) { dstctx->kdf_ukm = OPENSSL_memdup(srcctx->kdf_ukm, srcctx->kdf_ukmlen); if (dstctx->kdf_ukm == NULL) goto err; } if (srcctx->kdf_cekalg != NULL) { dstctx->kdf_cekalg = OPENSSL_strdup(srcctx->kdf_cekalg); if (dstctx->kdf_cekalg == NULL) goto err; } return dstctx; err: dh_freectx(dstctx); return NULL; } static int dh_set_ctx_params(void *vpdhctx, const OSSL_PARAM params[]) { PROV_DH_CTX *pdhctx = (PROV_DH_CTX *)vpdhctx; const OSSL_PARAM *p; unsigned int pad; char name[80] = { '\0' }; /* should be big enough */ char *str = NULL; if (pdhctx == NULL) return 0; if (ossl_param_is_empty(params)) return 1; if (!OSSL_FIPS_IND_SET_CTX_PARAM(pdhctx, OSSL_FIPS_IND_SETTABLE0, params, OSSL_EXCHANGE_PARAM_FIPS_KEY_CHECK)) return 0; if (!OSSL_FIPS_IND_SET_CTX_PARAM(pdhctx, OSSL_FIPS_IND_SETTABLE1, params, OSSL_EXCHANGE_PARAM_FIPS_DIGEST_CHECK)) return 0; p = OSSL_PARAM_locate_const(params, OSSL_EXCHANGE_PARAM_KDF_TYPE); if (p != NULL) { str = name; if (!OSSL_PARAM_get_utf8_string(p, &str, sizeof(name))) return 0; if (name[0] == '\0') pdhctx->kdf_type = PROV_DH_KDF_NONE; else if (strcmp(name, OSSL_KDF_NAME_X942KDF_ASN1) == 0) pdhctx->kdf_type = PROV_DH_KDF_X9_42_ASN1; else return 0; } p = OSSL_PARAM_locate_const(params, OSSL_EXCHANGE_PARAM_KDF_DIGEST); if (p != NULL) { char mdprops[80] = { '\0' }; /* should be big enough */ str = name; if (!OSSL_PARAM_get_utf8_string(p, &str, sizeof(name))) return 0; str = mdprops; p = OSSL_PARAM_locate_const(params, OSSL_EXCHANGE_PARAM_KDF_DIGEST_PROPS); if (p != NULL) { if (!OSSL_PARAM_get_utf8_string(p, &str, sizeof(mdprops))) return 0; } EVP_MD_free(pdhctx->kdf_md); pdhctx->kdf_md = EVP_MD_fetch(pdhctx->libctx, name, mdprops); if (pdhctx->kdf_md == NULL) return 0; /* XOF digests are not allowed */ if (EVP_MD_xof(pdhctx->kdf_md)) { ERR_raise(ERR_LIB_PROV, PROV_R_XOF_DIGESTS_NOT_ALLOWED); return 0; } #ifdef FIPS_MODULE if (!digest_check(pdhctx, pdhctx->kdf_md)) { EVP_MD_free(pdhctx->kdf_md); pdhctx->kdf_md = NULL; return 0; } #endif } p = OSSL_PARAM_locate_const(params, OSSL_EXCHANGE_PARAM_KDF_OUTLEN); if (p != NULL) { size_t outlen; if (!OSSL_PARAM_get_size_t(p, &outlen)) return 0; pdhctx->kdf_outlen = outlen; } p = OSSL_PARAM_locate_const(params, OSSL_EXCHANGE_PARAM_KDF_UKM); if (p != NULL) { void *tmp_ukm = NULL; size_t tmp_ukmlen; OPENSSL_free(pdhctx->kdf_ukm); pdhctx->kdf_ukm = NULL; pdhctx->kdf_ukmlen = 0; /* ukm is an optional field so it can be NULL */ if (p->data != NULL && p->data_size != 0) { if (!OSSL_PARAM_get_octet_string(p, &tmp_ukm, 0, &tmp_ukmlen)) return 0; pdhctx->kdf_ukm = tmp_ukm; pdhctx->kdf_ukmlen = tmp_ukmlen; } } p = OSSL_PARAM_locate_const(params, OSSL_EXCHANGE_PARAM_PAD); if (p != NULL) { if (!OSSL_PARAM_get_uint(p, &pad)) return 0; pdhctx->pad = pad ? 1 : 0; } p = OSSL_PARAM_locate_const(params, OSSL_KDF_PARAM_CEK_ALG); if (p != NULL) { str = name; OPENSSL_free(pdhctx->kdf_cekalg); pdhctx->kdf_cekalg = NULL; if (p->data != NULL && p->data_size != 0) { if (!OSSL_PARAM_get_utf8_string(p, &str, sizeof(name))) return 0; pdhctx->kdf_cekalg = OPENSSL_strdup(name); if (pdhctx->kdf_cekalg == NULL) return 0; } } return 1; } static const OSSL_PARAM known_settable_ctx_params[] = { OSSL_PARAM_int(OSSL_EXCHANGE_PARAM_PAD, NULL), OSSL_PARAM_utf8_string(OSSL_EXCHANGE_PARAM_KDF_TYPE, NULL, 0), OSSL_PARAM_utf8_string(OSSL_EXCHANGE_PARAM_KDF_DIGEST, NULL, 0), OSSL_PARAM_utf8_string(OSSL_EXCHANGE_PARAM_KDF_DIGEST_PROPS, NULL, 0), OSSL_PARAM_size_t(OSSL_EXCHANGE_PARAM_KDF_OUTLEN, NULL), OSSL_PARAM_octet_string(OSSL_EXCHANGE_PARAM_KDF_UKM, NULL, 0), OSSL_PARAM_utf8_string(OSSL_KDF_PARAM_CEK_ALG, NULL, 0), OSSL_FIPS_IND_SETTABLE_CTX_PARAM(OSSL_EXCHANGE_PARAM_FIPS_KEY_CHECK) OSSL_FIPS_IND_SETTABLE_CTX_PARAM(OSSL_EXCHANGE_PARAM_FIPS_DIGEST_CHECK) OSSL_PARAM_END }; static const OSSL_PARAM *dh_settable_ctx_params(ossl_unused void *vpdhctx, ossl_unused void *provctx) { return known_settable_ctx_params; } static const OSSL_PARAM known_gettable_ctx_params[] = { OSSL_PARAM_utf8_string(OSSL_EXCHANGE_PARAM_KDF_TYPE, NULL, 0), OSSL_PARAM_utf8_string(OSSL_EXCHANGE_PARAM_KDF_DIGEST, NULL, 0), OSSL_PARAM_size_t(OSSL_EXCHANGE_PARAM_KDF_OUTLEN, NULL), OSSL_PARAM_DEFN(OSSL_EXCHANGE_PARAM_KDF_UKM, OSSL_PARAM_OCTET_PTR, NULL, 0), OSSL_PARAM_utf8_string(OSSL_KDF_PARAM_CEK_ALG, NULL, 0), OSSL_FIPS_IND_GETTABLE_CTX_PARAM() OSSL_PARAM_END }; static const OSSL_PARAM *dh_gettable_ctx_params(ossl_unused void *vpdhctx, ossl_unused void *provctx) { return known_gettable_ctx_params; } static int dh_get_ctx_params(void *vpdhctx, OSSL_PARAM params[]) { PROV_DH_CTX *pdhctx = (PROV_DH_CTX *)vpdhctx; OSSL_PARAM *p; if (pdhctx == NULL) return 0; p = OSSL_PARAM_locate(params, OSSL_EXCHANGE_PARAM_KDF_TYPE); if (p != NULL) { const char *kdf_type = NULL; switch (pdhctx->kdf_type) { case PROV_DH_KDF_NONE: kdf_type = ""; break; case PROV_DH_KDF_X9_42_ASN1: kdf_type = OSSL_KDF_NAME_X942KDF_ASN1; break; default: return 0; } if (!OSSL_PARAM_set_utf8_string(p, kdf_type)) return 0; } p = OSSL_PARAM_locate(params, OSSL_EXCHANGE_PARAM_KDF_DIGEST); if (p != NULL && !OSSL_PARAM_set_utf8_string(p, pdhctx->kdf_md == NULL ? "" : EVP_MD_get0_name(pdhctx->kdf_md))) { return 0; } p = OSSL_PARAM_locate(params, OSSL_EXCHANGE_PARAM_KDF_OUTLEN); if (p != NULL && !OSSL_PARAM_set_size_t(p, pdhctx->kdf_outlen)) return 0; p = OSSL_PARAM_locate(params, OSSL_EXCHANGE_PARAM_KDF_UKM); if (p != NULL && !OSSL_PARAM_set_octet_ptr(p, pdhctx->kdf_ukm, pdhctx->kdf_ukmlen)) return 0; p = OSSL_PARAM_locate(params, OSSL_KDF_PARAM_CEK_ALG); if (p != NULL && !OSSL_PARAM_set_utf8_string(p, pdhctx->kdf_cekalg == NULL ? "" : pdhctx->kdf_cekalg)) return 0; if (!OSSL_FIPS_IND_GET_CTX_PARAM(pdhctx, params)) return 0; return 1; } const OSSL_DISPATCH ossl_dh_keyexch_functions[] = { { OSSL_FUNC_KEYEXCH_NEWCTX, (void (*)(void))dh_newctx }, { OSSL_FUNC_KEYEXCH_INIT, (void (*)(void))dh_init }, { OSSL_FUNC_KEYEXCH_DERIVE, (void (*)(void))dh_derive }, { OSSL_FUNC_KEYEXCH_SET_PEER, (void (*)(void))dh_set_peer }, { OSSL_FUNC_KEYEXCH_FREECTX, (void (*)(void))dh_freectx }, { OSSL_FUNC_KEYEXCH_DUPCTX, (void (*)(void))dh_dupctx }, { OSSL_FUNC_KEYEXCH_SET_CTX_PARAMS, (void (*)(void))dh_set_ctx_params }, { OSSL_FUNC_KEYEXCH_SETTABLE_CTX_PARAMS, (void (*)(void))dh_settable_ctx_params }, { OSSL_FUNC_KEYEXCH_GET_CTX_PARAMS, (void (*)(void))dh_get_ctx_params }, { OSSL_FUNC_KEYEXCH_GETTABLE_CTX_PARAMS, (void (*)(void))dh_gettable_ctx_params }, OSSL_DISPATCH_END }; /* * Copyright 2020-2024 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy * in the file LICENSE in the source distribution or at * https://www.openssl.org/source/license.html */ /* * ECDH low level APIs are deprecated for public use, but still ok for * internal use. */ #include "internal/deprecated.h" #include #include #include #include #include #include #include #include #include #include "prov/provider_ctx.h" #include "prov/providercommon.h" #include "prov/implementations.h" #include "prov/securitycheck.h" #include "crypto/ec.h" /* ossl_ecdh_kdf_X9_63() */ static OSSL_FUNC_keyexch_newctx_fn ecdh_newctx; static OSSL_FUNC_keyexch_init_fn ecdh_init; static OSSL_FUNC_keyexch_set_peer_fn ecdh_set_peer; static OSSL_FUNC_keyexch_derive_fn ecdh_derive; static OSSL_FUNC_keyexch_freectx_fn ecdh_freectx; static OSSL_FUNC_keyexch_dupctx_fn ecdh_dupctx; static OSSL_FUNC_keyexch_set_ctx_params_fn ecdh_set_ctx_params; static OSSL_FUNC_keyexch_settable_ctx_params_fn ecdh_settable_ctx_params; static OSSL_FUNC_keyexch_get_ctx_params_fn ecdh_get_ctx_params; static OSSL_FUNC_keyexch_gettable_ctx_params_fn ecdh_gettable_ctx_params; enum kdf_type { PROV_ECDH_KDF_NONE = 0, PROV_ECDH_KDF_X9_63 }; /* * What's passed as an actual key is defined by the KEYMGMT interface. * We happen to know that our KEYMGMT simply passes EC_KEY structures, so * we use that here too. */ typedef struct { OSSL_LIB_CTX *libctx; EC_KEY *k; EC_KEY *peerk; /* * ECDH cofactor mode: * * . 0 disabled * . 1 enabled * . -1 use cofactor mode set for k */ int cofactor_mode; /************ * ECDH KDF * ************/ /* KDF (if any) to use for ECDH */ enum kdf_type kdf_type; /* Message digest to use for key derivation */ EVP_MD *kdf_md; /* User key material */ unsigned char *kdf_ukm; size_t kdf_ukmlen; /* KDF output length */ size_t kdf_outlen; OSSL_FIPS_IND_DECLARE } PROV_ECDH_CTX; static void *ecdh_newctx(void *provctx) { PROV_ECDH_CTX *pectx; if (!ossl_prov_is_running()) return NULL; pectx = OPENSSL_zalloc(sizeof(*pectx)); if (pectx == NULL) return NULL; pectx->libctx = PROV_LIBCTX_OF(provctx); pectx->cofactor_mode = -1; pectx->kdf_type = PROV_ECDH_KDF_NONE; OSSL_FIPS_IND_INIT(pectx) return (void *)pectx; } static int ecdh_init(void *vpecdhctx, void *vecdh, const OSSL_PARAM params[]) { PROV_ECDH_CTX *pecdhctx = (PROV_ECDH_CTX *)vpecdhctx; if (!ossl_prov_is_running() || pecdhctx == NULL || vecdh == NULL || (EC_KEY_get0_group(vecdh) == NULL) || !EC_KEY_up_ref(vecdh)) return 0; EC_KEY_free(pecdhctx->k); pecdhctx->k = vecdh; pecdhctx->cofactor_mode = -1; pecdhctx->kdf_type = PROV_ECDH_KDF_NONE; OSSL_FIPS_IND_SET_APPROVED(pecdhctx) if (!ecdh_set_ctx_params(pecdhctx, params)) return 0; #ifdef FIPS_MODULE if (!ossl_fips_ind_ec_key_check(OSSL_FIPS_IND_GET(pecdhctx), OSSL_FIPS_IND_SETTABLE0, pecdhctx->libctx, EC_KEY_get0_group(vecdh), "ECDH Init", 1)) return 0; #endif return 1; } static int ecdh_match_params(const EC_KEY *priv, const EC_KEY *peer) { int ret; BN_CTX *ctx = NULL; const EC_GROUP *group_priv = EC_KEY_get0_group(priv); const EC_GROUP *group_peer = EC_KEY_get0_group(peer); ctx = BN_CTX_new_ex(ossl_ec_key_get_libctx(priv)); if (ctx == NULL) { ERR_raise(ERR_LIB_PROV, ERR_R_BN_LIB); return 0; } ret = group_priv != NULL && group_peer != NULL && EC_GROUP_cmp(group_priv, group_peer, ctx) == 0; if (!ret) ERR_raise(ERR_LIB_PROV, PROV_R_MISMATCHING_DOMAIN_PARAMETERS); BN_CTX_free(ctx); return ret; } static int ecdh_set_peer(void *vpecdhctx, void *vecdh) { PROV_ECDH_CTX *pecdhctx = (PROV_ECDH_CTX *)vpecdhctx; if (!ossl_prov_is_running() || pecdhctx == NULL || vecdh == NULL || !ecdh_match_params(pecdhctx->k, vecdh)) return 0; #ifdef FIPS_MODULE if (!ossl_fips_ind_ec_key_check(OSSL_FIPS_IND_GET(pecdhctx), OSSL_FIPS_IND_SETTABLE0, pecdhctx->libctx, EC_KEY_get0_group(vecdh), "ECDH Set Peer", 1)) return 0; #endif if (!EC_KEY_up_ref(vecdh)) return 0; EC_KEY_free(pecdhctx->peerk); pecdhctx->peerk = vecdh; return 1; } static void ecdh_freectx(void *vpecdhctx) { PROV_ECDH_CTX *pecdhctx = (PROV_ECDH_CTX *)vpecdhctx; EC_KEY_free(pecdhctx->k); EC_KEY_free(pecdhctx->peerk); EVP_MD_free(pecdhctx->kdf_md); OPENSSL_clear_free(pecdhctx->kdf_ukm, pecdhctx->kdf_ukmlen); OPENSSL_free(pecdhctx); } static void *ecdh_dupctx(void *vpecdhctx) { PROV_ECDH_CTX *srcctx = (PROV_ECDH_CTX *)vpecdhctx; PROV_ECDH_CTX *dstctx; if (!ossl_prov_is_running()) return NULL; dstctx = OPENSSL_zalloc(sizeof(*srcctx)); if (dstctx == NULL) return NULL; *dstctx = *srcctx; /* clear all pointers */ dstctx->k= NULL; dstctx->peerk = NULL; dstctx->kdf_md = NULL; dstctx->kdf_ukm = NULL; /* up-ref all ref-counted objects referenced in dstctx */ if (srcctx->k != NULL && !EC_KEY_up_ref(srcctx->k)) goto err; else dstctx->k = srcctx->k; if (srcctx->peerk != NULL && !EC_KEY_up_ref(srcctx->peerk)) goto err; else dstctx->peerk = srcctx->peerk; if (srcctx->kdf_md != NULL && !EVP_MD_up_ref(srcctx->kdf_md)) goto err; else dstctx->kdf_md = srcctx->kdf_md; /* Duplicate UKM data if present */ if (srcctx->kdf_ukm != NULL && srcctx->kdf_ukmlen > 0) { dstctx->kdf_ukm = OPENSSL_memdup(srcctx->kdf_ukm, srcctx->kdf_ukmlen); if (dstctx->kdf_ukm == NULL) goto err; } return dstctx; err: ecdh_freectx(dstctx); return NULL; } static int ecdh_set_ctx_params(void *vpecdhctx, const OSSL_PARAM params[]) { char name[80] = { '\0' }; /* should be big enough */ char *str = NULL; PROV_ECDH_CTX *pectx = (PROV_ECDH_CTX *)vpecdhctx; const OSSL_PARAM *p; if (pectx == NULL) return 0; if (ossl_param_is_empty(params)) return 1; if (!OSSL_FIPS_IND_SET_CTX_PARAM(pectx, OSSL_FIPS_IND_SETTABLE0, params, OSSL_EXCHANGE_PARAM_FIPS_KEY_CHECK)) return 0; if (!OSSL_FIPS_IND_SET_CTX_PARAM(pectx, OSSL_FIPS_IND_SETTABLE1, params, OSSL_EXCHANGE_PARAM_FIPS_DIGEST_CHECK)) return 0; if (!OSSL_FIPS_IND_SET_CTX_PARAM(pectx, OSSL_FIPS_IND_SETTABLE2, params, OSSL_EXCHANGE_PARAM_FIPS_ECDH_COFACTOR_CHECK)) return 0; p = OSSL_PARAM_locate_const(params, OSSL_EXCHANGE_PARAM_EC_ECDH_COFACTOR_MODE); if (p != NULL) { int mode; if (!OSSL_PARAM_get_int(p, &mode)) return 0; if (mode < -1 || mode > 1) return 0; pectx->cofactor_mode = mode; } p = OSSL_PARAM_locate_const(params, OSSL_EXCHANGE_PARAM_KDF_TYPE); if (p != NULL) { str = name; if (!OSSL_PARAM_get_utf8_string(p, &str, sizeof(name))) return 0; if (name[0] == '\0') pectx->kdf_type = PROV_ECDH_KDF_NONE; else if (strcmp(name, OSSL_KDF_NAME_X963KDF) == 0) pectx->kdf_type = PROV_ECDH_KDF_X9_63; else return 0; } p = OSSL_PARAM_locate_const(params, OSSL_EXCHANGE_PARAM_KDF_DIGEST); if (p != NULL) { char mdprops[80] = { '\0' }; /* should be big enough */ str = name; if (!OSSL_PARAM_get_utf8_string(p, &str, sizeof(name))) return 0; str = mdprops; p = OSSL_PARAM_locate_const(params, OSSL_EXCHANGE_PARAM_KDF_DIGEST_PROPS); if (p != NULL) { if (!OSSL_PARAM_get_utf8_string(p, &str, sizeof(mdprops))) return 0; } EVP_MD_free(pectx->kdf_md); pectx->kdf_md = EVP_MD_fetch(pectx->libctx, name, mdprops); if (pectx->kdf_md == NULL) return 0; /* XOF digests are not allowed */ if (EVP_MD_xof(pectx->kdf_md)) { ERR_raise(ERR_LIB_PROV, PROV_R_XOF_DIGESTS_NOT_ALLOWED); return 0; } #ifdef FIPS_MODULE if (!ossl_fips_ind_digest_exch_check(OSSL_FIPS_IND_GET(pectx), OSSL_FIPS_IND_SETTABLE1, pectx->libctx, pectx->kdf_md, "ECDH Set Ctx")) { EVP_MD_free(pectx->kdf_md); pectx->kdf_md = NULL; return 0; } #endif } p = OSSL_PARAM_locate_const(params, OSSL_EXCHANGE_PARAM_KDF_OUTLEN); if (p != NULL) { size_t outlen; if (!OSSL_PARAM_get_size_t(p, &outlen)) return 0; pectx->kdf_outlen = outlen; } p = OSSL_PARAM_locate_const(params, OSSL_EXCHANGE_PARAM_KDF_UKM); if (p != NULL) { void *tmp_ukm = NULL; size_t tmp_ukmlen; if (!OSSL_PARAM_get_octet_string(p, &tmp_ukm, 0, &tmp_ukmlen)) return 0; OPENSSL_free(pectx->kdf_ukm); pectx->kdf_ukm = tmp_ukm; pectx->kdf_ukmlen = tmp_ukmlen; } return 1; } static const OSSL_PARAM known_settable_ctx_params[] = { OSSL_PARAM_int(OSSL_EXCHANGE_PARAM_EC_ECDH_COFACTOR_MODE, NULL), OSSL_PARAM_utf8_string(OSSL_EXCHANGE_PARAM_KDF_TYPE, NULL, 0), OSSL_PARAM_utf8_string(OSSL_EXCHANGE_PARAM_KDF_DIGEST, NULL, 0), OSSL_PARAM_utf8_string(OSSL_EXCHANGE_PARAM_KDF_DIGEST_PROPS, NULL, 0), OSSL_PARAM_size_t(OSSL_EXCHANGE_PARAM_KDF_OUTLEN, NULL), OSSL_PARAM_octet_string(OSSL_EXCHANGE_PARAM_KDF_UKM, NULL, 0), OSSL_FIPS_IND_SETTABLE_CTX_PARAM(OSSL_EXCHANGE_PARAM_FIPS_KEY_CHECK) OSSL_FIPS_IND_SETTABLE_CTX_PARAM(OSSL_EXCHANGE_PARAM_FIPS_DIGEST_CHECK) OSSL_FIPS_IND_SETTABLE_CTX_PARAM(OSSL_EXCHANGE_PARAM_FIPS_ECDH_COFACTOR_CHECK) OSSL_PARAM_END }; static const OSSL_PARAM *ecdh_settable_ctx_params(ossl_unused void *vpecdhctx, ossl_unused void *provctx) { return known_settable_ctx_params; } static int ecdh_get_ctx_params(void *vpecdhctx, OSSL_PARAM params[]) { PROV_ECDH_CTX *pectx = (PROV_ECDH_CTX *)vpecdhctx; OSSL_PARAM *p; if (pectx == NULL) return 0; p = OSSL_PARAM_locate(params, OSSL_EXCHANGE_PARAM_EC_ECDH_COFACTOR_MODE); if (p != NULL) { int mode = pectx->cofactor_mode; if (mode == -1) { /* check what is the default for pecdhctx->k */ mode = EC_KEY_get_flags(pectx->k) & EC_FLAG_COFACTOR_ECDH ? 1 : 0; } if (!OSSL_PARAM_set_int(p, mode)) return 0; } p = OSSL_PARAM_locate(params, OSSL_EXCHANGE_PARAM_KDF_TYPE); if (p != NULL) { const char *kdf_type = NULL; switch (pectx->kdf_type) { case PROV_ECDH_KDF_NONE: kdf_type = ""; break; case PROV_ECDH_KDF_X9_63: kdf_type = OSSL_KDF_NAME_X963KDF; break; default: return 0; } if (!OSSL_PARAM_set_utf8_string(p, kdf_type)) return 0; } p = OSSL_PARAM_locate(params, OSSL_EXCHANGE_PARAM_KDF_DIGEST); if (p != NULL && !OSSL_PARAM_set_utf8_string(p, pectx->kdf_md == NULL ? "" : EVP_MD_get0_name(pectx->kdf_md))) { return 0; } p = OSSL_PARAM_locate(params, OSSL_EXCHANGE_PARAM_KDF_OUTLEN); if (p != NULL && !OSSL_PARAM_set_size_t(p, pectx->kdf_outlen)) return 0; p = OSSL_PARAM_locate(params, OSSL_EXCHANGE_PARAM_KDF_UKM); if (p != NULL && !OSSL_PARAM_set_octet_ptr(p, pectx->kdf_ukm, pectx->kdf_ukmlen)) return 0; if (!OSSL_FIPS_IND_GET_CTX_PARAM(pectx, params)) return 0; return 1; } static const OSSL_PARAM known_gettable_ctx_params[] = { OSSL_PARAM_int(OSSL_EXCHANGE_PARAM_EC_ECDH_COFACTOR_MODE, NULL), OSSL_PARAM_utf8_string(OSSL_EXCHANGE_PARAM_KDF_TYPE, NULL, 0), OSSL_PARAM_utf8_string(OSSL_EXCHANGE_PARAM_KDF_DIGEST, NULL, 0), OSSL_PARAM_size_t(OSSL_EXCHANGE_PARAM_KDF_OUTLEN, NULL), OSSL_PARAM_DEFN(OSSL_EXCHANGE_PARAM_KDF_UKM, OSSL_PARAM_OCTET_PTR, NULL, 0), OSSL_FIPS_IND_GETTABLE_CTX_PARAM() OSSL_PARAM_END }; static const OSSL_PARAM *ecdh_gettable_ctx_params(ossl_unused void *vpecdhctx, ossl_unused void *provctx) { return known_gettable_ctx_params; } static ossl_inline size_t ecdh_size(const EC_KEY *k) { size_t degree = 0; const EC_GROUP *group; if (k == NULL || (group = EC_KEY_get0_group(k)) == NULL) return 0; degree = EC_GROUP_get_degree(group); return (degree + 7) / 8; } static ossl_inline int ecdh_plain_derive(void *vpecdhctx, unsigned char *secret, size_t *psecretlen, size_t outlen) { PROV_ECDH_CTX *pecdhctx = (PROV_ECDH_CTX *)vpecdhctx; int retlen, ret = 0; size_t ecdhsize, size; const EC_POINT *ppubkey = NULL; EC_KEY *privk = NULL; const EC_GROUP *group; const BIGNUM *cofactor; int key_cofactor_mode; int has_cofactor; #ifdef FIPS_MODULE int cofactor_approved = 0; #endif if (pecdhctx->k == NULL || pecdhctx->peerk == NULL) { ERR_raise(ERR_LIB_PROV, PROV_R_MISSING_KEY); return 0; } ecdhsize = ecdh_size(pecdhctx->k); if (secret == NULL) { *psecretlen = ecdhsize; return 1; } if ((group = EC_KEY_get0_group(pecdhctx->k)) == NULL || (cofactor = EC_GROUP_get0_cofactor(group)) == NULL) return 0; has_cofactor = !BN_is_one(cofactor); /* * NB: unlike PKCS#3 DH, if outlen is less than maximum size this is not * an error, the result is truncated. */ size = outlen < ecdhsize ? outlen : ecdhsize; /* * The ctx->cofactor_mode flag has precedence over the * cofactor_mode flag set on ctx->k. * * - if ctx->cofactor_mode == -1, use ctx->k directly * - if ctx->cofactor_mode == key_cofactor_mode, use ctx->k directly * - if ctx->cofactor_mode != key_cofactor_mode: * - if ctx->k->cofactor == 1, the cofactor_mode flag is irrelevant, use * ctx->k directly * - if ctx->k->cofactor != 1, use a duplicate of ctx->k with the flag * set to ctx->cofactor_mode */ key_cofactor_mode = (EC_KEY_get_flags(pecdhctx->k) & EC_FLAG_COFACTOR_ECDH) ? 1 : 0; if (pecdhctx->cofactor_mode != -1 && pecdhctx->cofactor_mode != key_cofactor_mode && has_cofactor) { if ((privk = EC_KEY_dup(pecdhctx->k)) == NULL) return 0; if (pecdhctx->cofactor_mode == 1) { EC_KEY_set_flags(privk, EC_FLAG_COFACTOR_ECDH); #ifdef FIPS_MODULE cofactor_approved = 1; #endif } else { EC_KEY_clear_flags(privk, EC_FLAG_COFACTOR_ECDH); } } else { privk = pecdhctx->k; #ifdef FIPS_MODULE cofactor_approved = key_cofactor_mode; #endif } #ifdef FIPS_MODULE /* * SP800-56A r3 Section 5.7.1.2 requires ECC Cofactor DH to be used. * This applies to the 'B' and 'K' curves that have cofactors that are not 1. */ if (has_cofactor && !cofactor_approved) { if (!OSSL_FIPS_IND_ON_UNAPPROVED(pecdhctx, OSSL_FIPS_IND_SETTABLE2, pecdhctx->libctx, "ECDH", "Cofactor", ossl_fips_config_ecdh_cofactor_check)) { ERR_raise(ERR_LIB_PROV, PROV_R_COFACTOR_REQUIRED); goto end; } } #endif ppubkey = EC_KEY_get0_public_key(pecdhctx->peerk); retlen = ECDH_compute_key(secret, size, ppubkey, privk, NULL); if (retlen <= 0) goto end; *psecretlen = retlen; ret = 1; end: if (privk != pecdhctx->k) EC_KEY_free(privk); return ret; } static ossl_inline int ecdh_X9_63_kdf_derive(void *vpecdhctx, unsigned char *secret, size_t *psecretlen, size_t outlen) { PROV_ECDH_CTX *pecdhctx = (PROV_ECDH_CTX *)vpecdhctx; unsigned char *stmp = NULL; size_t stmplen; int ret = 0; if (secret == NULL) { *psecretlen = pecdhctx->kdf_outlen; return 1; } if (pecdhctx->kdf_outlen > outlen) { ERR_raise(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL); return 0; } if (!ecdh_plain_derive(vpecdhctx, NULL, &stmplen, 0)) return 0; if ((stmp = OPENSSL_secure_malloc(stmplen)) == NULL) return 0; if (!ecdh_plain_derive(vpecdhctx, stmp, &stmplen, stmplen)) goto err; /* Do KDF stuff */ if (!ossl_ecdh_kdf_X9_63(secret, pecdhctx->kdf_outlen, stmp, stmplen, pecdhctx->kdf_ukm, pecdhctx->kdf_ukmlen, pecdhctx->kdf_md, pecdhctx->libctx, NULL)) goto err; *psecretlen = pecdhctx->kdf_outlen; ret = 1; err: OPENSSL_secure_clear_free(stmp, stmplen); return ret; } static int ecdh_derive(void *vpecdhctx, unsigned char *secret, size_t *psecretlen, size_t outlen) { PROV_ECDH_CTX *pecdhctx = (PROV_ECDH_CTX *)vpecdhctx; switch (pecdhctx->kdf_type) { case PROV_ECDH_KDF_NONE: return ecdh_plain_derive(vpecdhctx, secret, psecretlen, outlen); case PROV_ECDH_KDF_X9_63: return ecdh_X9_63_kdf_derive(vpecdhctx, secret, psecretlen, outlen); default: break; } return 0; } const OSSL_DISPATCH ossl_ecdh_keyexch_functions[] = { { OSSL_FUNC_KEYEXCH_NEWCTX, (void (*)(void))ecdh_newctx }, { OSSL_FUNC_KEYEXCH_INIT, (void (*)(void))ecdh_init }, { OSSL_FUNC_KEYEXCH_DERIVE, (void (*)(void))ecdh_derive }, { OSSL_FUNC_KEYEXCH_SET_PEER, (void (*)(void))ecdh_set_peer }, { OSSL_FUNC_KEYEXCH_FREECTX, (void (*)(void))ecdh_freectx }, { OSSL_FUNC_KEYEXCH_DUPCTX, (void (*)(void))ecdh_dupctx }, { OSSL_FUNC_KEYEXCH_SET_CTX_PARAMS, (void (*)(void))ecdh_set_ctx_params }, { OSSL_FUNC_KEYEXCH_SETTABLE_CTX_PARAMS, (void (*)(void))ecdh_settable_ctx_params }, { OSSL_FUNC_KEYEXCH_GET_CTX_PARAMS, (void (*)(void))ecdh_get_ctx_params }, { OSSL_FUNC_KEYEXCH_GETTABLE_CTX_PARAMS, (void (*)(void))ecdh_gettable_ctx_params }, OSSL_DISPATCH_END }; /* * Copyright 2020-2024 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy * in the file LICENSE in the source distribution or at * https://www.openssl.org/source/license.html */ #include #include #include #include #include #include #include "internal/cryptlib.h" #include "crypto/ecx.h" #include "prov/implementations.h" #include "prov/providercommon.h" #include "prov/securitycheck.h" static OSSL_FUNC_keyexch_newctx_fn x25519_newctx; static OSSL_FUNC_keyexch_newctx_fn x448_newctx; static OSSL_FUNC_keyexch_init_fn x25519_init; static OSSL_FUNC_keyexch_init_fn x448_init; static OSSL_FUNC_keyexch_set_peer_fn ecx_set_peer; static OSSL_FUNC_keyexch_derive_fn ecx_derive; static OSSL_FUNC_keyexch_freectx_fn ecx_freectx; static OSSL_FUNC_keyexch_dupctx_fn ecx_dupctx; static OSSL_FUNC_keyexch_gettable_ctx_params_fn ecx_gettable_ctx_params; static OSSL_FUNC_keyexch_get_ctx_params_fn ecx_get_ctx_params; /* * What's passed as an actual key is defined by the KEYMGMT interface. * We happen to know that our KEYMGMT simply passes ECX_KEY structures, so * we use that here too. */ typedef struct { size_t keylen; ECX_KEY *key; ECX_KEY *peerkey; } PROV_ECX_CTX; static void *ecx_newctx(void *provctx, size_t keylen) { PROV_ECX_CTX *ctx; if (!ossl_prov_is_running()) return NULL; ctx = OPENSSL_zalloc(sizeof(PROV_ECX_CTX)); if (ctx == NULL) return NULL; ctx->keylen = keylen; return ctx; } static void *x25519_newctx(void *provctx) { return ecx_newctx(provctx, X25519_KEYLEN); } static void *x448_newctx(void *provctx) { return ecx_newctx(provctx, X448_KEYLEN); } static int ecx_init(void *vecxctx, void *vkey, const char *algname) { PROV_ECX_CTX *ecxctx = (PROV_ECX_CTX *)vecxctx; ECX_KEY *key = vkey; if (!ossl_prov_is_running()) return 0; if (ecxctx == NULL || key == NULL || key->keylen != ecxctx->keylen || !ossl_ecx_key_up_ref(key)) { ERR_raise(ERR_LIB_PROV, ERR_R_INTERNAL_ERROR); return 0; } ossl_ecx_key_free(ecxctx->key); ecxctx->key = key; #ifdef FIPS_MODULE if (!ossl_FIPS_IND_callback(key->libctx, algname, "Init")) return 0; #endif return 1; } static int x25519_init(void *vecxctx, void *vkey, ossl_unused const OSSL_PARAM params[]) { return ecx_init(vecxctx, vkey, "X25519"); } static int x448_init(void *vecxctx, void *vkey, ossl_unused const OSSL_PARAM params[]) { return ecx_init(vecxctx, vkey, "X448"); } static int ecx_set_peer(void *vecxctx, void *vkey) { PROV_ECX_CTX *ecxctx = (PROV_ECX_CTX *)vecxctx; ECX_KEY *key = vkey; if (!ossl_prov_is_running()) return 0; if (ecxctx == NULL || key == NULL || key->keylen != ecxctx->keylen || !ossl_ecx_key_up_ref(key)) { ERR_raise(ERR_LIB_PROV, ERR_R_INTERNAL_ERROR); return 0; } ossl_ecx_key_free(ecxctx->peerkey); ecxctx->peerkey = key; return 1; } static int ecx_derive(void *vecxctx, unsigned char *secret, size_t *secretlen, size_t outlen) { PROV_ECX_CTX *ecxctx = (PROV_ECX_CTX *)vecxctx; if (!ossl_prov_is_running()) return 0; return ossl_ecx_compute_key(ecxctx->peerkey, ecxctx->key, ecxctx->keylen, secret, secretlen, outlen); } static void ecx_freectx(void *vecxctx) { PROV_ECX_CTX *ecxctx = (PROV_ECX_CTX *)vecxctx; ossl_ecx_key_free(ecxctx->key); ossl_ecx_key_free(ecxctx->peerkey); OPENSSL_free(ecxctx); } static void *ecx_dupctx(void *vecxctx) { PROV_ECX_CTX *srcctx = (PROV_ECX_CTX *)vecxctx; PROV_ECX_CTX *dstctx; if (!ossl_prov_is_running()) return NULL; dstctx = OPENSSL_zalloc(sizeof(*srcctx)); if (dstctx == NULL) return NULL; *dstctx = *srcctx; if (dstctx->key != NULL && !ossl_ecx_key_up_ref(dstctx->key)) { ERR_raise(ERR_LIB_PROV, ERR_R_INTERNAL_ERROR); OPENSSL_free(dstctx); return NULL; } if (dstctx->peerkey != NULL && !ossl_ecx_key_up_ref(dstctx->peerkey)) { ERR_raise(ERR_LIB_PROV, ERR_R_INTERNAL_ERROR); ossl_ecx_key_free(dstctx->key); OPENSSL_free(dstctx); return NULL; } return dstctx; } static const OSSL_PARAM *ecx_gettable_ctx_params(ossl_unused void *vctx, ossl_unused void *provctx) { static const OSSL_PARAM known_gettable_ctx_params[] = { OSSL_FIPS_IND_GETTABLE_CTX_PARAM() OSSL_PARAM_END }; return known_gettable_ctx_params; } static int ecx_get_ctx_params(ossl_unused void *vctx, OSSL_PARAM params[]) { #ifdef FIPS_MODULE int approved = 0; OSSL_PARAM *p = OSSL_PARAM_locate(params, OSSL_ALG_PARAM_FIPS_APPROVED_INDICATOR); if (p != NULL && !OSSL_PARAM_set_int(p, approved)) return 0; #endif return 1; } const OSSL_DISPATCH ossl_x25519_keyexch_functions[] = { { OSSL_FUNC_KEYEXCH_NEWCTX, (void (*)(void))x25519_newctx }, { OSSL_FUNC_KEYEXCH_INIT, (void (*)(void))x25519_init }, { OSSL_FUNC_KEYEXCH_DERIVE, (void (*)(void))ecx_derive }, { OSSL_FUNC_KEYEXCH_SET_PEER, (void (*)(void))ecx_set_peer }, { OSSL_FUNC_KEYEXCH_FREECTX, (void (*)(void))ecx_freectx }, { OSSL_FUNC_KEYEXCH_DUPCTX, (void (*)(void))ecx_dupctx }, { OSSL_FUNC_KEYEXCH_GET_CTX_PARAMS, (void (*)(void))ecx_get_ctx_params }, { OSSL_FUNC_KEYEXCH_GETTABLE_CTX_PARAMS, (void (*)(void))ecx_gettable_ctx_params }, OSSL_DISPATCH_END }; const OSSL_DISPATCH ossl_x448_keyexch_functions[] = { { OSSL_FUNC_KEYEXCH_NEWCTX, (void (*)(void))x448_newctx }, { OSSL_FUNC_KEYEXCH_INIT, (void (*)(void))x448_init }, { OSSL_FUNC_KEYEXCH_DERIVE, (void (*)(void))ecx_derive }, { OSSL_FUNC_KEYEXCH_SET_PEER, (void (*)(void))ecx_set_peer }, { OSSL_FUNC_KEYEXCH_FREECTX, (void (*)(void))ecx_freectx }, { OSSL_FUNC_KEYEXCH_DUPCTX, (void (*)(void))ecx_dupctx }, { OSSL_FUNC_KEYEXCH_GET_CTX_PARAMS, (void (*)(void))ecx_get_ctx_params }, { OSSL_FUNC_KEYEXCH_GETTABLE_CTX_PARAMS, (void (*)(void))ecx_gettable_ctx_params }, OSSL_DISPATCH_END }; /* * Copyright 2019-2026 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy * in the file LICENSE in the source distribution or at * https://www.openssl.org/source/license.html */ #include #include #include #include #include "internal/cryptlib.h" #include "internal/refcount.h" #include "internal/provider.h" #include "internal/core.h" #include "internal/numbers.h" /* includes SIZE_MAX */ #include "crypto/evp.h" #include "evp_local.h" static void evp_keyexch_free(void *data) { EVP_KEYEXCH_free(data); } static int evp_keyexch_up_ref(void *data) { return EVP_KEYEXCH_up_ref(data); } static EVP_KEYEXCH *evp_keyexch_new(OSSL_PROVIDER *prov) { EVP_KEYEXCH *exchange = OPENSSL_zalloc(sizeof(EVP_KEYEXCH)); if (exchange == NULL) return NULL; if (!CRYPTO_NEW_REF(&exchange->refcnt, 1) || !ossl_provider_up_ref(prov)) { CRYPTO_FREE_REF(&exchange->refcnt); OPENSSL_free(exchange); return NULL; } exchange->prov = prov; return exchange; } static void *evp_keyexch_from_algorithm(int name_id, const OSSL_ALGORITHM *algodef, OSSL_PROVIDER *prov) { const OSSL_DISPATCH *fns = algodef->implementation; EVP_KEYEXCH *exchange = NULL; int fncnt = 0, sparamfncnt = 0, gparamfncnt = 0, derive_found = 0; if ((exchange = evp_keyexch_new(prov)) == NULL) { ERR_raise(ERR_LIB_EVP, ERR_R_EVP_LIB); goto err; } exchange->name_id = name_id; if ((exchange->type_name = ossl_algorithm_get1_first_name(algodef)) == NULL) goto err; exchange->description = algodef->algorithm_description; for (; fns->function_id != 0; fns++) { switch (fns->function_id) { case OSSL_FUNC_KEYEXCH_NEWCTX: if (exchange->newctx != NULL) break; exchange->newctx = OSSL_FUNC_keyexch_newctx(fns); fncnt++; break; case OSSL_FUNC_KEYEXCH_INIT: if (exchange->init != NULL) break; exchange->init = OSSL_FUNC_keyexch_init(fns); fncnt++; break; case OSSL_FUNC_KEYEXCH_SET_PEER: if (exchange->set_peer != NULL) break; exchange->set_peer = OSSL_FUNC_keyexch_set_peer(fns); break; case OSSL_FUNC_KEYEXCH_DERIVE: if (exchange->derive != NULL) break; exchange->derive = OSSL_FUNC_keyexch_derive(fns); derive_found = 1; break; case OSSL_FUNC_KEYEXCH_FREECTX: if (exchange->freectx != NULL) break; exchange->freectx = OSSL_FUNC_keyexch_freectx(fns); fncnt++; break; case OSSL_FUNC_KEYEXCH_DUPCTX: if (exchange->dupctx != NULL) break; exchange->dupctx = OSSL_FUNC_keyexch_dupctx(fns); break; case OSSL_FUNC_KEYEXCH_GET_CTX_PARAMS: if (exchange->get_ctx_params != NULL) break; exchange->get_ctx_params = OSSL_FUNC_keyexch_get_ctx_params(fns); gparamfncnt++; break; case OSSL_FUNC_KEYEXCH_GETTABLE_CTX_PARAMS: if (exchange->gettable_ctx_params != NULL) break; exchange->gettable_ctx_params = OSSL_FUNC_keyexch_gettable_ctx_params(fns); gparamfncnt++; break; case OSSL_FUNC_KEYEXCH_SET_CTX_PARAMS: if (exchange->set_ctx_params != NULL) break; exchange->set_ctx_params = OSSL_FUNC_keyexch_set_ctx_params(fns); sparamfncnt++; break; case OSSL_FUNC_KEYEXCH_SETTABLE_CTX_PARAMS: if (exchange->settable_ctx_params != NULL) break; exchange->settable_ctx_params = OSSL_FUNC_keyexch_settable_ctx_params(fns); sparamfncnt++; break; case OSSL_FUNC_KEYEXCH_DERIVE_SKEY: if (exchange->derive_skey != NULL) break; exchange->derive_skey = OSSL_FUNC_keyexch_derive_skey(fns); derive_found = 1; break; } } fncnt += derive_found; if (fncnt != 4 || (gparamfncnt != 0 && gparamfncnt != 2) || (sparamfncnt != 0 && sparamfncnt != 2)) { /* * In order to be a consistent set of functions we must have at least * a complete set of "exchange" functions: init, derive, newctx, * and freectx. The set_ctx_params and settable_ctx_params functions are * optional, but if one of them is present then the other one must also * be present. Same goes for get_ctx_params and gettable_ctx_params. * The dupctx and set_peer functions are optional. */ ERR_raise(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS); goto err; } return exchange; err: EVP_KEYEXCH_free(exchange); return NULL; } void EVP_KEYEXCH_free(EVP_KEYEXCH *exchange) { int i; if (exchange == NULL) return; CRYPTO_DOWN_REF(&exchange->refcnt, &i); if (i > 0) return; OPENSSL_free(exchange->type_name); ossl_provider_free(exchange->prov); CRYPTO_FREE_REF(&exchange->refcnt); OPENSSL_free(exchange); } int EVP_KEYEXCH_up_ref(EVP_KEYEXCH *exchange) { int ref = 0; CRYPTO_UP_REF(&exchange->refcnt, &ref); return 1; } OSSL_PROVIDER *EVP_KEYEXCH_get0_provider(const EVP_KEYEXCH *exchange) { return exchange->prov; } EVP_KEYEXCH *EVP_KEYEXCH_fetch(OSSL_LIB_CTX *ctx, const char *algorithm, const char *properties) { return evp_generic_fetch(ctx, OSSL_OP_KEYEXCH, algorithm, properties, evp_keyexch_from_algorithm, evp_keyexch_up_ref, evp_keyexch_free); } EVP_KEYEXCH *evp_keyexch_fetch_from_prov(OSSL_PROVIDER *prov, const char *algorithm, const char *properties) { return evp_generic_fetch_from_prov(prov, OSSL_OP_KEYEXCH, algorithm, properties, evp_keyexch_from_algorithm, evp_keyexch_up_ref, evp_keyexch_free); } int EVP_PKEY_derive_init(EVP_PKEY_CTX *ctx) { return EVP_PKEY_derive_init_ex(ctx, NULL); } int EVP_PKEY_derive_init_ex(EVP_PKEY_CTX *ctx, const OSSL_PARAM params[]) { int ret; void *provkey = NULL; EVP_KEYEXCH *exchange = NULL; EVP_KEYMGMT *tmp_keymgmt = NULL; const OSSL_PROVIDER *tmp_prov = NULL; const char *supported_exch = NULL; int iter; if (ctx == NULL) { ERR_raise(ERR_LIB_EVP, ERR_R_PASSED_NULL_PARAMETER); return -2; } evp_pkey_ctx_free_old_ops(ctx); ctx->operation = EVP_PKEY_OP_DERIVE; ERR_set_mark(); if (evp_pkey_ctx_is_legacy(ctx)) goto legacy; /* * Some algorithms (e.g. legacy KDFs) don't have a pkey - so we create * a blank one. */ if (ctx->pkey == NULL) { EVP_PKEY *pkey = EVP_PKEY_new(); if (pkey == NULL || !EVP_PKEY_set_type_by_keymgmt(pkey, ctx->keymgmt) || (pkey->keydata = evp_keymgmt_newdata(ctx->keymgmt)) == NULL) { ERR_clear_last_mark(); EVP_PKEY_free(pkey); ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR); goto err; } ctx->pkey = pkey; } /* * Try to derive the supported exch from |ctx->keymgmt|. */ if (!ossl_assert(ctx->pkey->keymgmt == NULL || ctx->pkey->keymgmt == ctx->keymgmt)) { ERR_clear_last_mark(); ERR_raise(ERR_LIB_EVP, ERR_R_INTERNAL_ERROR); goto err; } supported_exch = evp_keymgmt_util_query_operation_name(ctx->keymgmt, OSSL_OP_KEYEXCH); if (supported_exch == NULL) { ERR_clear_last_mark(); ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR); goto err; } /* * We perform two iterations: * * 1. Do the normal exchange fetch, using the fetching data given by * the EVP_PKEY_CTX. * 2. Do the provider specific exchange fetch, from the same provider * as |ctx->keymgmt| * * We then try to fetch the keymgmt from the same provider as the * exchange, and try to export |ctx->pkey| to that keymgmt (when * this keymgmt happens to be the same as |ctx->keymgmt|, the export * is a no-op, but we call it anyway to not complicate the code even * more). * If the export call succeeds (returns a non-NULL provider key pointer), * we're done and can perform the operation itself. If not, we perform * the second iteration, or jump to legacy. */ for (iter = 1, provkey = NULL; iter < 3 && provkey == NULL; iter++) { EVP_KEYMGMT *tmp_keymgmt_tofree = NULL; /* * If we're on the second iteration, free the results from the first. * They are NULL on the first iteration, so no need to check what * iteration we're on. */ EVP_KEYEXCH_free(exchange); EVP_KEYMGMT_free(tmp_keymgmt); switch (iter) { case 1: exchange = EVP_KEYEXCH_fetch(ctx->libctx, supported_exch, ctx->propquery); if (exchange != NULL) tmp_prov = EVP_KEYEXCH_get0_provider(exchange); break; case 2: tmp_prov = EVP_KEYMGMT_get0_provider(ctx->keymgmt); exchange = evp_keyexch_fetch_from_prov((OSSL_PROVIDER *)tmp_prov, supported_exch, ctx->propquery); if (exchange == NULL) goto legacy; break; } if (exchange == NULL) continue; /* * Ensure that the key is provided, either natively, or as a cached * export. We start by fetching the keymgmt with the same name as * |ctx->keymgmt|, but from the provider of the exchange method, using * the same property query as when fetching the exchange method. * With the keymgmt we found (if we did), we try to export |ctx->pkey| * to it (evp_pkey_export_to_provider() is smart enough to only actually * export it if |tmp_keymgmt| is different from |ctx->pkey|'s keymgmt) */ tmp_keymgmt_tofree = tmp_keymgmt = evp_keymgmt_fetch_from_prov((OSSL_PROVIDER *)tmp_prov, EVP_KEYMGMT_get0_name(ctx->keymgmt), ctx->propquery); if (tmp_keymgmt != NULL) provkey = evp_pkey_export_to_provider(ctx->pkey, ctx->libctx, &tmp_keymgmt, ctx->propquery); if (tmp_keymgmt == NULL) EVP_KEYMGMT_free(tmp_keymgmt_tofree); } if (provkey == NULL) { EVP_KEYEXCH_free(exchange); goto legacy; } ERR_pop_to_mark(); /* No more legacy from here down to legacy: */ /* A Coverity false positive with up_ref/down_ref and free */ /* coverity[use_after_free] */ ctx->op.kex.exchange = exchange; /* A Coverity false positive with up_ref/down_ref and free */ /* coverity[deref_arg] */ ctx->op.kex.algctx = exchange->newctx(ossl_provider_ctx(exchange->prov)); if (ctx->op.kex.algctx == NULL) { /* The provider key can stay in the cache */ ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR); goto err; } ret = exchange->init(ctx->op.kex.algctx, provkey, params); EVP_KEYMGMT_free(tmp_keymgmt); return ret ? 1 : 0; err: evp_pkey_ctx_free_old_ops(ctx); ctx->operation = EVP_PKEY_OP_UNDEFINED; EVP_KEYMGMT_free(tmp_keymgmt); return 0; legacy: /* * If we don't have the full support we need with provided methods, * let's go see if legacy does. */ ERR_pop_to_mark(); #ifdef FIPS_MODULE return 0; #else if (ctx->pmeth == NULL || ctx->pmeth->derive == NULL) { ERR_raise(ERR_LIB_EVP, EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE); return -2; } if (ctx->pmeth->derive_init == NULL) return 1; ret = ctx->pmeth->derive_init(ctx); if (ret <= 0) ctx->operation = EVP_PKEY_OP_UNDEFINED; EVP_KEYMGMT_free(tmp_keymgmt); return ret; #endif } int EVP_PKEY_derive_set_peer_ex(EVP_PKEY_CTX *ctx, EVP_PKEY *peer, int validate_peer) { int ret = 0, check; void *provkey = NULL; EVP_PKEY_CTX *check_ctx = NULL; EVP_KEYMGMT *tmp_keymgmt = NULL, *tmp_keymgmt_tofree = NULL; if (ctx == NULL) { ERR_raise(ERR_LIB_EVP, ERR_R_PASSED_NULL_PARAMETER); return -1; } if (!EVP_PKEY_CTX_IS_DERIVE_OP(ctx) || ctx->op.kex.algctx == NULL) goto legacy; if (ctx->op.kex.exchange->set_peer == NULL) { ERR_raise(ERR_LIB_EVP, EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE); return -2; } if (validate_peer) { check_ctx = EVP_PKEY_CTX_new_from_pkey(ctx->libctx, peer, ctx->propquery); if (check_ctx == NULL) return -1; check = EVP_PKEY_public_check(check_ctx); EVP_PKEY_CTX_free(check_ctx); if (check <= 0) return -1; } /* * Ensure that the |peer| is provided, either natively, or as a cached * export. We start by fetching the keymgmt with the same name as * |ctx->keymgmt|, but from the provider of the exchange method, using * the same property query as when fetching the exchange method. * With the keymgmt we found (if we did), we try to export |peer| * to it (evp_pkey_export_to_provider() is smart enough to only actually * export it if |tmp_keymgmt| is different from |peer|'s keymgmt) */ tmp_keymgmt_tofree = tmp_keymgmt = evp_keymgmt_fetch_from_prov((OSSL_PROVIDER *) EVP_KEYEXCH_get0_provider(ctx->op.kex.exchange), EVP_KEYMGMT_get0_name(ctx->keymgmt), ctx->propquery); if (tmp_keymgmt != NULL) /* A Coverity issue with up_ref/down_ref and free */ /* coverity[pass_freed_arg] */ provkey = evp_pkey_export_to_provider(peer, ctx->libctx, &tmp_keymgmt, ctx->propquery); EVP_KEYMGMT_free(tmp_keymgmt_tofree); /* * If making the key provided wasn't possible, legacy may be able to pick * it up */ if (provkey == NULL) goto legacy; ret = ctx->op.kex.exchange->set_peer(ctx->op.kex.algctx, provkey); if (ret <= 0) return ret; goto common; legacy: #ifdef FIPS_MODULE return ret; #else if (ctx->pmeth == NULL || !(ctx->pmeth->derive != NULL || ctx->pmeth->encrypt != NULL || ctx->pmeth->decrypt != NULL) || ctx->pmeth->ctrl == NULL) { ERR_raise(ERR_LIB_EVP, EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE); return -2; } if (ctx->operation != EVP_PKEY_OP_DERIVE && ctx->operation != EVP_PKEY_OP_ENCRYPT && ctx->operation != EVP_PKEY_OP_DECRYPT) { ERR_raise(ERR_LIB_EVP, EVP_R_OPERATION_NOT_INITIALIZED); return -1; } ret = ctx->pmeth->ctrl(ctx, EVP_PKEY_CTRL_PEER_KEY, 0, peer); if (ret <= 0) return ret; if (ret == 2) return 1; if (ctx->pkey == NULL) { ERR_raise(ERR_LIB_EVP, EVP_R_NO_KEY_SET); return -1; } if (ctx->pkey->type != peer->type) { ERR_raise(ERR_LIB_EVP, EVP_R_DIFFERENT_KEY_TYPES); return -1; } /* * For clarity. The error is if parameters in peer are * present (!missing) but don't match. EVP_PKEY_parameters_eq may return * 1 (match), 0 (don't match) and -2 (comparison is not defined). -1 * (different key types) is impossible here because it is checked earlier. * -2 is OK for us here, as well as 1, so we can check for 0 only. */ if (!EVP_PKEY_missing_parameters(peer) && !EVP_PKEY_parameters_eq(ctx->pkey, peer)) { ERR_raise(ERR_LIB_EVP, EVP_R_DIFFERENT_PARAMETERS); return -1; } ret = ctx->pmeth->ctrl(ctx, EVP_PKEY_CTRL_PEER_KEY, 1, peer); if (ret <= 0) return ret; #endif common: if (!EVP_PKEY_up_ref(peer)) return -1; EVP_PKEY_free(ctx->peerkey); ctx->peerkey = peer; return 1; } int EVP_PKEY_derive_set_peer(EVP_PKEY_CTX *ctx, EVP_PKEY *peer) { return EVP_PKEY_derive_set_peer_ex(ctx, peer, 1); } int EVP_PKEY_derive(EVP_PKEY_CTX *ctx, unsigned char *key, size_t *pkeylen) { int ret; if (ctx == NULL || pkeylen == NULL) { ERR_raise(ERR_LIB_EVP, ERR_R_PASSED_NULL_PARAMETER); return -1; } if (!EVP_PKEY_CTX_IS_DERIVE_OP(ctx)) { ERR_raise(ERR_LIB_EVP, EVP_R_OPERATION_NOT_INITIALIZED); return -1; } if (ctx->op.kex.algctx == NULL) goto legacy; ret = ctx->op.kex.exchange->derive(ctx->op.kex.algctx, key, pkeylen, key != NULL ? *pkeylen : 0); return ret; legacy: if (ctx->pmeth == NULL || ctx->pmeth->derive == NULL) { ERR_raise(ERR_LIB_EVP, EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE); return -2; } M_check_autoarg(ctx, key, pkeylen, EVP_F_EVP_PKEY_DERIVE) return ctx->pmeth->derive(ctx, key, pkeylen); } EVP_SKEY *EVP_PKEY_derive_SKEY(EVP_PKEY_CTX *ctx, EVP_SKEYMGMT *mgmt, const char *key_type, const char *propquery, size_t keylen, const OSSL_PARAM params[]) { EVP_SKEYMGMT *skeymgmt = NULL; EVP_SKEY *ret = NULL; if (ctx == NULL || key_type == NULL) { ERR_raise(ERR_LIB_EVP, ERR_R_PASSED_NULL_PARAMETER); return NULL; } if (!EVP_PKEY_CTX_IS_DERIVE_OP(ctx)) { ERR_raise(ERR_LIB_EVP, EVP_R_OPERATION_NOT_INITIALIZED); return NULL; } if (ctx->op.kex.algctx == NULL) { ERR_raise(ERR_R_EVP_LIB, ERR_R_UNSUPPORTED); return NULL; } if (mgmt != NULL) { skeymgmt = mgmt; } else { skeymgmt = evp_skeymgmt_fetch_from_prov(ctx->op.kex.exchange->prov, key_type, propquery); if (skeymgmt == NULL) { /* * The provider does not support skeymgmt, let's try to fallback * to a provider that supports it */ skeymgmt = EVP_SKEYMGMT_fetch(ctx->libctx, key_type, propquery); } if (skeymgmt == NULL) { ERR_raise(ERR_LIB_EVP, ERR_R_FETCH_FAILED); return NULL; } } /* Fallback to raw derive + import if necessary */ if (skeymgmt->prov != ctx->op.kex.exchange->prov || ctx->op.kex.exchange->derive_skey == NULL) { size_t tmplen = keylen; unsigned char *key = NULL; OSSL_PARAM import_params[2] = { OSSL_PARAM_END, OSSL_PARAM_END }; if (ctx->op.kex.exchange->derive == NULL) { ERR_raise(ERR_R_EVP_LIB, ERR_R_UNSUPPORTED); goto cleanup; } key = OPENSSL_zalloc(keylen); if (key == NULL) { ERR_raise(ERR_R_EVP_LIB, ERR_R_CRYPTO_LIB); goto cleanup; } if (!ctx->op.kex.exchange->derive(ctx->op.kex.algctx, key, &tmplen, tmplen)) { OPENSSL_free(key); goto cleanup; } if (keylen != tmplen) { OPENSSL_free(key); ERR_raise(ERR_R_EVP_LIB, ERR_R_INTERNAL_ERROR); goto cleanup; } import_params[0] = OSSL_PARAM_construct_octet_string(OSSL_SKEY_PARAM_RAW_BYTES, key, keylen); ret = EVP_SKEY_import_SKEYMGMT(ctx->libctx, skeymgmt, OSSL_SKEYMGMT_SELECT_SECRET_KEY, import_params); OPENSSL_clear_free(key, keylen); goto cleanup; } ret = evp_skey_alloc(skeymgmt); if (ret == NULL) goto cleanup; ret->keydata = ctx->op.kex.exchange->derive_skey(ctx->op.kex.algctx, key_type, ossl_provider_ctx(skeymgmt->prov), skeymgmt->import, keylen, params); if (ret->keydata == NULL) { EVP_SKEY_free(ret); ret = NULL; goto cleanup; } cleanup: if (mgmt != skeymgmt) EVP_SKEYMGMT_free(skeymgmt); return ret; } int evp_keyexch_get_number(const EVP_KEYEXCH *keyexch) { return keyexch->name_id; } const char *EVP_KEYEXCH_get0_name(const EVP_KEYEXCH *keyexch) { return keyexch->type_name; } const char *EVP_KEYEXCH_get0_description(const EVP_KEYEXCH *keyexch) { return keyexch->description; } int EVP_KEYEXCH_is_a(const EVP_KEYEXCH *keyexch, const char *name) { return keyexch != NULL && evp_is_a(keyexch->prov, keyexch->name_id, NULL, name); } void EVP_KEYEXCH_do_all_provided(OSSL_LIB_CTX *libctx, void (*fn)(EVP_KEYEXCH *keyexch, void *arg), void *arg) { evp_generic_do_all(libctx, OSSL_OP_KEYEXCH, (void (*)(void *, void *))fn, arg, evp_keyexch_from_algorithm, evp_keyexch_up_ref, evp_keyexch_free); } int EVP_KEYEXCH_names_do_all(const EVP_KEYEXCH *keyexch, void (*fn)(const char *name, void *data), void *data) { if (keyexch->prov != NULL) return evp_names_do_all(keyexch->prov, keyexch->name_id, fn, data); return 1; } const OSSL_PARAM *EVP_KEYEXCH_gettable_ctx_params(const EVP_KEYEXCH *keyexch) { void *provctx; if (keyexch == NULL || keyexch->gettable_ctx_params == NULL) return NULL; provctx = ossl_provider_ctx(EVP_KEYEXCH_get0_provider(keyexch)); return keyexch->gettable_ctx_params(NULL, provctx); } const OSSL_PARAM *EVP_KEYEXCH_settable_ctx_params(const EVP_KEYEXCH *keyexch) { void *provctx; if (keyexch == NULL || keyexch->settable_ctx_params == NULL) return NULL; provctx = ossl_provider_ctx(EVP_KEYEXCH_get0_provider(keyexch)); return keyexch->settable_ctx_params(NULL, provctx); } # We make separate GOAL variables for each algorithm, to make it easy to # switch each to the Legacy provider when needed. $DH_GOAL=../../libdefault.a ../../libfips.a $ECDH_GOAL=../../libdefault.a ../../libfips.a $ECX_GOAL=../../libdefault.a ../../libfips.a $KDF_GOAL=../../libdefault.a ../../libfips.a IF[{- !$disabled{dh} -}] SOURCE[$DH_GOAL]=dh_exch.c ENDIF IF[{- !$disabled{asm} -}] $ECDEF_s390x=S390X_EC_ASM # Now that we have defined all the arch specific variables, use the # appropriate one, and define the appropriate macros IF[$ECASM_{- $target{asm_arch} -}] $ECDEF=$ECDEF_{- $target{asm_arch} -} ENDIF ENDIF IF[{- !$disabled{ec} -}] IF[{- !$disabled{ecx} -}] SOURCE[$ECX_GOAL]=ecx_exch.c DEFINE[$ECX_GOAL]=$ECDEF ENDIF SOURCE[$ECDH_GOAL]=ecdh_exch.c ENDIF SOURCE[$KDF_GOAL]=kdf_exch.c /* * Copyright 2019-2025 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy * in the file LICENSE in the source distribution or at * https://www.openssl.org/source/license.html */ /* clang-format off */ {- use OpenSSL::paramnames qw(produce_param_decoder); -} /* clang-format on */ /* * DH low level APIs are deprecated for public use, but still ok for * internal use. */ #include "internal/deprecated.h" #include #include #include #include #include #include #include #include #include "internal/cryptlib.h" #include "prov/providercommon.h" #include "prov/implementations.h" #include "prov/provider_ctx.h" #include "prov/securitycheck.h" #include "crypto/dh.h" static OSSL_FUNC_keyexch_newctx_fn dh_newctx; static OSSL_FUNC_keyexch_init_fn dh_init; static OSSL_FUNC_keyexch_set_peer_fn dh_set_peer; static OSSL_FUNC_keyexch_derive_fn dh_derive; static OSSL_FUNC_keyexch_freectx_fn dh_freectx; static OSSL_FUNC_keyexch_dupctx_fn dh_dupctx; static OSSL_FUNC_keyexch_set_ctx_params_fn dh_set_ctx_params; static OSSL_FUNC_keyexch_settable_ctx_params_fn dh_settable_ctx_params; static OSSL_FUNC_keyexch_get_ctx_params_fn dh_get_ctx_params; static OSSL_FUNC_keyexch_gettable_ctx_params_fn dh_gettable_ctx_params; /* * This type is only really used to handle some legacy related functionality. * If you need to use other KDF's (such as SSKDF) just use PROV_DH_KDF_NONE * here and then create and run a KDF after the key is derived. * Note that X942 has 2 variants of key derivation: * (1) DH_KDF_X9_42_ASN1 - which contains an ANS1 encoded object that has * the counter embedded in it. * (2) DH_KDF_X941_CONCAT - which is the same as ECDH_X963_KDF (which can be * done by creating a "X963KDF". */ enum kdf_type { PROV_DH_KDF_NONE = 0, PROV_DH_KDF_X9_42_ASN1 }; /* * What's passed as an actual key is defined by the KEYMGMT interface. * We happen to know that our KEYMGMT simply passes DH structures, so * we use that here too. */ typedef struct { OSSL_LIB_CTX *libctx; DH *dh; DH *dhpeer; unsigned int pad : 1; /* DH KDF */ /* KDF (if any) to use for DH */ enum kdf_type kdf_type; /* Message digest to use for key derivation */ EVP_MD *kdf_md; /* User key material */ unsigned char *kdf_ukm; size_t kdf_ukmlen; /* KDF output length */ size_t kdf_outlen; char *kdf_cekalg; OSSL_FIPS_IND_DECLARE } PROV_DH_CTX; static void *dh_newctx(void *provctx) { PROV_DH_CTX *pdhctx; if (!ossl_prov_is_running()) return NULL; pdhctx = OPENSSL_zalloc(sizeof(PROV_DH_CTX)); if (pdhctx == NULL) return NULL; OSSL_FIPS_IND_INIT(pdhctx) pdhctx->libctx = PROV_LIBCTX_OF(provctx); pdhctx->kdf_type = PROV_DH_KDF_NONE; return pdhctx; } #ifdef FIPS_MODULE static int dh_check_key(PROV_DH_CTX *ctx) { int key_approved = ossl_dh_check_key(ctx->dh); if (!key_approved) { if (!OSSL_FIPS_IND_ON_UNAPPROVED(ctx, OSSL_FIPS_IND_SETTABLE0, ctx->libctx, "DH Init", "DH Key", ossl_fips_config_securitycheck_enabled)) { ERR_raise(ERR_LIB_PROV, PROV_R_INVALID_KEY_LENGTH); return 0; } } return 1; } static int digest_check(PROV_DH_CTX *ctx, const EVP_MD *md) { return ossl_fips_ind_digest_exch_check(OSSL_FIPS_IND_GET(ctx), OSSL_FIPS_IND_SETTABLE1, ctx->libctx, md, "DH Set Ctx"); } #endif static int dh_init(void *vpdhctx, void *vdh, const OSSL_PARAM params[]) { PROV_DH_CTX *pdhctx = (PROV_DH_CTX *)vpdhctx; if (!ossl_prov_is_running() || pdhctx == NULL || vdh == NULL || !DH_up_ref(vdh)) return 0; DH_free(pdhctx->dh); pdhctx->dh = vdh; pdhctx->kdf_type = PROV_DH_KDF_NONE; OSSL_FIPS_IND_SET_APPROVED(pdhctx) if (!dh_set_ctx_params(pdhctx, params)) return 0; #ifdef FIPS_MODULE if (!dh_check_key(pdhctx)) return 0; #endif return 1; } /* The 2 parties must share the same domain parameters */ static int dh_match_params(DH *priv, DH *peer) { int ret; FFC_PARAMS *dhparams_priv = ossl_dh_get0_params(priv); FFC_PARAMS *dhparams_peer = ossl_dh_get0_params(peer); ret = dhparams_priv != NULL && dhparams_peer != NULL && ossl_ffc_params_cmp(dhparams_priv, dhparams_peer, 1); if (!ret) ERR_raise(ERR_LIB_PROV, PROV_R_MISMATCHING_DOMAIN_PARAMETERS); return ret; } static int dh_set_peer(void *vpdhctx, void *vdh) { PROV_DH_CTX *pdhctx = (PROV_DH_CTX *)vpdhctx; if (!ossl_prov_is_running() || pdhctx == NULL || vdh == NULL || !dh_match_params(vdh, pdhctx->dh) || !DH_up_ref(vdh)) return 0; DH_free(pdhctx->dhpeer); pdhctx->dhpeer = vdh; return 1; } static int dh_plain_derive(void *vpdhctx, unsigned char *secret, size_t *secretlen, size_t outlen, unsigned int pad) { PROV_DH_CTX *pdhctx = (PROV_DH_CTX *)vpdhctx; int ret; size_t dhsize; const BIGNUM *pub_key = NULL; if (pdhctx->dh == NULL || pdhctx->dhpeer == NULL) { ERR_raise(ERR_LIB_PROV, PROV_R_MISSING_KEY); return 0; } dhsize = (size_t)DH_size(pdhctx->dh); if (secret == NULL) { *secretlen = dhsize; return 1; } if (outlen < dhsize) { ERR_raise(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL); return 0; } DH_get0_key(pdhctx->dhpeer, &pub_key, NULL); if (pad) ret = DH_compute_key_padded(secret, pub_key, pdhctx->dh); else ret = DH_compute_key(secret, pub_key, pdhctx->dh); if (ret <= 0) return 0; *secretlen = ret; return 1; } static int dh_X9_42_kdf_derive(void *vpdhctx, unsigned char *secret, size_t *secretlen, size_t outlen) { PROV_DH_CTX *pdhctx = (PROV_DH_CTX *)vpdhctx; unsigned char *stmp = NULL; size_t stmplen; int ret = 0; if (secret == NULL) { *secretlen = pdhctx->kdf_outlen; return 1; } if (pdhctx->kdf_outlen > outlen) { ERR_raise(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL); return 0; } if (!dh_plain_derive(pdhctx, NULL, &stmplen, 0, 1)) return 0; if ((stmp = OPENSSL_secure_malloc(stmplen)) == NULL) return 0; if (!dh_plain_derive(pdhctx, stmp, &stmplen, stmplen, 1)) goto err; /* Do KDF stuff */ if (pdhctx->kdf_type == PROV_DH_KDF_X9_42_ASN1) { if (!ossl_dh_kdf_X9_42_asn1(secret, pdhctx->kdf_outlen, stmp, stmplen, pdhctx->kdf_cekalg, pdhctx->kdf_ukm, pdhctx->kdf_ukmlen, pdhctx->kdf_md, pdhctx->libctx, NULL)) goto err; } *secretlen = pdhctx->kdf_outlen; ret = 1; err: OPENSSL_secure_clear_free(stmp, stmplen); return ret; } static int dh_derive(void *vpdhctx, unsigned char *secret, size_t *psecretlen, size_t outlen) { PROV_DH_CTX *pdhctx = (PROV_DH_CTX *)vpdhctx; if (!ossl_prov_is_running()) return 0; switch (pdhctx->kdf_type) { case PROV_DH_KDF_NONE: return dh_plain_derive(pdhctx, secret, psecretlen, outlen, pdhctx->pad); case PROV_DH_KDF_X9_42_ASN1: return dh_X9_42_kdf_derive(pdhctx, secret, psecretlen, outlen); default: break; } return 0; } static void dh_freectx(void *vpdhctx) { PROV_DH_CTX *pdhctx = (PROV_DH_CTX *)vpdhctx; OPENSSL_free(pdhctx->kdf_cekalg); DH_free(pdhctx->dh); DH_free(pdhctx->dhpeer); EVP_MD_free(pdhctx->kdf_md); OPENSSL_clear_free(pdhctx->kdf_ukm, pdhctx->kdf_ukmlen); OPENSSL_free(pdhctx); } static void *dh_dupctx(void *vpdhctx) { PROV_DH_CTX *srcctx = (PROV_DH_CTX *)vpdhctx; PROV_DH_CTX *dstctx; if (!ossl_prov_is_running()) return NULL; dstctx = OPENSSL_zalloc(sizeof(*srcctx)); if (dstctx == NULL) return NULL; *dstctx = *srcctx; dstctx->dh = NULL; dstctx->dhpeer = NULL; dstctx->kdf_md = NULL; dstctx->kdf_ukm = NULL; dstctx->kdf_cekalg = NULL; if (srcctx->dh != NULL && !DH_up_ref(srcctx->dh)) goto err; else dstctx->dh = srcctx->dh; if (srcctx->dhpeer != NULL && !DH_up_ref(srcctx->dhpeer)) goto err; else dstctx->dhpeer = srcctx->dhpeer; if (srcctx->kdf_md != NULL && !EVP_MD_up_ref(srcctx->kdf_md)) goto err; else dstctx->kdf_md = srcctx->kdf_md; /* Duplicate UKM data if present */ if (srcctx->kdf_ukm != NULL && srcctx->kdf_ukmlen > 0) { dstctx->kdf_ukm = OPENSSL_memdup(srcctx->kdf_ukm, srcctx->kdf_ukmlen); if (dstctx->kdf_ukm == NULL) goto err; } if (srcctx->kdf_cekalg != NULL) { dstctx->kdf_cekalg = OPENSSL_strdup(srcctx->kdf_cekalg); if (dstctx->kdf_cekalg == NULL) goto err; } return dstctx; err: dh_freectx(dstctx); return NULL; } /* clang-format off */ {- produce_param_decoder('dh_set_ctx_params', (['OSSL_EXCHANGE_PARAM_PAD', 'pad', 'int'], ['OSSL_EXCHANGE_PARAM_KDF_TYPE', 'kdf', 'utf8_string'], ['OSSL_EXCHANGE_PARAM_KDF_DIGEST', 'digest', 'utf8_string'], ['OSSL_EXCHANGE_PARAM_KDF_DIGEST_PROPS', 'propq', 'utf8_string'], ['OSSL_EXCHANGE_PARAM_KDF_OUTLEN', 'len', 'size_t'], ['OSSL_EXCHANGE_PARAM_KDF_UKM', 'ukm', 'octet_string'], ['OSSL_KDF_PARAM_CEK_ALG', 'cekalg', 'utf8_string'], ['OSSL_EXCHANGE_PARAM_FIPS_KEY_CHECK', 'ind_k', 'int', 'fips'], ['OSSL_EXCHANGE_PARAM_FIPS_DIGEST_CHECK', 'ind_d', 'int', 'fips'], )); -} /* clang-format on */ static int dh_set_ctx_params(void *vpdhctx, const OSSL_PARAM params[]) { PROV_DH_CTX *pdhctx = (PROV_DH_CTX *)vpdhctx; struct dh_set_ctx_params_st p; unsigned int pad; char name[80] = { '\0' }; /* should be big enough */ char *str = NULL; if (pdhctx == NULL || !dh_set_ctx_params_decoder(params, &p)) return 0; if (!OSSL_FIPS_IND_SET_CTX_FROM_PARAM(pdhctx, OSSL_FIPS_IND_SETTABLE0, p.ind_k)) return 0; if (!OSSL_FIPS_IND_SET_CTX_FROM_PARAM(pdhctx, OSSL_FIPS_IND_SETTABLE1, p.ind_d)) return 0; if (p.kdf != NULL) { str = name; if (!OSSL_PARAM_get_utf8_string(p.kdf, &str, sizeof(name))) return 0; if (name[0] == '\0') pdhctx->kdf_type = PROV_DH_KDF_NONE; else if (strcmp(name, OSSL_KDF_NAME_X942KDF_ASN1) == 0) pdhctx->kdf_type = PROV_DH_KDF_X9_42_ASN1; else return 0; } if (p.digest != NULL) { char mdprops[80] = { '\0' }; /* should be big enough */ str = name; if (!OSSL_PARAM_get_utf8_string(p.digest, &str, sizeof(name))) return 0; str = mdprops; if (p.propq != NULL) { if (!OSSL_PARAM_get_utf8_string(p.propq, &str, sizeof(mdprops))) return 0; } EVP_MD_free(pdhctx->kdf_md); pdhctx->kdf_md = EVP_MD_fetch(pdhctx->libctx, name, mdprops); if (pdhctx->kdf_md == NULL) return 0; /* XOF digests are not allowed */ if (EVP_MD_xof(pdhctx->kdf_md)) { ERR_raise(ERR_LIB_PROV, PROV_R_XOF_DIGESTS_NOT_ALLOWED); return 0; } #ifdef FIPS_MODULE if (!digest_check(pdhctx, pdhctx->kdf_md)) { EVP_MD_free(pdhctx->kdf_md); pdhctx->kdf_md = NULL; return 0; } #endif } if (p.len != NULL) { size_t outlen; if (!OSSL_PARAM_get_size_t(p.len, &outlen)) return 0; pdhctx->kdf_outlen = outlen; } if (p.ukm != NULL) { void *tmp_ukm = NULL; size_t tmp_ukmlen; OPENSSL_free(pdhctx->kdf_ukm); pdhctx->kdf_ukm = NULL; pdhctx->kdf_ukmlen = 0; /* ukm is an optional field so it can be NULL */ if (p.ukm->data != NULL && p.ukm->data_size != 0) { if (!OSSL_PARAM_get_octet_string(p.ukm, &tmp_ukm, 0, &tmp_ukmlen)) return 0; pdhctx->kdf_ukm = tmp_ukm; pdhctx->kdf_ukmlen = tmp_ukmlen; } } if (p.pad != NULL) { if (!OSSL_PARAM_get_uint(p.pad, &pad)) return 0; pdhctx->pad = pad ? 1 : 0; } if (p.cekalg != NULL) { str = name; OPENSSL_free(pdhctx->kdf_cekalg); pdhctx->kdf_cekalg = NULL; if (p.cekalg->data != NULL && p.cekalg->data_size != 0) { if (!OSSL_PARAM_get_utf8_string(p.cekalg, &str, sizeof(name))) return 0; pdhctx->kdf_cekalg = OPENSSL_strdup(name); if (pdhctx->kdf_cekalg == NULL) return 0; } } return 1; } static const OSSL_PARAM *dh_settable_ctx_params(ossl_unused void *vpdhctx, ossl_unused void *provctx) { return dh_set_ctx_params_list; } /* clang-format off */ {- produce_param_decoder('dh_get_ctx_params', (['OSSL_EXCHANGE_PARAM_KDF_TYPE', 'kdf', 'utf8_string'], ['OSSL_EXCHANGE_PARAM_KDF_DIGEST', 'digest', 'utf8_string'], ['OSSL_EXCHANGE_PARAM_KDF_OUTLEN', 'len', 'size_t'], ['OSSL_EXCHANGE_PARAM_KDF_UKM', 'ukm', 'octet_ptr'], ['OSSL_KDF_PARAM_CEK_ALG', 'cekalg', 'utf8_string'], ['OSSL_ALG_PARAM_FIPS_APPROVED_INDICATOR', 'ind', 'int', 'fips'], )); -} /* clang-format on */ static const OSSL_PARAM *dh_gettable_ctx_params(ossl_unused void *vpdhctx, ossl_unused void *provctx) { return dh_get_ctx_params_list; } static int dh_get_ctx_params(void *vpdhctx, OSSL_PARAM params[]) { PROV_DH_CTX *pdhctx = (PROV_DH_CTX *)vpdhctx; struct dh_get_ctx_params_st p; if (pdhctx == NULL || !dh_get_ctx_params_decoder(params, &p)) return 0; if (p.kdf != NULL) { const char *kdf_type = NULL; switch (pdhctx->kdf_type) { case PROV_DH_KDF_NONE: kdf_type = ""; break; case PROV_DH_KDF_X9_42_ASN1: kdf_type = OSSL_KDF_NAME_X942KDF_ASN1; break; default: return 0; } if (!OSSL_PARAM_set_utf8_string(p.kdf, kdf_type)) return 0; } if (p.digest != NULL && !OSSL_PARAM_set_utf8_string(p.digest, pdhctx->kdf_md == NULL ? "" : EVP_MD_get0_name(pdhctx->kdf_md))) { return 0; } if (p.len != NULL && !OSSL_PARAM_set_size_t(p.len, pdhctx->kdf_outlen)) return 0; if (p.ukm != NULL && !OSSL_PARAM_set_octet_ptr(p.ukm, pdhctx->kdf_ukm, pdhctx->kdf_ukmlen)) return 0; if (p.cekalg != NULL && !OSSL_PARAM_set_utf8_string(p.cekalg, pdhctx->kdf_cekalg == NULL ? "" : pdhctx->kdf_cekalg)) return 0; if (!OSSL_FIPS_IND_GET_CTX_FROM_PARAM(pdhctx, p.ind)) return 0; return 1; } const OSSL_DISPATCH ossl_dh_keyexch_functions[] = { { OSSL_FUNC_KEYEXCH_NEWCTX, (void (*)(void))dh_newctx }, { OSSL_FUNC_KEYEXCH_INIT, (void (*)(void))dh_init }, { OSSL_FUNC_KEYEXCH_DERIVE, (void (*)(void))dh_derive }, { OSSL_FUNC_KEYEXCH_SET_PEER, (void (*)(void))dh_set_peer }, { OSSL_FUNC_KEYEXCH_FREECTX, (void (*)(void))dh_freectx }, { OSSL_FUNC_KEYEXCH_DUPCTX, (void (*)(void))dh_dupctx }, { OSSL_FUNC_KEYEXCH_SET_CTX_PARAMS, (void (*)(void))dh_set_ctx_params }, { OSSL_FUNC_KEYEXCH_SETTABLE_CTX_PARAMS, (void (*)(void))dh_settable_ctx_params }, { OSSL_FUNC_KEYEXCH_GET_CTX_PARAMS, (void (*)(void))dh_get_ctx_params }, { OSSL_FUNC_KEYEXCH_GETTABLE_CTX_PARAMS, (void (*)(void))dh_gettable_ctx_params }, OSSL_DISPATCH_END }; /* * Copyright 2020-2025 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy * in the file LICENSE in the source distribution or at * https://www.openssl.org/source/license.html */ /* clang-format off */ {- use OpenSSL::paramnames qw(produce_param_decoder); -} /* clang-format on */ /* * ECDH low level APIs are deprecated for public use, but still ok for * internal use. */ #include "internal/deprecated.h" #include #include #include #include #include #include #include #include #include #include "internal/cryptlib.h" #include "prov/provider_ctx.h" #include "prov/providercommon.h" #include "prov/implementations.h" #include "prov/securitycheck.h" #include "crypto/ec.h" /* ossl_ecdh_kdf_X9_63() */ static OSSL_FUNC_keyexch_newctx_fn ecdh_newctx; static OSSL_FUNC_keyexch_init_fn ecdh_init; static OSSL_FUNC_keyexch_set_peer_fn ecdh_set_peer; static OSSL_FUNC_keyexch_derive_fn ecdh_derive; static OSSL_FUNC_keyexch_derive_skey_fn ecdh_derive_skey; static OSSL_FUNC_keyexch_freectx_fn ecdh_freectx; static OSSL_FUNC_keyexch_dupctx_fn ecdh_dupctx; static OSSL_FUNC_keyexch_set_ctx_params_fn ecdh_set_ctx_params; static OSSL_FUNC_keyexch_settable_ctx_params_fn ecdh_settable_ctx_params; static OSSL_FUNC_keyexch_get_ctx_params_fn ecdh_get_ctx_params; static OSSL_FUNC_keyexch_gettable_ctx_params_fn ecdh_gettable_ctx_params; enum kdf_type { PROV_ECDH_KDF_NONE = 0, PROV_ECDH_KDF_X9_63 }; /* * What's passed as an actual key is defined by the KEYMGMT interface. * We happen to know that our KEYMGMT simply passes EC_KEY structures, so * we use that here too. */ typedef struct { OSSL_LIB_CTX *libctx; EC_KEY *k; EC_KEY *peerk; /* * ECDH cofactor mode: * * . 0 disabled * . 1 enabled * . -1 use cofactor mode set for k */ int cofactor_mode; /************ * ECDH KDF * ************/ /* KDF (if any) to use for ECDH */ enum kdf_type kdf_type; /* Message digest to use for key derivation */ EVP_MD *kdf_md; /* User key material */ unsigned char *kdf_ukm; size_t kdf_ukmlen; /* KDF output length */ size_t kdf_outlen; OSSL_FIPS_IND_DECLARE } PROV_ECDH_CTX; static void *ecdh_newctx(void *provctx) { PROV_ECDH_CTX *pectx; if (!ossl_prov_is_running()) return NULL; pectx = OPENSSL_zalloc(sizeof(*pectx)); if (pectx == NULL) return NULL; pectx->libctx = PROV_LIBCTX_OF(provctx); pectx->cofactor_mode = -1; pectx->kdf_type = PROV_ECDH_KDF_NONE; OSSL_FIPS_IND_INIT(pectx) return (void *)pectx; } static int ecdh_init(void *vpecdhctx, void *vecdh, const OSSL_PARAM params[]) { PROV_ECDH_CTX *pecdhctx = (PROV_ECDH_CTX *)vpecdhctx; if (!ossl_prov_is_running() || pecdhctx == NULL || vecdh == NULL || (EC_KEY_get0_group(vecdh) == NULL) || !EC_KEY_up_ref(vecdh)) return 0; EC_KEY_free(pecdhctx->k); pecdhctx->k = vecdh; pecdhctx->cofactor_mode = -1; pecdhctx->kdf_type = PROV_ECDH_KDF_NONE; OSSL_FIPS_IND_SET_APPROVED(pecdhctx) if (!ecdh_set_ctx_params(pecdhctx, params)) return 0; #ifdef FIPS_MODULE if (!ossl_fips_ind_ec_key_check(OSSL_FIPS_IND_GET(pecdhctx), OSSL_FIPS_IND_SETTABLE0, pecdhctx->libctx, EC_KEY_get0_group(vecdh), "ECDH Init", 1)) return 0; #endif return 1; } static int ecdh_match_params(const EC_KEY *priv, const EC_KEY *peer) { int ret; BN_CTX *ctx = NULL; const EC_GROUP *group_priv = EC_KEY_get0_group(priv); const EC_GROUP *group_peer = EC_KEY_get0_group(peer); ctx = BN_CTX_new_ex(ossl_ec_key_get_libctx(priv)); if (ctx == NULL) { ERR_raise(ERR_LIB_PROV, ERR_R_BN_LIB); return 0; } ret = group_priv != NULL && group_peer != NULL && EC_GROUP_cmp(group_priv, group_peer, ctx) == 0; if (!ret) ERR_raise(ERR_LIB_PROV, PROV_R_MISMATCHING_DOMAIN_PARAMETERS); BN_CTX_free(ctx); return ret; } static int ecdh_set_peer(void *vpecdhctx, void *vecdh) { PROV_ECDH_CTX *pecdhctx = (PROV_ECDH_CTX *)vpecdhctx; if (!ossl_prov_is_running() || pecdhctx == NULL || vecdh == NULL || !ecdh_match_params(pecdhctx->k, vecdh)) return 0; #ifdef FIPS_MODULE if (!ossl_fips_ind_ec_key_check(OSSL_FIPS_IND_GET(pecdhctx), OSSL_FIPS_IND_SETTABLE0, pecdhctx->libctx, EC_KEY_get0_group(vecdh), "ECDH Set Peer", 1)) return 0; #endif if (!EC_KEY_up_ref(vecdh)) return 0; EC_KEY_free(pecdhctx->peerk); pecdhctx->peerk = vecdh; return 1; } static void ecdh_freectx(void *vpecdhctx) { PROV_ECDH_CTX *pecdhctx = (PROV_ECDH_CTX *)vpecdhctx; EC_KEY_free(pecdhctx->k); EC_KEY_free(pecdhctx->peerk); EVP_MD_free(pecdhctx->kdf_md); OPENSSL_clear_free(pecdhctx->kdf_ukm, pecdhctx->kdf_ukmlen); OPENSSL_free(pecdhctx); } static void *ecdh_dupctx(void *vpecdhctx) { PROV_ECDH_CTX *srcctx = (PROV_ECDH_CTX *)vpecdhctx; PROV_ECDH_CTX *dstctx; if (!ossl_prov_is_running()) return NULL; dstctx = OPENSSL_zalloc(sizeof(*srcctx)); if (dstctx == NULL) return NULL; *dstctx = *srcctx; /* clear all pointers */ dstctx->k = NULL; dstctx->peerk = NULL; dstctx->kdf_md = NULL; dstctx->kdf_ukm = NULL; /* up-ref all ref-counted objects referenced in dstctx */ if (srcctx->k != NULL && !EC_KEY_up_ref(srcctx->k)) goto err; else dstctx->k = srcctx->k; if (srcctx->peerk != NULL && !EC_KEY_up_ref(srcctx->peerk)) goto err; else dstctx->peerk = srcctx->peerk; if (srcctx->kdf_md != NULL && !EVP_MD_up_ref(srcctx->kdf_md)) goto err; else dstctx->kdf_md = srcctx->kdf_md; /* Duplicate UKM data if present */ if (srcctx->kdf_ukm != NULL && srcctx->kdf_ukmlen > 0) { dstctx->kdf_ukm = OPENSSL_memdup(srcctx->kdf_ukm, srcctx->kdf_ukmlen); if (dstctx->kdf_ukm == NULL) goto err; } return dstctx; err: ecdh_freectx(dstctx); return NULL; } /* clang-format off */ {- produce_param_decoder('ecdh_set_ctx_params', (['OSSL_EXCHANGE_PARAM_EC_ECDH_COFACTOR_MODE', 'mode', 'int'], ['OSSL_EXCHANGE_PARAM_KDF_TYPE', 'kdf', 'utf8_string'], ['OSSL_EXCHANGE_PARAM_KDF_DIGEST', 'digest', 'utf8_string'], ['OSSL_EXCHANGE_PARAM_KDF_DIGEST_PROPS', 'propq', 'utf8_string'], ['OSSL_EXCHANGE_PARAM_KDF_OUTLEN', 'len', 'size_t'], ['OSSL_EXCHANGE_PARAM_KDF_UKM', 'ukm', 'octet_string'], ['OSSL_EXCHANGE_PARAM_FIPS_KEY_CHECK', 'ind_k', 'int', 'fips'], ['OSSL_EXCHANGE_PARAM_FIPS_DIGEST_CHECK', 'ind_d', 'int', 'fips'], ['OSSL_EXCHANGE_PARAM_FIPS_ECDH_COFACTOR_CHECK', 'ind_cofac', 'int', 'fips'], )); -} /* clang-format on */ static int ecdh_set_ctx_params(void *vpecdhctx, const OSSL_PARAM params[]) { char name[80] = { '\0' }; /* should be big enough */ char *str = NULL; PROV_ECDH_CTX *pectx = (PROV_ECDH_CTX *)vpecdhctx; struct ecdh_set_ctx_params_st p; if (pectx == NULL || !ecdh_set_ctx_params_decoder(params, &p)) return 0; if (!OSSL_FIPS_IND_SET_CTX_FROM_PARAM(pectx, OSSL_FIPS_IND_SETTABLE0, p.ind_k)) return 0; if (!OSSL_FIPS_IND_SET_CTX_FROM_PARAM(pectx, OSSL_FIPS_IND_SETTABLE1, p.ind_d)) return 0; if (!OSSL_FIPS_IND_SET_CTX_FROM_PARAM(pectx, OSSL_FIPS_IND_SETTABLE2, p.ind_cofac)) return 0; if (p.mode != NULL) { int mode; if (!OSSL_PARAM_get_int(p.mode, &mode)) return 0; if (mode < -1 || mode > 1) return 0; pectx->cofactor_mode = mode; } if (p.kdf != NULL) { str = name; if (!OSSL_PARAM_get_utf8_string(p.kdf, &str, sizeof(name))) return 0; if (name[0] == '\0') pectx->kdf_type = PROV_ECDH_KDF_NONE; else if (strcmp(name, OSSL_KDF_NAME_X963KDF) == 0) pectx->kdf_type = PROV_ECDH_KDF_X9_63; else return 0; } if (p.digest != NULL) { char mdprops[80] = { '\0' }; /* should be big enough */ str = name; if (!OSSL_PARAM_get_utf8_string(p.digest, &str, sizeof(name))) return 0; str = mdprops; if (p.propq != NULL) { if (!OSSL_PARAM_get_utf8_string(p.propq, &str, sizeof(mdprops))) return 0; } EVP_MD_free(pectx->kdf_md); pectx->kdf_md = EVP_MD_fetch(pectx->libctx, name, mdprops); if (pectx->kdf_md == NULL) return 0; /* XOF digests are not allowed */ if (EVP_MD_xof(pectx->kdf_md)) { ERR_raise(ERR_LIB_PROV, PROV_R_XOF_DIGESTS_NOT_ALLOWED); return 0; } #ifdef FIPS_MODULE if (!ossl_fips_ind_digest_exch_check(OSSL_FIPS_IND_GET(pectx), OSSL_FIPS_IND_SETTABLE1, pectx->libctx, pectx->kdf_md, "ECDH Set Ctx")) { EVP_MD_free(pectx->kdf_md); pectx->kdf_md = NULL; return 0; } #endif } if (p.len != NULL) { size_t outlen; if (!OSSL_PARAM_get_size_t(p.len, &outlen)) return 0; pectx->kdf_outlen = outlen; } if (p.ukm != NULL) { void *tmp_ukm = NULL; size_t tmp_ukmlen; if (!OSSL_PARAM_get_octet_string(p.ukm, &tmp_ukm, 0, &tmp_ukmlen)) return 0; OPENSSL_free(pectx->kdf_ukm); pectx->kdf_ukm = tmp_ukm; pectx->kdf_ukmlen = tmp_ukmlen; } return 1; } static const OSSL_PARAM *ecdh_settable_ctx_params(ossl_unused void *vpecdhctx, ossl_unused void *provctx) { return ecdh_set_ctx_params_list; } /* clang-format off */ {- produce_param_decoder('ecdh_get_ctx_params', (['OSSL_EXCHANGE_PARAM_EC_ECDH_COFACTOR_MODE', 'mode', 'int'], ['OSSL_EXCHANGE_PARAM_KDF_TYPE', 'kdf', 'utf8_string'], ['OSSL_EXCHANGE_PARAM_KDF_DIGEST', 'digest', 'utf8_string'], ['OSSL_EXCHANGE_PARAM_KDF_OUTLEN', 'len', 'size_t'], ['OSSL_EXCHANGE_PARAM_KDF_UKM', 'ukm', 'octet_ptr'], ['OSSL_ALG_PARAM_FIPS_APPROVED_INDICATOR', 'ind', 'int', 'fips'], )); -} /* clang-format on */ static int ecdh_get_ctx_params(void *vpecdhctx, OSSL_PARAM params[]) { PROV_ECDH_CTX *pectx = (PROV_ECDH_CTX *)vpecdhctx; struct ecdh_get_ctx_params_st p; if (pectx == NULL || !ecdh_get_ctx_params_decoder(params, &p)) return 0; if (p.mode != NULL) { int mode = pectx->cofactor_mode; if (mode == -1) { /* check what is the default for pecdhctx->k */ mode = EC_KEY_get_flags(pectx->k) & EC_FLAG_COFACTOR_ECDH ? 1 : 0; } if (!OSSL_PARAM_set_int(p.mode, mode)) return 0; } if (p.kdf != NULL) { const char *kdf_type = NULL; switch (pectx->kdf_type) { case PROV_ECDH_KDF_NONE: kdf_type = ""; break; case PROV_ECDH_KDF_X9_63: kdf_type = OSSL_KDF_NAME_X963KDF; break; default: return 0; } if (!OSSL_PARAM_set_utf8_string(p.kdf, kdf_type)) return 0; } if (p.digest != NULL && !OSSL_PARAM_set_utf8_string(p.digest, pectx->kdf_md == NULL ? "" : EVP_MD_get0_name(pectx->kdf_md))) { return 0; } if (p.len != NULL && !OSSL_PARAM_set_size_t(p.len, pectx->kdf_outlen)) return 0; if (p.ukm != NULL && !OSSL_PARAM_set_octet_ptr(p.ukm, pectx->kdf_ukm, pectx->kdf_ukmlen)) return 0; if (!OSSL_FIPS_IND_GET_CTX_FROM_PARAM(pectx, p.ind)) return 0; return 1; } static const OSSL_PARAM *ecdh_gettable_ctx_params(ossl_unused void *vpecdhctx, ossl_unused void *provctx) { return ecdh_get_ctx_params_list; } static ossl_inline size_t ecdh_size(const EC_KEY *k) { size_t degree = 0; const EC_GROUP *group; if (k == NULL || (group = EC_KEY_get0_group(k)) == NULL) return 0; degree = EC_GROUP_get_degree(group); return (degree + 7) / 8; } static ossl_inline int ecdh_plain_derive(void *vpecdhctx, unsigned char *secret, size_t *psecretlen, size_t outlen) { PROV_ECDH_CTX *pecdhctx = (PROV_ECDH_CTX *)vpecdhctx; int retlen, ret = 0; size_t ecdhsize, size; const EC_POINT *ppubkey = NULL; EC_KEY *privk = NULL; const EC_GROUP *group; const BIGNUM *cofactor; int key_cofactor_mode; int has_cofactor; #ifdef FIPS_MODULE int cofactor_approved = 0; #endif if (pecdhctx->k == NULL || pecdhctx->peerk == NULL) { ERR_raise(ERR_LIB_PROV, PROV_R_MISSING_KEY); return 0; } ecdhsize = ecdh_size(pecdhctx->k); if (secret == NULL) { *psecretlen = ecdhsize; return 1; } if ((group = EC_KEY_get0_group(pecdhctx->k)) == NULL || (cofactor = EC_GROUP_get0_cofactor(group)) == NULL) return 0; has_cofactor = !BN_is_one(cofactor); /* * NB: unlike PKCS#3 DH, if outlen is less than maximum size this is not * an error, the result is truncated. */ size = outlen < ecdhsize ? outlen : ecdhsize; /* * The ctx->cofactor_mode flag has precedence over the * cofactor_mode flag set on ctx->k. * * - if ctx->cofactor_mode == -1, use ctx->k directly * - if ctx->cofactor_mode == key_cofactor_mode, use ctx->k directly * - if ctx->cofactor_mode != key_cofactor_mode: * - if ctx->k->cofactor == 1, the cofactor_mode flag is irrelevant, use * ctx->k directly * - if ctx->k->cofactor != 1, use a duplicate of ctx->k with the flag * set to ctx->cofactor_mode */ key_cofactor_mode = (EC_KEY_get_flags(pecdhctx->k) & EC_FLAG_COFACTOR_ECDH) ? 1 : 0; if (pecdhctx->cofactor_mode != -1 && pecdhctx->cofactor_mode != key_cofactor_mode && has_cofactor) { if ((privk = EC_KEY_dup(pecdhctx->k)) == NULL) return 0; if (pecdhctx->cofactor_mode == 1) { EC_KEY_set_flags(privk, EC_FLAG_COFACTOR_ECDH); #ifdef FIPS_MODULE cofactor_approved = 1; #endif } else { EC_KEY_clear_flags(privk, EC_FLAG_COFACTOR_ECDH); } } else { privk = pecdhctx->k; #ifdef FIPS_MODULE cofactor_approved = key_cofactor_mode; #endif } #ifdef FIPS_MODULE /* * SP800-56A r3 Section 5.7.1.2 requires ECC Cofactor DH to be used. * This applies to the 'B' and 'K' curves that have cofactors that are not 1. */ if (has_cofactor && !cofactor_approved) { if (!OSSL_FIPS_IND_ON_UNAPPROVED(pecdhctx, OSSL_FIPS_IND_SETTABLE2, pecdhctx->libctx, "ECDH", "Cofactor", ossl_fips_config_ecdh_cofactor_check)) { ERR_raise(ERR_LIB_PROV, PROV_R_COFACTOR_REQUIRED); goto end; } } #endif ppubkey = EC_KEY_get0_public_key(pecdhctx->peerk); retlen = ECDH_compute_key(secret, size, ppubkey, privk, NULL); if (retlen <= 0) goto end; *psecretlen = retlen; ret = 1; end: if (privk != pecdhctx->k) EC_KEY_free(privk); return ret; } static ossl_inline int ecdh_X9_63_kdf_derive(void *vpecdhctx, unsigned char *secret, size_t *psecretlen, size_t outlen) { PROV_ECDH_CTX *pecdhctx = (PROV_ECDH_CTX *)vpecdhctx; unsigned char *stmp = NULL; size_t stmplen; int ret = 0; if (secret == NULL) { *psecretlen = pecdhctx->kdf_outlen; return 1; } if (pecdhctx->kdf_outlen > outlen) { ERR_raise(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL); return 0; } if (!ecdh_plain_derive(vpecdhctx, NULL, &stmplen, 0)) return 0; if ((stmp = OPENSSL_secure_malloc(stmplen)) == NULL) return 0; if (!ecdh_plain_derive(vpecdhctx, stmp, &stmplen, stmplen)) goto err; /* Do KDF stuff */ if (!ossl_ecdh_kdf_X9_63(secret, pecdhctx->kdf_outlen, stmp, stmplen, pecdhctx->kdf_ukm, pecdhctx->kdf_ukmlen, pecdhctx->kdf_md, pecdhctx->libctx, NULL)) goto err; *psecretlen = pecdhctx->kdf_outlen; ret = 1; err: OPENSSL_secure_clear_free(stmp, stmplen); return ret; } static int ecdh_derive(void *vpecdhctx, unsigned char *secret, size_t *psecretlen, size_t outlen) { PROV_ECDH_CTX *pecdhctx = (PROV_ECDH_CTX *)vpecdhctx; switch (pecdhctx->kdf_type) { case PROV_ECDH_KDF_NONE: return ecdh_plain_derive(vpecdhctx, secret, psecretlen, outlen); case PROV_ECDH_KDF_X9_63: return ecdh_X9_63_kdf_derive(vpecdhctx, secret, psecretlen, outlen); default: break; } return 0; } static void *ecdh_derive_skey(void *vpecdhctx, const char *key_type ossl_unused, void *provctx, OSSL_FUNC_skeymgmt_import_fn *import, size_t outlen, const OSSL_PARAM params_in[] ossl_unused) { unsigned char *secret = NULL; size_t secretlen = 0; void *ret = NULL; OSSL_PARAM params[2] = { OSSL_PARAM_END, OSSL_PARAM_END }; if (import == NULL || outlen == 0) return NULL; if (ecdh_derive(vpecdhctx, secret, &secretlen, outlen) == 0) return NULL; if ((secret = OPENSSL_malloc(secretlen)) == NULL) return NULL; if (ecdh_derive(vpecdhctx, secret, &secretlen, outlen) == 0 || secretlen != outlen) { OPENSSL_clear_free(secret, secretlen); return NULL; } params[0] = OSSL_PARAM_construct_octet_string(OSSL_SKEY_PARAM_RAW_BYTES, (void *)secret, outlen); /* This is mandatory, no need to check for its presence */ ret = import(provctx, OSSL_SKEYMGMT_SELECT_SECRET_KEY, params); OPENSSL_clear_free(secret, secretlen); return ret; } const OSSL_DISPATCH ossl_ecdh_keyexch_functions[] = { { OSSL_FUNC_KEYEXCH_NEWCTX, (void (*)(void))ecdh_newctx }, { OSSL_FUNC_KEYEXCH_INIT, (void (*)(void))ecdh_init }, { OSSL_FUNC_KEYEXCH_DERIVE, (void (*)(void))ecdh_derive }, { OSSL_FUNC_KEYEXCH_DERIVE_SKEY, (void (*)(void))ecdh_derive_skey }, { OSSL_FUNC_KEYEXCH_SET_PEER, (void (*)(void))ecdh_set_peer }, { OSSL_FUNC_KEYEXCH_FREECTX, (void (*)(void))ecdh_freectx }, { OSSL_FUNC_KEYEXCH_DUPCTX, (void (*)(void))ecdh_dupctx }, { OSSL_FUNC_KEYEXCH_SET_CTX_PARAMS, (void (*)(void))ecdh_set_ctx_params }, { OSSL_FUNC_KEYEXCH_SETTABLE_CTX_PARAMS, (void (*)(void))ecdh_settable_ctx_params }, { OSSL_FUNC_KEYEXCH_GET_CTX_PARAMS, (void (*)(void))ecdh_get_ctx_params }, { OSSL_FUNC_KEYEXCH_GETTABLE_CTX_PARAMS, (void (*)(void))ecdh_gettable_ctx_params }, OSSL_DISPATCH_END }; /* * Copyright 2020-2025 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy * in the file LICENSE in the source distribution or at * https://www.openssl.org/source/license.html */ /* clang-format off */ {- use OpenSSL::paramnames qw(produce_param_decoder); -} /* clang-format on */ #include #include #include #include #include #include #include "internal/cryptlib.h" #include "crypto/ecx.h" #include "prov/implementations.h" #include "prov/providercommon.h" #include "prov/securitycheck.h" static OSSL_FUNC_keyexch_newctx_fn x25519_newctx; static OSSL_FUNC_keyexch_newctx_fn x448_newctx; static OSSL_FUNC_keyexch_init_fn x25519_init; static OSSL_FUNC_keyexch_init_fn x448_init; static OSSL_FUNC_keyexch_set_peer_fn ecx_set_peer; static OSSL_FUNC_keyexch_derive_fn ecx_derive; static OSSL_FUNC_keyexch_freectx_fn ecx_freectx; static OSSL_FUNC_keyexch_dupctx_fn ecx_dupctx; static OSSL_FUNC_keyexch_gettable_ctx_params_fn ecx_gettable_ctx_params; static OSSL_FUNC_keyexch_get_ctx_params_fn ecx_get_ctx_params; /* * What's passed as an actual key is defined by the KEYMGMT interface. * We happen to know that our KEYMGMT simply passes ECX_KEY structures, so * we use that here too. */ typedef struct { size_t keylen; ECX_KEY *key; ECX_KEY *peerkey; } PROV_ECX_CTX; static void *ecx_newctx(void *provctx, size_t keylen) { PROV_ECX_CTX *ctx; if (!ossl_prov_is_running()) return NULL; ctx = OPENSSL_zalloc(sizeof(PROV_ECX_CTX)); if (ctx == NULL) return NULL; ctx->keylen = keylen; return ctx; } static void *x25519_newctx(void *provctx) { return ecx_newctx(provctx, X25519_KEYLEN); } static void *x448_newctx(void *provctx) { return ecx_newctx(provctx, X448_KEYLEN); } static int ecx_init(void *vecxctx, void *vkey, const char *algname) { PROV_ECX_CTX *ecxctx = (PROV_ECX_CTX *)vecxctx; ECX_KEY *key = vkey; if (!ossl_prov_is_running()) return 0; if (ecxctx == NULL || key == NULL || key->keylen != ecxctx->keylen || !ossl_ecx_key_up_ref(key)) { ERR_raise(ERR_LIB_PROV, ERR_R_INTERNAL_ERROR); return 0; } ossl_ecx_key_free(ecxctx->key); ecxctx->key = key; #ifdef FIPS_MODULE if (!ossl_FIPS_IND_callback(key->libctx, algname, "Init")) return 0; #endif return 1; } static int x25519_init(void *vecxctx, void *vkey, ossl_unused const OSSL_PARAM params[]) { return ecx_init(vecxctx, vkey, "X25519"); } static int x448_init(void *vecxctx, void *vkey, ossl_unused const OSSL_PARAM params[]) { return ecx_init(vecxctx, vkey, "X448"); } static int ecx_set_peer(void *vecxctx, void *vkey) { PROV_ECX_CTX *ecxctx = (PROV_ECX_CTX *)vecxctx; ECX_KEY *key = vkey; if (!ossl_prov_is_running()) return 0; if (ecxctx == NULL || key == NULL || key->keylen != ecxctx->keylen || !ossl_ecx_key_up_ref(key)) { ERR_raise(ERR_LIB_PROV, ERR_R_INTERNAL_ERROR); return 0; } ossl_ecx_key_free(ecxctx->peerkey); ecxctx->peerkey = key; return 1; } static int ecx_derive(void *vecxctx, unsigned char *secret, size_t *secretlen, size_t outlen) { PROV_ECX_CTX *ecxctx = (PROV_ECX_CTX *)vecxctx; if (!ossl_prov_is_running()) return 0; return ossl_ecx_compute_key(ecxctx->peerkey, ecxctx->key, ecxctx->keylen, secret, secretlen, outlen); } static void ecx_freectx(void *vecxctx) { PROV_ECX_CTX *ecxctx = (PROV_ECX_CTX *)vecxctx; ossl_ecx_key_free(ecxctx->key); ossl_ecx_key_free(ecxctx->peerkey); OPENSSL_free(ecxctx); } static void *ecx_dupctx(void *vecxctx) { PROV_ECX_CTX *srcctx = (PROV_ECX_CTX *)vecxctx; PROV_ECX_CTX *dstctx; if (!ossl_prov_is_running()) return NULL; dstctx = OPENSSL_zalloc(sizeof(*srcctx)); if (dstctx == NULL) return NULL; *dstctx = *srcctx; if (dstctx->key != NULL && !ossl_ecx_key_up_ref(dstctx->key)) { ERR_raise(ERR_LIB_PROV, ERR_R_INTERNAL_ERROR); OPENSSL_free(dstctx); return NULL; } if (dstctx->peerkey != NULL && !ossl_ecx_key_up_ref(dstctx->peerkey)) { ERR_raise(ERR_LIB_PROV, ERR_R_INTERNAL_ERROR); ossl_ecx_key_free(dstctx->key); OPENSSL_free(dstctx); return NULL; } return dstctx; } #ifdef FIPS_MODULE /* clang-format off */ {- produce_param_decoder('ecx_get_ctx_params', (['OSSL_ALG_PARAM_FIPS_APPROVED_INDICATOR', 'ind', 'int', 'fips'], )); -} /* clang-format on */ #endif static const OSSL_PARAM *ecx_gettable_ctx_params(ossl_unused void *vctx, ossl_unused void *provctx) { #ifdef FIPS_MODULE return ecx_get_ctx_params_list; #else static OSSL_PARAM params[] = { OSSL_PARAM_END }; return params; #endif } static int ecx_get_ctx_params(ossl_unused void *vctx, OSSL_PARAM params[]) { #ifdef FIPS_MODULE int approved = 0; struct ecx_get_ctx_params_st p; if (vctx == NULL || !ecx_get_ctx_params_decoder(params, &p)) return 0; if (p.ind != NULL && !OSSL_PARAM_set_int(p.ind, approved)) return 0; #endif return 1; } const OSSL_DISPATCH ossl_x25519_keyexch_functions[] = { { OSSL_FUNC_KEYEXCH_NEWCTX, (void (*)(void))x25519_newctx }, { OSSL_FUNC_KEYEXCH_INIT, (void (*)(void))x25519_init }, { OSSL_FUNC_KEYEXCH_DERIVE, (void (*)(void))ecx_derive }, { OSSL_FUNC_KEYEXCH_SET_PEER, (void (*)(void))ecx_set_peer }, { OSSL_FUNC_KEYEXCH_FREECTX, (void (*)(void))ecx_freectx }, { OSSL_FUNC_KEYEXCH_DUPCTX, (void (*)(void))ecx_dupctx }, { OSSL_FUNC_KEYEXCH_GET_CTX_PARAMS, (void (*)(void))ecx_get_ctx_params }, { OSSL_FUNC_KEYEXCH_GETTABLE_CTX_PARAMS, (void (*)(void))ecx_gettable_ctx_params }, OSSL_DISPATCH_END }; const OSSL_DISPATCH ossl_x448_keyexch_functions[] = { { OSSL_FUNC_KEYEXCH_NEWCTX, (void (*)(void))x448_newctx }, { OSSL_FUNC_KEYEXCH_INIT, (void (*)(void))x448_init }, { OSSL_FUNC_KEYEXCH_DERIVE, (void (*)(void))ecx_derive }, { OSSL_FUNC_KEYEXCH_SET_PEER, (void (*)(void))ecx_set_peer }, { OSSL_FUNC_KEYEXCH_FREECTX, (void (*)(void))ecx_freectx }, { OSSL_FUNC_KEYEXCH_DUPCTX, (void (*)(void))ecx_dupctx }, { OSSL_FUNC_KEYEXCH_GET_CTX_PARAMS, (void (*)(void))ecx_get_ctx_params }, { OSSL_FUNC_KEYEXCH_GETTABLE_CTX_PARAMS, (void (*)(void))ecx_gettable_ctx_params }, OSSL_DISPATCH_END }; /* * Copyright 2020-2024 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy * in the file LICENSE in the source distribution or at * https://www.openssl.org/source/license.html */ #include #include #include #include #include #include #include #include "internal/numbers.h" #include "prov/implementations.h" #include "prov/provider_ctx.h" #include "prov/kdfexchange.h" #include "prov/providercommon.h" static OSSL_FUNC_keyexch_newctx_fn kdf_tls1_prf_newctx; static OSSL_FUNC_keyexch_newctx_fn kdf_hkdf_newctx; static OSSL_FUNC_keyexch_newctx_fn kdf_scrypt_newctx; static OSSL_FUNC_keyexch_init_fn kdf_init; static OSSL_FUNC_keyexch_derive_fn kdf_derive; static OSSL_FUNC_keyexch_freectx_fn kdf_freectx; static OSSL_FUNC_keyexch_dupctx_fn kdf_dupctx; static OSSL_FUNC_keyexch_set_ctx_params_fn kdf_set_ctx_params; static OSSL_FUNC_keyexch_get_ctx_params_fn kdf_get_ctx_params; static OSSL_FUNC_keyexch_settable_ctx_params_fn kdf_tls1_prf_settable_ctx_params; static OSSL_FUNC_keyexch_settable_ctx_params_fn kdf_hkdf_settable_ctx_params; static OSSL_FUNC_keyexch_settable_ctx_params_fn kdf_scrypt_settable_ctx_params; static OSSL_FUNC_keyexch_gettable_ctx_params_fn kdf_tls1_prf_gettable_ctx_params; static OSSL_FUNC_keyexch_gettable_ctx_params_fn kdf_hkdf_gettable_ctx_params; static OSSL_FUNC_keyexch_gettable_ctx_params_fn kdf_scrypt_gettable_ctx_params; typedef struct { void *provctx; EVP_KDF_CTX *kdfctx; KDF_DATA *kdfdata; } PROV_KDF_CTX; static void *kdf_newctx(const char *kdfname, void *provctx) { PROV_KDF_CTX *kdfctx; EVP_KDF *kdf = NULL; if (!ossl_prov_is_running()) return NULL; kdfctx = OPENSSL_zalloc(sizeof(PROV_KDF_CTX)); if (kdfctx == NULL) return NULL; kdfctx->provctx = provctx; kdf = EVP_KDF_fetch(PROV_LIBCTX_OF(provctx), kdfname, NULL); if (kdf == NULL) goto err; kdfctx->kdfctx = EVP_KDF_CTX_new(kdf); EVP_KDF_free(kdf); if (kdfctx->kdfctx == NULL) goto err; return kdfctx; err: OPENSSL_free(kdfctx); return NULL; } #define KDF_NEWCTX(funcname, kdfname) \ static void *kdf_##funcname##_newctx(void *provctx) \ { \ return kdf_newctx(kdfname, provctx); \ } KDF_NEWCTX(tls1_prf, "TLS1-PRF") KDF_NEWCTX(hkdf, "HKDF") KDF_NEWCTX(scrypt, "SCRYPT") static int kdf_init(void *vpkdfctx, void *vkdf, const OSSL_PARAM params[]) { PROV_KDF_CTX *pkdfctx = (PROV_KDF_CTX *)vpkdfctx; if (!ossl_prov_is_running() || pkdfctx == NULL || vkdf == NULL || !ossl_kdf_data_up_ref(vkdf)) return 0; pkdfctx->kdfdata = vkdf; return kdf_set_ctx_params(pkdfctx, params); } static int kdf_derive(void *vpkdfctx, unsigned char *secret, size_t *secretlen, size_t outlen) { PROV_KDF_CTX *pkdfctx = (PROV_KDF_CTX *)vpkdfctx; size_t kdfsize; int ret; if (!ossl_prov_is_running()) return 0; kdfsize = EVP_KDF_CTX_get_kdf_size(pkdfctx->kdfctx); if (secret == NULL) { *secretlen = kdfsize; return 1; } if (kdfsize != SIZE_MAX) { if (outlen < kdfsize) { ERR_raise(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL); return 0; } outlen = kdfsize; } ret = EVP_KDF_derive(pkdfctx->kdfctx, secret, outlen, NULL); if (ret <= 0) return 0; *secretlen = outlen; return 1; } static void kdf_freectx(void *vpkdfctx) { PROV_KDF_CTX *pkdfctx = (PROV_KDF_CTX *)vpkdfctx; EVP_KDF_CTX_free(pkdfctx->kdfctx); ossl_kdf_data_free(pkdfctx->kdfdata); OPENSSL_free(pkdfctx); } static void *kdf_dupctx(void *vpkdfctx) { PROV_KDF_CTX *srcctx = (PROV_KDF_CTX *)vpkdfctx; PROV_KDF_CTX *dstctx; if (!ossl_prov_is_running()) return NULL; dstctx = OPENSSL_zalloc(sizeof(*srcctx)); if (dstctx == NULL) return NULL; *dstctx = *srcctx; dstctx->kdfctx = EVP_KDF_CTX_dup(srcctx->kdfctx); if (dstctx->kdfctx == NULL) { OPENSSL_free(dstctx); return NULL; } if (!ossl_kdf_data_up_ref(dstctx->kdfdata)) { EVP_KDF_CTX_free(dstctx->kdfctx); OPENSSL_free(dstctx); return NULL; } return dstctx; } static int kdf_set_ctx_params(void *vpkdfctx, const OSSL_PARAM params[]) { PROV_KDF_CTX *pkdfctx = (PROV_KDF_CTX *)vpkdfctx; return EVP_KDF_CTX_set_params(pkdfctx->kdfctx, params); } static int kdf_get_ctx_params(void *vpkdfctx, OSSL_PARAM params[]) { PROV_KDF_CTX *pkdfctx = (PROV_KDF_CTX *)vpkdfctx; return EVP_KDF_CTX_get_params(pkdfctx->kdfctx, params); } static const OSSL_PARAM *kdf_settable_ctx_params(ossl_unused void *vpkdfctx, void *provctx, const char *kdfname) { EVP_KDF *kdf = EVP_KDF_fetch(PROV_LIBCTX_OF(provctx), kdfname, NULL); const OSSL_PARAM *params; if (kdf == NULL) return NULL; params = EVP_KDF_settable_ctx_params(kdf); EVP_KDF_free(kdf); return params; } #define KDF_SETTABLE_CTX_PARAMS(funcname, kdfname) \ static const OSSL_PARAM *kdf_##funcname##_settable_ctx_params(void *vpkdfctx, \ void *provctx) \ { \ return kdf_settable_ctx_params(vpkdfctx, provctx, kdfname); \ } KDF_SETTABLE_CTX_PARAMS(tls1_prf, "TLS1-PRF") KDF_SETTABLE_CTX_PARAMS(hkdf, "HKDF") KDF_SETTABLE_CTX_PARAMS(scrypt, "SCRYPT") static const OSSL_PARAM *kdf_gettable_ctx_params(ossl_unused void *vpkdfctx, void *provctx, const char *kdfname) { EVP_KDF *kdf = EVP_KDF_fetch(PROV_LIBCTX_OF(provctx), kdfname, NULL); const OSSL_PARAM *params; if (kdf == NULL) return NULL; params = EVP_KDF_gettable_ctx_params(kdf); EVP_KDF_free(kdf); return params; } #define KDF_GETTABLE_CTX_PARAMS(funcname, kdfname) \ static const OSSL_PARAM *kdf_##funcname##_gettable_ctx_params(void *vpkdfctx, \ void *provctx) \ { \ return kdf_gettable_ctx_params(vpkdfctx, provctx, kdfname); \ } KDF_GETTABLE_CTX_PARAMS(tls1_prf, "TLS1-PRF") KDF_GETTABLE_CTX_PARAMS(hkdf, "HKDF") KDF_GETTABLE_CTX_PARAMS(scrypt, "SCRYPT") #define KDF_KEYEXCH_FUNCTIONS(funcname) \ const OSSL_DISPATCH ossl_kdf_##funcname##_keyexch_functions[] = { \ { OSSL_FUNC_KEYEXCH_NEWCTX, (void (*)(void))kdf_##funcname##_newctx }, \ { OSSL_FUNC_KEYEXCH_INIT, (void (*)(void))kdf_init }, \ { OSSL_FUNC_KEYEXCH_DERIVE, (void (*)(void))kdf_derive }, \ { OSSL_FUNC_KEYEXCH_FREECTX, (void (*)(void))kdf_freectx }, \ { OSSL_FUNC_KEYEXCH_DUPCTX, (void (*)(void))kdf_dupctx }, \ { OSSL_FUNC_KEYEXCH_SET_CTX_PARAMS, (void (*)(void))kdf_set_ctx_params }, \ { OSSL_FUNC_KEYEXCH_GET_CTX_PARAMS, (void (*)(void))kdf_get_ctx_params }, \ { OSSL_FUNC_KEYEXCH_SETTABLE_CTX_PARAMS, \ (void (*)(void))kdf_##funcname##_settable_ctx_params }, \ { OSSL_FUNC_KEYEXCH_GETTABLE_CTX_PARAMS, \ (void (*)(void))kdf_##funcname##_gettable_ctx_params }, \ OSSL_DISPATCH_END \ }; KDF_KEYEXCH_FUNCTIONS(tls1_prf) KDF_KEYEXCH_FUNCTIONS(hkdf) KDF_KEYEXCH_FUNCTIONS(scrypt) /* * Copyright 2020-2023 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy * in the file LICENSE in the source distribution or at * https://www.openssl.org/source/license.html */ #include #include #include "internal/refcount.h" struct kdf_data_st { OSSL_LIB_CTX *libctx; CRYPTO_REF_COUNT refcnt; }; typedef struct kdf_data_st KDF_DATA; KDF_DATA *ossl_kdf_data_new(void *provctx); void ossl_kdf_data_free(KDF_DATA *kdfdata); int ossl_kdf_data_up_ref(KDF_DATA *kdfdata); # Change Log ## [Unreleased] ## [v0.9.111] - 2025-11-07 ### Added * Added bindings to `EVP_MAC` APIs. * Added bindings to `ASN1_GENERALIZEDTIME_new` and `ASN1_GENERALIZEDTIME_set_string`. ## [v0.9.110] - 2025-10-14 ### Added * Added support for LibreSSL 4.2.0. * Added bindings to many OpenSSL APIs. ### Changed * Bumped bindgen to 0.72.0. * Bumped MSRV to 1.70. ### Fixed * Fixed missing `__off_t` on NetBSD 10. * Fixed building with `OPENSSL_NO_COMP`. * Fixed building with `OPENSSL_NO_SRTP`. * Fixed finding OpenSSL on AIX. ### Removed * Removed support for OpenSSL <1.0.2. * Removed support for LibreSSL <3.5. ## [v0.9.109] - 2025-05-28 ### Fixed * Fixed building with `vcpkg`, a statically linked OpenSSL, and rust 1.87.0. * Fixed building on the latest BoringSSL. ## [v0.9.108] - 2025-04-30 ### Added * Added support for LibreSSL 4.1.x. ## [v0.9.107] - 2025-04-04 ### Added * Support for building with AWS-LC. ## [v0.9.106] - 2025-02-15 ### Added * Support building with `OPENSSL_NO_RC2`. * Exposed `EVP_rc2_cbc` and `EVP_rc2_40_cbc`. ## [v0.9.105] - 2025-02-02 ### Added * Added `DTLS_server_method` and `DTLS_client_method`. ## [v0.9.104] - 2024-10-15 ### Added * Added support for LibreSSL 4.0.x. * Added `EVP_KDF_*` and `EVP_KDF_CTX_*` bindings. * Added `EVP_DigestSqueeze`. * Added `OSSL_PARAM_construct_octet_string`. * Added `OSSL_set_max_threads` and `OSSL_get_max_threads`. ### Changed * `openssl-sys` is now a 2021 edition crate * Explicitly specify the MSRV in `Cargo.toml` * Raised the `bindgen` (optional) dependency from 0.65 to 0.69 ## [v0.9.103] - 2024-07-20 ### Added * Added several functions and constants for datagram `BIO`s. * Added `EVP_PKEY_set1_DSA`, `EVP_PKEY_set1_DH`, and `EVP_PKEY_set1_EC_KEY`. * Added several functions related to QUIC support. ## [v0.9.102] - 2024-03-28 ### Added * Added support for LibreSSL 3.9.x. ## [v0.9.101] - 2024-02-21 ### Fixed * Fixed a bug where, when building with the `vendored` feature, this crate always needed to be rebuilt. ## [v0.9.100] - 2024-02-19 ### Added * Added `OSSL_PARAM`, `OSSL_PARAM_construct_uint` , `OSSL_PARAM_construct_end`. * Added `EVP_PKEY_CTX_set_params` and `EVP_PKEY_CTX_get_params`. * Added `X509_alias_get0`. * Added `EVP_default_properties_enable_fips`. ## [v0.9.99] - 2024-01-19 ### Added * On macOS added Homebrew's `openssl@3.0` to the list of candidates to build against. * `NID_brainpoolP256r1`, `NID_brainpoolP320r1`, `NID_brainpoolP384r1`, and `NID_brainpoolP512r1` are now available on LibreSSL. ### Changed * `X509_PURPOSE` is now opaque on LibreSSL 3.9.0+. ## [v0.9.98] - 2023-12-22 ### Added * Added `RAND_priv_bytes`. * Added `NID_brainpoolP320r1`. ### Changed * `X509_PURPOSE_get0` now returns a `const` pointer on LibreSSL 3.9.0+. * `X509V3_EXT_add_alias` is removed on LibreSSL 3.9.0+. ## [v0.9.97] - 2023-12-04 ### Changed * libatomic is no longer dynamically linked for 32 bit ARM targets. ### Added * Added `SSL_read_ex`, `SSL_peek_ex`, and `SSL_write_ex`. ## [v0.9.96] - 2023-11-22 ### Changed * `EVP_chacha20` is now available on LibreSSL ### Added * Added `EVP_des_ede3_ecb`, `EVP_des_ede3_cfb8`, `EVP_des_ede3_ofb`, `EVP_camellia_128_ofb`, `EVP_camellia_192_ofb`, `EVP_camellia_256_ofb`, `EVP_cast5_ofb`, `EVP_idea_ofb` * Added `X509_STORE_get1_all_certs` * Added `SSL_CTRL_GET_PEER_TMP_KEY`, `SSL_CTRL_GET_TMP_KEY`, `SSL_get_peer_tmp_key`, `SSL_get_tmp_key` ## [v0.9.95] - 2023-11-03 ### Changed * Fixed the availability of `EVP_PKEY_RSA_PSS` on OpenSSL ### Added * Added support for LibreSSL 3.8.x. * Added `NID_chacha20_poly1305` ## [v0.9.94] - 2023-11-01 ### Changed * `X509_ALGOR` is now opaque on new LibreSSL releases ### Added * Added support for building with `OPENSSL_NO_SCRYPT` * Added `EVP_PKEY_RSA_PSS` and `EVP_PKEY_DHX` * Functions and constants for using HKDF `EVP_PKEY` are now available on LibreSSL. * Added `SSL_CTX_set_security_level`, `SSL_set_security_level`, `SSL_CTX_get_security_level`, `SSL_get_security_level` * Added `X509_check_host`, `X509_check_email`, `X509_check_ip`, `X509_check_ip_asc` ## [v0.9.93] - 2023-09-04 ### Changed * The `vendored` Cargo feature now builds OpenSSL 3.1, as 1.1.1 is reaching its EOL. ### Added * Added support for LibreSSL 3.8.1. ## [v0.9.92] - 2023-08-27 ### Added * Added `EVP_CIPHER_CTX_copy` * Expose `EVP_chacha20_poly1305` on LibreSSL * Added `X509_VERIFY_PARAM_set1_email` ## [v0.9.91] - 2023-08-06 ### Added * Expose `poly1305_state`, `CRYPTO_poly1305_init`, `CRYPTO_poly1305_update`, and `CRYPTO_poly1305_finish` on BoringSSL and LibreSSL. * Fix detection of libraries on OpenBSD. * Added `EC_POINT_point2hex` and `EC_POINT_hex2point`. * Added `EVP_PKEY_verify_recover_init`, `EVP_PKEY_verify_recover`, and `EVP_PKEY_CTX_set_signature_md`. * Added `EVP_CIPHER_CTX_FLAG_WRAP_ALLOW` and `EVP_CTX_set_flags`. * Added `BN_mod_sqrt`. ## [v0.9.90] - 2023-06-20 ### Fixed * Fixed compilation with BoringSSL when building with the bindgen CLI. ## [v0.9.89] - 2023-06-20 ### Fixed * Fixed compilation with recent versions of BoringSSL. ### Added * Added support for detecting OpenSSL compiled with `OPENSSL_NO_OCB`. * Added `EVP_PKEY_SM2` and `NID_sm2`. * Added `EVP_PKEY_assign_RSA`, `EVP_PKEY_assign_DSA`, `EVP_PKEY_assign_DH`, and `EVP_PKEY_assign_EC_KEY`. * Added `EC_GROUP_get_asn1_flag`. * Expose `EC_POINT_get_affine_coordinates` on BoringSSL and LibreSSL. * Added `EVP_PKEY_derive_set_peer_ex`. ## [v0.9.88] - 2023-05-30 ### Added * Added support for the LibreSSL 3.8.0. * Added support for detecting `OPENSSL_NO_RC4`. * Added `OBJ_dup`. * Added `ASN1_TYPE_new`, `ASN1_TYPE_set`, `d2i_ASN1_TYPE`, and `i2d_ASN1_TYPE`. * Added `SSL_bytes_to_cipher_list`, `SSL_CTX_get_num_tickets`, and `SSL_get_num_tickets`. * Added `GENERAL_NAME_set0_othername`. * Added `X509_get_pathlen`. ## [v0.9.87] - 2023-04-24 ### Added * Added `DH_CHECK`. * Added `CMAC_CTX_new`, `CMAC_CTX_free`, `CMAC_Init`, `CMAC_Update`, `CMAC_Final`, and `CMAC_CTX_copy`. * Added `EVP_default_properties_is_fips_enabled`. * Added `X509_get0_subject_key_id`, `X509_get0_authority_key_id`, `X509_get0_authority_issuer`, and `X509_get0_authority_serial`. * Added `NID_poly1305`. ## [v0.9.86] - 2023-04-20 ### Fixed * Fixed BoringSSL support with the latest bindgen release. ### Added * Added bindings for PKCS#7 functions and more X.509 functions. ## [v0.9.85] - 2023-04-09 ### Added * Added support for LibreSSL 3.7.x. ## [v0.9.84] - 2023-04-01 ### Added * Added `ASN1_INTEGER_dup` and `ASN1_INTEGER_cmp`. * Added `stack_st_X509_NAME_ENTRY`. * Added `DIST_POINT_NAME`, `DIST_POINT`, `stack_st_DIST_POINT`, `DIST_POINT_free`, and `DIST_POINT_NAME_free`. ## [v0.9.83] - 2023-03-23 ### Fixed * Fixed version checks for LibreSSL. ### Added * Added `i2d_X509_EXTENSION`. * Added `GENERAL_NAME_new`. ## [v0.9.82] - 2023-03-19 ### Added * Added support for LibreSSL 3.7.1. * Added support for X25519 and Ed25519 on LibreSSL and BoringSSL. ## [v0.9.81] - 2023-03-14 ### Fixed Fixed builds against OpenSSL built with `no-cast`. ### Added * Added experimental bindgen support for BoringSSL. * Added `X509_VERIFY_PARAM_set_auth_level`, `X509_VERIFY_PARAM_get_auth_level`, and `X509_VERIFY_PARAM_set_purpose`. * Added `X509_PURPOSE_*` consts. * Added `X509_NAME_add_entry`. * Added `X509_load_crl_file`. * Added `SSL_set_cipher_list`, `SSL_set_ssl_method`, `SSL_use_PrivateKey_file`, `SSL_use_PrivateKey`, `SSL_use_certificate`, `SSL_use_certificate_chain_file`, `SSL_set_client_CA_list`, `SSL_add_client_CA`, and `SSL_set0_verify_cert_store`. * Added `X509_PURPOSE`, `X509_STORE_set_purpose`, and `X509_STORE_set_trust`. * Added `SSL_CTX_set_num_tickets`, `SSL_set_num_tickets`, `SSL_CTX_get_num_tickets`, and `SSL_get_num_tickets`. * Added `CMS_verify`. ### Removed * Removed an unnecessary link to libatomic for 32-bit android targets. ## [v0.9.80] - 2022-12-20 ### Fixed * Added `NO_DEPRECATED_3_0` cfg checks for more APIs. ### Added * Added support for LibreSSL 3.7.0. * Added `SSL_CTRL_CHAIN_CERT` and `SSL_add0_chain_cert`. * Added `EVP_PKEY_get_security_bits` and `EVP_PKEY_security_bits`. * Added `OSSL_PROVIDER_set_default_search_path`. ## [v0.9.79] - 2022-12-06 ### Added * Added `EVP_CIPHER_CTX_num`. * Added `X509_LOOKUP_file` and `X509_load_cert_file`. ## [v0.9.78] - 2022-11-23 ### Added * Added support for LibreSSL 3.6.x. * Added `NID_brainpoolP256r1`, `NID_brainpoolP384r1`, and `NID_brainpool512r1`. * Added `EVP_camellia_128_cfb128`, `EVP_camellia_128_ecb`, `EVP_camellia_192_cfb128`, `EVP_camellia_192_ecb`, `EVP_camellia_256_cfb128`, and `EVP_camellia_256_ecb`. * Added `EVP_cast5_cfb64` and `EVP_cast5_ecb`. * Added `EVP_idea_cfb64` and `EVP_idea_ecb`. * Added `DSA_SIG`, `d2i_DSA_SIG`, `i2d_DSA_SIG`, `DSA_SIG_new`, `DSA_SIG_free`, `DSA_SIG_get0`, and `DSA_SIG_set0`. * Added `X509_STORE_set1_param`, `X509_VERIFY_PARAM_new`, `X509_VERIFY_PARAM_set_time`, and `X509_VERIFY_PARAM_set_depth`. ## [v0.9.77] - 2022-10-22 ### Added * Added support for LibreSSL 3.6.0 * Added `assume_init`. ## [v0.9.76] - 2022-09-26 ### Added * Added `SSL_get_psk_identity_hint` and `SSL_get_psk_identity`. * Added SHA-3 NID constants. * Added `SSL_OP_PRIORITIZE_CHACHA`. * Added `X509_REQ_print`. * Added `EVP_MD_CTX_size` and `EVP_MD_CTX_get_size` * Added `EVP_MD_CTX_reset`. * Added experimental, unstable support for BoringSSL. ### Fixed * Fixed the deprecation note on `SSL_CTX_set_alpn_select_cb`. ## [v0.9.75] - 2022-07-09 ### Added * Added SM4 bindings. * Added `EC_GROUP_set_generator` and `EC_POINT_set_affine_coordinates_GFp`. ## [v0.9.74] - 2022-06-01 ### Added * Added `EVP_MD_block_size`. * Added `X509V3_EXT_add_alias`. * Added `X509_V_ERR_INVALID_CA` back when building against OpenSSL 3.0. ## [v0.9.73] - 2022-05-02 ### Added * Added support for installations that place libraries in `$OPENSSL_DIR/lib64` in addition to `$OPENSSL_DIR/lib`. * Added `X509_issuer_name_hash`. * Added `ASN1_string_set`. * Added `X509_CRL_dup`, `X509_REQ_dup`, `X509_NAME_dup`, and `X509_dup`. * Added `X509_print`. * Added support for LibreSSL 3.5.x. ## [v0.9.72] - 2021-12-11 ### Changed * Temporarily downgraded the vendored OpenSSL back to 1.1.1 due to significant performance regressions. We will move back to 3.0.0 when a future release resolves those issues. ### Added * Added `PKCS12_set_mac`. * Added `EVP_PKEY_sign_init`, `EVP_PKEY_sign`, `EVP_PKEY_verify_init`, and `EVP_PKEY_verify`. * Added support for LibreSSL 3.4.x. ## [v0.9.71] ### Fixed * Fixed linkage to static OpenSSL 3.0.0 libraries on some 32 bit Android targets. ### Added * Added support for LibreSSL 3.4.1. * Added `SSL_get_extms_support` and `SSL_CTRL_GET_EXTMS_SUPPORT`. * Added `OBJ_create`. * Added `EVP_CIPHER_CTX_get0_cipher`, `EVP_CIPHER_CTX_get_block_size`, `EVP_CIPHER_CTX_get_key_length`, `EVP_CIPHER_CTX_get_iv_length`, and `EVP_CIPHER_CTX_get_tag_length`. * Added `EVP_CIPHER_free`. * Added `EVP_CIPHER_CTX_rand_key`. * Added `OSSL_LIB_CTX_new` and `OSSL_LIB_CTX_free`. * Added `EVP_CIPHER_fetch`. * Added `EVP_MD_fetch` and `EVP_MD_free`. * Added `OPENSSL_malloc` and `OPENSSL_free`. * Added `EVP_DigestSignUpdate` and `EVP_DigestVerifyUpdate`. ## [v0.9.70] - 2021-10-31 ### Fixed * Fixed linkage to static 3.0.0 OpenSSL libraries on some 32 bit architectures. ## [v0.9.69] - 2021-10-31 ### Changed * Upgraded the vendored OpenSSL to 3.0.0. ### Added * Added support for automatic detection of Homebrew `openssl@3` installs. * Added `EVP_PKEY_Q_keygen` and `EVP_EC_gen`. ## [v0.9.68] - 2021-10-27 ### Added * Added `BN_bn2binpad`. * Added `i2d_X509_NAME` and `d2i_X509_NAME`. * Added `BN_FLG_MALLOCED`, `BN_FLG_STATIC_DATA`, `BN_FLG_CONSTTIME`, and `BN_FLG_SECURE`. * Added `BN_CTX_secure_new`, `BN_secure_new`, `BN_set_flags`, and `BN_get_flags`. ## [v0.9.67] - 2021-09-21 ### Added * Added support for LibreSSL 3.4.0 ## [v0.9.66] - 2021-08-17 ### Added * Added `EVP_seed_cbc`, `EVP_seed_cfb128`, `EVP_seed_ecb`, and `EVP_seed_ofb`. * Added `OBJ_length` and `OBJ_get0_data`. * Added `i2d_PKCS8PrivateKey_bio`. ## [v0.9.65] - 2021-06-21 ### Fixed * Restored the accidentally deleted `PEM_read_bio_X509_CRL` function. ## [v0.9.64] - 2021-06-18 ### Added * Added support for OpenSSL 3.x.x. * Added `SSL_peek`. * Added `ERR_LIB_ASN1` and `ASN1_R_HEADER_TOO_LONG`. * Added `d2i_X509_bio`. * Added `OBJ_nid2obj`. * Added `RAND_add`. * Added `SSL_CTX_set_post_handshake_auth`. * Added `COMP_get_type`. * Added `X509_get_default_cert_file_env`, `X509_get_default_cert_file`, `X509_get_default_cert_dir_env`, and `X509_get_default_cirt_dir`. ## [v0.9.63] - 2021-05-06 ### Added * Added support for LibreSSL 3.3.x. ## [v0.9.62] - 2021-04-28 ### Added * Added support for LibreSSL 3.3.2. * Added `DH_set0_key`. * Added `EC_POINT_get_affine_coordinates`. ## [v0.9.61] - 2021-03-13 ### Added * Added support for automatic detection of OpenSSL installations via pkgsrc and MacPorts on macOS. * Added various `V_ASN1_*` constants. * Added `DH_generate_parameters_ex`. * Added `EC_POINT_is_at_infinity` and `EC_POINT_is_on_curve`. * Added `EVP_CIPHER_nid`. * Added `EVP_sm3`. * Added `NID_*` constants related to SM3. * Added `PKCS7_get0_signers`. * Added `EVP_PKEY_CTX_set0_rsa_oaep_label`. * Added `ACCESS_DESCRIPTION` and `ACCESS_DESCRIPTION_free`. ## [v0.9.60] - 2020-12-24 ### Added * Added support for the default Homebrew install directory on ARM. * Added `EVP_PKEY_CTX_set_rsa_oaep_md` and `EVP_PKEY_CTRL_RSA_OAEP_MD`. ## [v0.9.59] - 2020-12-09 ### Added * Added support for LibreSSL 3.2.x, 3.3.0, and 3.3.1. * Added `DH_generate_parameters`, `DH_generate_key`, `DH_compute_key`, and `DH_size`. * Added `NID_X25519`, `NID_X448`, `EVP_PKEY_x25519` and `EVP_PKEY_x448`. * Added `OBJ_txt2obj`. * Added `d2i_PKCS7` and `i2d_PKCS7`. * Added `SRTP_AEAD_AES_128_GCM` and `SRTP_AEAD_AES_256_GCM`. ## [v0.9.58] - 2020-06-05 ### Added * Added `SSL_set_mtu`. * Added support for LibreSSL 3.2.0. * Added `PEM_read_bio_EC_PUBKEY`, `PEM_write_bio_EC_PUBKEY`, `d2i_EC_PUBKEY`, and `i2d_EC_PUBKEY`. * Added `EVP_PKEY_encrypt_init`, `EVP_PKEY_encrypt`, `EVP_PKEY_decrypt_init`, `EVP_PKEY_decrypt`, `EVP_PKEY_get_raw_public_key`, `EVP_PKEY_new_raw_public_key`, `EVP_PKEY_get_raw_private_key`, and `EVP_PKEY_new_raw_private_key`. * Added `OBJ_sn2nid`. ## [v0.9.57] - 2020-05-24 ### Added * Added support for LibreSSL 3.1.x. ## [v0.9.56] - 2020-05-07 ### Fixed * Fixed vendored builds on windows-gnu targets. ### Added * Added support for LibreSSL 3.0.0. ## [v0.9.55] - 2020-04-07 ### Fixed * Fixed windows-msvc library names when using OpenSSL from vcpkg. ### Added * If the `OPENSSL_NO_VENDOR` environment variable is set, vendoring will not be used even if enabled. * Added `SSL_CTX_get_verify_mode` and `SSL_get_verify_mode`. * Added `SSL_is_init_finished`. * Added `SSL_CTX_set_cert_store`. * Added `TLS_server_method` and `TLS_client_method`. * Added `X509_STORE_get0_objects`. * Added `X509_OBJECT_free`, `X509_OBJECT_get_type`, and `X509_OBJECT_get0_X509`. ## [v0.9.54] - 2020-01-29 ### Added * Added `BIO_CTRL_DGRAM_QUERY_MTU`. * Added `EVP_EncryptInit_ex`, `EVP_EncryptFinal_ex`, `EVP_DecryptInit_ex`, and `EVP_DecryptFinal_ex`. * Added `EVP_md_null`. * Added `EVP_PKCS82PKEY`. * Added `PKCS8_PRIV_KEY_INFO`, `d2i_PKCS8_PRIV_KEY_INFO`, and `PKCS8_PRIV_KEY_INFO_free`. * Added `SSL_OP_NO_RENEGOTIATION`. ## [v0.9.53] - 2019-11-22 ### Added * Added `ASN1_TIME_diff`. * Added `EC_GROUP_order_bits`. * Added `EVP_EncodeBlock` and `EVP_DecodeBlock`. * Added `SSL_CTRL_SET_GROUPS_LIST`, `SSL_CTRL_SET_SIGALGS_LIST`, `SSL_CTX_set1_groups_list`, and `SSL_CTX_set1_sigalgs_list`. * Added `Clone` implementations to `SHA_CTX`, `SHA256_CTX`, and `SHA512_CTX`. ## [v0.9.52] - 2019-10-19 ### Added * Added support for LibreSSL 3.0.x. ## [v0.9.51] - 2019-10-02 ### Added * Added support for LibreSSL 3.0.1. ## [v0.9.50] - 2019-10-02 ### Added * Added `CRYPTO_LOCK_EVP_PKEY`. * Added `EVP_PKEY_ED25519` and `EVP_PKEY_ED448`. * Added `EVP_DigestSign` and `EVP_DigestVerify`. * Added `EVP_PKEY_up_ref`. * Added `NID_ED25519` and `NID_ED448`. ## [v0.9.49] - 2019-08-15 ### Added * Added support for LibreSSL 3.0.0. ## [v0.9.48] - 2019-07-19 ### Added * Added `AES_wrap_key` and `AES_unwrap_key`. * Added `EC_GROUP_get_cofactor`, `EC_GROUP_get0_generator`, and `EC_POINT_dup`. * Added `EVP_aes_128_ofb`, `EVP_aes_192_ecb`, `EVP_aes_192_cbc`, `EVP_aes_192_cfb1`, `EVP_aes_192_cfb8`, `EVP_aes_192_cfb_128`, `EVP_aes_192_ctr`, `EVP_aes_192_ccm`, `EVP_aes_192_gcm`, `EVP_aes_192_ofb`, and `EVP_aes_256_ofb`. * Added `PEM_read_bio_CMS` and `PEM_write_bio_CMS`. ## [v0.9.47] - 2019-05-18 ### Added * Added `SSL_CTX_add_client_CA`. ## [v0.9.46] - 2019-05-08 ### Added * Added support for the LibreSSL 2.9.x series. ## [v0.9.45] - 2019-05-03 ### Fixed * Reverted a change to windows-gnu library names that caused regressions. ## [v0.9.44] - 2019-04-30 ### Added * The `DEP_OPENSSL_VENDORED` environment variable tells downstream build scripts if the vendored feature was enabled. * Added `EVP_SealInit`, `EVP_SealFinal`, `EVP_EncryptUpdate`, `EVP_OpenInit`, `EVP_OpenFinal`, and `EVP_DecryptUpdate`. * Added `EVP_PKEY_size`. ### Fixed * Fixed library names when targeting windows-gnu and pkg-config fails. ## [v0.9.43] - 2019-03-20 ### Added * Added `d2i_CMS_ContentInfo` and `CMS_encrypt`. * Added `X509_verify` and `X509_REQ_verify`. * Added `EVP_MD_type` and `EVP_GROUP_get_curve_name`. [Unreleased]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.111..master [v0.9.111]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.110...openssl-sys-v0.9.111 [v0.9.110]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.109...openssl-sys-v0.9.110 [v0.9.109]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.108...openssl-sys-v0.9.109 [v0.9.108]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.107...openssl-sys-v0.9.108 [v0.9.107]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.106...openssl-sys-v0.9.107 [v0.9.106]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.105...openssl-sys-v0.9.106 [v0.9.105]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.104...openssl-sys-v0.9.105 [v0.9.104]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.103...openssl-sys-v0.9.104 [v0.9.103]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.102...openssl-sys-v0.9.103 [v0.9.102]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.101...openssl-sys-v0.9.102 [v0.9.101]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.100...openssl-sys-v0.9.101 [v0.9.100]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.99...openssl-sys-v0.9.100 [v0.9.99]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.98...openssl-sys-v0.9.99 [v0.9.98]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.97...openssl-sys-v0.9.98 [v0.9.97]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.96...openssl-sys-v0.9.97 [v0.9.96]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.95...openssl-sys-v0.9.96 [v0.9.95]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.94...openssl-sys-v0.9.95 [v0.9.94]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.93...openssl-sys-v0.9.94 [v0.9.93]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.92...openssl-sys-v0.9.93 [v0.9.92]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.91...openssl-sys-v0.9.92 [v0.9.91]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.90...openssl-sys-v0.9.91 [v0.9.90]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.89...openssl-sys-v0.9.90 [v0.9.89]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.88...openssl-sys-v0.9.89 [v0.9.88]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.87...openssl-sys-v0.9.88 [v0.9.87]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.86...openssl-sys-v0.9.87 [v0.9.86]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.85...openssl-sys-v0.9.86 [v0.9.85]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.84...openssl-sys-v0.9.85 [v0.9.84]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.83...openssl-sys-v0.9.84 [v0.9.83]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.82...openssl-sys-v0.9.83 [v0.9.82]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.81...openssl-sys-v0.9.82 [v0.9.81]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.80...openssl-sys-v0.9.81 [v0.9.80]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.79...openssl-sys-v0.9.80 [v0.9.79]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.78...openssl-sys-v0.9.79 [v0.9.78]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.77...openssl-sys-v0.9.78 [v0.9.77]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.76...openssl-sys-v0.9.77 [v0.9.76]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.75...openssl-sys-v0.9.76 [v0.9.75]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.74...openssl-sys-v0.9.75 [v0.9.74]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.73...openssl-sys-v0.9.74 [v0.9.73]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.72...openssl-sys-v0.9.73 [v0.9.72]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.71...openssl-sys-v0.9.72 [v0.9.71]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.70...openssl-sys-v0.9.71 [v0.9.70]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.69...openssl-sys-v0.9.70 [v0.9.69]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.68...openssl-sys-v0.9.69 [v0.9.68]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.67...openssl-sys-v0.9.68 [v0.9.67]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.66...openssl-sys-v0.9.67 [v0.9.66]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.65...openssl-sys-v0.9.66 [v0.9.65]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.64...openssl-sys-v0.9.65 [v0.9.64]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.63...openssl-sys-v0.9.64 [v0.9.63]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.62...openssl-sys-v0.9.63 [v0.9.62]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.61...openssl-sys-v0.9.62 [v0.9.61]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.60...openssl-sys-v0.9.61 [v0.9.60]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.59...openssl-sys-v0.9.60 [v0.9.59]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.58...openssl-sys-v0.9.59 [v0.9.58]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.57...openssl-sys-v0.9.58 [v0.9.57]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.56...openssl-sys-v0.9.57 [v0.9.56]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.55...openssl-sys-v0.9.56 [v0.9.55]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.54...openssl-sys-v0.9.55 [v0.9.54]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.53...openssl-sys-v0.9.54 [v0.9.53]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.52...openssl-sys-v0.9.53 [v0.9.52]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.51...openssl-sys-v0.9.52 [v0.9.51]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.50...openssl-sys-v0.9.51 [v0.9.50]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.49...openssl-sys-v0.9.50 [v0.9.49]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.48...openssl-sys-v0.9.49 [v0.9.48]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.47...openssl-sys-v0.9.48 [v0.9.47]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.46...openssl-sys-v0.9.47 [v0.9.46]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.45...openssl-sys-v0.9.46 [v0.9.45]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.44...openssl-sys-v0.9.45 [v0.9.44]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.43...openssl-sys-v0.9.44 [v0.9.43]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.42...openssl-sys-v0.9.43 # Change Log ## [Unreleased] ## [v0.9.112] - 2026-03-11 ### Added * Added bindings for HKDF support. * Added `OSSL_PARAM_BLD_push_int`. * Added bindings for `EVP_PKEY_new_raw_public_key_ex`, `EVP_PKEY_new_raw_private_key_ex`, and `EVP_PKEY_is_a`. * Added brainpool curve NID constants. * Added NID for `AES_*_OCB`. * Unconditionally exposed `X509_NAME_dup` and other `*_dup()` functions. * Added support for pregenerated Rust bindings from AWS-LC installations. * Added support for LibreSSL 4.3.0. ### Changed * Bumped `aws-lc-sys` from 0.27 to 0.38. 0.38 includes security fixes (CVEs). ### Removed * Removed `ASN1_STRING_data` for LibreSSL 4.3.0. * Removed `X509_VERIFY_PARAM_ID` for LibreSSL 4.3.0. * Removed `ASN1_ENCODING` for LibreSSL 4.3.0. ## [v0.9.111] - 2025-11-07 ### Added * Added bindings to `EVP_MAC` APIs. * Added bindings to `ASN1_GENERALIZEDTIME_new` and `ASN1_GENERALIZEDTIME_set_string`. ## [v0.9.110] - 2025-10-14 ### Added * Added support for LibreSSL 4.2.0. * Added bindings to many OpenSSL APIs. ### Changed * Bumped bindgen to 0.72.0. * Bumped MSRV to 1.70. ### Fixed * Fixed missing `__off_t` on NetBSD 10. * Fixed building with `OPENSSL_NO_COMP`. * Fixed building with `OPENSSL_NO_SRTP`. * Fixed finding OpenSSL on AIX. ### Removed * Removed support for OpenSSL <1.0.2. * Removed support for LibreSSL <3.5. ## [v0.9.109] - 2025-05-28 ### Fixed * Fixed building with `vcpkg`, a statically linked OpenSSL, and rust 1.87.0. * Fixed building on the latest BoringSSL. ## [v0.9.108] - 2025-04-30 ### Added * Added support for LibreSSL 4.1.x. ## [v0.9.107] - 2025-04-04 ### Added * Support for building with AWS-LC. ## [v0.9.106] - 2025-02-15 ### Added * Support building with `OPENSSL_NO_RC2`. * Exposed `EVP_rc2_cbc` and `EVP_rc2_40_cbc`. ## [v0.9.105] - 2025-02-02 ### Added * Added `DTLS_server_method` and `DTLS_client_method`. ## [v0.9.104] - 2024-10-15 ### Added * Added support for LibreSSL 4.0.x. * Added `EVP_KDF_*` and `EVP_KDF_CTX_*` bindings. * Added `EVP_DigestSqueeze`. * Added `OSSL_PARAM_construct_octet_string`. * Added `OSSL_set_max_threads` and `OSSL_get_max_threads`. ### Changed * `openssl-sys` is now a 2021 edition crate * Explicitly specify the MSRV in `Cargo.toml` * Raised the `bindgen` (optional) dependency from 0.65 to 0.69 ## [v0.9.103] - 2024-07-20 ### Added * Added several functions and constants for datagram `BIO`s. * Added `EVP_PKEY_set1_DSA`, `EVP_PKEY_set1_DH`, and `EVP_PKEY_set1_EC_KEY`. * Added several functions related to QUIC support. ## [v0.9.102] - 2024-03-28 ### Added * Added support for LibreSSL 3.9.x. ## [v0.9.101] - 2024-02-21 ### Fixed * Fixed a bug where, when building with the `vendored` feature, this crate always needed to be rebuilt. ## [v0.9.100] - 2024-02-19 ### Added * Added `OSSL_PARAM`, `OSSL_PARAM_construct_uint` , `OSSL_PARAM_construct_end`. * Added `EVP_PKEY_CTX_set_params` and `EVP_PKEY_CTX_get_params`. * Added `X509_alias_get0`. * Added `EVP_default_properties_enable_fips`. ## [v0.9.99] - 2024-01-19 ### Added * On macOS added Homebrew's `openssl@3.0` to the list of candidates to build against. * `NID_brainpoolP256r1`, `NID_brainpoolP320r1`, `NID_brainpoolP384r1`, and `NID_brainpoolP512r1` are now available on LibreSSL. ### Changed * `X509_PURPOSE` is now opaque on LibreSSL 3.9.0+. ## [v0.9.98] - 2023-12-22 ### Added * Added `RAND_priv_bytes`. * Added `NID_brainpoolP320r1`. ### Changed * `X509_PURPOSE_get0` now returns a `const` pointer on LibreSSL 3.9.0+. * `X509V3_EXT_add_alias` is removed on LibreSSL 3.9.0+. ## [v0.9.97] - 2023-12-04 ### Changed * libatomic is no longer dynamically linked for 32 bit ARM targets. ### Added * Added `SSL_read_ex`, `SSL_peek_ex`, and `SSL_write_ex`. ## [v0.9.96] - 2023-11-22 ### Changed * `EVP_chacha20` is now available on LibreSSL ### Added * Added `EVP_des_ede3_ecb`, `EVP_des_ede3_cfb8`, `EVP_des_ede3_ofb`, `EVP_camellia_128_ofb`, `EVP_camellia_192_ofb`, `EVP_camellia_256_ofb`, `EVP_cast5_ofb`, `EVP_idea_ofb` * Added `X509_STORE_get1_all_certs` * Added `SSL_CTRL_GET_PEER_TMP_KEY`, `SSL_CTRL_GET_TMP_KEY`, `SSL_get_peer_tmp_key`, `SSL_get_tmp_key` ## [v0.9.95] - 2023-11-03 ### Changed * Fixed the availability of `EVP_PKEY_RSA_PSS` on OpenSSL ### Added * Added support for LibreSSL 3.8.x. * Added `NID_chacha20_poly1305` ## [v0.9.94] - 2023-11-01 ### Changed * `X509_ALGOR` is now opaque on new LibreSSL releases ### Added * Added support for building with `OPENSSL_NO_SCRYPT` * Added `EVP_PKEY_RSA_PSS` and `EVP_PKEY_DHX` * Functions and constants for using HKDF `EVP_PKEY` are now available on LibreSSL. * Added `SSL_CTX_set_security_level`, `SSL_set_security_level`, `SSL_CTX_get_security_level`, `SSL_get_security_level` * Added `X509_check_host`, `X509_check_email`, `X509_check_ip`, `X509_check_ip_asc` ## [v0.9.93] - 2023-09-04 ### Changed * The `vendored` Cargo feature now builds OpenSSL 3.1, as 1.1.1 is reaching its EOL. ### Added * Added support for LibreSSL 3.8.1. ## [v0.9.92] - 2023-08-27 ### Added * Added `EVP_CIPHER_CTX_copy` * Expose `EVP_chacha20_poly1305` on LibreSSL * Added `X509_VERIFY_PARAM_set1_email` ## [v0.9.91] - 2023-08-06 ### Added * Expose `poly1305_state`, `CRYPTO_poly1305_init`, `CRYPTO_poly1305_update`, and `CRYPTO_poly1305_finish` on BoringSSL and LibreSSL. * Fix detection of libraries on OpenBSD. * Added `EC_POINT_point2hex` and `EC_POINT_hex2point`. * Added `EVP_PKEY_verify_recover_init`, `EVP_PKEY_verify_recover`, and `EVP_PKEY_CTX_set_signature_md`. * Added `EVP_CIPHER_CTX_FLAG_WRAP_ALLOW` and `EVP_CTX_set_flags`. * Added `BN_mod_sqrt`. ## [v0.9.90] - 2023-06-20 ### Fixed * Fixed compilation with BoringSSL when building with the bindgen CLI. ## [v0.9.89] - 2023-06-20 ### Fixed * Fixed compilation with recent versions of BoringSSL. ### Added * Added support for detecting OpenSSL compiled with `OPENSSL_NO_OCB`. * Added `EVP_PKEY_SM2` and `NID_sm2`. * Added `EVP_PKEY_assign_RSA`, `EVP_PKEY_assign_DSA`, `EVP_PKEY_assign_DH`, and `EVP_PKEY_assign_EC_KEY`. * Added `EC_GROUP_get_asn1_flag`. * Expose `EC_POINT_get_affine_coordinates` on BoringSSL and LibreSSL. * Added `EVP_PKEY_derive_set_peer_ex`. ## [v0.9.88] - 2023-05-30 ### Added * Added support for the LibreSSL 3.8.0. * Added support for detecting `OPENSSL_NO_RC4`. * Added `OBJ_dup`. * Added `ASN1_TYPE_new`, `ASN1_TYPE_set`, `d2i_ASN1_TYPE`, and `i2d_ASN1_TYPE`. * Added `SSL_bytes_to_cipher_list`, `SSL_CTX_get_num_tickets`, and `SSL_get_num_tickets`. * Added `GENERAL_NAME_set0_othername`. * Added `X509_get_pathlen`. ## [v0.9.87] - 2023-04-24 ### Added * Added `DH_CHECK`. * Added `CMAC_CTX_new`, `CMAC_CTX_free`, `CMAC_Init`, `CMAC_Update`, `CMAC_Final`, and `CMAC_CTX_copy`. * Added `EVP_default_properties_is_fips_enabled`. * Added `X509_get0_subject_key_id`, `X509_get0_authority_key_id`, `X509_get0_authority_issuer`, and `X509_get0_authority_serial`. * Added `NID_poly1305`. ## [v0.9.86] - 2023-04-20 ### Fixed * Fixed BoringSSL support with the latest bindgen release. ### Added * Added bindings for PKCS#7 functions and more X.509 functions. ## [v0.9.85] - 2023-04-09 ### Added * Added support for LibreSSL 3.7.x. ## [v0.9.84] - 2023-04-01 ### Added * Added `ASN1_INTEGER_dup` and `ASN1_INTEGER_cmp`. * Added `stack_st_X509_NAME_ENTRY`. * Added `DIST_POINT_NAME`, `DIST_POINT`, `stack_st_DIST_POINT`, `DIST_POINT_free`, and `DIST_POINT_NAME_free`. ## [v0.9.83] - 2023-03-23 ### Fixed * Fixed version checks for LibreSSL. ### Added * Added `i2d_X509_EXTENSION`. * Added `GENERAL_NAME_new`. ## [v0.9.82] - 2023-03-19 ### Added * Added support for LibreSSL 3.7.1. * Added support for X25519 and Ed25519 on LibreSSL and BoringSSL. ## [v0.9.81] - 2023-03-14 ### Fixed Fixed builds against OpenSSL built with `no-cast`. ### Added * Added experimental bindgen support for BoringSSL. * Added `X509_VERIFY_PARAM_set_auth_level`, `X509_VERIFY_PARAM_get_auth_level`, and `X509_VERIFY_PARAM_set_purpose`. * Added `X509_PURPOSE_*` consts. * Added `X509_NAME_add_entry`. * Added `X509_load_crl_file`. * Added `SSL_set_cipher_list`, `SSL_set_ssl_method`, `SSL_use_PrivateKey_file`, `SSL_use_PrivateKey`, `SSL_use_certificate`, `SSL_use_certificate_chain_file`, `SSL_set_client_CA_list`, `SSL_add_client_CA`, and `SSL_set0_verify_cert_store`. * Added `X509_PURPOSE`, `X509_STORE_set_purpose`, and `X509_STORE_set_trust`. * Added `SSL_CTX_set_num_tickets`, `SSL_set_num_tickets`, `SSL_CTX_get_num_tickets`, and `SSL_get_num_tickets`. * Added `CMS_verify`. ### Removed * Removed an unnecessary link to libatomic for 32-bit android targets. ## [v0.9.80] - 2022-12-20 ### Fixed * Added `NO_DEPRECATED_3_0` cfg checks for more APIs. ### Added * Added support for LibreSSL 3.7.0. * Added `SSL_CTRL_CHAIN_CERT` and `SSL_add0_chain_cert`. * Added `EVP_PKEY_get_security_bits` and `EVP_PKEY_security_bits`. * Added `OSSL_PROVIDER_set_default_search_path`. ## [v0.9.79] - 2022-12-06 ### Added * Added `EVP_CIPHER_CTX_num`. * Added `X509_LOOKUP_file` and `X509_load_cert_file`. ## [v0.9.78] - 2022-11-23 ### Added * Added support for LibreSSL 3.6.x. * Added `NID_brainpoolP256r1`, `NID_brainpoolP384r1`, and `NID_brainpool512r1`. * Added `EVP_camellia_128_cfb128`, `EVP_camellia_128_ecb`, `EVP_camellia_192_cfb128`, `EVP_camellia_192_ecb`, `EVP_camellia_256_cfb128`, and `EVP_camellia_256_ecb`. * Added `EVP_cast5_cfb64` and `EVP_cast5_ecb`. * Added `EVP_idea_cfb64` and `EVP_idea_ecb`. * Added `DSA_SIG`, `d2i_DSA_SIG`, `i2d_DSA_SIG`, `DSA_SIG_new`, `DSA_SIG_free`, `DSA_SIG_get0`, and `DSA_SIG_set0`. * Added `X509_STORE_set1_param`, `X509_VERIFY_PARAM_new`, `X509_VERIFY_PARAM_set_time`, and `X509_VERIFY_PARAM_set_depth`. ## [v0.9.77] - 2022-10-22 ### Added * Added support for LibreSSL 3.6.0 * Added `assume_init`. ## [v0.9.76] - 2022-09-26 ### Added * Added `SSL_get_psk_identity_hint` and `SSL_get_psk_identity`. * Added SHA-3 NID constants. * Added `SSL_OP_PRIORITIZE_CHACHA`. * Added `X509_REQ_print`. * Added `EVP_MD_CTX_size` and `EVP_MD_CTX_get_size` * Added `EVP_MD_CTX_reset`. * Added experimental, unstable support for BoringSSL. ### Fixed * Fixed the deprecation note on `SSL_CTX_set_alpn_select_cb`. ## [v0.9.75] - 2022-07-09 ### Added * Added SM4 bindings. * Added `EC_GROUP_set_generator` and `EC_POINT_set_affine_coordinates_GFp`. ## [v0.9.74] - 2022-06-01 ### Added * Added `EVP_MD_block_size`. * Added `X509V3_EXT_add_alias`. * Added `X509_V_ERR_INVALID_CA` back when building against OpenSSL 3.0. ## [v0.9.73] - 2022-05-02 ### Added * Added support for installations that place libraries in `$OPENSSL_DIR/lib64` in addition to `$OPENSSL_DIR/lib`. * Added `X509_issuer_name_hash`. * Added `ASN1_string_set`. * Added `X509_CRL_dup`, `X509_REQ_dup`, `X509_NAME_dup`, and `X509_dup`. * Added `X509_print`. * Added support for LibreSSL 3.5.x. ## [v0.9.72] - 2021-12-11 ### Changed * Temporarily downgraded the vendored OpenSSL back to 1.1.1 due to significant performance regressions. We will move back to 3.0.0 when a future release resolves those issues. ### Added * Added `PKCS12_set_mac`. * Added `EVP_PKEY_sign_init`, `EVP_PKEY_sign`, `EVP_PKEY_verify_init`, and `EVP_PKEY_verify`. * Added support for LibreSSL 3.4.x. ## [v0.9.71] ### Fixed * Fixed linkage to static OpenSSL 3.0.0 libraries on some 32 bit Android targets. ### Added * Added support for LibreSSL 3.4.1. * Added `SSL_get_extms_support` and `SSL_CTRL_GET_EXTMS_SUPPORT`. * Added `OBJ_create`. * Added `EVP_CIPHER_CTX_get0_cipher`, `EVP_CIPHER_CTX_get_block_size`, `EVP_CIPHER_CTX_get_key_length`, `EVP_CIPHER_CTX_get_iv_length`, and `EVP_CIPHER_CTX_get_tag_length`. * Added `EVP_CIPHER_free`. * Added `EVP_CIPHER_CTX_rand_key`. * Added `OSSL_LIB_CTX_new` and `OSSL_LIB_CTX_free`. * Added `EVP_CIPHER_fetch`. * Added `EVP_MD_fetch` and `EVP_MD_free`. * Added `OPENSSL_malloc` and `OPENSSL_free`. * Added `EVP_DigestSignUpdate` and `EVP_DigestVerifyUpdate`. ## [v0.9.70] - 2021-10-31 ### Fixed * Fixed linkage to static 3.0.0 OpenSSL libraries on some 32 bit architectures. ## [v0.9.69] - 2021-10-31 ### Changed * Upgraded the vendored OpenSSL to 3.0.0. ### Added * Added support for automatic detection of Homebrew `openssl@3` installs. * Added `EVP_PKEY_Q_keygen` and `EVP_EC_gen`. ## [v0.9.68] - 2021-10-27 ### Added * Added `BN_bn2binpad`. * Added `i2d_X509_NAME` and `d2i_X509_NAME`. * Added `BN_FLG_MALLOCED`, `BN_FLG_STATIC_DATA`, `BN_FLG_CONSTTIME`, and `BN_FLG_SECURE`. * Added `BN_CTX_secure_new`, `BN_secure_new`, `BN_set_flags`, and `BN_get_flags`. ## [v0.9.67] - 2021-09-21 ### Added * Added support for LibreSSL 3.4.0 ## [v0.9.66] - 2021-08-17 ### Added * Added `EVP_seed_cbc`, `EVP_seed_cfb128`, `EVP_seed_ecb`, and `EVP_seed_ofb`. * Added `OBJ_length` and `OBJ_get0_data`. * Added `i2d_PKCS8PrivateKey_bio`. ## [v0.9.65] - 2021-06-21 ### Fixed * Restored the accidentally deleted `PEM_read_bio_X509_CRL` function. ## [v0.9.64] - 2021-06-18 ### Added * Added support for OpenSSL 3.x.x. * Added `SSL_peek`. * Added `ERR_LIB_ASN1` and `ASN1_R_HEADER_TOO_LONG`. * Added `d2i_X509_bio`. * Added `OBJ_nid2obj`. * Added `RAND_add`. * Added `SSL_CTX_set_post_handshake_auth`. * Added `COMP_get_type`. * Added `X509_get_default_cert_file_env`, `X509_get_default_cert_file`, `X509_get_default_cert_dir_env`, and `X509_get_default_cirt_dir`. ## [v0.9.63] - 2021-05-06 ### Added * Added support for LibreSSL 3.3.x. ## [v0.9.62] - 2021-04-28 ### Added * Added support for LibreSSL 3.3.2. * Added `DH_set0_key`. * Added `EC_POINT_get_affine_coordinates`. ## [v0.9.61] - 2021-03-13 ### Added * Added support for automatic detection of OpenSSL installations via pkgsrc and MacPorts on macOS. * Added various `V_ASN1_*` constants. * Added `DH_generate_parameters_ex`. * Added `EC_POINT_is_at_infinity` and `EC_POINT_is_on_curve`. * Added `EVP_CIPHER_nid`. * Added `EVP_sm3`. * Added `NID_*` constants related to SM3. * Added `PKCS7_get0_signers`. * Added `EVP_PKEY_CTX_set0_rsa_oaep_label`. * Added `ACCESS_DESCRIPTION` and `ACCESS_DESCRIPTION_free`. ## [v0.9.60] - 2020-12-24 ### Added * Added support for the default Homebrew install directory on ARM. * Added `EVP_PKEY_CTX_set_rsa_oaep_md` and `EVP_PKEY_CTRL_RSA_OAEP_MD`. ## [v0.9.59] - 2020-12-09 ### Added * Added support for LibreSSL 3.2.x, 3.3.0, and 3.3.1. * Added `DH_generate_parameters`, `DH_generate_key`, `DH_compute_key`, and `DH_size`. * Added `NID_X25519`, `NID_X448`, `EVP_PKEY_x25519` and `EVP_PKEY_x448`. * Added `OBJ_txt2obj`. * Added `d2i_PKCS7` and `i2d_PKCS7`. * Added `SRTP_AEAD_AES_128_GCM` and `SRTP_AEAD_AES_256_GCM`. ## [v0.9.58] - 2020-06-05 ### Added * Added `SSL_set_mtu`. * Added support for LibreSSL 3.2.0. * Added `PEM_read_bio_EC_PUBKEY`, `PEM_write_bio_EC_PUBKEY`, `d2i_EC_PUBKEY`, and `i2d_EC_PUBKEY`. * Added `EVP_PKEY_encrypt_init`, `EVP_PKEY_encrypt`, `EVP_PKEY_decrypt_init`, `EVP_PKEY_decrypt`, `EVP_PKEY_get_raw_public_key`, `EVP_PKEY_new_raw_public_key`, `EVP_PKEY_get_raw_private_key`, and `EVP_PKEY_new_raw_private_key`. * Added `OBJ_sn2nid`. ## [v0.9.57] - 2020-05-24 ### Added * Added support for LibreSSL 3.1.x. ## [v0.9.56] - 2020-05-07 ### Fixed * Fixed vendored builds on windows-gnu targets. ### Added * Added support for LibreSSL 3.0.0. ## [v0.9.55] - 2020-04-07 ### Fixed * Fixed windows-msvc library names when using OpenSSL from vcpkg. ### Added * If the `OPENSSL_NO_VENDOR` environment variable is set, vendoring will not be used even if enabled. * Added `SSL_CTX_get_verify_mode` and `SSL_get_verify_mode`. * Added `SSL_is_init_finished`. * Added `SSL_CTX_set_cert_store`. * Added `TLS_server_method` and `TLS_client_method`. * Added `X509_STORE_get0_objects`. * Added `X509_OBJECT_free`, `X509_OBJECT_get_type`, and `X509_OBJECT_get0_X509`. ## [v0.9.54] - 2020-01-29 ### Added * Added `BIO_CTRL_DGRAM_QUERY_MTU`. * Added `EVP_EncryptInit_ex`, `EVP_EncryptFinal_ex`, `EVP_DecryptInit_ex`, and `EVP_DecryptFinal_ex`. * Added `EVP_md_null`. * Added `EVP_PKCS82PKEY`. * Added `PKCS8_PRIV_KEY_INFO`, `d2i_PKCS8_PRIV_KEY_INFO`, and `PKCS8_PRIV_KEY_INFO_free`. * Added `SSL_OP_NO_RENEGOTIATION`. ## [v0.9.53] - 2019-11-22 ### Added * Added `ASN1_TIME_diff`. * Added `EC_GROUP_order_bits`. * Added `EVP_EncodeBlock` and `EVP_DecodeBlock`. * Added `SSL_CTRL_SET_GROUPS_LIST`, `SSL_CTRL_SET_SIGALGS_LIST`, `SSL_CTX_set1_groups_list`, and `SSL_CTX_set1_sigalgs_list`. * Added `Clone` implementations to `SHA_CTX`, `SHA256_CTX`, and `SHA512_CTX`. ## [v0.9.52] - 2019-10-19 ### Added * Added support for LibreSSL 3.0.x. ## [v0.9.51] - 2019-10-02 ### Added * Added support for LibreSSL 3.0.1. ## [v0.9.50] - 2019-10-02 ### Added * Added `CRYPTO_LOCK_EVP_PKEY`. * Added `EVP_PKEY_ED25519` and `EVP_PKEY_ED448`. * Added `EVP_DigestSign` and `EVP_DigestVerify`. * Added `EVP_PKEY_up_ref`. * Added `NID_ED25519` and `NID_ED448`. ## [v0.9.49] - 2019-08-15 ### Added * Added support for LibreSSL 3.0.0. ## [v0.9.48] - 2019-07-19 ### Added * Added `AES_wrap_key` and `AES_unwrap_key`. * Added `EC_GROUP_get_cofactor`, `EC_GROUP_get0_generator`, and `EC_POINT_dup`. * Added `EVP_aes_128_ofb`, `EVP_aes_192_ecb`, `EVP_aes_192_cbc`, `EVP_aes_192_cfb1`, `EVP_aes_192_cfb8`, `EVP_aes_192_cfb_128`, `EVP_aes_192_ctr`, `EVP_aes_192_ccm`, `EVP_aes_192_gcm`, `EVP_aes_192_ofb`, and `EVP_aes_256_ofb`. * Added `PEM_read_bio_CMS` and `PEM_write_bio_CMS`. ## [v0.9.47] - 2019-05-18 ### Added * Added `SSL_CTX_add_client_CA`. ## [v0.9.46] - 2019-05-08 ### Added * Added support for the LibreSSL 2.9.x series. ## [v0.9.45] - 2019-05-03 ### Fixed * Reverted a change to windows-gnu library names that caused regressions. ## [v0.9.44] - 2019-04-30 ### Added * The `DEP_OPENSSL_VENDORED` environment variable tells downstream build scripts if the vendored feature was enabled. * Added `EVP_SealInit`, `EVP_SealFinal`, `EVP_EncryptUpdate`, `EVP_OpenInit`, `EVP_OpenFinal`, and `EVP_DecryptUpdate`. * Added `EVP_PKEY_size`. ### Fixed * Fixed library names when targeting windows-gnu and pkg-config fails. ## [v0.9.43] - 2019-03-20 ### Added * Added `d2i_CMS_ContentInfo` and `CMS_encrypt`. * Added `X509_verify` and `X509_REQ_verify`. * Added `EVP_MD_type` and `EVP_GROUP_get_curve_name`. [Unreleased]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.112..master [v0.9.112]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.111...openssl-sys-v0.9.112 [v0.9.111]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.110...openssl-sys-v0.9.111 [v0.9.110]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.109...openssl-sys-v0.9.110 [v0.9.109]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.108...openssl-sys-v0.9.109 [v0.9.108]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.107...openssl-sys-v0.9.108 [v0.9.107]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.106...openssl-sys-v0.9.107 [v0.9.106]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.105...openssl-sys-v0.9.106 [v0.9.105]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.104...openssl-sys-v0.9.105 [v0.9.104]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.103...openssl-sys-v0.9.104 [v0.9.103]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.102...openssl-sys-v0.9.103 [v0.9.102]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.101...openssl-sys-v0.9.102 [v0.9.101]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.100...openssl-sys-v0.9.101 [v0.9.100]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.99...openssl-sys-v0.9.100 [v0.9.99]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.98...openssl-sys-v0.9.99 [v0.9.98]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.97...openssl-sys-v0.9.98 [v0.9.97]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.96...openssl-sys-v0.9.97 [v0.9.96]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.95...openssl-sys-v0.9.96 [v0.9.95]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.94...openssl-sys-v0.9.95 [v0.9.94]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.93...openssl-sys-v0.9.94 [v0.9.93]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.92...openssl-sys-v0.9.93 [v0.9.92]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.91...openssl-sys-v0.9.92 [v0.9.91]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.90...openssl-sys-v0.9.91 [v0.9.90]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.89...openssl-sys-v0.9.90 [v0.9.89]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.88...openssl-sys-v0.9.89 [v0.9.88]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.87...openssl-sys-v0.9.88 [v0.9.87]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.86...openssl-sys-v0.9.87 [v0.9.86]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.85...openssl-sys-v0.9.86 [v0.9.85]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.84...openssl-sys-v0.9.85 [v0.9.84]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.83...openssl-sys-v0.9.84 [v0.9.83]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.82...openssl-sys-v0.9.83 [v0.9.82]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.81...openssl-sys-v0.9.82 [v0.9.81]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.80...openssl-sys-v0.9.81 [v0.9.80]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.79...openssl-sys-v0.9.80 [v0.9.79]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.78...openssl-sys-v0.9.79 [v0.9.78]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.77...openssl-sys-v0.9.78 [v0.9.77]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.76...openssl-sys-v0.9.77 [v0.9.76]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.75...openssl-sys-v0.9.76 [v0.9.75]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.74...openssl-sys-v0.9.75 [v0.9.74]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.73...openssl-sys-v0.9.74 [v0.9.73]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.72...openssl-sys-v0.9.73 [v0.9.72]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.71...openssl-sys-v0.9.72 [v0.9.71]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.70...openssl-sys-v0.9.71 [v0.9.70]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.69...openssl-sys-v0.9.70 [v0.9.69]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.68...openssl-sys-v0.9.69 [v0.9.68]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.67...openssl-sys-v0.9.68 [v0.9.67]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.66...openssl-sys-v0.9.67 [v0.9.66]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.65...openssl-sys-v0.9.66 [v0.9.65]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.64...openssl-sys-v0.9.65 [v0.9.64]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.63...openssl-sys-v0.9.64 [v0.9.63]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.62...openssl-sys-v0.9.63 [v0.9.62]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.61...openssl-sys-v0.9.62 [v0.9.61]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.60...openssl-sys-v0.9.61 [v0.9.60]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.59...openssl-sys-v0.9.60 [v0.9.59]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.58...openssl-sys-v0.9.59 [v0.9.58]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.57...openssl-sys-v0.9.58 [v0.9.57]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.56...openssl-sys-v0.9.57 [v0.9.56]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.55...openssl-sys-v0.9.56 [v0.9.55]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.54...openssl-sys-v0.9.55 [v0.9.54]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.53...openssl-sys-v0.9.54 [v0.9.53]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.52...openssl-sys-v0.9.53 [v0.9.52]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.51...openssl-sys-v0.9.52 [v0.9.51]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.50...openssl-sys-v0.9.51 [v0.9.50]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.49...openssl-sys-v0.9.50 [v0.9.49]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.48...openssl-sys-v0.9.49 [v0.9.48]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.47...openssl-sys-v0.9.48 [v0.9.47]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.46...openssl-sys-v0.9.47 [v0.9.46]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.45...openssl-sys-v0.9.46 [v0.9.45]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.44...openssl-sys-v0.9.45 [v0.9.44]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.43...openssl-sys-v0.9.44 [v0.9.43]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.42...openssl-sys-v0.9.43 # Change Log ## [Unreleased] ## [v0.9.114] - 2026-04-19 ### Added * Added support for OpenSSL 4.x. * Added support for LibreSSL 4.3.x. ### Changed * Marked `BIO_get_mem_data` as `unsafe` on AWS-LC -- this matches other backends. * `X509_NAME_ENTRY_get_data`, `X509_NAME_ENTRY_get_object`, and `X509_CRL_get_issuer` now return `*const` pointers under `ossl400` to match OpenSSL 4. ## [v0.9.113] - 2026-04-12 ### Added * Exposed `EVP_MD_CTX_reset` on LibreSSL. ### Changed * Bumped `aws-lc-sys` to 0.39. ## [v0.9.112] - 2026-03-11 ### Added * Added bindings for HKDF support. * Added `OSSL_PARAM_BLD_push_int`. * Added bindings for `EVP_PKEY_new_raw_public_key_ex`, `EVP_PKEY_new_raw_private_key_ex`, and `EVP_PKEY_is_a`. * Added brainpool curve NID constants. * Added NID for `AES_*_OCB`. * Unconditionally exposed `X509_NAME_dup` and other `*_dup()` functions. * Added support for pregenerated Rust bindings from AWS-LC installations. * Added support for LibreSSL 4.3.0. ### Changed * Bumped `aws-lc-sys` from 0.27 to 0.38. 0.38 includes security fixes (CVEs). ### Removed * Removed `ASN1_STRING_data` for LibreSSL 4.3.0. * Removed `X509_VERIFY_PARAM_ID` for LibreSSL 4.3.0. * Removed `ASN1_ENCODING` for LibreSSL 4.3.0. ## [v0.9.111] - 2025-11-07 ### Added * Added bindings to `EVP_MAC` APIs. * Added bindings to `ASN1_GENERALIZEDTIME_new` and `ASN1_GENERALIZEDTIME_set_string`. ## [v0.9.110] - 2025-10-14 ### Added * Added support for LibreSSL 4.2.0. * Added bindings to many OpenSSL APIs. ### Changed * Bumped bindgen to 0.72.0. * Bumped MSRV to 1.70. ### Fixed * Fixed missing `__off_t` on NetBSD 10. * Fixed building with `OPENSSL_NO_COMP`. * Fixed building with `OPENSSL_NO_SRTP`. * Fixed finding OpenSSL on AIX. ### Removed * Removed support for OpenSSL <1.0.2. * Removed support for LibreSSL <3.5. ## [v0.9.109] - 2025-05-28 ### Fixed * Fixed building with `vcpkg`, a statically linked OpenSSL, and rust 1.87.0. * Fixed building on the latest BoringSSL. ## [v0.9.108] - 2025-04-30 ### Added * Added support for LibreSSL 4.1.x. ## [v0.9.107] - 2025-04-04 ### Added * Support for building with AWS-LC. ## [v0.9.106] - 2025-02-15 ### Added * Support building with `OPENSSL_NO_RC2`. * Exposed `EVP_rc2_cbc` and `EVP_rc2_40_cbc`. ## [v0.9.105] - 2025-02-02 ### Added * Added `DTLS_server_method` and `DTLS_client_method`. ## [v0.9.104] - 2024-10-15 ### Added * Added support for LibreSSL 4.0.x. * Added `EVP_KDF_*` and `EVP_KDF_CTX_*` bindings. * Added `EVP_DigestSqueeze`. * Added `OSSL_PARAM_construct_octet_string`. * Added `OSSL_set_max_threads` and `OSSL_get_max_threads`. ### Changed * `openssl-sys` is now a 2021 edition crate * Explicitly specify the MSRV in `Cargo.toml` * Raised the `bindgen` (optional) dependency from 0.65 to 0.69 ## [v0.9.103] - 2024-07-20 ### Added * Added several functions and constants for datagram `BIO`s. * Added `EVP_PKEY_set1_DSA`, `EVP_PKEY_set1_DH`, and `EVP_PKEY_set1_EC_KEY`. * Added several functions related to QUIC support. ## [v0.9.102] - 2024-03-28 ### Added * Added support for LibreSSL 3.9.x. ## [v0.9.101] - 2024-02-21 ### Fixed * Fixed a bug where, when building with the `vendored` feature, this crate always needed to be rebuilt. ## [v0.9.100] - 2024-02-19 ### Added * Added `OSSL_PARAM`, `OSSL_PARAM_construct_uint` , `OSSL_PARAM_construct_end`. * Added `EVP_PKEY_CTX_set_params` and `EVP_PKEY_CTX_get_params`. * Added `X509_alias_get0`. * Added `EVP_default_properties_enable_fips`. ## [v0.9.99] - 2024-01-19 ### Added * On macOS added Homebrew's `openssl@3.0` to the list of candidates to build against. * `NID_brainpoolP256r1`, `NID_brainpoolP320r1`, `NID_brainpoolP384r1`, and `NID_brainpoolP512r1` are now available on LibreSSL. ### Changed * `X509_PURPOSE` is now opaque on LibreSSL 3.9.0+. ## [v0.9.98] - 2023-12-22 ### Added * Added `RAND_priv_bytes`. * Added `NID_brainpoolP320r1`. ### Changed * `X509_PURPOSE_get0` now returns a `const` pointer on LibreSSL 3.9.0+. * `X509V3_EXT_add_alias` is removed on LibreSSL 3.9.0+. ## [v0.9.97] - 2023-12-04 ### Changed * libatomic is no longer dynamically linked for 32 bit ARM targets. ### Added * Added `SSL_read_ex`, `SSL_peek_ex`, and `SSL_write_ex`. ## [v0.9.96] - 2023-11-22 ### Changed * `EVP_chacha20` is now available on LibreSSL ### Added * Added `EVP_des_ede3_ecb`, `EVP_des_ede3_cfb8`, `EVP_des_ede3_ofb`, `EVP_camellia_128_ofb`, `EVP_camellia_192_ofb`, `EVP_camellia_256_ofb`, `EVP_cast5_ofb`, `EVP_idea_ofb` * Added `X509_STORE_get1_all_certs` * Added `SSL_CTRL_GET_PEER_TMP_KEY`, `SSL_CTRL_GET_TMP_KEY`, `SSL_get_peer_tmp_key`, `SSL_get_tmp_key` ## [v0.9.95] - 2023-11-03 ### Changed * Fixed the availability of `EVP_PKEY_RSA_PSS` on OpenSSL ### Added * Added support for LibreSSL 3.8.x. * Added `NID_chacha20_poly1305` ## [v0.9.94] - 2023-11-01 ### Changed * `X509_ALGOR` is now opaque on new LibreSSL releases ### Added * Added support for building with `OPENSSL_NO_SCRYPT` * Added `EVP_PKEY_RSA_PSS` and `EVP_PKEY_DHX` * Functions and constants for using HKDF `EVP_PKEY` are now available on LibreSSL. * Added `SSL_CTX_set_security_level`, `SSL_set_security_level`, `SSL_CTX_get_security_level`, `SSL_get_security_level` * Added `X509_check_host`, `X509_check_email`, `X509_check_ip`, `X509_check_ip_asc` ## [v0.9.93] - 2023-09-04 ### Changed * The `vendored` Cargo feature now builds OpenSSL 3.1, as 1.1.1 is reaching its EOL. ### Added * Added support for LibreSSL 3.8.1. ## [v0.9.92] - 2023-08-27 ### Added * Added `EVP_CIPHER_CTX_copy` * Expose `EVP_chacha20_poly1305` on LibreSSL * Added `X509_VERIFY_PARAM_set1_email` ## [v0.9.91] - 2023-08-06 ### Added * Expose `poly1305_state`, `CRYPTO_poly1305_init`, `CRYPTO_poly1305_update`, and `CRYPTO_poly1305_finish` on BoringSSL and LibreSSL. * Fix detection of libraries on OpenBSD. * Added `EC_POINT_point2hex` and `EC_POINT_hex2point`. * Added `EVP_PKEY_verify_recover_init`, `EVP_PKEY_verify_recover`, and `EVP_PKEY_CTX_set_signature_md`. * Added `EVP_CIPHER_CTX_FLAG_WRAP_ALLOW` and `EVP_CTX_set_flags`. * Added `BN_mod_sqrt`. ## [v0.9.90] - 2023-06-20 ### Fixed * Fixed compilation with BoringSSL when building with the bindgen CLI. ## [v0.9.89] - 2023-06-20 ### Fixed * Fixed compilation with recent versions of BoringSSL. ### Added * Added support for detecting OpenSSL compiled with `OPENSSL_NO_OCB`. * Added `EVP_PKEY_SM2` and `NID_sm2`. * Added `EVP_PKEY_assign_RSA`, `EVP_PKEY_assign_DSA`, `EVP_PKEY_assign_DH`, and `EVP_PKEY_assign_EC_KEY`. * Added `EC_GROUP_get_asn1_flag`. * Expose `EC_POINT_get_affine_coordinates` on BoringSSL and LibreSSL. * Added `EVP_PKEY_derive_set_peer_ex`. ## [v0.9.88] - 2023-05-30 ### Added * Added support for the LibreSSL 3.8.0. * Added support for detecting `OPENSSL_NO_RC4`. * Added `OBJ_dup`. * Added `ASN1_TYPE_new`, `ASN1_TYPE_set`, `d2i_ASN1_TYPE`, and `i2d_ASN1_TYPE`. * Added `SSL_bytes_to_cipher_list`, `SSL_CTX_get_num_tickets`, and `SSL_get_num_tickets`. * Added `GENERAL_NAME_set0_othername`. * Added `X509_get_pathlen`. ## [v0.9.87] - 2023-04-24 ### Added * Added `DH_CHECK`. * Added `CMAC_CTX_new`, `CMAC_CTX_free`, `CMAC_Init`, `CMAC_Update`, `CMAC_Final`, and `CMAC_CTX_copy`. * Added `EVP_default_properties_is_fips_enabled`. * Added `X509_get0_subject_key_id`, `X509_get0_authority_key_id`, `X509_get0_authority_issuer`, and `X509_get0_authority_serial`. * Added `NID_poly1305`. ## [v0.9.86] - 2023-04-20 ### Fixed * Fixed BoringSSL support with the latest bindgen release. ### Added * Added bindings for PKCS#7 functions and more X.509 functions. ## [v0.9.85] - 2023-04-09 ### Added * Added support for LibreSSL 3.7.x. ## [v0.9.84] - 2023-04-01 ### Added * Added `ASN1_INTEGER_dup` and `ASN1_INTEGER_cmp`. * Added `stack_st_X509_NAME_ENTRY`. * Added `DIST_POINT_NAME`, `DIST_POINT`, `stack_st_DIST_POINT`, `DIST_POINT_free`, and `DIST_POINT_NAME_free`. ## [v0.9.83] - 2023-03-23 ### Fixed * Fixed version checks for LibreSSL. ### Added * Added `i2d_X509_EXTENSION`. * Added `GENERAL_NAME_new`. ## [v0.9.82] - 2023-03-19 ### Added * Added support for LibreSSL 3.7.1. * Added support for X25519 and Ed25519 on LibreSSL and BoringSSL. ## [v0.9.81] - 2023-03-14 ### Fixed Fixed builds against OpenSSL built with `no-cast`. ### Added * Added experimental bindgen support for BoringSSL. * Added `X509_VERIFY_PARAM_set_auth_level`, `X509_VERIFY_PARAM_get_auth_level`, and `X509_VERIFY_PARAM_set_purpose`. * Added `X509_PURPOSE_*` consts. * Added `X509_NAME_add_entry`. * Added `X509_load_crl_file`. * Added `SSL_set_cipher_list`, `SSL_set_ssl_method`, `SSL_use_PrivateKey_file`, `SSL_use_PrivateKey`, `SSL_use_certificate`, `SSL_use_certificate_chain_file`, `SSL_set_client_CA_list`, `SSL_add_client_CA`, and `SSL_set0_verify_cert_store`. * Added `X509_PURPOSE`, `X509_STORE_set_purpose`, and `X509_STORE_set_trust`. * Added `SSL_CTX_set_num_tickets`, `SSL_set_num_tickets`, `SSL_CTX_get_num_tickets`, and `SSL_get_num_tickets`. * Added `CMS_verify`. ### Removed * Removed an unnecessary link to libatomic for 32-bit android targets. ## [v0.9.80] - 2022-12-20 ### Fixed * Added `NO_DEPRECATED_3_0` cfg checks for more APIs. ### Added * Added support for LibreSSL 3.7.0. * Added `SSL_CTRL_CHAIN_CERT` and `SSL_add0_chain_cert`. * Added `EVP_PKEY_get_security_bits` and `EVP_PKEY_security_bits`. * Added `OSSL_PROVIDER_set_default_search_path`. ## [v0.9.79] - 2022-12-06 ### Added * Added `EVP_CIPHER_CTX_num`. * Added `X509_LOOKUP_file` and `X509_load_cert_file`. ## [v0.9.78] - 2022-11-23 ### Added * Added support for LibreSSL 3.6.x. * Added `NID_brainpoolP256r1`, `NID_brainpoolP384r1`, and `NID_brainpool512r1`. * Added `EVP_camellia_128_cfb128`, `EVP_camellia_128_ecb`, `EVP_camellia_192_cfb128`, `EVP_camellia_192_ecb`, `EVP_camellia_256_cfb128`, and `EVP_camellia_256_ecb`. * Added `EVP_cast5_cfb64` and `EVP_cast5_ecb`. * Added `EVP_idea_cfb64` and `EVP_idea_ecb`. * Added `DSA_SIG`, `d2i_DSA_SIG`, `i2d_DSA_SIG`, `DSA_SIG_new`, `DSA_SIG_free`, `DSA_SIG_get0`, and `DSA_SIG_set0`. * Added `X509_STORE_set1_param`, `X509_VERIFY_PARAM_new`, `X509_VERIFY_PARAM_set_time`, and `X509_VERIFY_PARAM_set_depth`. ## [v0.9.77] - 2022-10-22 ### Added * Added support for LibreSSL 3.6.0 * Added `assume_init`. ## [v0.9.76] - 2022-09-26 ### Added * Added `SSL_get_psk_identity_hint` and `SSL_get_psk_identity`. * Added SHA-3 NID constants. * Added `SSL_OP_PRIORITIZE_CHACHA`. * Added `X509_REQ_print`. * Added `EVP_MD_CTX_size` and `EVP_MD_CTX_get_size` * Added `EVP_MD_CTX_reset`. * Added experimental, unstable support for BoringSSL. ### Fixed * Fixed the deprecation note on `SSL_CTX_set_alpn_select_cb`. ## [v0.9.75] - 2022-07-09 ### Added * Added SM4 bindings. * Added `EC_GROUP_set_generator` and `EC_POINT_set_affine_coordinates_GFp`. ## [v0.9.74] - 2022-06-01 ### Added * Added `EVP_MD_block_size`. * Added `X509V3_EXT_add_alias`. * Added `X509_V_ERR_INVALID_CA` back when building against OpenSSL 3.0. ## [v0.9.73] - 2022-05-02 ### Added * Added support for installations that place libraries in `$OPENSSL_DIR/lib64` in addition to `$OPENSSL_DIR/lib`. * Added `X509_issuer_name_hash`. * Added `ASN1_string_set`. * Added `X509_CRL_dup`, `X509_REQ_dup`, `X509_NAME_dup`, and `X509_dup`. * Added `X509_print`. * Added support for LibreSSL 3.5.x. ## [v0.9.72] - 2021-12-11 ### Changed * Temporarily downgraded the vendored OpenSSL back to 1.1.1 due to significant performance regressions. We will move back to 3.0.0 when a future release resolves those issues. ### Added * Added `PKCS12_set_mac`. * Added `EVP_PKEY_sign_init`, `EVP_PKEY_sign`, `EVP_PKEY_verify_init`, and `EVP_PKEY_verify`. * Added support for LibreSSL 3.4.x. ## [v0.9.71] ### Fixed * Fixed linkage to static OpenSSL 3.0.0 libraries on some 32 bit Android targets. ### Added * Added support for LibreSSL 3.4.1. * Added `SSL_get_extms_support` and `SSL_CTRL_GET_EXTMS_SUPPORT`. * Added `OBJ_create`. * Added `EVP_CIPHER_CTX_get0_cipher`, `EVP_CIPHER_CTX_get_block_size`, `EVP_CIPHER_CTX_get_key_length`, `EVP_CIPHER_CTX_get_iv_length`, and `EVP_CIPHER_CTX_get_tag_length`. * Added `EVP_CIPHER_free`. * Added `EVP_CIPHER_CTX_rand_key`. * Added `OSSL_LIB_CTX_new` and `OSSL_LIB_CTX_free`. * Added `EVP_CIPHER_fetch`. * Added `EVP_MD_fetch` and `EVP_MD_free`. * Added `OPENSSL_malloc` and `OPENSSL_free`. * Added `EVP_DigestSignUpdate` and `EVP_DigestVerifyUpdate`. ## [v0.9.70] - 2021-10-31 ### Fixed * Fixed linkage to static 3.0.0 OpenSSL libraries on some 32 bit architectures. ## [v0.9.69] - 2021-10-31 ### Changed * Upgraded the vendored OpenSSL to 3.0.0. ### Added * Added support for automatic detection of Homebrew `openssl@3` installs. * Added `EVP_PKEY_Q_keygen` and `EVP_EC_gen`. ## [v0.9.68] - 2021-10-27 ### Added * Added `BN_bn2binpad`. * Added `i2d_X509_NAME` and `d2i_X509_NAME`. * Added `BN_FLG_MALLOCED`, `BN_FLG_STATIC_DATA`, `BN_FLG_CONSTTIME`, and `BN_FLG_SECURE`. * Added `BN_CTX_secure_new`, `BN_secure_new`, `BN_set_flags`, and `BN_get_flags`. ## [v0.9.67] - 2021-09-21 ### Added * Added support for LibreSSL 3.4.0 ## [v0.9.66] - 2021-08-17 ### Added * Added `EVP_seed_cbc`, `EVP_seed_cfb128`, `EVP_seed_ecb`, and `EVP_seed_ofb`. * Added `OBJ_length` and `OBJ_get0_data`. * Added `i2d_PKCS8PrivateKey_bio`. ## [v0.9.65] - 2021-06-21 ### Fixed * Restored the accidentally deleted `PEM_read_bio_X509_CRL` function. ## [v0.9.64] - 2021-06-18 ### Added * Added support for OpenSSL 3.x.x. * Added `SSL_peek`. * Added `ERR_LIB_ASN1` and `ASN1_R_HEADER_TOO_LONG`. * Added `d2i_X509_bio`. * Added `OBJ_nid2obj`. * Added `RAND_add`. * Added `SSL_CTX_set_post_handshake_auth`. * Added `COMP_get_type`. * Added `X509_get_default_cert_file_env`, `X509_get_default_cert_file`, `X509_get_default_cert_dir_env`, and `X509_get_default_cirt_dir`. ## [v0.9.63] - 2021-05-06 ### Added * Added support for LibreSSL 3.3.x. ## [v0.9.62] - 2021-04-28 ### Added * Added support for LibreSSL 3.3.2. * Added `DH_set0_key`. * Added `EC_POINT_get_affine_coordinates`. ## [v0.9.61] - 2021-03-13 ### Added * Added support for automatic detection of OpenSSL installations via pkgsrc and MacPorts on macOS. * Added various `V_ASN1_*` constants. * Added `DH_generate_parameters_ex`. * Added `EC_POINT_is_at_infinity` and `EC_POINT_is_on_curve`. * Added `EVP_CIPHER_nid`. * Added `EVP_sm3`. * Added `NID_*` constants related to SM3. * Added `PKCS7_get0_signers`. * Added `EVP_PKEY_CTX_set0_rsa_oaep_label`. * Added `ACCESS_DESCRIPTION` and `ACCESS_DESCRIPTION_free`. ## [v0.9.60] - 2020-12-24 ### Added * Added support for the default Homebrew install directory on ARM. * Added `EVP_PKEY_CTX_set_rsa_oaep_md` and `EVP_PKEY_CTRL_RSA_OAEP_MD`. ## [v0.9.59] - 2020-12-09 ### Added * Added support for LibreSSL 3.2.x, 3.3.0, and 3.3.1. * Added `DH_generate_parameters`, `DH_generate_key`, `DH_compute_key`, and `DH_size`. * Added `NID_X25519`, `NID_X448`, `EVP_PKEY_x25519` and `EVP_PKEY_x448`. * Added `OBJ_txt2obj`. * Added `d2i_PKCS7` and `i2d_PKCS7`. * Added `SRTP_AEAD_AES_128_GCM` and `SRTP_AEAD_AES_256_GCM`. ## [v0.9.58] - 2020-06-05 ### Added * Added `SSL_set_mtu`. * Added support for LibreSSL 3.2.0. * Added `PEM_read_bio_EC_PUBKEY`, `PEM_write_bio_EC_PUBKEY`, `d2i_EC_PUBKEY`, and `i2d_EC_PUBKEY`. * Added `EVP_PKEY_encrypt_init`, `EVP_PKEY_encrypt`, `EVP_PKEY_decrypt_init`, `EVP_PKEY_decrypt`, `EVP_PKEY_get_raw_public_key`, `EVP_PKEY_new_raw_public_key`, `EVP_PKEY_get_raw_private_key`, and `EVP_PKEY_new_raw_private_key`. * Added `OBJ_sn2nid`. ## [v0.9.57] - 2020-05-24 ### Added * Added support for LibreSSL 3.1.x. ## [v0.9.56] - 2020-05-07 ### Fixed * Fixed vendored builds on windows-gnu targets. ### Added * Added support for LibreSSL 3.0.0. ## [v0.9.55] - 2020-04-07 ### Fixed * Fixed windows-msvc library names when using OpenSSL from vcpkg. ### Added * If the `OPENSSL_NO_VENDOR` environment variable is set, vendoring will not be used even if enabled. * Added `SSL_CTX_get_verify_mode` and `SSL_get_verify_mode`. * Added `SSL_is_init_finished`. * Added `SSL_CTX_set_cert_store`. * Added `TLS_server_method` and `TLS_client_method`. * Added `X509_STORE_get0_objects`. * Added `X509_OBJECT_free`, `X509_OBJECT_get_type`, and `X509_OBJECT_get0_X509`. ## [v0.9.54] - 2020-01-29 ### Added * Added `BIO_CTRL_DGRAM_QUERY_MTU`. * Added `EVP_EncryptInit_ex`, `EVP_EncryptFinal_ex`, `EVP_DecryptInit_ex`, and `EVP_DecryptFinal_ex`. * Added `EVP_md_null`. * Added `EVP_PKCS82PKEY`. * Added `PKCS8_PRIV_KEY_INFO`, `d2i_PKCS8_PRIV_KEY_INFO`, and `PKCS8_PRIV_KEY_INFO_free`. * Added `SSL_OP_NO_RENEGOTIATION`. ## [v0.9.53] - 2019-11-22 ### Added * Added `ASN1_TIME_diff`. * Added `EC_GROUP_order_bits`. * Added `EVP_EncodeBlock` and `EVP_DecodeBlock`. * Added `SSL_CTRL_SET_GROUPS_LIST`, `SSL_CTRL_SET_SIGALGS_LIST`, `SSL_CTX_set1_groups_list`, and `SSL_CTX_set1_sigalgs_list`. * Added `Clone` implementations to `SHA_CTX`, `SHA256_CTX`, and `SHA512_CTX`. ## [v0.9.52] - 2019-10-19 ### Added * Added support for LibreSSL 3.0.x. ## [v0.9.51] - 2019-10-02 ### Added * Added support for LibreSSL 3.0.1. ## [v0.9.50] - 2019-10-02 ### Added * Added `CRYPTO_LOCK_EVP_PKEY`. * Added `EVP_PKEY_ED25519` and `EVP_PKEY_ED448`. * Added `EVP_DigestSign` and `EVP_DigestVerify`. * Added `EVP_PKEY_up_ref`. * Added `NID_ED25519` and `NID_ED448`. ## [v0.9.49] - 2019-08-15 ### Added * Added support for LibreSSL 3.0.0. ## [v0.9.48] - 2019-07-19 ### Added * Added `AES_wrap_key` and `AES_unwrap_key`. * Added `EC_GROUP_get_cofactor`, `EC_GROUP_get0_generator`, and `EC_POINT_dup`. * Added `EVP_aes_128_ofb`, `EVP_aes_192_ecb`, `EVP_aes_192_cbc`, `EVP_aes_192_cfb1`, `EVP_aes_192_cfb8`, `EVP_aes_192_cfb_128`, `EVP_aes_192_ctr`, `EVP_aes_192_ccm`, `EVP_aes_192_gcm`, `EVP_aes_192_ofb`, and `EVP_aes_256_ofb`. * Added `PEM_read_bio_CMS` and `PEM_write_bio_CMS`. ## [v0.9.47] - 2019-05-18 ### Added * Added `SSL_CTX_add_client_CA`. ## [v0.9.46] - 2019-05-08 ### Added * Added support for the LibreSSL 2.9.x series. ## [v0.9.45] - 2019-05-03 ### Fixed * Reverted a change to windows-gnu library names that caused regressions. ## [v0.9.44] - 2019-04-30 ### Added * The `DEP_OPENSSL_VENDORED` environment variable tells downstream build scripts if the vendored feature was enabled. * Added `EVP_SealInit`, `EVP_SealFinal`, `EVP_EncryptUpdate`, `EVP_OpenInit`, `EVP_OpenFinal`, and `EVP_DecryptUpdate`. * Added `EVP_PKEY_size`. ### Fixed * Fixed library names when targeting windows-gnu and pkg-config fails. ## [v0.9.43] - 2019-03-20 ### Added * Added `d2i_CMS_ContentInfo` and `CMS_encrypt`. * Added `X509_verify` and `X509_REQ_verify`. * Added `EVP_MD_type` and `EVP_GROUP_get_curve_name`. [Unreleased]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.114..master [v0.9.114]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.113...openssl-sys-v0.9.114 [v0.9.113]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.112...openssl-sys-v0.9.113 [v0.9.112]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.111...openssl-sys-v0.9.112 [v0.9.111]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.110...openssl-sys-v0.9.111 [v0.9.110]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.109...openssl-sys-v0.9.110 [v0.9.109]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.108...openssl-sys-v0.9.109 [v0.9.108]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.107...openssl-sys-v0.9.108 [v0.9.107]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.106...openssl-sys-v0.9.107 [v0.9.106]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.105...openssl-sys-v0.9.106 [v0.9.105]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.104...openssl-sys-v0.9.105 [v0.9.104]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.103...openssl-sys-v0.9.104 [v0.9.103]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.102...openssl-sys-v0.9.103 [v0.9.102]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.101...openssl-sys-v0.9.102 [v0.9.101]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.100...openssl-sys-v0.9.101 [v0.9.100]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.99...openssl-sys-v0.9.100 [v0.9.99]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.98...openssl-sys-v0.9.99 [v0.9.98]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.97...openssl-sys-v0.9.98 [v0.9.97]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.96...openssl-sys-v0.9.97 [v0.9.96]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.95...openssl-sys-v0.9.96 [v0.9.95]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.94...openssl-sys-v0.9.95 [v0.9.94]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.93...openssl-sys-v0.9.94 [v0.9.93]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.92...openssl-sys-v0.9.93 [v0.9.92]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.91...openssl-sys-v0.9.92 [v0.9.91]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.90...openssl-sys-v0.9.91 [v0.9.90]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.89...openssl-sys-v0.9.90 [v0.9.89]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.88...openssl-sys-v0.9.89 [v0.9.88]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.87...openssl-sys-v0.9.88 [v0.9.87]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.86...openssl-sys-v0.9.87 [v0.9.86]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.85...openssl-sys-v0.9.86 [v0.9.85]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.84...openssl-sys-v0.9.85 [v0.9.84]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.83...openssl-sys-v0.9.84 [v0.9.83]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.82...openssl-sys-v0.9.83 [v0.9.82]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.81...openssl-sys-v0.9.82 [v0.9.81]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.80...openssl-sys-v0.9.81 [v0.9.80]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.79...openssl-sys-v0.9.80 [v0.9.79]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.78...openssl-sys-v0.9.79 [v0.9.78]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.77...openssl-sys-v0.9.78 [v0.9.77]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.76...openssl-sys-v0.9.77 [v0.9.76]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.75...openssl-sys-v0.9.76 [v0.9.75]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.74...openssl-sys-v0.9.75 [v0.9.74]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.73...openssl-sys-v0.9.74 [v0.9.73]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.72...openssl-sys-v0.9.73 [v0.9.72]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.71...openssl-sys-v0.9.72 [v0.9.71]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.70...openssl-sys-v0.9.71 [v0.9.70]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.69...openssl-sys-v0.9.70 [v0.9.69]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.68...openssl-sys-v0.9.69 [v0.9.68]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.67...openssl-sys-v0.9.68 [v0.9.67]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.66...openssl-sys-v0.9.67 [v0.9.66]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.65...openssl-sys-v0.9.66 [v0.9.65]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.64...openssl-sys-v0.9.65 [v0.9.64]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.63...openssl-sys-v0.9.64 [v0.9.63]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.62...openssl-sys-v0.9.63 [v0.9.62]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.61...openssl-sys-v0.9.62 [v0.9.61]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.60...openssl-sys-v0.9.61 [v0.9.60]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.59...openssl-sys-v0.9.60 [v0.9.59]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.58...openssl-sys-v0.9.59 [v0.9.58]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.57...openssl-sys-v0.9.58 [v0.9.57]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.56...openssl-sys-v0.9.57 [v0.9.56]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.55...openssl-sys-v0.9.56 [v0.9.55]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.54...openssl-sys-v0.9.55 [v0.9.54]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.53...openssl-sys-v0.9.54 [v0.9.53]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.52...openssl-sys-v0.9.53 [v0.9.52]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.51...openssl-sys-v0.9.52 [v0.9.51]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.50...openssl-sys-v0.9.51 [v0.9.50]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.49...openssl-sys-v0.9.50 [v0.9.49]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.48...openssl-sys-v0.9.49 [v0.9.48]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.47...openssl-sys-v0.9.48 [v0.9.47]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.46...openssl-sys-v0.9.47 [v0.9.46]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.45...openssl-sys-v0.9.46 [v0.9.45]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.44...openssl-sys-v0.9.45 [v0.9.44]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.43...openssl-sys-v0.9.44 [v0.9.43]: https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.42...openssl-sys-v0.9.43 ### 0.17.13 **Date:** February 23, 2026. **Changelog:** - Make memory zeroization an optional feature (enabled by default - equivalent to before the change) ([#592](https://github.com/orion-rs/orion/pull/592), credits: [@achimcc](https://github.com/achimcc)). - Update `getrandom` to `0.4.1`. - Update `rand` (dev-dependency) to `0.10`. ### 0.17.12 **Date:** January 8, 2026. **Changelog:** - Add C2SP/Wycheproof test vectors to PBKDF2 implementation ([#495](https://github.com/orion-rs/orion/pull/495)). - Add support for scrypt password key-derivation function ([#493](https://github.com/orion-rs/orion/pull/493), credits: [@finfet](https://github.com/finfet)). - Bump MSRV to `1.86.0`. - Update C2SP/Wycheproof for MLKEM ([#583](https://github.com/orion-rs/orion/pull/583)). - Update dev-dependencies. - Bump copyright year to 2026. ### 0.17.11 **Date:** June 7, 2025. **Changelog:** - Bump `fiat-crypto` to `0.3.0` ([#491](https://github.com/orion-rs/orion/pull/491)). - Fix `zizmor`-reported template-injection risk in WASM CI run-path ([#490](https://github.com/orion-rs/orion/pull/490)). - Fix compiling with `cargo build --features serde,alloc --no-default-features` ([#473](https://github.com/orion-rs/orion/pull/473), credits: [@joseluis](https://github.com/joseluis)). - Additional X25519 unit-tests ([#477](https://github.com/orion-rs/orion/pull/477), [#478](https://github.com/orion-rs/orion/pull/478), credits: [@RoscoeEH](https://github.com/RoscoeEH)). - Improvements of documentation and typos ([#470](https://github.com/orion-rs/orion/pull/470), [#486](https://github.com/orion-rs/orion/pull/486), credits: [@leopardracer](https://github.com/leopardracer), [@davidjsonn](https://github.com/davidjsonn)). ### 0.17.10 **Date:** April 12, 2025. **Changelog:** - Add `encap_deterministic()` and `auth_encap_deterministic()` to `DhKem` in `hazardous::kem::x25519_hkdf_sha256::DhKem` [#458](https://github.com/orion-rs/orion/pull/458). - Make `hazardous::kem::x25519_hkdf_sha256::DhKem` available in `#![no_std]` context [#458](https://github.com/orion-rs/orion/pull/458). - Add support for HPKE (RFC 9180) [#458](https://github.com/orion-rs/orion/pull/458). - Switch to source-based code coverage [#462](https://github.com/orion-rs/orion/pull/462). - ML-KEM (internal): Cache hash of encapsulation key to save computation on multiple `encap()` operations [#464](https://github.com/orion-rs/orion/pull/464). - ML-KEM (internal): Cache encapsulation key within decapsulation key, to avoid re-computation after generation of decapsulation key [#447](https://github.com/orion-rs/orion/pull/447). ### 0.17.9 **Date:** March 1, 2025. **Changelog:** - Add support for post-quantum ML-KEM from FIPS-203 ([#431](https://github.com/orion-rs/orion/pull/431)). - Add support for hybrid KEM X-Wing (draft06 version) ([#434](https://github.com/orion-rs/orion/issues/434)). - Implement `core::error::Error` instead of the `std`-version ([#440](https://github.com/orion-rs/orion/pull/440)). - Bump MSRV to `1.81.0`. - Update CI dependencies. ### 0.17.8 **Date:** January 27, 2025. **Changelog:** - Bump `getrandom` to `0.3.0`. - Update CI dependencies. ### 0.17.7 **Date:** September 10, 2024. **Changelog:** - Add support for SHAKE128 and SHAKE256 from FIPS 202 ([#398](https://github.com/orion-rs/orion/pull/398)). - Bump copyright year to 2024. - Bump MSRV to `1.80.0`. - Update CI dependencies. - SHA2: Switch from `checked_shl(3)` to `checked_mul(8)` during `increment_mlen()` (internal) ([#376](https://github.com/orion-rs/orion/issues/376)). ### 0.17.6 **Date:** September 19, 2023. **Changelog:** - Bump MSRV to `1.70.0`. - Bump `fiat-crypto` to `0.2.1`. ### 0.17.5 **Date:** July 4, 2023. **Changelog:** - Add `experimental` crate feature. - Add support for fully-committing AEAD variants based on CTX ([#324](https://github.com/orion-rs/orion/pull/324)). - Add support for SHA3 ([#327](https://github.com/orion-rs/orion/pull/327)). - Bump MSRV to `1.64`. - Add support for DHKEM(X25519, HKDF-SHA256) from HPKE [RFC 9180](https://www.rfc-editor.org/rfc/rfc9180). ### 0.17.4 **Date:** March 4, 2023. **Changelog:** - Update Wycheproof test vectors ([#320](https://github.com/orion-rs/orion/issues/320)). - Switch from `actions-rs/tarpaulin` to `cargo-tarpaulin` ([#322](https://github.com/orion-rs/orion/pull/322)) - Update documentation for PBKDF2 and Argon2i cost parameter selection ([#316](https://github.com/orion-rs/orion/pull/316), [#321](https://github.com/orion-rs/orion/pull/321)). - Remove `cargo-audit` which was redundant to `cargo-deny` ([#311](https://github.com/orion-rs/orion/issues/311)). - Bump MSRV to `1.59.0`. - Remove `html_root_url` ([#325](https://github.com/orion-rs/orion/pull/325)). ### 0.17.3 **Date:** December 7, 2022. **Changelog:** - Fix misuse issue in (X)ChaCha20 and (X)ChaCha20-Poly1305 APIs ([#308](https://github.com/orion-rs/orion/issues/308)). - Add benchmark check test without running any actual benchmarks ([#307](https://github.com/orion-rs/orion/pull/307)). - Improve `Balek2b::new()` docs ([#303](https://github.com/orion-rs/orion/pull/303)). - Migrated to Rust Edition 2021 ([#237](https://github.com/orion-rs/orion/issues/237)). - MSRV bumped to `1.57.0` and `criterion` updated ([#299](https://github.com/orion-rs/orion/pull/299)). - Added `serde` doc feature-tag to `PasswordHash` ser/deser impls ([#297](https://github.com/orion-rs/orion/pull/297)). ### 0.17.2 **Date:** August 16, 2022. **Changelog:** - BLAKE2b `Hasher` enum now implements `Debug + PartialEq` ([#278](https://github.com/orion-rs/orion/issues/278) (by [@black-eagle17](https://github.com/black-eagle17))). - Removed unmaintained `audit-check` and replaced with `cargo-deny` ([#292](https://github.com/orion-rs/orion/pull/292)). - Allow Unicode-DFS-2016 license in dev-dependency tree ([#291](https://github.com/orion-rs/orion/pull/291)). ### 0.17.1 **Date:** January 30, 2022. **Changelog:** - Use fiat-crypto from their provided crate on crates.io ([#201](https://github.com/orion-rs/orion/issues/201)) (by [Vince Mutolo](https://github.com/vlmutolo)). - Doc-tests no longer fail if run with `cargo test --no-default-features`, as the erroneous usages have been feature-gated ([#254](https://github.com/orion-rs/orion/issues/254)). - Specify MSRV in `Cargo.toml` via `rust-version` field ([#250](https://github.com/orion-rs/orion/issues/250)). - `audit-check` GitHub Action added in addition to `cargo-audit` ([#257](https://github.com/orion-rs/orion/issues/257)). - Updated copyright year to 2022 ([#267](https://github.com/orion-rs/orion/issues/267)). - Implement `std::io::Write` for BLAKE2 and SHA2, also adding `orion::hash::digest_from_reader` ([#228](https://github.com/orion-rs/orion/pull/228)) (by [Vince Mutolo](https://github.com/vlmutolo)). - Implement Poly1305 using fiat-crypto ([#198](https://github.com/orion-rs/orion/issues/198)). - Correct capitalization of crate name in docs, README and wiki ([#259](https://github.com/orion-rs/orion/issues/259)). - Fix the benchmarking targets that failed to compile after `0.17.0` ([#270](https://github.com/orion-rs/orion/pull/270)). - Various internal cleanups and improvements. ### 0.17.0 **Date:** November 24, 2021. **Changelog:** - [Breaking change] Keyed and non-keyed BLAKE2b have been split into two separate modules (`orion::hazardous::mac::blake2b` and `orion::hazardous::hash::blake2::blake2b` respectively). The keyed now returns a `Tag` instead of `Digest` ([#208](https://github.com/orion-rs/orion/issues/208)). - [Breaking change] `Tag`s (not only those used by BLAKE2b, but all) now implement `Drop` but no longer implement `Copy` ([#208](https://github.com/orion-rs/orion/issues/208)). - [Breaking change] `seal_chunk()` used in streaming AEAD now take `StreamTag` by reference ([#212](https://github.com/orion-rs/orion/issues/212)) (by [24seconds](https://github.com/24seconds)). ### 0.16.1 **Date:** November 3, 2021. **Changelog:** - Add support for X25519 using fiat-crypto Curve25519 field arithmetic (new modules `orion::hazardous::ecc` and `orion::kex`) ([#197](https://github.com/orion-rs/orion/pull/197)). - Implement serde `Serialize` and `Deserialize` for relevant types ([#192](https://github.com/orion-rs/orion/issues/192)) (by [Vince Mutolo](https://github.com/vlmutolo)). - Fix incorrect documentation of SHA256 streaming state ([#196](https://github.com/orion-rs/orion/issues/196)). - Add `is_empty()` to newtypes ([#206](https://github.com/orion-rs/orion/pull/206)). - Add documentation for correct use of streaming AEAD API with `StreamTag::Finish` ([#139](https://github.com/orion-rs/orion/issues/139)). - Convert uses of `assert!(a == b)` to `assert_eq!(a, b)` where possible ([#210](https://github.com/orion-rs/orion/issues/210)) (by [Emmanuel Leblond](https://github.com/touilleMan)). - Derive `Clone` + `Copy` for `StreamTag` ([#211](https://github.com/orion-rs/orion/issues/211)) (by [24seconds](https://github.com/24seconds)). - Harden security of GitHub Actions CI/CD ([#200](https://github.com/orion-rs/orion/issues/200)) (by [Vince Mutolo](https://github.com/vlmutolo)). - Re-export HMAC `Tag`s used in their corresponding HKDF API ([#224](https://github.com/orion-rs/orion/issues/224)). - Fix warnings from CI jobs and bump MSRV to `1.52.0` ([#222](https://github.com/orion-rs/orion/issues/222)) ([#223](https://github.com/orion-rs/orion/issues/223)). - Update benchmarks ([#214](https://github.com/orion-rs/orion/issues/214)). - Render feature badges for API on docs.rs ([#238](https://github.com/orion-rs/orion/issues/238)). - Add new Crate Features page to wiki ([#215](https://github.com/orion-rs/orion/issues/215)). ### 0.16.0 **Date:** March 29, 2021. **Changelog:** - [Breaking change] Moved all libraries to the https://github.com/orion-rs organization and added [Vince Mutolo](https://github.com/vlmutolo) as a maintainer ([#191](https://github.com/orion-rs/orion/issues/191)). - [Breaking change] Use Argon2i parameters from PasswordHash in `pwhash::hash_password_verify()` ([#138](https://github.com/orion-rs/orion/issues/138)) (by [Vince Mutolo](https://github.com/vlmutolo)). - [Breaking change] Limit high-level, variable-length newtype's input to `isize::MAX` ([#130](https://github.com/orion-rs/orion/issues/130)). - [Breaking change] Add support for SHA256 and SHA384 ([#152](https://github.com/orion-rs/orion/issues/152), [#181](https://github.com/orion-rs/orion/pull/181), [#162](https://github.com/orion-rs/orion/issues/162), [#183](https://github.com/orion-rs/orion/pull/183)). - [Breaking change] Add support for HMAC-SHA(256/384), PBKDF2-HMAC-SHA(256/384) and HKDF-HMAC-SHA(256/384) ([#171](https://github.com/orion-rs/orion/pull/171), [#153](https://github.com/orion-rs/orion/issues/153), [#154](https://github.com/orion-rs/orion/issues/154), [#170](https://github.com/orion-rs/orion/issues/170)). - [Breaking change] Remove `orion::kdf::derive_key_verify()` and `orion::hazardous::kdf::hkdf::verify()` ([#179](https://github.com/orion-rs/orion/issues/179), [#184](https://github.com/orion-rs/orion/pull/184)). - [Breaking change] Convert `StreamTag` used in `orion::hazardous::aead::streaming` and `orion::aead::streaming` to lower-case acronyms (i.e `StreamTag::MESSAGE` -> `StreamTag::Message`) ([#190](https://github.com/orion-rs/orion/pull/190)). - Use new intra-doc links ([#134](https://github.com/orion-rs/orion/issues/134), [#185](https://github.com/orion-rs/orion/pull/185)) along with other small improvements to documentation. - Update fuzzing targets (#[182](https://github.com/orion-rs/orion/issues/182)). - Add documentation for user-awareness of potential sensitive data in out-parameters during password-hash verification ([#178](https://github.com/orion-rs/orion/issues/178), [#187](https://github.com/orion-rs/orion/pull/187)) (contrib. by [Vince Mutolo](https://github.com/vlmutolo)). - Replace `base64` dependency with `ct-codecs` to support constant-time encoding & decoding in `orion::pwhash::PasswordHash` ([#188](https://github.com/orion-rs/orion/issues/188), [#189](https://github.com/orion-rs/orion/pull/189)). - Refactor property-based tests to use the `#[quickcheck]` attribute, introducing `quickcheck_macros` as a dev-dependency ([#180](https://github.com/orion-rs/orion/pull/180)). - Bump MSRV to `1.51.0`. ### 0.15.6 **Date:** February 9, 2021. **Changelog:** - The entire CI infrastructure has been moved to GitHub Actions (removing AppVeyor and Travis CI). - Add `cargo-deny` to CI jobs ([#174](https://github.com/brycx/orion/pull/174)). - Refactoring of code related to testing and reading test vectors ([#136](https://github.com/brycx/orion/pull/136), [#143](https://github.com/brycx/orion/pull/143)). - Add new public Matrix room for discussion ([#144](https://github.com/brycx/orion/issues/144)). - Internal documentation improvements and clippy improvements (by [u5surf](https://github.com/u5surf)). - Update and correct license years ([#164](https://github.com/brycx/orion/pull/164)). - Update `quickcheck`. - Fix documentation on the `generate()` output-size for HMAC-based secret key newtypes which was incorrect ([#169](https://github.com/brycx/orion/issues/169)). - Improve the usage example in `orion::auth` ([Vince Mutolo](https://github.com/vlmutolo)). - Add GitHub issue templates for bugs and feature requests ([#155](https://github.com/brycx/orion/pull/155)). - Add `SECURITY.md`, specifying a disclosure policy, threat-model and information regarding yanking ([#163](https://github.com/brycx/orion/pull/163)). ### 0.15.5 **Date:** October 13, 2020. **Changelog:** - Documentation improvements. - Update `base64` to `0.13.0`. ### 0.15.4 **Date:** September 25, 2020. **Changelog:** - Empty plaintexts are now allowed for `hazardous::aead` ([#127](https://github.com/brycx/orion/pull/127)). - Update `getrandom` to `0.2`. - Bump MSRV to `1.41` due to bump in `subtle`. ### 0.15.3 **Date:** August 8, 2020. **Changelog:** - Documentation improvements. - Argon2i is now available in a `no_std` context, using the new `alloc` feature ([#126](https://github.com/brycx/orion/pull/126)). - `release` and `bench` profiles now use the default LTO (thin local LTO) instead of fat LTO. ### 0.15.2 **Date:** June 7, 2020. **Changelog:** - Remove old `no_std` feature from CONTRIBUTING guidelines. - Improve documentation and code around HKDFs maximum output length. - Move clippy, rustfmt and basic tests to GitHub Actions ([#122](https://github.com/brycx/orion/pull/122)). - Add random secret-key/nonce tests to AEADs and stream ciphers ([#123](https://github.com/brycx/orion/pull/123)). - Address various clippy warnings. ### 0.15.1 **Date:** March 9, 2020. **Changelog:** - Update `base64` dependency from `0.11.0` to `0.12.0`. - Documentation improvements. ### 0.15.0 **Date:** February 25, 2020. **Changelog:** - [Breaking change] `secure_cmp` and all verification functions now return `Result<(), UnknownCryptoError>` instead of `Result` ([#97](https://github.com/brycx/orion/issues/97)). - [Breaking change] HChaCha20 is no longer public. - [Breaking change] The default size of a randomly generated secret key in `hazardous::hash::blake2b` is now 32 bytes instead of 64 bytes ([#88](https://github.com/brycx/orion/pull/88#issuecomment-529423151)). - [Breaking change] `orion::auth` now uses BLAKE2b in keyed-mode as MAC ([#88](https://github.com/brycx/orion/pull/88), by [Vince Mutolo](https://github.com/vlmutolo)). - [Breaking change] The public API for structs used with incremental processing has been changed ([#106](https://github.com/brycx/orion/issues/106) and [#87](https://github.com/brycx/orion/pull/87)). - [Breaking change] Support for Argon2i(single-threaded) has been added. This is now used in the `orion::kdf` and `orion::pwhash` modules ([#113](https://github.com/brycx/orion/pull/113)). - [Breaking change] `chacha20::keystream_block` is no longer available. - [Breaking change] Uses of (X)ChaCha20Poly1305 will return an error if a `usize` to `u64` conversion would be lossy. - [Breaking change] orion is now `no_std`-compatible on stable Rust and the `no_std` and `nightly` features have been removed ([#111](https://github.com/brycx/orion/pull/111)). - libsodium-compatible, streaming AEAD based on XChaCha20Poly1305 (libsodiums "secretstream") ([#99](https://github.com/brycx/orion/pull/99) and [#108](https://github.com/brycx/orion/pull/108), by [snsmac](https://github.com/snsmac)). - Switch to Criterion for benchmarks. - Add contribution guidelines in `CONTRIBUTING.md`. - Move the changelog to a `CHANGELOG.md` file. - Add test vectors to XChaCha20. - Improvements to `secure_cmp` ([#93](https://github.com/brycx/orion/pull/93), by [snsmac](https://github.com/snsmac)) - Add explicit security warnings to `#[must_use]` public APIs that return a `Result` ([#95](https://github.com/brycx/orion/pull/95), by [Cole Lawrence](https://github.com/colelawrence)) - Cleanup in the orion-dudect tests and add tests for newtype `PartialEq<&[u8]>` impl. - Remove hardcoded docs.rs links in the documentation ([#100](https://github.com/brycx/orion/pull/100), by [Kyle Schreiber](https://github.com/finfet)). - Previously, the documentation for `util::secure_rand_bytes` stated that a panic would occur if the function failed to generate random bytes without throwing an error, which was not the case. This has been corrected. - Add `Blake2b::verify` to fuzzing targets. - orion-dudect now also tests for constant-time execution in CI on OSX and Windows platforms. - Testing constant-time execution with WASM at [orion-sidefuzz](https://github.com/brycx/orion-sidefuzz). - New testing framework which has greatly reduced the amount of duplicate testing code ([#96](https://github.com/brycx/orion/pull/96)). - Document and test MSRV ([#104](https://github.com/brycx/orion/issues/104)). - orion is now listed as an alternative to the old `rust-crypto` crate on [RustSec](https://rustsec.org/advisories/RUSTSEC-2016-0005.html). - `UnknownCryptoError` now implements `std::error::Error` for better interoperability with error-handling crates. - Added new test vectors from Wycheproof for ChaCha20Poly1305, XChaCha20Poly1305, HMAC-SHA512 and HKDF-HMAC-SHA512 ([#116](https://github.com/brycx/orion/pull/116)). - `#![deny(warnings)]` has been removed and replaced with flags in CI build jobs. - GitHub actions are used for daily security audit for the `crates-published` branch. Travis CI runs only weekly on `crates-published` branch now (daily before). - Removed inlining attributes that did not provide any performance improvements when tested with benchmarks ([commit](https://github.com/brycx/orion/commit/eea1899c0b2967c17c0ee6d05559065c3f67c7d5)). - Various performance improvements. - Various improvements to fuzzing targets. - Various improvements to tests. ### 0.14.5 [Yanked] **Date:** January 25, 2020. **Changelog:** - Fix `nightly` build breakage. ### 0.14.4 [Yanked] **Date:** August 21, 2019. **Changelog:** - Reduce the amount of allocations throughout most of orion. - Vectorize the ChaCha20 implementation providing ~6% performance improvement for (X)ChaCha20Poly1305 and ~11.5% for (X)ChaCha20. - Documentation improvements. ### 0.14.3 [Yanked] **Date:** August 1, 2019. **Changelog:** - Improved performance for ChaCha20Poly1305/XChaCha20Poly1305 when AAD is empty. - Refactoring of streaming contexts used by SHA512, BLAKE2b and Poly1305. - Implement `PartialEq<&[u8]>` for all newtypes and provide documentation for usage of such (by [Vince Mutolo](https://github.com/vlmutolo)). - Switched to stable rustfmt. - Fix use of now deprecated (since `v0.1.7`) `getrandom` errors. - Updated fuzzing targets in orion-fuzz. ### 0.14.2 [Yanked] **Date:** June 10, 2019. **Changelog:** - Improved performance on all implementations, most notably: ~30% in ChaCha20/XChaCha20 and ~20% in ChaCha20Poly1305/XChaCha20Poly1305. - Updated `zeroize` dependency. - Testing WebAssembly (`wasm32-unknown-unknown`) support in CI. - Improved documentation. ### 0.14.1 [Yanked] **Date:** May 27, 2019. **Changelog:** - Update `zeroize` dependency. - Improvements to documentation. ### 0.14.0 [Yanked] **Date:** May 4, 2019. **Changelog:** - [Breaking change] Function `as_bytes()` for public newtypes are replaced with `AsRef<>` trait implementations. This means all `as_bytes()` calls need to be replaced with `as_ref()`. - [Breaking change] The `SecretKey` for BLAKE2b is longer padded with zeroes to the length of the blocksize. Thus, the `SecretKey` no longer has a `get_original_length()` function, but the same result will be represented by the `get_length()` function instead. - [Breaking change] All calls to `as_ref()` and `unprotected_as_bytes()` return the newtypes data with what it was initialized, regardless of padding. (With the exception of HMAC) - [Breaking change] All calls to `get_length()` return the length of the newtype with what is what initialized, regardless of padding. (With the exception of HMAC) - [Breaking change] All newtypes that offer `generate()` now panic if the RNG fails to initialize of read from its source. This also means that newtype `generate()` functions, that do not take in a size parameter, no longer return a `Result`. - [Breaking change] `ValidationCryptoError` and `FinalizationCryptoError` have been removed. Though this doesn't mean that there is less information available, see [issue here](https://github.com/brycx/orion/issues/64). - [Breaking change] Support for cSHAKE256 has been dropped, also meaning orion no longer depends on tiny-keccak. 8% decrease in `unsafe` code in dependencies. - All fuzzing targets in `fuzz` that used libFuzzer have been deprecated in favor of those in [orion-fuzz](https://github.com/brycx/orion-fuzz) using honggfuzz-rs. - Improvements to fuzzing targets in orion-fuzz. - [Automated testing in CI, for constant-time execution](https://github.com/brycx/orion-dudect). - Added `From<[u8; C]>` trait implementations for C-length fixed-sized newtypes, so that the caller may avoid using `Result` when not working with slices. - [Breaking change] Module `hazardous::constants` has been removed and all types made private. Only a select number of constants have been re-exported in their respective modules. See [here for more information](https://github.com/brycx/orion/pull/72). - It is now strictly advised against using orion in debug mode, for what is meant to be production use. Using `opt-level = 0` with orion, is also advised against. See [security section](https://github.com/brycx/orion/wiki/Security#release-and-codegen-options). - `rand_os` has been replaced with `getrandom`. - Improvements to documentation examples as they no longer use `.unwrap()` but `?` instead. ### 0.13.4 [Yanked] **Date:** April 1, 2019. **Changelog:** - Fix build for latest nightly. ### 0.13.3 [Yanked] **Date:** March 31, 2019. **Changelog:** - Updated `zeroize` to `0.6.0`. - Added a small number of tests. - Improvement to constant-time interfaces ([#66](https://github.com/brycx/orion/pull/66)). ### 0.13.2 [Yanked] **Date:** March 13, 2019. **Changelog:** - PBKDF2 and BLAKE2b now panic on lengths exceeding (2^32-1) _ 64 and 2_(2^64-1), respectively. - ChaCha20 length constrictions are now equivalent to those of the RFC and panics on trying to process more than 2^32-1 keystream blocks. - Documentation improvements. - OpenSSL test vectors for BLAKE2b. **Note**: Strictly speaking, the first two changes are breaking, but because of the unlikeliness that this has an effect on anybody, they were not marked as such. ### 0.13.1 [Yanked] **Date:** February 16, 2019. **Changelog:** - Documentation improvements ([#60](https://github.com/brycx/orion/issues/60)). ### 0.13.0 [Yanked] **Date:** February 10, 2019. **Changelog:** - [Breaking change]: `orion::hazardous::hash::sha512` previously used the same `Digest` as BLAKE2b. This is no longer the case, making it impossible to specify a non fixed-length hash as `Digest` with SHA512. - [Breaking change]: `HLEN` constant renamed to `SHA512_OUTSIZE` and `SHA2_BLOCKSIZE` constant renamed to `SHA512_BLOCKSIZE`. - Added `POLY1305_OUTSIZE` constant. - Improved documentation for high-level `Password`, `SecretKey` in `hazardous`s `hmac` and `blake2b`, as well as `Password` in `pbkdf2` of `hazardous`. - Added AppVeyor builds and testing for Windows MSVC with Visual Studio 2017. ### 0.12.6 [Yanked] **Date:** February 8, 2019. **Changelog:** - Switched to zeroize in favor of clear_on_drop, such that using orion on stable Rust no longer requires a C compiler. - Fuzzing with honggfuzz-rs. ### 0.12.5 [Yanked] **Date:** February 4, 2019. **Changelog:** - Refactored HMAC and improved performance for PBKDF2 by ~50%. - Removed `byteorder` dependency using instead the endianness conversion functions that came with Rust 1.32. ### 0.12.4 [Yanked] **Date:** January 31, 2019. **Changelog:** - Fixes a bug where hashing, with BLAKE2b, over 2^64-1 bytes of data would cause an overflowing addition on debug builds. - Fixes a bug where hashing, with SHA512, over 2^64-1 bytes of data would not result in the counter being correctly incremented. - Added property-based testing, using QuickCheck, to most of the library and improved testing for the library in general. - `PartialEq` is now implemented for `orion::kdf::Salt` and `Nonce` in both `chacha20` and `xchacha20`. - Added `get_length()` for `blake2b::Digest`. - Updated fuzzing dependencies. ### 0.12.3 [Yanked] **Date:** January 29, 2019. **Changelog:** - Improved compilation time. - Bugfix [#50](https://github.com/brycx/orion/issues/50). - Update `byteorder` and `serde_json` dependencies (fixes build-failures related to `rand_core`). ### 0.12.2 [Yanked] **Date:** January 26, 2019. **Changelog:** - Fix a [bug](https://github.com/brycx/orion/issues/52) that lead to panics when using `out` parameters, with `seal()`/`open()` in `hazardous`, with a length above a given point. ### 0.12.1 [Yanked] **Date:** January 16, 2019. **Changelog:** - Switched `rand` dependency out with `rand_os`. ### 0.12.0 [Yanked] **Date:** December 29, 2018. **Changelog:** - [Breaking change]: All high-level functions now return a Result. - [Breaking change]: `Password` in `pbkdf2`, `SecretKey` and `hmac()` of `hmac` and `extract()` of `hkdf` in `hazardous` now return a Result. - [Breaking change]: Limit all `generate()` taking a `length` parameter, and `orion::kdf` calls to a length of less than `u32::max_value()` as maximum. - [Breaking change]: `orion::kdf` and `orion::pwhash` take a new `Password` parameter that is heap-allocated and returns a Result. - Removed `sha2` dependency and `ring` dev-dependency. `sha2` has been replaced with orion's own SHA512 implementation. - Added support for BLAKE2b and SHA512. - Updated to Rust 2018 Edition. - Better performance for HMAC, HKDF and PBKDF2. Thanks to Gabe Langlais for valuable feedback, especially on the API design. ### 0.11.2 [Yanked] **Date:** December 22, 2018. **Changelog:** - Security fix: [#46](https://github.com/brycx/orion/issues/46) ([RUSTSEC-2018-0012](https://rustsec.org/advisories/RUSTSEC-2018-0012.html), [CVE-2018-20999](https://nvd.nist.gov/vuln/detail/CVE-2018-20999)). - Updated subtle dependency. ### 0.11.0 [Yanked] **Date:** November 24, 2018. **Changelog:** - Fix [missing error propagation](https://github.com/brycx/orion/issues/40) in `v0.10`. ### 0.10.0 [Yanked] **Date:** November 23, 2018. **Changelog:** - New types for secret keys, nonces, tags, etc. This greatly increases misuse-resistance, usability and safety. To read more about the types and how they are implemented, see the [wiki section](https://github.com/brycx/orion/wiki/Design). - `default` API has been dropped. All high-level functionality is now accessible through these interfaces: `orion::aead`, `orion::auth`, `orion::kdf` and `orion::pwhash`. - AEAD interfaces in `hazardous` and in the high-level API (previously `default::encrypt`, etc.) have been renamed to `seal` and `open` to reflect the authentication and hopefully increase familiarity. - `finalize_to_dst()` has been dropped for HMAC. - Adaption of the `#[must_use]` attribute. - Documentation improvements. - HKDF and cSHAKE dropped from high-level API. - High-level PBKDF2 now uses 64 byte salts and 64 byte password hashes and the iteration count has been made available for users to control. - Argument `info` for HKDF and `ad` for AEADs are now `Option`. - `util::gen_rand_key` and `util::compare_ct` are now `util::secure_rand_bytes` and `util::secure_cmp`. - The password length enforcement in high-level PBKDF2 API has been removed. - All other public types (eg. `CShake`, `Hmac` and `Poly1305`) now implement `Debug`. - Using `clear_on_drop` to wipe memory in favor of `seckey`. - New features `nightly` and `no_std`. To use orion in a `no_std` context, some dependency specifications are needed. Refer to the README for these. - Major improvements to error propagation. ### 0.9.1 [Yanked] **Date:** November 11, 2018. **Changelog:** - Fix bug in double-HMAC verification in the default API - Documentation improvements ### 0.9.0 [Yanked] **Date:** November 4, 2018. **Changelog:** - Added support for HChaCha20, XChaCha20 and AEAD XChaCha20Poly1305. - The `default` APIs encryption/decryption interface has been reintroduced, now offering authenticated encryption through the AEAD XChaCha20Poly1305 implementation. - Most of the library's structure has been revamped. - Major additions to the project wiki detailing testing and some information regarding dependencies and security. - Improved fuzzing targets and overall test suite. - Documentation improvements. ### 0.8.0 [Yanked] **Date:** October 7, 2018. **Changelog:** - Added AEAD ChaCha20Poly1305 from [RFC 8439](https://tools.ietf.org/html/rfc8439) - Added `keystream_block()` public function to retrieve a keystream from `chacha20` - Added Poly1305 from [RFC 8439](https://tools.ietf.org/html/rfc8439) - `default::encrypt` and `default::decrypt` removed until orion offers XChaCha20 with Poly1305 - Documentation improvement - Updated `sha2` dependency ### 0.7.4 [Yanked] **Date:** September 27, 2018. **Changelog:** - Fix bug in PBKDF2 (See [issue](https://github.com/brycx/orion/issues/30)) ### 0.7.3 [Yanked] **Date:** September 26, 2018. **Changelog:** - Update `subtle` dependency ### 0.7.2 [Yanked] **Date:** September 26, 2018. **Changelog:** - Fuzz test improvements - Documentation improvements ### 0.7.1 [Yanked] **Date:** September 20, 2018. **Changelog:** - `default::chacha20_*` initial counter set to 0 ### 0.7.0 [Yanked] **Date:** September 17, 2018. **Changelog:** - Added `FinalizationCryptoError` which means `cshake` and `hmac` now return a `Result` on finalization and update function calls. - Added the ChaCha20 algorithm from the [RCF 8439](https://tools.ietf.org/html/rfc8439). - Fix failed builds for `no_std`. - Fix a bug where a user could call `update()` after finalization on both `cshake` and `hmac`. - `cshake_verify()` function dropped from default API. - Documentation improvement. ### 0.6.1 [Yanked] **Date:** September 5, 2018. **Changelog:** - Update `subtle` dependency ### 0.6.0 [Yanked] **Date:** August 31, 2018. **Changelog:** - Fix: `byteorder` and `rand` imported correctly for `no_std` - Add default feature `safe_api`, meaning that for `no_std`, import orion with default features disabled - Due to dependency fixing, Double HMAC Verification is now only done in the `safe_api` - `gen_rand_key` now only available with `safe_api` ### 0.5.2 [Yanked] **Date:** August 22, 2018. **Changelog:** - Replaced `byte-tools` with `byteorder` crate as `byte-tools` no longer offers the required functionality ### 0.5.1 [Yanked] **Date:** August 20, 2018. **Changelog:** - Added `reset()` function to cSHAKE - Added finalization check for HMAC and cSHAKE, making it impossible to call finalization functions twice without a reset in between. Preventing misuse. ### 0.5.0 [Yanked] **Date:** August 13, 2018. **Changelog:** - Support for SHA256, SHA384, SHA512/256 and cSHAKE128 dropped. - Support for `#![no_std]` added. - HMAC streaming API. - HMAC now uses SHA512. - Switched out `clear_on_drop` with `seckey`. - Switched out `constant_time_eq` with `subtle`. - cSHAKE streaming API. - `default::pbkdf2` no longer appends salt to password before hashing due to some problems integrating this using `#![no_std]`. This might be re-introduced later on. - `orion::core` renamed to `orion::utilities`. - cSHAKE verification function removed from hazardous. Performance improvements compared to v0.4.3: - HMAC: ~10% performance improvement - HKDF: ~5% performance improvement - PBKDF2: ~15% performance improvement - cSHAKE: ~11% performance improvement This was benchmarked on a MacBook Air 1,6 GHz Intel Core i5, 4GB. ### 0.4.3 [Yanked] **Date:** August 8, 2018. **Changelog:** - Updated dependency - Adopted faster HMAC key padding steps from `rigel` crate, avoiding allocation as before but without the `Cow` borrow - Memory and performance improvement to the PBKDF2 implementation by avoiding many useless allocations ### 0.17.14 **Date:** April 25, 2026. **Changelog:** - Add `TryFrom<&[u8]>` for `mlkem512::EncapsulationKey`, `mlkem768::EncapsulationKey` and `mlkem1024::EncapsulationKey`. - Fix compiling with the following feature-set: `--no-default-features, --features alloc,zeroize` by conditionally enabling `alloc` for `zeroize`, on `alloc`-only configurations. ### 0.17.13 **Date:** February 23, 2026. **Changelog:** - Make memory zeroization an optional feature (enabled by default - equivalent to before the change) ([#592](https://github.com/orion-rs/orion/pull/592), credits: [@achimcc](https://github.com/achimcc)). - Update `getrandom` to `0.4.1`. - Update `rand` (dev-dependency) to `0.10`. ### 0.17.12 **Date:** January 8, 2026. **Changelog:** - Add C2SP/Wycheproof test vectors to PBKDF2 implementation ([#495](https://github.com/orion-rs/orion/pull/495)). - Add support for scrypt password key-derivation function ([#493](https://github.com/orion-rs/orion/pull/493), credits: [@finfet](https://github.com/finfet)). - Bump MSRV to `1.86.0`. - Update C2SP/Wycheproof for MLKEM ([#583](https://github.com/orion-rs/orion/pull/583)). - Update dev-dependencies. - Bump copyright year to 2026. ### 0.17.11 **Date:** June 7, 2025. **Changelog:** - Bump `fiat-crypto` to `0.3.0` ([#491](https://github.com/orion-rs/orion/pull/491)). - Fix `zizmor`-reported template-injection risk in WASM CI run-path ([#490](https://github.com/orion-rs/orion/pull/490)). - Fix compiling with `cargo build --features serde,alloc --no-default-features` ([#473](https://github.com/orion-rs/orion/pull/473), credits: [@joseluis](https://github.com/joseluis)). - Additional X25519 unit-tests ([#477](https://github.com/orion-rs/orion/pull/477), [#478](https://github.com/orion-rs/orion/pull/478), credits: [@RoscoeEH](https://github.com/RoscoeEH)). - Improvements of documentation and typos ([#470](https://github.com/orion-rs/orion/pull/470), [#486](https://github.com/orion-rs/orion/pull/486), credits: [@leopardracer](https://github.com/leopardracer), [@davidjsonn](https://github.com/davidjsonn)). ### 0.17.10 **Date:** April 12, 2025. **Changelog:** - Add `encap_deterministic()` and `auth_encap_deterministic()` to `DhKem` in `hazardous::kem::x25519_hkdf_sha256::DhKem` [#458](https://github.com/orion-rs/orion/pull/458). - Make `hazardous::kem::x25519_hkdf_sha256::DhKem` available in `#![no_std]` context [#458](https://github.com/orion-rs/orion/pull/458). - Add support for HPKE (RFC 9180) [#458](https://github.com/orion-rs/orion/pull/458). - Switch to source-based code coverage [#462](https://github.com/orion-rs/orion/pull/462). - ML-KEM (internal): Cache hash of encapsulation key to save computation on multiple `encap()` operations [#464](https://github.com/orion-rs/orion/pull/464). - ML-KEM (internal): Cache encapsulation key within decapsulation key, to avoid re-computation after generation of decapsulation key [#447](https://github.com/orion-rs/orion/pull/447). ### 0.17.9 **Date:** March 1, 2025. **Changelog:** - Add support for post-quantum ML-KEM from FIPS-203 ([#431](https://github.com/orion-rs/orion/pull/431)). - Add support for hybrid KEM X-Wing (draft06 version) ([#434](https://github.com/orion-rs/orion/issues/434)). - Implement `core::error::Error` instead of the `std`-version ([#440](https://github.com/orion-rs/orion/pull/440)). - Bump MSRV to `1.81.0`. - Update CI dependencies. ### 0.17.8 **Date:** January 27, 2025. **Changelog:** - Bump `getrandom` to `0.3.0`. - Update CI dependencies. ### 0.17.7 **Date:** September 10, 2024. **Changelog:** - Add support for SHAKE128 and SHAKE256 from FIPS 202 ([#398](https://github.com/orion-rs/orion/pull/398)). - Bump copyright year to 2024. - Bump MSRV to `1.80.0`. - Update CI dependencies. - SHA2: Switch from `checked_shl(3)` to `checked_mul(8)` during `increment_mlen()` (internal) ([#376](https://github.com/orion-rs/orion/issues/376)). ### 0.17.6 **Date:** September 19, 2023. **Changelog:** - Bump MSRV to `1.70.0`. - Bump `fiat-crypto` to `0.2.1`. ### 0.17.5 **Date:** July 4, 2023. **Changelog:** - Add `experimental` crate feature. - Add support for fully-committing AEAD variants based on CTX ([#324](https://github.com/orion-rs/orion/pull/324)). - Add support for SHA3 ([#327](https://github.com/orion-rs/orion/pull/327)). - Bump MSRV to `1.64`. - Add support for DHKEM(X25519, HKDF-SHA256) from HPKE [RFC 9180](https://www.rfc-editor.org/rfc/rfc9180). ### 0.17.4 **Date:** March 4, 2023. **Changelog:** - Update Wycheproof test vectors ([#320](https://github.com/orion-rs/orion/issues/320)). - Switch from `actions-rs/tarpaulin` to `cargo-tarpaulin` ([#322](https://github.com/orion-rs/orion/pull/322)) - Update documentation for PBKDF2 and Argon2i cost parameter selection ([#316](https://github.com/orion-rs/orion/pull/316), [#321](https://github.com/orion-rs/orion/pull/321)). - Remove `cargo-audit` which was redundant to `cargo-deny` ([#311](https://github.com/orion-rs/orion/issues/311)). - Bump MSRV to `1.59.0`. - Remove `html_root_url` ([#325](https://github.com/orion-rs/orion/pull/325)). ### 0.17.3 **Date:** December 7, 2022. **Changelog:** - Fix misuse issue in (X)ChaCha20 and (X)ChaCha20-Poly1305 APIs ([#308](https://github.com/orion-rs/orion/issues/308)). - Add benchmark check test without running any actual benchmarks ([#307](https://github.com/orion-rs/orion/pull/307)). - Improve `Balek2b::new()` docs ([#303](https://github.com/orion-rs/orion/pull/303)). - Migrated to Rust Edition 2021 ([#237](https://github.com/orion-rs/orion/issues/237)). - MSRV bumped to `1.57.0` and `criterion` updated ([#299](https://github.com/orion-rs/orion/pull/299)). - Added `serde` doc feature-tag to `PasswordHash` ser/deser impls ([#297](https://github.com/orion-rs/orion/pull/297)). ### 0.17.2 **Date:** August 16, 2022. **Changelog:** - BLAKE2b `Hasher` enum now implements `Debug + PartialEq` ([#278](https://github.com/orion-rs/orion/issues/278) (by [@black-eagle17](https://github.com/black-eagle17))). - Removed unmaintained `audit-check` and replaced with `cargo-deny` ([#292](https://github.com/orion-rs/orion/pull/292)). - Allow Unicode-DFS-2016 license in dev-dependency tree ([#291](https://github.com/orion-rs/orion/pull/291)). ### 0.17.1 **Date:** January 30, 2022. **Changelog:** - Use fiat-crypto from their provided crate on crates.io ([#201](https://github.com/orion-rs/orion/issues/201)) (by [Vince Mutolo](https://github.com/vlmutolo)). - Doc-tests no longer fail if run with `cargo test --no-default-features`, as the erroneous usages have been feature-gated ([#254](https://github.com/orion-rs/orion/issues/254)). - Specify MSRV in `Cargo.toml` via `rust-version` field ([#250](https://github.com/orion-rs/orion/issues/250)). - `audit-check` GitHub Action added in addition to `cargo-audit` ([#257](https://github.com/orion-rs/orion/issues/257)). - Updated copyright year to 2022 ([#267](https://github.com/orion-rs/orion/issues/267)). - Implement `std::io::Write` for BLAKE2 and SHA2, also adding `orion::hash::digest_from_reader` ([#228](https://github.com/orion-rs/orion/pull/228)) (by [Vince Mutolo](https://github.com/vlmutolo)). - Implement Poly1305 using fiat-crypto ([#198](https://github.com/orion-rs/orion/issues/198)). - Correct capitalization of crate name in docs, README and wiki ([#259](https://github.com/orion-rs/orion/issues/259)). - Fix the benchmarking targets that failed to compile after `0.17.0` ([#270](https://github.com/orion-rs/orion/pull/270)). - Various internal cleanups and improvements. ### 0.17.0 **Date:** November 24, 2021. **Changelog:** - [Breaking change] Keyed and non-keyed BLAKE2b have been split into two separate modules (`orion::hazardous::mac::blake2b` and `orion::hazardous::hash::blake2::blake2b` respectively). The keyed now returns a `Tag` instead of `Digest` ([#208](https://github.com/orion-rs/orion/issues/208)). - [Breaking change] `Tag`s (not only those used by BLAKE2b, but all) now implement `Drop` but no longer implement `Copy` ([#208](https://github.com/orion-rs/orion/issues/208)). - [Breaking change] `seal_chunk()` used in streaming AEAD now take `StreamTag` by reference ([#212](https://github.com/orion-rs/orion/issues/212)) (by [24seconds](https://github.com/24seconds)). ### 0.16.1 **Date:** November 3, 2021. **Changelog:** - Add support for X25519 using fiat-crypto Curve25519 field arithmetic (new modules `orion::hazardous::ecc` and `orion::kex`) ([#197](https://github.com/orion-rs/orion/pull/197)). - Implement serde `Serialize` and `Deserialize` for relevant types ([#192](https://github.com/orion-rs/orion/issues/192)) (by [Vince Mutolo](https://github.com/vlmutolo)). - Fix incorrect documentation of SHA256 streaming state ([#196](https://github.com/orion-rs/orion/issues/196)). - Add `is_empty()` to newtypes ([#206](https://github.com/orion-rs/orion/pull/206)). - Add documentation for correct use of streaming AEAD API with `StreamTag::Finish` ([#139](https://github.com/orion-rs/orion/issues/139)). - Convert uses of `assert!(a == b)` to `assert_eq!(a, b)` where possible ([#210](https://github.com/orion-rs/orion/issues/210)) (by [Emmanuel Leblond](https://github.com/touilleMan)). - Derive `Clone` + `Copy` for `StreamTag` ([#211](https://github.com/orion-rs/orion/issues/211)) (by [24seconds](https://github.com/24seconds)). - Harden security of GitHub Actions CI/CD ([#200](https://github.com/orion-rs/orion/issues/200)) (by [Vince Mutolo](https://github.com/vlmutolo)). - Re-export HMAC `Tag`s used in their corresponding HKDF API ([#224](https://github.com/orion-rs/orion/issues/224)). - Fix warnings from CI jobs and bump MSRV to `1.52.0` ([#222](https://github.com/orion-rs/orion/issues/222)) ([#223](https://github.com/orion-rs/orion/issues/223)). - Update benchmarks ([#214](https://github.com/orion-rs/orion/issues/214)). - Render feature badges for API on docs.rs ([#238](https://github.com/orion-rs/orion/issues/238)). - Add new Crate Features page to wiki ([#215](https://github.com/orion-rs/orion/issues/215)). ### 0.16.0 **Date:** March 29, 2021. **Changelog:** - [Breaking change] Moved all libraries to the https://github.com/orion-rs organization and added [Vince Mutolo](https://github.com/vlmutolo) as a maintainer ([#191](https://github.com/orion-rs/orion/issues/191)). - [Breaking change] Use Argon2i parameters from PasswordHash in `pwhash::hash_password_verify()` ([#138](https://github.com/orion-rs/orion/issues/138)) (by [Vince Mutolo](https://github.com/vlmutolo)). - [Breaking change] Limit high-level, variable-length newtype's input to `isize::MAX` ([#130](https://github.com/orion-rs/orion/issues/130)). - [Breaking change] Add support for SHA256 and SHA384 ([#152](https://github.com/orion-rs/orion/issues/152), [#181](https://github.com/orion-rs/orion/pull/181), [#162](https://github.com/orion-rs/orion/issues/162), [#183](https://github.com/orion-rs/orion/pull/183)). - [Breaking change] Add support for HMAC-SHA(256/384), PBKDF2-HMAC-SHA(256/384) and HKDF-HMAC-SHA(256/384) ([#171](https://github.com/orion-rs/orion/pull/171), [#153](https://github.com/orion-rs/orion/issues/153), [#154](https://github.com/orion-rs/orion/issues/154), [#170](https://github.com/orion-rs/orion/issues/170)). - [Breaking change] Remove `orion::kdf::derive_key_verify()` and `orion::hazardous::kdf::hkdf::verify()` ([#179](https://github.com/orion-rs/orion/issues/179), [#184](https://github.com/orion-rs/orion/pull/184)). - [Breaking change] Convert `StreamTag` used in `orion::hazardous::aead::streaming` and `orion::aead::streaming` to lower-case acronyms (i.e `StreamTag::MESSAGE` -> `StreamTag::Message`) ([#190](https://github.com/orion-rs/orion/pull/190)). - Use new intra-doc links ([#134](https://github.com/orion-rs/orion/issues/134), [#185](https://github.com/orion-rs/orion/pull/185)) along with other small improvements to documentation. - Update fuzzing targets (#[182](https://github.com/orion-rs/orion/issues/182)). - Add documentation for user-awareness of potential sensitive data in out-parameters during password-hash verification ([#178](https://github.com/orion-rs/orion/issues/178), [#187](https://github.com/orion-rs/orion/pull/187)) (contrib. by [Vince Mutolo](https://github.com/vlmutolo)). - Replace `base64` dependency with `ct-codecs` to support constant-time encoding & decoding in `orion::pwhash::PasswordHash` ([#188](https://github.com/orion-rs/orion/issues/188), [#189](https://github.com/orion-rs/orion/pull/189)). - Refactor property-based tests to use the `#[quickcheck]` attribute, introducing `quickcheck_macros` as a dev-dependency ([#180](https://github.com/orion-rs/orion/pull/180)). - Bump MSRV to `1.51.0`. ### 0.15.6 **Date:** February 9, 2021. **Changelog:** - The entire CI infrastructure has been moved to GitHub Actions (removing AppVeyor and Travis CI). - Add `cargo-deny` to CI jobs ([#174](https://github.com/brycx/orion/pull/174)). - Refactoring of code related to testing and reading test vectors ([#136](https://github.com/brycx/orion/pull/136), [#143](https://github.com/brycx/orion/pull/143)). - Add new public Matrix room for discussion ([#144](https://github.com/brycx/orion/issues/144)). - Internal documentation improvements and clippy improvements (by [u5surf](https://github.com/u5surf)). - Update and correct license years ([#164](https://github.com/brycx/orion/pull/164)). - Update `quickcheck`. - Fix documentation on the `generate()` output-size for HMAC-based secret key newtypes which was incorrect ([#169](https://github.com/brycx/orion/issues/169)). - Improve the usage example in `orion::auth` ([Vince Mutolo](https://github.com/vlmutolo)). - Add GitHub issue templates for bugs and feature requests ([#155](https://github.com/brycx/orion/pull/155)). - Add `SECURITY.md`, specifying a disclosure policy, threat-model and information regarding yanking ([#163](https://github.com/brycx/orion/pull/163)). ### 0.15.5 **Date:** October 13, 2020. **Changelog:** - Documentation improvements. - Update `base64` to `0.13.0`. ### 0.15.4 **Date:** September 25, 2020. **Changelog:** - Empty plaintexts are now allowed for `hazardous::aead` ([#127](https://github.com/brycx/orion/pull/127)). - Update `getrandom` to `0.2`. - Bump MSRV to `1.41` due to bump in `subtle`. ### 0.15.3 **Date:** August 8, 2020. **Changelog:** - Documentation improvements. - Argon2i is now available in a `no_std` context, using the new `alloc` feature ([#126](https://github.com/brycx/orion/pull/126)). - `release` and `bench` profiles now use the default LTO (thin local LTO) instead of fat LTO. ### 0.15.2 **Date:** June 7, 2020. **Changelog:** - Remove old `no_std` feature from CONTRIBUTING guidelines. - Improve documentation and code around HKDFs maximum output length. - Move clippy, rustfmt and basic tests to GitHub Actions ([#122](https://github.com/brycx/orion/pull/122)). - Add random secret-key/nonce tests to AEADs and stream ciphers ([#123](https://github.com/brycx/orion/pull/123)). - Address various clippy warnings. ### 0.15.1 **Date:** March 9, 2020. **Changelog:** - Update `base64` dependency from `0.11.0` to `0.12.0`. - Documentation improvements. ### 0.15.0 **Date:** February 25, 2020. **Changelog:** - [Breaking change] `secure_cmp` and all verification functions now return `Result<(), UnknownCryptoError>` instead of `Result` ([#97](https://github.com/brycx/orion/issues/97)). - [Breaking change] HChaCha20 is no longer public. - [Breaking change] The default size of a randomly generated secret key in `hazardous::hash::blake2b` is now 32 bytes instead of 64 bytes ([#88](https://github.com/brycx/orion/pull/88#issuecomment-529423151)). - [Breaking change] `orion::auth` now uses BLAKE2b in keyed-mode as MAC ([#88](https://github.com/brycx/orion/pull/88), by [Vince Mutolo](https://github.com/vlmutolo)). - [Breaking change] The public API for structs used with incremental processing has been changed ([#106](https://github.com/brycx/orion/issues/106) and [#87](https://github.com/brycx/orion/pull/87)). - [Breaking change] Support for Argon2i(single-threaded) has been added. This is now used in the `orion::kdf` and `orion::pwhash` modules ([#113](https://github.com/brycx/orion/pull/113)). - [Breaking change] `chacha20::keystream_block` is no longer available. - [Breaking change] Uses of (X)ChaCha20Poly1305 will return an error if a `usize` to `u64` conversion would be lossy. - [Breaking change] orion is now `no_std`-compatible on stable Rust and the `no_std` and `nightly` features have been removed ([#111](https://github.com/brycx/orion/pull/111)). - libsodium-compatible, streaming AEAD based on XChaCha20Poly1305 (libsodiums "secretstream") ([#99](https://github.com/brycx/orion/pull/99) and [#108](https://github.com/brycx/orion/pull/108), by [snsmac](https://github.com/snsmac)). - Switch to Criterion for benchmarks. - Add contribution guidelines in `CONTRIBUTING.md`. - Move the changelog to a `CHANGELOG.md` file. - Add test vectors to XChaCha20. - Improvements to `secure_cmp` ([#93](https://github.com/brycx/orion/pull/93), by [snsmac](https://github.com/snsmac)) - Add explicit security warnings to `#[must_use]` public APIs that return a `Result` ([#95](https://github.com/brycx/orion/pull/95), by [Cole Lawrence](https://github.com/colelawrence)) - Cleanup in the orion-dudect tests and add tests for newtype `PartialEq<&[u8]>` impl. - Remove hardcoded docs.rs links in the documentation ([#100](https://github.com/brycx/orion/pull/100), by [Kyle Schreiber](https://github.com/finfet)). - Previously, the documentation for `util::secure_rand_bytes` stated that a panic would occur if the function failed to generate random bytes without throwing an error, which was not the case. This has been corrected. - Add `Blake2b::verify` to fuzzing targets. - orion-dudect now also tests for constant-time execution in CI on OSX and Windows platforms. - Testing constant-time execution with WASM at [orion-sidefuzz](https://github.com/brycx/orion-sidefuzz). - New testing framework which has greatly reduced the amount of duplicate testing code ([#96](https://github.com/brycx/orion/pull/96)). - Document and test MSRV ([#104](https://github.com/brycx/orion/issues/104)). - orion is now listed as an alternative to the old `rust-crypto` crate on [RustSec](https://rustsec.org/advisories/RUSTSEC-2016-0005.html). - `UnknownCryptoError` now implements `std::error::Error` for better interoperability with error-handling crates. - Added new test vectors from Wycheproof for ChaCha20Poly1305, XChaCha20Poly1305, HMAC-SHA512 and HKDF-HMAC-SHA512 ([#116](https://github.com/brycx/orion/pull/116)). - `#![deny(warnings)]` has been removed and replaced with flags in CI build jobs. - GitHub actions are used for daily security audit for the `crates-published` branch. Travis CI runs only weekly on `crates-published` branch now (daily before). - Removed inlining attributes that did not provide any performance improvements when tested with benchmarks ([commit](https://github.com/brycx/orion/commit/eea1899c0b2967c17c0ee6d05559065c3f67c7d5)). - Various performance improvements. - Various improvements to fuzzing targets. - Various improvements to tests. ### 0.14.5 [Yanked] **Date:** January 25, 2020. **Changelog:** - Fix `nightly` build breakage. ### 0.14.4 [Yanked] **Date:** August 21, 2019. **Changelog:** - Reduce the amount of allocations throughout most of orion. - Vectorize the ChaCha20 implementation providing ~6% performance improvement for (X)ChaCha20Poly1305 and ~11.5% for (X)ChaCha20. - Documentation improvements. ### 0.14.3 [Yanked] **Date:** August 1, 2019. **Changelog:** - Improved performance for ChaCha20Poly1305/XChaCha20Poly1305 when AAD is empty. - Refactoring of streaming contexts used by SHA512, BLAKE2b and Poly1305. - Implement `PartialEq<&[u8]>` for all newtypes and provide documentation for usage of such (by [Vince Mutolo](https://github.com/vlmutolo)). - Switched to stable rustfmt. - Fix use of now deprecated (since `v0.1.7`) `getrandom` errors. - Updated fuzzing targets in orion-fuzz. ### 0.14.2 [Yanked] **Date:** June 10, 2019. **Changelog:** - Improved performance on all implementations, most notably: ~30% in ChaCha20/XChaCha20 and ~20% in ChaCha20Poly1305/XChaCha20Poly1305. - Updated `zeroize` dependency. - Testing WebAssembly (`wasm32-unknown-unknown`) support in CI. - Improved documentation. ### 0.14.1 [Yanked] **Date:** May 27, 2019. **Changelog:** - Update `zeroize` dependency. - Improvements to documentation. ### 0.14.0 [Yanked] **Date:** May 4, 2019. **Changelog:** - [Breaking change] Function `as_bytes()` for public newtypes are replaced with `AsRef<>` trait implementations. This means all `as_bytes()` calls need to be replaced with `as_ref()`. - [Breaking change] The `SecretKey` for BLAKE2b is longer padded with zeroes to the length of the blocksize. Thus, the `SecretKey` no longer has a `get_original_length()` function, but the same result will be represented by the `get_length()` function instead. - [Breaking change] All calls to `as_ref()` and `unprotected_as_bytes()` return the newtypes data with what it was initialized, regardless of padding. (With the exception of HMAC) - [Breaking change] All calls to `get_length()` return the length of the newtype with what is what initialized, regardless of padding. (With the exception of HMAC) - [Breaking change] All newtypes that offer `generate()` now panic if the RNG fails to initialize of read from its source. This also means that newtype `generate()` functions, that do not take in a size parameter, no longer return a `Result`. - [Breaking change] `ValidationCryptoError` and `FinalizationCryptoError` have been removed. Though this doesn't mean that there is less information available, see [issue here](https://github.com/brycx/orion/issues/64). - [Breaking change] Support for cSHAKE256 has been dropped, also meaning orion no longer depends on tiny-keccak. 8% decrease in `unsafe` code in dependencies. - All fuzzing targets in `fuzz` that used libFuzzer have been deprecated in favor of those in [orion-fuzz](https://github.com/brycx/orion-fuzz) using honggfuzz-rs. - Improvements to fuzzing targets in orion-fuzz. - [Automated testing in CI, for constant-time execution](https://github.com/brycx/orion-dudect). - Added `From<[u8; C]>` trait implementations for C-length fixed-sized newtypes, so that the caller may avoid using `Result` when not working with slices. - [Breaking change] Module `hazardous::constants` has been removed and all types made private. Only a select number of constants have been re-exported in their respective modules. See [here for more information](https://github.com/brycx/orion/pull/72). - It is now strictly advised against using orion in debug mode, for what is meant to be production use. Using `opt-level = 0` with orion, is also advised against. See [security section](https://github.com/brycx/orion/wiki/Security#release-and-codegen-options). - `rand_os` has been replaced with `getrandom`. - Improvements to documentation examples as they no longer use `.unwrap()` but `?` instead. ### 0.13.4 [Yanked] **Date:** April 1, 2019. **Changelog:** - Fix build for latest nightly. ### 0.13.3 [Yanked] **Date:** March 31, 2019. **Changelog:** - Updated `zeroize` to `0.6.0`. - Added a small number of tests. - Improvement to constant-time interfaces ([#66](https://github.com/brycx/orion/pull/66)). ### 0.13.2 [Yanked] **Date:** March 13, 2019. **Changelog:** - PBKDF2 and BLAKE2b now panic on lengths exceeding (2^32-1) _ 64 and 2_(2^64-1), respectively. - ChaCha20 length constrictions are now equivalent to those of the RFC and panics on trying to process more than 2^32-1 keystream blocks. - Documentation improvements. - OpenSSL test vectors for BLAKE2b. **Note**: Strictly speaking, the first two changes are breaking, but because of the unlikeliness that this has an effect on anybody, they were not marked as such. ### 0.13.1 [Yanked] **Date:** February 16, 2019. **Changelog:** - Documentation improvements ([#60](https://github.com/brycx/orion/issues/60)). ### 0.13.0 [Yanked] **Date:** February 10, 2019. **Changelog:** - [Breaking change]: `orion::hazardous::hash::sha512` previously used the same `Digest` as BLAKE2b. This is no longer the case, making it impossible to specify a non fixed-length hash as `Digest` with SHA512. - [Breaking change]: `HLEN` constant renamed to `SHA512_OUTSIZE` and `SHA2_BLOCKSIZE` constant renamed to `SHA512_BLOCKSIZE`. - Added `POLY1305_OUTSIZE` constant. - Improved documentation for high-level `Password`, `SecretKey` in `hazardous`s `hmac` and `blake2b`, as well as `Password` in `pbkdf2` of `hazardous`. - Added AppVeyor builds and testing for Windows MSVC with Visual Studio 2017. ### 0.12.6 [Yanked] **Date:** February 8, 2019. **Changelog:** - Switched to zeroize in favor of clear_on_drop, such that using orion on stable Rust no longer requires a C compiler. - Fuzzing with honggfuzz-rs. ### 0.12.5 [Yanked] **Date:** February 4, 2019. **Changelog:** - Refactored HMAC and improved performance for PBKDF2 by ~50%. - Removed `byteorder` dependency using instead the endianness conversion functions that came with Rust 1.32. ### 0.12.4 [Yanked] **Date:** January 31, 2019. **Changelog:** - Fixes a bug where hashing, with BLAKE2b, over 2^64-1 bytes of data would cause an overflowing addition on debug builds. - Fixes a bug where hashing, with SHA512, over 2^64-1 bytes of data would not result in the counter being correctly incremented. - Added property-based testing, using QuickCheck, to most of the library and improved testing for the library in general. - `PartialEq` is now implemented for `orion::kdf::Salt` and `Nonce` in both `chacha20` and `xchacha20`. - Added `get_length()` for `blake2b::Digest`. - Updated fuzzing dependencies. ### 0.12.3 [Yanked] **Date:** January 29, 2019. **Changelog:** - Improved compilation time. - Bugfix [#50](https://github.com/brycx/orion/issues/50). - Update `byteorder` and `serde_json` dependencies (fixes build-failures related to `rand_core`). ### 0.12.2 [Yanked] **Date:** January 26, 2019. **Changelog:** - Fix a [bug](https://github.com/brycx/orion/issues/52) that lead to panics when using `out` parameters, with `seal()`/`open()` in `hazardous`, with a length above a given point. ### 0.12.1 [Yanked] **Date:** January 16, 2019. **Changelog:** - Switched `rand` dependency out with `rand_os`. ### 0.12.0 [Yanked] **Date:** December 29, 2018. **Changelog:** - [Breaking change]: All high-level functions now return a Result. - [Breaking change]: `Password` in `pbkdf2`, `SecretKey` and `hmac()` of `hmac` and `extract()` of `hkdf` in `hazardous` now return a Result. - [Breaking change]: Limit all `generate()` taking a `length` parameter, and `orion::kdf` calls to a length of less than `u32::max_value()` as maximum. - [Breaking change]: `orion::kdf` and `orion::pwhash` take a new `Password` parameter that is heap-allocated and returns a Result. - Removed `sha2` dependency and `ring` dev-dependency. `sha2` has been replaced with orion's own SHA512 implementation. - Added support for BLAKE2b and SHA512. - Updated to Rust 2018 Edition. - Better performance for HMAC, HKDF and PBKDF2. Thanks to Gabe Langlais for valuable feedback, especially on the API design. ### 0.11.2 [Yanked] **Date:** December 22, 2018. **Changelog:** - Security fix: [#46](https://github.com/brycx/orion/issues/46) ([RUSTSEC-2018-0012](https://rustsec.org/advisories/RUSTSEC-2018-0012.html), [CVE-2018-20999](https://nvd.nist.gov/vuln/detail/CVE-2018-20999)). - Updated subtle dependency. ### 0.11.0 [Yanked] **Date:** November 24, 2018. **Changelog:** - Fix [missing error propagation](https://github.com/brycx/orion/issues/40) in `v0.10`. ### 0.10.0 [Yanked] **Date:** November 23, 2018. **Changelog:** - New types for secret keys, nonces, tags, etc. This greatly increases misuse-resistance, usability and safety. To read more about the types and how they are implemented, see the [wiki section](https://github.com/brycx/orion/wiki/Design). - `default` API has been dropped. All high-level functionality is now accessible through these interfaces: `orion::aead`, `orion::auth`, `orion::kdf` and `orion::pwhash`. - AEAD interfaces in `hazardous` and in the high-level API (previously `default::encrypt`, etc.) have been renamed to `seal` and `open` to reflect the authentication and hopefully increase familiarity. - `finalize_to_dst()` has been dropped for HMAC. - Adaption of the `#[must_use]` attribute. - Documentation improvements. - HKDF and cSHAKE dropped from high-level API. - High-level PBKDF2 now uses 64 byte salts and 64 byte password hashes and the iteration count has been made available for users to control. - Argument `info` for HKDF and `ad` for AEADs are now `Option`. - `util::gen_rand_key` and `util::compare_ct` are now `util::secure_rand_bytes` and `util::secure_cmp`. - The password length enforcement in high-level PBKDF2 API has been removed. - All other public types (eg. `CShake`, `Hmac` and `Poly1305`) now implement `Debug`. - Using `clear_on_drop` to wipe memory in favor of `seckey`. - New features `nightly` and `no_std`. To use orion in a `no_std` context, some dependency specifications are needed. Refer to the README for these. - Major improvements to error propagation. ### 0.9.1 [Yanked] **Date:** November 11, 2018. **Changelog:** - Fix bug in double-HMAC verification in the default API - Documentation improvements ### 0.9.0 [Yanked] **Date:** November 4, 2018. **Changelog:** - Added support for HChaCha20, XChaCha20 and AEAD XChaCha20Poly1305. - The `default` APIs encryption/decryption interface has been reintroduced, now offering authenticated encryption through the AEAD XChaCha20Poly1305 implementation. - Most of the library's structure has been revamped. - Major additions to the project wiki detailing testing and some information regarding dependencies and security. - Improved fuzzing targets and overall test suite. - Documentation improvements. ### 0.8.0 [Yanked] **Date:** October 7, 2018. **Changelog:** - Added AEAD ChaCha20Poly1305 from [RFC 8439](https://tools.ietf.org/html/rfc8439) - Added `keystream_block()` public function to retrieve a keystream from `chacha20` - Added Poly1305 from [RFC 8439](https://tools.ietf.org/html/rfc8439) - `default::encrypt` and `default::decrypt` removed until orion offers XChaCha20 with Poly1305 - Documentation improvement - Updated `sha2` dependency ### 0.7.4 [Yanked] **Date:** September 27, 2018. **Changelog:** - Fix bug in PBKDF2 (See [issue](https://github.com/brycx/orion/issues/30)) ### 0.7.3 [Yanked] **Date:** September 26, 2018. **Changelog:** - Update `subtle` dependency ### 0.7.2 [Yanked] **Date:** September 26, 2018. **Changelog:** - Fuzz test improvements - Documentation improvements ### 0.7.1 [Yanked] **Date:** September 20, 2018. **Changelog:** - `default::chacha20_*` initial counter set to 0 ### 0.7.0 [Yanked] **Date:** September 17, 2018. **Changelog:** - Added `FinalizationCryptoError` which means `cshake` and `hmac` now return a `Result` on finalization and update function calls. - Added the ChaCha20 algorithm from the [RCF 8439](https://tools.ietf.org/html/rfc8439). - Fix failed builds for `no_std`. - Fix a bug where a user could call `update()` after finalization on both `cshake` and `hmac`. - `cshake_verify()` function dropped from default API. - Documentation improvement. ### 0.6.1 [Yanked] **Date:** September 5, 2018. **Changelog:** - Update `subtle` dependency ### 0.6.0 [Yanked] **Date:** August 31, 2018. **Changelog:** - Fix: `byteorder` and `rand` imported correctly for `no_std` - Add default feature `safe_api`, meaning that for `no_std`, import orion with default features disabled - Due to dependency fixing, Double HMAC Verification is now only done in the `safe_api` - `gen_rand_key` now only available with `safe_api` ### 0.5.2 [Yanked] **Date:** August 22, 2018. **Changelog:** - Replaced `byte-tools` with `byteorder` crate as `byte-tools` no longer offers the required functionality ### 0.5.1 [Yanked] **Date:** August 20, 2018. **Changelog:** - Added `reset()` function to cSHAKE - Added finalization check for HMAC and cSHAKE, making it impossible to call finalization functions twice without a reset in between. Preventing misuse. ### 0.5.0 [Yanked] **Date:** August 13, 2018. **Changelog:** - Support for SHA256, SHA384, SHA512/256 and cSHAKE128 dropped. - Support for `#![no_std]` added. - HMAC streaming API. - HMAC now uses SHA512. - Switched out `clear_on_drop` with `seckey`. - Switched out `constant_time_eq` with `subtle`. - cSHAKE streaming API. - `default::pbkdf2` no longer appends salt to password before hashing due to some problems integrating this using `#![no_std]`. This might be re-introduced later on. - `orion::core` renamed to `orion::utilities`. - cSHAKE verification function removed from hazardous. Performance improvements compared to v0.4.3: - HMAC: ~10% performance improvement - HKDF: ~5% performance improvement - PBKDF2: ~15% performance improvement - cSHAKE: ~11% performance improvement This was benchmarked on a MacBook Air 1,6 GHz Intel Core i5, 4GB. ### 0.4.3 [Yanked] **Date:** August 8, 2018. **Changelog:** - Updated dependency - Adopted faster HMAC key padding steps from `rigel` crate, avoiding allocation as before but without the `Cow` borrow - Memory and performance improvement to the PBKDF2 implementation by avoiding many useless allocations # Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [0.3.33] - 2026-04-12 ### Changed - Error output from `pkg-config` is included in the message again to help with finding the cause (#187) ## [0.3.32] - 2025-03-03 ### Fixed - Suggest installing pkgconf via homebrew on macOS instead of pkg-config (#173) - Quote failed pkg-config command correctly in error messages to allow for directly copy&pasting it into a shell (#175) ## [0.3.31] - 2024-09-23 ### Fixed - Remove double `cargo:` prefix from linker line (#168). ## [0.3.30] - 2024-02-14 ### Changed - Update documentation for cross-compilation (#161). - Update GitHub Action CI (#160). ## [0.3.29] - 2024-01-17 ### Fixed - Detection and usage of Windows static libraries (#154). - Passing `-Wl,-u` to the linker if specified in the pkg-config file (#154). ## [0.3.28] - 2023-12-20 ### Fixed - Pass -l:libfoo.a to linker directly (#149). ### Changed - Improve error message when library not found (#158). ## [0.3.27] - 2023-05-03 ### Added - Support falling back to `pkgconf` if `pkg-config` is not available (#145). ### Changed - Simplify running `pkg-config` (#144). - Document MSRV in `Cargo.toml` via `rust-version`. - Fix a couple of minor clippy warnings (#147). ## [0.3.26] - 2022-10-26 ### Added - Support for handling full paths to libraries in addition to normal `-l` linker flags (#134). ## [0.3.25] - 2022-03-31 ### Added - Support for parsing `-Wl` linker arguments from the `Libs` lines and passing them to the linker as well as making them available via `Library::ld_args` (#131). ### Changed - Use SPDX license format and remove obsolete badge info (#129). ## [0.3.24] - 2021-12-11 ### Fixed - Re-add `target_supported()`, which was accidentally removed in 0.3.15 (#128). ## [0.3.23] - 2021-12-06 ### Changed - Improve error messages when a `pkg-config` package can't be found (#127). ## [0.3.22] - 2021-10-24 ### Fixed - `pkg-config` compiles again with Rust 1.30 or newer. 0.3.21 accidentally made use of API only available since 1.40 (#124, #125). ### Changed - Switched from Travis to GitHub Actions for the CI. Travis is dysfunctional since quite some time (#126). ## [0.3.21] - 2021-10-22 ### Fixed - Tests succeed again on macOS (#122). ### Changed - Improve error message in case of missing pkg-config and provide instructions how it can be installed (#121). ## [0.3.20] - 2021-09-25 ### Fixed - Use target-specific pkg-config consistently everywhere (#121, #118). ## [0.3.19] - 2020-10-13 ### Added - Add `README.md` to be displayed on crates.io (#111). - Support for `-isystem`, `-iquote` and `-idirafter` include flags (#115). ### Changed - Improve documentation for cross-compilation (#113). - Allow overriding system root via the `PKG_CONFIG_SYSROOT_DIR` or `SYSROOT` environment variable (#82). ## [0.3.18] - 2020-07-11 ### Fixed - Use `env::var_os()` almost everywhere to handle non-UTF8 paths in environment variables, and also improve error handling around environment variable handling (#106). ### Changed - Default the `env_metadata` build parameter to `true` instead of `false`. Whenever a pkg-config related environment variable changes it would make sense to rebuild crates that use pkg-config, or otherwise changes might not be picked up. As such the previous default didn't make much sense (#105). ## [0.3.17] - 2019-11-02 ### Fixed - Fix support for multiple version number constraints (#95) ## [0.3.16] - 2019-09-09 ### Changed - Stop using deprecated functions and require Rust 1.30 (#84) ### Fixed - Fix repository URL in README.md - Fix various clippy warnings ### Added - Run `cargo fmt` as part of the CI (#89) - Derive `Clone` for `Library` and `Debug` for `Config (#91) - Add support for `PKG_CONFIG_ALLOW_SYSTEM_CFLAGS` and enable by default (#93) ## [0.3.15] - 2019-07-25 ### Changed - Changes minimum documented rust version to 1.28 (#76) ### Fixed - Fix Travis CI badge url (#78) - Fix project name in README.md (#81) ### Added - Support specifying range of versions (#75) - Allow cross-compilation if pkg-config is customized (#44, #86) ## [0.3.14] - 2018-08-28 ### Fixed - Don't append .lib suffix on MSVC builds (#72) ## [0.3.13] - 2018-08-06 ### Fixed - Fix MSVC support to actually work and consider library paths too (#71) ## [0.3.12] - 2018-06-18 ### Added - Support for MSVC (#70) - Document and test Rust 1.13 as minimally supported version (#66) ## [0.3.11] - 2018-04-24 ### Fixed - Re-added AsciiExt import (#65) ## [0.3.10] - 2018-04-23 ### Added - Allow static linking of /usr/ on macOS (#42) - Add support for parsing `-Wl,` style framework flags (#48) - Parse defines in `pkg-config` output (#49) - Rerun on `PKG_CONFIG_PATH` changes (#50) - Introduce target-scoped variables (#58) - Respect pkg-config escaping rules used with --cflags and --libs (#61) ### Changed - Use `?` instead of `try!()` in the codebase (#63) # Changelog All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](https://semver.org). Releases may yanked if there is a security bug, a soundness bug, or a regression. ## [Unreleased] ## [0.2.6] - 2026-03-14 portable-atomic-util has been extracted from the portable-atomic repository into its own repository: ## [0.2.5] - 2026-01-31 - Add `Arc::{new_zeroed,new_zeroed_slice}` at Rust 1.36+. (align to the [std `Arc` change in Rust 1.92](https://github.com/rust-lang/rust/pull/144091)) ([f8affb6](https://github.com/taiki-e/portable-atomic/commit/f8affb661abb1ac928cd78a66bf8fe1e72c42e42), [ae5aba7](https://github.com/taiki-e/portable-atomic/commit/ae5aba7cbe182b5d83b4b4973ccdaab372bef4d6)) - Implement `Default` for `Pin: Default>`. (align to the [std `Arc` change in Rust 1.91](https://github.com/rust-lang/rust/pull/143717)) ([2d8d33c](https://github.com/taiki-e/portable-atomic/commit/2d8d33c127126e9d290c6f368f54c2a784b43b57)) - Implement `From<&mut {[T],str}>` for `Arc<{[T],str}>` at Rust 1.36+. (align to the [std `Arc` change in Rust 1.84](https://github.com/rust-lang/rust/pull/129329)) ([99640d6](https://github.com/taiki-e/portable-atomic/commit/99640d656fb93c54e3fc255b820f61653d6c425e), [ae5aba7](https://github.com/taiki-e/portable-atomic/commit/ae5aba7cbe182b5d83b4b4973ccdaab372bef4d6)) - Implement `{AsFd, AsRawFd}` for `Arc` on Trusty. ([1b09ffb](https://github.com/taiki-e/portable-atomic/commit/1b09ffbc3010dc64b16e4fdf39742caee933ec7d)) - Support slice-related methods that previously required Rust 1.44+ at Rust 1.36+. ([ae5aba7](https://github.com/taiki-e/portable-atomic/commit/ae5aba7cbe182b5d83b4b4973ccdaab372bef4d6)) - Support `AsRawFd for Arc` implementation on Unix in all Rust versions. Previously, it was only for Rust 1.63+. ([1b09ffb](https://github.com/taiki-e/portable-atomic/commit/1b09ffbc3010dc64b16e4fdf39742caee933ec7d)) - Fix build error when building for HermitOS with `std` feature in Rust 1.63-1.68. ([1b09ffb](https://github.com/taiki-e/portable-atomic/commit/1b09ffbc3010dc64b16e4fdf39742caee933ec7d)) - Documentation improvements. - Enable [release immutability](https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/immutable-releases). ## [0.2.4] - 2024-11-23 - Add unstable `portable_atomic_unstable_coerce_unsized` cfg (requires Rust nightly). ([#195](https://github.com/taiki-e/portable-atomic/pull/195), thanks @brodycj) - Respect [`RUSTC_BOOTSTRAP=-1` recently added in nightly](https://github.com/rust-lang/rust/pull/132993) in rustc version detection. ([5b2847a](https://github.com/taiki-e/portable-atomic/commit/5b2847a8b99aa2a57a6c80f5a47327b2764f08cc)) ## [0.2.3] - 2024-10-17 - Add `Arc::{new_uninit,assume_init}` at Rust 1.36+ and `Arc::new_uninit_slice` at Rust 1.44+. (align to the [std `Arc` change in Rust 1.82](https://github.com/rust-lang/rust/pull/129401)) ([362dc9a](https://github.com/taiki-e/portable-atomic/commit/362dc9af2779c81aa346e89c4d3f3eef71cf29ed)) - Support `make_mut` on `Arc<[T]>` and `Arc` at Rust 1.36+. (align to the [std `Arc` change in Rust 1.81](https://github.com/rust-lang/rust/pull/116113)) ([362dc9a](https://github.com/taiki-e/portable-atomic/commit/362dc9af2779c81aa346e89c4d3f3eef71cf29ed)) ## [0.2.2] - 2024-07-11 - Fix [build issue with `esp` toolchain](https://github.com/taiki-e/semihosting/issues/11). ([f8ea85e](https://github.com/taiki-e/portable-atomic/commit/f8ea85e1aa46fa00bc865633fb40b05f8a0c823b)) ## [0.2.1] - 2024-06-22 **Note:** This release has been yanked due to an issue fixed in 0.2.2. - Support `impl Error for Arc` in no-std at Rust 1.81+. ([30b9f90](https://github.com/taiki-e/portable-atomic/commit/30b9f90346dfad14ab00f1c7e1f988f941330bcf)) - Implement `Default` for `Arc<[T]>` and `Arc` at Rust 1.51+. (align to the [std `Arc` change in Rust 1.80](https://github.com/rust-lang/rust/pull/124640)) ([c6ee296](https://github.com/taiki-e/portable-atomic/commit/c6ee29606984863d008c2cf2209751ed0fa43b14)) - Implement `{AsFd, AsRawFd}` for `Arc` on HermitOS. ([b778244](https://github.com/taiki-e/portable-atomic/commit/b778244917e17bfc431c9add4d028ff26d00e3b7)) ## [0.2.0] - 2024-05-07 - Rewrite `Arc` based on `std::sync::Arc`'s implementation. ([#142](https://github.com/taiki-e/portable-atomic/pull/142)) This fixes accidental API differences with std ([#139](https://github.com/taiki-e/portable-atomic/issues/139), [#140](https://github.com/taiki-e/portable-atomic/issues/140)) and adds many missing APIs compared to std: - Add `Arc::{downcast, into_inner, make_mut, new_cyclic}` ([#142](https://github.com/taiki-e/portable-atomic/pull/142)) - Implement `{fmt::Display, fmt::Pointer, Error, From, From>, From>, AsFd, AsRawFd, AsHandle, AsSocket}` for `Arc` ([#142](https://github.com/taiki-e/portable-atomic/pull/142), [78690d7](https://github.com/taiki-e/portable-atomic/commit/78690d7cad3b394119ea147c5773f67806a6ac09), [aba0930](https://github.com/taiki-e/portable-atomic/commit/aba0930269d7075b81810b49bbbbb6c5edc85ea0)) - Implement `{From<&[T]>, From>, From<[T; N]>, FromIterator}` for `Arc<[T]>` ([#142](https://github.com/taiki-e/portable-atomic/pull/142), [5e9f693](https://github.com/taiki-e/portable-atomic/commit/5e9f693dcb43c35187ca95ce1c824e0cb1d3c4f8)) - Implement `TryFrom>` for `Arc<[T; N]>` ([#142](https://github.com/taiki-e/portable-atomic/pull/142)) - Implement `From>` for `Arc<[u8]>` ([#142](https://github.com/taiki-e/portable-atomic/pull/142)) - Implement `{From<&str>, From}` for `Arc` ([#142](https://github.com/taiki-e/portable-atomic/pull/142)) - Implement `{Read, Write, Seek}` for `Arc` ([591ece5](https://github.com/taiki-e/portable-atomic/commit/591ece5bde0f19f1895853791924ee55c51ee61e)) - Remove `T: UnwindSafe` bound from `impl UnwindSafe for Arc` ([#142](https://github.com/taiki-e/portable-atomic/pull/142)) - Add `task::Wake`. ([#145](https://github.com/taiki-e/portable-atomic/pull/145)) This is equivalent to `std::task::Wake`, but using `portable_atomic_util::Arc` as a reference-counted pointer. - Respect `RUSTC_WRAPPER` in rustc version detection. ## [0.1.5] - 2023-12-17 - Improve offset calculation in `Arc::{into_raw,as_ptr,from_ptr}`. ([#141](https://github.com/taiki-e/portable-atomic/pull/141), thanks @gtsiam) ## [0.1.4] - 2023-12-16 - Fix a bug where `Arc::{into_raw,as_ptr}` returned invalid pointers for larger alignment types. ([#138](https://github.com/taiki-e/portable-atomic/pull/138), thanks @notgull) ## [0.1.3] - 2023-05-06 **Note:** This release has been yanked due to a bug fixed in 0.1.4. - Enable `portable-atomic`'s `require-cas` feature to display helpful error messages to users on targets requiring additional action on the user side to provide atomic CAS. ([#100](https://github.com/taiki-e/portable-atomic/pull/100)) ## [0.1.2] - 2023-04-04 **Note:** This release has been yanked due to a bug fixed in 0.1.4. - Implement `AsRef`, `Borrow`, and `Unpin` on `Arc`. ([#92](https://github.com/taiki-e/portable-atomic/pull/92) [#93](https://github.com/taiki-e/portable-atomic/pull/93), thanks @notgull) ## [0.1.1] - 2023-03-24 **Note:** This release has been yanked due to a bug fixed in 0.1.4. - Prevent weak counter overflow in `Arc::downgrade`. ([#83](https://github.com/taiki-e/portable-atomic/pull/83)) This fixes [a potential unsoundness recently found in the standard library's `Arc`](https://github.com/rust-lang/rust/issues/108706). ## [0.1.0] - 2023-01-15 **Note:** This release has been yanked due to a bug fixed in 0.1.4. Initial release [Unreleased]: https://github.com/taiki-e/portable-atomic-util/compare/v0.2.6...HEAD [0.2.6]: https://github.com/taiki-e/portable-atomic-util/compare/v0.2.5...v0.2.6 [0.2.5]: https://github.com/taiki-e/portable-atomic-util/compare/v0.2.4...v0.2.5 [0.2.4]: https://github.com/taiki-e/portable-atomic-util/compare/v0.2.3...v0.2.4 [0.2.3]: https://github.com/taiki-e/portable-atomic-util/compare/v0.2.2...v0.2.3 [0.2.2]: https://github.com/taiki-e/portable-atomic-util/compare/v0.2.1...v0.2.2 [0.2.1]: https://github.com/taiki-e/portable-atomic-util/compare/v0.2.0...v0.2.1 [0.2.0]: https://github.com/taiki-e/portable-atomic-util/compare/v0.1.5...v0.2.0 [0.1.5]: https://github.com/taiki-e/portable-atomic-util/compare/v0.1.4...v0.1.5 [0.1.4]: https://github.com/taiki-e/portable-atomic-util/compare/v0.1.3...v0.1.4 [0.1.3]: https://github.com/taiki-e/portable-atomic-util/compare/v0.1.2...v0.1.3 [0.1.2]: https://github.com/taiki-e/portable-atomic-util/compare/v0.1.1...v0.1.2 [0.1.1]: https://github.com/taiki-e/portable-atomic-util/compare/v0.1.0...v0.1.1 [0.1.0]: https://github.com/taiki-e/portable-atomic-util/releases/tag/v0.1.0 # Changelog All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](https://semver.org). Releases may yanked if there is a security bug, a soundness bug, or a regression. ## [Unreleased] ## [0.2.7] - 2026-04-16 - Implement serde serialization and deserialization for `Arc`, gated behind "serde" feature. ([#2](https://github.com/taiki-e/portable-atomic-util/pull/2), thanks @tommasoclini) ## [0.2.6] - 2026-03-14 portable-atomic-util has been extracted from the portable-atomic repository into its own repository: ## [0.2.5] - 2026-01-31 - Add `Arc::{new_zeroed,new_zeroed_slice}` at Rust 1.36+. (align to the [std `Arc` change in Rust 1.92](https://github.com/rust-lang/rust/pull/144091)) ([f8affb6](https://github.com/taiki-e/portable-atomic/commit/f8affb661abb1ac928cd78a66bf8fe1e72c42e42), [ae5aba7](https://github.com/taiki-e/portable-atomic/commit/ae5aba7cbe182b5d83b4b4973ccdaab372bef4d6)) - Implement `Default` for `Pin: Default>`. (align to the [std `Arc` change in Rust 1.91](https://github.com/rust-lang/rust/pull/143717)) ([2d8d33c](https://github.com/taiki-e/portable-atomic/commit/2d8d33c127126e9d290c6f368f54c2a784b43b57)) - Implement `From<&mut {[T],str}>` for `Arc<{[T],str}>` at Rust 1.36+. (align to the [std `Arc` change in Rust 1.84](https://github.com/rust-lang/rust/pull/129329)) ([99640d6](https://github.com/taiki-e/portable-atomic/commit/99640d656fb93c54e3fc255b820f61653d6c425e), [ae5aba7](https://github.com/taiki-e/portable-atomic/commit/ae5aba7cbe182b5d83b4b4973ccdaab372bef4d6)) - Implement `{AsFd, AsRawFd}` for `Arc` on Trusty. ([1b09ffb](https://github.com/taiki-e/portable-atomic/commit/1b09ffbc3010dc64b16e4fdf39742caee933ec7d)) - Support slice-related methods that previously required Rust 1.44+ at Rust 1.36+. ([ae5aba7](https://github.com/taiki-e/portable-atomic/commit/ae5aba7cbe182b5d83b4b4973ccdaab372bef4d6)) - Support `AsRawFd for Arc` implementation on Unix in all Rust versions. Previously, it was only for Rust 1.63+. ([1b09ffb](https://github.com/taiki-e/portable-atomic/commit/1b09ffbc3010dc64b16e4fdf39742caee933ec7d)) - Fix build error when building for HermitOS with `std` feature in Rust 1.63-1.68. ([1b09ffb](https://github.com/taiki-e/portable-atomic/commit/1b09ffbc3010dc64b16e4fdf39742caee933ec7d)) - Documentation improvements. - Enable [release immutability](https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/immutable-releases). ## [0.2.4] - 2024-11-23 - Add unstable `portable_atomic_unstable_coerce_unsized` cfg (requires Rust nightly). ([#195](https://github.com/taiki-e/portable-atomic/pull/195), thanks @brodycj) - Respect [`RUSTC_BOOTSTRAP=-1` recently added in nightly](https://github.com/rust-lang/rust/pull/132993) in rustc version detection. ([5b2847a](https://github.com/taiki-e/portable-atomic/commit/5b2847a8b99aa2a57a6c80f5a47327b2764f08cc)) ## [0.2.3] - 2024-10-17 - Add `Arc::{new_uninit,assume_init}` at Rust 1.36+ and `Arc::new_uninit_slice` at Rust 1.44+. (align to the [std `Arc` change in Rust 1.82](https://github.com/rust-lang/rust/pull/129401)) ([362dc9a](https://github.com/taiki-e/portable-atomic/commit/362dc9af2779c81aa346e89c4d3f3eef71cf29ed)) - Support `make_mut` on `Arc<[T]>` and `Arc` at Rust 1.36+. (align to the [std `Arc` change in Rust 1.81](https://github.com/rust-lang/rust/pull/116113)) ([362dc9a](https://github.com/taiki-e/portable-atomic/commit/362dc9af2779c81aa346e89c4d3f3eef71cf29ed)) ## [0.2.2] - 2024-07-11 - Fix [build issue with `esp` toolchain](https://github.com/taiki-e/semihosting/issues/11). ([f8ea85e](https://github.com/taiki-e/portable-atomic/commit/f8ea85e1aa46fa00bc865633fb40b05f8a0c823b)) ## [0.2.1] - 2024-06-22 **Note:** This release has been yanked due to an issue fixed in 0.2.2. - Support `impl Error for Arc` in no-std at Rust 1.81+. ([30b9f90](https://github.com/taiki-e/portable-atomic/commit/30b9f90346dfad14ab00f1c7e1f988f941330bcf)) - Implement `Default` for `Arc<[T]>` and `Arc` at Rust 1.51+. (align to the [std `Arc` change in Rust 1.80](https://github.com/rust-lang/rust/pull/124640)) ([c6ee296](https://github.com/taiki-e/portable-atomic/commit/c6ee29606984863d008c2cf2209751ed0fa43b14)) - Implement `{AsFd, AsRawFd}` for `Arc` on HermitOS. ([b778244](https://github.com/taiki-e/portable-atomic/commit/b778244917e17bfc431c9add4d028ff26d00e3b7)) ## [0.2.0] - 2024-05-07 - Rewrite `Arc` based on `std::sync::Arc`'s implementation. ([#142](https://github.com/taiki-e/portable-atomic/pull/142)) This fixes accidental API differences with std ([#139](https://github.com/taiki-e/portable-atomic/issues/139), [#140](https://github.com/taiki-e/portable-atomic/issues/140)) and adds many missing APIs compared to std: - Add `Arc::{downcast, into_inner, make_mut, new_cyclic}` ([#142](https://github.com/taiki-e/portable-atomic/pull/142)) - Implement `{fmt::Display, fmt::Pointer, Error, From, From>, From>, AsFd, AsRawFd, AsHandle, AsSocket}` for `Arc` ([#142](https://github.com/taiki-e/portable-atomic/pull/142), [78690d7](https://github.com/taiki-e/portable-atomic/commit/78690d7cad3b394119ea147c5773f67806a6ac09), [aba0930](https://github.com/taiki-e/portable-atomic/commit/aba0930269d7075b81810b49bbbbb6c5edc85ea0)) - Implement `{From<&[T]>, From>, From<[T; N]>, FromIterator}` for `Arc<[T]>` ([#142](https://github.com/taiki-e/portable-atomic/pull/142), [5e9f693](https://github.com/taiki-e/portable-atomic/commit/5e9f693dcb43c35187ca95ce1c824e0cb1d3c4f8)) - Implement `TryFrom>` for `Arc<[T; N]>` ([#142](https://github.com/taiki-e/portable-atomic/pull/142)) - Implement `From>` for `Arc<[u8]>` ([#142](https://github.com/taiki-e/portable-atomic/pull/142)) - Implement `{From<&str>, From}` for `Arc` ([#142](https://github.com/taiki-e/portable-atomic/pull/142)) - Implement `{Read, Write, Seek}` for `Arc` ([591ece5](https://github.com/taiki-e/portable-atomic/commit/591ece5bde0f19f1895853791924ee55c51ee61e)) - Remove `T: UnwindSafe` bound from `impl UnwindSafe for Arc` ([#142](https://github.com/taiki-e/portable-atomic/pull/142)) - Add `task::Wake`. ([#145](https://github.com/taiki-e/portable-atomic/pull/145)) This is equivalent to `std::task::Wake`, but using `portable_atomic_util::Arc` as a reference-counted pointer. - Respect `RUSTC_WRAPPER` in rustc version detection. ## [0.1.5] - 2023-12-17 - Improve offset calculation in `Arc::{into_raw,as_ptr,from_ptr}`. ([#141](https://github.com/taiki-e/portable-atomic/pull/141), thanks @gtsiam) ## [0.1.4] - 2023-12-16 - Fix a bug where `Arc::{into_raw,as_ptr}` returned invalid pointers for larger alignment types. ([#138](https://github.com/taiki-e/portable-atomic/pull/138), thanks @notgull) ## [0.1.3] - 2023-05-06 **Note:** This release has been yanked due to a bug fixed in 0.1.4. - Enable `portable-atomic`'s `require-cas` feature to display helpful error messages to users on targets requiring additional action on the user side to provide atomic CAS. ([#100](https://github.com/taiki-e/portable-atomic/pull/100)) ## [0.1.2] - 2023-04-04 **Note:** This release has been yanked due to a bug fixed in 0.1.4. - Implement `AsRef`, `Borrow`, and `Unpin` on `Arc`. ([#92](https://github.com/taiki-e/portable-atomic/pull/92) [#93](https://github.com/taiki-e/portable-atomic/pull/93), thanks @notgull) ## [0.1.1] - 2023-03-24 **Note:** This release has been yanked due to a bug fixed in 0.1.4. - Prevent weak counter overflow in `Arc::downgrade`. ([#83](https://github.com/taiki-e/portable-atomic/pull/83)) This fixes [a potential unsoundness recently found in the standard library's `Arc`](https://github.com/rust-lang/rust/issues/108706). ## [0.1.0] - 2023-01-15 **Note:** This release has been yanked due to a bug fixed in 0.1.4. Initial release [Unreleased]: https://github.com/taiki-e/portable-atomic-util/compare/v0.2.7...HEAD [0.2.7]: https://github.com/taiki-e/portable-atomic-util/compare/v0.2.6...v0.2.7 [0.2.6]: https://github.com/taiki-e/portable-atomic-util/compare/v0.2.5...v0.2.6 [0.2.5]: https://github.com/taiki-e/portable-atomic-util/compare/v0.2.4...v0.2.5 [0.2.4]: https://github.com/taiki-e/portable-atomic-util/compare/v0.2.3...v0.2.4 [0.2.3]: https://github.com/taiki-e/portable-atomic-util/compare/v0.2.2...v0.2.3 [0.2.2]: https://github.com/taiki-e/portable-atomic-util/compare/v0.2.1...v0.2.2 [0.2.1]: https://github.com/taiki-e/portable-atomic-util/compare/v0.2.0...v0.2.1 [0.2.0]: https://github.com/taiki-e/portable-atomic-util/compare/v0.1.5...v0.2.0 [0.1.5]: https://github.com/taiki-e/portable-atomic-util/compare/v0.1.4...v0.1.5 [0.1.4]: https://github.com/taiki-e/portable-atomic-util/compare/v0.1.3...v0.1.4 [0.1.3]: https://github.com/taiki-e/portable-atomic-util/compare/v0.1.2...v0.1.3 [0.1.2]: https://github.com/taiki-e/portable-atomic-util/compare/v0.1.1...v0.1.2 [0.1.1]: https://github.com/taiki-e/portable-atomic-util/compare/v0.1.0...v0.1.1 [0.1.0]: https://github.com/taiki-e/portable-atomic-util/releases/tag/v0.1.0 # Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). A [separate changelog is kept for rand_core](https://github.com/rust-random/core/blob/master/CHANGELOG.md). You may also find the [Upgrade Guide](https://rust-random.github.io/book/update.html) useful. ## [0.10.0] - 2026-02-08 ### Changes - The dependency on `rand_chacha` has been replaced with a dependency on `chacha20`. This changes the implementation behind `StdRng`, but the output remains the same. There may be some API breakage when using the ChaCha-types directly as these are now the ones in `chacha20` instead of `rand_chacha` ([#1642]). - Rename fns `IndexedRandom::choose_multiple` -> `sample`, `choose_multiple_array` -> `sample_array`, `choose_multiple_weighted` -> `sample_weighted`, struct `SliceChooseIter` -> `IndexedSamples` and fns `IteratorRandom::choose_multiple` -> `sample`, `choose_multiple_fill` -> `sample_fill` ([#1632]) - Use Edition 2024 and MSRV 1.85 ([#1653]) - Let `Fill` be implemented for element types, not sliceable types ([#1652]) - Fix `OsError::raw_os_error` on UEFI targets by returning `Option` ([#1665]) - Replace fn `TryRngCore::read_adapter(..) -> RngReadAdapter` with simpler struct `RngReader` ([#1669]) - Remove fns `SeedableRng::from_os_rng`, `try_from_os_rng` ([#1674]) - Remove `Clone` support for `StdRng`, `ReseedingRng` ([#1677]) - Use `postcard` instead of `bincode` to test the serde feature ([#1693]) - Avoid excessive allocation in `IteratorRandom::sample` when `amount` is much larger than iterator size ([#1695]) - Rename `os_rng` -> `sys_rng`, `OsRng` -> `SysRng`, `OsError` -> `SysError` ([#1697]) - Rename `Rng` -> `RngExt` as upstream `rand_core` has renamed `RngCore` -> `Rng` ([#1717]) ### Additions - Add fns `IndexedRandom::choose_iter`, `choose_weighted_iter` ([#1632]) - Pub export `Xoshiro128PlusPlus`, `Xoshiro256PlusPlus` prngs ([#1649]) - Pub export `ChaCha8Rng`, `ChaCha12Rng`, `ChaCha20Rng` behind `chacha` feature ([#1659]) - Fn `rand::make_rng() -> R where R: SeedableRng` ([#1734]) ### Removals - Removed `ReseedingRng` ([#1722]) - Removed unused feature "nightly" ([#1732]) - Removed feature `small_rng` ([#1732]) [#1632]: https://github.com/rust-random/rand/pull/1632 [#1642]: https://github.com/rust-random/rand/pull/1642 [#1649]: https://github.com/rust-random/rand/pull/1649 [#1652]: https://github.com/rust-random/rand/pull/1652 [#1653]: https://github.com/rust-random/rand/pull/1653 [#1659]: https://github.com/rust-random/rand/pull/1659 [#1665]: https://github.com/rust-random/rand/pull/1665 [#1669]: https://github.com/rust-random/rand/pull/1669 [#1674]: https://github.com/rust-random/rand/pull/1674 [#1677]: https://github.com/rust-random/rand/pull/1677 [#1693]: https://github.com/rust-random/rand/pull/1693 [#1695]: https://github.com/rust-random/rand/pull/1695 [#1697]: https://github.com/rust-random/rand/pull/1697 [#1717]: https://github.com/rust-random/rand/pull/1717 [#1722]: https://github.com/rust-random/rand/pull/1722 [#1732]: https://github.com/rust-random/rand/pull/1732 [#1734]: https://github.com/rust-random/rand/pull/1734 ## [0.9.2] - 2025-07-20 ### Deprecated - Deprecate `rand::rngs::mock` module and `StepRng` generator ([#1634]) ### Additions - Enable `WeightedIndex` (de)serialization ([#1646]) ## [0.9.1] - 2025-04-17 ### Security and unsafe - Revise "not a crypto library" policy again ([#1565]) - Remove `zerocopy` dependency from `rand` ([#1579]) ### Fixes - Fix feature `simd_support` for recent nightly rust ([#1586]) ### Changes - Allow `fn rand::seq::index::sample_weighted` and `fn IndexedRandom::choose_multiple_weighted` to return fewer than `amount` results ([#1623]), reverting an undocumented change ([#1382]) to the previous release. ### Additions - Add `rand::distr::Alphabetic` distribution. ([#1587]) - Re-export `rand_core` ([#1604]) [#1565]: https://github.com/rust-random/rand/pull/1565 [#1579]: https://github.com/rust-random/rand/pull/1579 [#1586]: https://github.com/rust-random/rand/pull/1586 [#1587]: https://github.com/rust-random/rand/pull/1587 [#1604]: https://github.com/rust-random/rand/pull/1604 [#1623]: https://github.com/rust-random/rand/pull/1623 [#1634]: https://github.com/rust-random/rand/pull/1634 [#1646]: https://github.com/rust-random/rand/pull/1646 ## [0.9.0] - 2025-01-27 ### Security and unsafe - Policy: "rand is not a crypto library" ([#1514]) - Remove fork-protection from `ReseedingRng` and `ThreadRng`. Instead, it is recommended to call `ThreadRng::reseed` on fork. ([#1379]) - Use `zerocopy` to replace some `unsafe` code ([#1349], [#1393], [#1446], [#1502]) ### Dependencies - Bump the MSRV to 1.63.0 ([#1207], [#1246], [#1269], [#1341], [#1416], [#1536]); note that 1.60.0 may work for dependents when using `--ignore-rust-version` - Update to `rand_core` v0.9.0 ([#1558]) ### Features - Support `std` feature without `getrandom` or `rand_chacha` ([#1354]) - Enable feature `small_rng` by default ([#1455]) - Remove implicit feature `rand_chacha`; use `std_rng` instead. ([#1473]) - Rename feature `serde1` to `serde` ([#1477]) - Rename feature `getrandom` to `os_rng` ([#1537]) - Add feature `thread_rng` ([#1547]) ### API changes: rand_core traits - Add fn `RngCore::read_adapter` implementing `std::io::Read` ([#1267]) - Add trait `CryptoBlockRng: BlockRngCore`; make `trait CryptoRng: RngCore` ([#1273]) - Add traits `TryRngCore`, `TryCryptoRng` ([#1424], [#1499]) - Rename `fn SeedableRng::from_rng` -> `try_from_rng` and add infallible variant `fn from_rng` ([#1424]) - Rename `fn SeedableRng::from_entropy` -> `from_os_rng` and add fallible variant `fn try_from_os_rng` ([#1424]) - Add bounds `Clone` and `AsRef` to associated type `SeedableRng::Seed` ([#1491]) ### API changes: Rng trait and top-level fns - Rename fn `rand::thread_rng()` to `rand::rng()` and remove from the prelude ([#1506]) - Remove fn `rand::random()` from the prelude ([#1506]) - Add top-level fns `random_iter`, `random_range`, `random_bool`, `random_ratio`, `fill` ([#1488]) - Re-introduce fn `Rng::gen_iter` as `random_iter` ([#1305], [#1500]) - Rename fn `Rng::gen` to `random` to avoid conflict with the new `gen` keyword in Rust 2024 ([#1438]) - Rename fns `Rng::gen_range` to `random_range`, `gen_bool` to `random_bool`, `gen_ratio` to `random_ratio` ([#1505]) - Annotate panicking methods with `#[track_caller]` ([#1442], [#1447]) ### API changes: RNGs - Fix `::Seed` size to 256 bits ([#1455]) - Remove first parameter (`rng`) of `ReseedingRng::new` ([#1533]) ### API changes: Sequences - Split trait `SliceRandom` into `IndexedRandom`, `IndexedMutRandom`, `SliceRandom` ([#1382]) - Add `IndexedRandom::choose_multiple_array`, `index::sample_array` ([#1453], [#1469]) ### API changes: Distributions: renames - Rename module `rand::distributions` to `rand::distr` ([#1470]) - Rename distribution `Standard` to `StandardUniform` ([#1526]) - Move `distr::Slice` -> `distr::slice::Choose`, `distr::EmptySlice` -> `distr::slice::Empty` ([#1548]) - Rename trait `distr::DistString` -> `distr::SampleString` ([#1548]) - Rename `distr::DistIter` -> `distr::Iter`, `distr::DistMap` -> `distr::Map` ([#1548]) ### API changes: Distributions - Relax `Sized` bound on `Distribution for &D` ([#1278]) - Remove impl of `Distribution>` for `StandardUniform` ([#1526]) - Let distribution `StandardUniform` support all `NonZero*` types ([#1332]) - Fns `{Uniform, UniformSampler}::{new, new_inclusive}` return a `Result` (instead of potentially panicking) ([#1229]) - Distribution `Uniform` implements `TryFrom` instead of `From` for ranges ([#1229]) - Add `UniformUsize` ([#1487]) - Remove support for generating `isize` and `usize` values with `StandardUniform`, `Uniform` (except via `UniformUsize`) and `Fill` and usage as a `WeightedAliasIndex` weight ([#1487]) - Add impl `DistString` for distributions `Slice` and `Uniform` ([#1315]) - Add fn `Slice::num_choices` ([#1402]) - Add fn `p()` for distribution `Bernoulli` to access probability ([#1481]) ### API changes: Weighted distributions - Add `pub` module `rand::distr::weighted`, moving `WeightedIndex` there ([#1548]) - Add trait `weighted::Weight`, allowing `WeightedIndex` to trap overflow ([#1353]) - Add fns `weight, weights, total_weight` to distribution `WeightedIndex` ([#1420]) - Rename enum `WeightedError` to `weighted::Error`, revising variants ([#1382]) and mark as `#[non_exhaustive]` ([#1480]) ### API changes: SIMD - Switch to `std::simd`, expand SIMD & docs ([#1239]) ### Reproducibility-breaking changes - Make `ReseedingRng::reseed` discard remaining data from the last block generated ([#1379]) - Change fn `SmallRng::seed_from_u64` implementation ([#1203]) - Allow `UniformFloat::new` samples and `UniformFloat::sample_single` to yield `high` ([#1462]) - Fix portability of distribution `Slice` ([#1469]) - Make `Uniform` for `usize` portable via `UniformUsize` ([#1487]) - Fix `IndexdRandom::choose_multiple_weighted` for very small seeds and optimize for large input length / low memory ([#1530]) ### Reproducibility-breaking optimisations - Optimize fn `sample_floyd`, affecting output of `rand::seq::index::sample` and `rand::seq::SliceRandom::choose_multiple` ([#1277]) - New, faster algorithms for `IteratorRandom::choose` and `choose_stable` ([#1268]) - New, faster algorithms for `SliceRandom::shuffle` and `partial_shuffle` ([#1272]) - Optimize distribution `Uniform`: use Canon's method (single sampling) / Lemire's method (distribution sampling) for faster sampling (breaks value stability; [#1287]) - Optimize fn `sample_single_inclusive` for floats (+~20% perf) ([#1289]) ### Other optimisations - Improve `SmallRng` initialization performance ([#1482]) - Optimise SIMD widening multiply ([#1247]) ### Other - Add `Cargo.lock.msrv` file ([#1275]) - Reformat with `rustfmt` and enforce ([#1448]) - Apply Clippy suggestions and enforce ([#1448], [#1474]) - Move all benchmarks to new `benches` crate ([#1329], [#1439]) and migrate to Criterion ([#1490]) ### Documentation - Improve `ThreadRng` related docs ([#1257]) - Docs: enable experimental `--generate-link-to-definition` feature ([#1327]) - Better doc of crate features, use `doc_auto_cfg` ([#1411], [#1450]) [#1203]: https://github.com/rust-random/rand/pull/1203 [#1207]: https://github.com/rust-random/rand/pull/1207 [#1229]: https://github.com/rust-random/rand/pull/1229 [#1239]: https://github.com/rust-random/rand/pull/1239 [#1246]: https://github.com/rust-random/rand/pull/1246 [#1247]: https://github.com/rust-random/rand/pull/1247 [#1257]: https://github.com/rust-random/rand/pull/1257 [#1267]: https://github.com/rust-random/rand/pull/1267 [#1268]: https://github.com/rust-random/rand/pull/1268 [#1269]: https://github.com/rust-random/rand/pull/1269 [#1272]: https://github.com/rust-random/rand/pull/1272 [#1273]: https://github.com/rust-random/rand/pull/1273 [#1275]: https://github.com/rust-random/rand/pull/1275 [#1277]: https://github.com/rust-random/rand/pull/1277 [#1278]: https://github.com/rust-random/rand/pull/1278 [#1287]: https://github.com/rust-random/rand/pull/1287 [#1289]: https://github.com/rust-random/rand/pull/1289 [#1305]: https://github.com/rust-random/rand/pull/1305 [#1315]: https://github.com/rust-random/rand/pull/1315 [#1327]: https://github.com/rust-random/rand/pull/1327 [#1329]: https://github.com/rust-random/rand/pull/1329 [#1332]: https://github.com/rust-random/rand/pull/1332 [#1341]: https://github.com/rust-random/rand/pull/1341 [#1349]: https://github.com/rust-random/rand/pull/1349 [#1353]: https://github.com/rust-random/rand/pull/1353 [#1354]: https://github.com/rust-random/rand/pull/1354 [#1379]: https://github.com/rust-random/rand/pull/1379 [#1382]: https://github.com/rust-random/rand/pull/1382 [#1393]: https://github.com/rust-random/rand/pull/1393 [#1402]: https://github.com/rust-random/rand/pull/1402 [#1411]: https://github.com/rust-random/rand/pull/1411 [#1416]: https://github.com/rust-random/rand/pull/1416 [#1420]: https://github.com/rust-random/rand/pull/1420 [#1424]: https://github.com/rust-random/rand/pull/1424 [#1438]: https://github.com/rust-random/rand/pull/1438 [#1439]: https://github.com/rust-random/rand/pull/1439 [#1442]: https://github.com/rust-random/rand/pull/1442 [#1446]: https://github.com/rust-random/rand/pull/1446 [#1447]: https://github.com/rust-random/rand/pull/1447 [#1448]: https://github.com/rust-random/rand/pull/1448 [#1450]: https://github.com/rust-random/rand/pull/1450 [#1453]: https://github.com/rust-random/rand/pull/1453 [#1455]: https://github.com/rust-random/rand/pull/1455 [#1462]: https://github.com/rust-random/rand/pull/1462 [#1469]: https://github.com/rust-random/rand/pull/1469 [#1470]: https://github.com/rust-random/rand/pull/1470 [#1473]: https://github.com/rust-random/rand/pull/1473 [#1474]: https://github.com/rust-random/rand/pull/1474 [#1477]: https://github.com/rust-random/rand/pull/1477 [#1480]: https://github.com/rust-random/rand/pull/1480 [#1481]: https://github.com/rust-random/rand/pull/1481 [#1482]: https://github.com/rust-random/rand/pull/1482 [#1487]: https://github.com/rust-random/rand/pull/1487 [#1488]: https://github.com/rust-random/rand/pull/1488 [#1490]: https://github.com/rust-random/rand/pull/1490 [#1491]: https://github.com/rust-random/rand/pull/1491 [#1499]: https://github.com/rust-random/rand/pull/1499 [#1500]: https://github.com/rust-random/rand/pull/1500 [#1502]: https://github.com/rust-random/rand/pull/1502 [#1505]: https://github.com/rust-random/rand/pull/1505 [#1506]: https://github.com/rust-random/rand/pull/1506 [#1514]: https://github.com/rust-random/rand/pull/1514 [#1526]: https://github.com/rust-random/rand/pull/1526 [#1530]: https://github.com/rust-random/rand/pull/1530 [#1533]: https://github.com/rust-random/rand/pull/1533 [#1536]: https://github.com/rust-random/rand/pull/1536 [#1537]: https://github.com/rust-random/rand/pull/1537 [#1547]: https://github.com/rust-random/rand/pull/1547 [#1548]: https://github.com/rust-random/rand/pull/1548 [#1558]: https://github.com/rust-random/rand/pull/1558 ## [0.8.5] - 2021-08-20 ### Fixes - Fix build on non-32/64-bit architectures ([#1144]) - Fix "min_const_gen" feature for `no_std` ([#1173]) - Check `libc::pthread_atfork` return value with panic on error ([#1178]) - More robust reseeding in case `ReseedingRng` is used from a fork handler ([#1178]) - Fix nightly: remove unused `slice_partition_at_index` feature ([#1215]) - Fix nightly + `simd_support`: update `packed_simd` ([#1216]) ### Rngs - `StdRng`: Switch from HC128 to ChaCha12 on emscripten ([#1142]). We now use ChaCha12 on all platforms. ### Documentation - Added docs about rand's use of const generics ([#1150]) - Better random chars example ([#1157]) [#1142]: https://github.com/rust-random/rand/pull/1142 [#1144]: https://github.com/rust-random/rand/pull/1144 [#1150]: https://github.com/rust-random/rand/pull/1150 [#1157]: https://github.com/rust-random/rand/pull/1157 [#1173]: https://github.com/rust-random/rand/pull/1173 [#1178]: https://github.com/rust-random/rand/pull/1178 [#1215]: https://github.com/rust-random/rand/pull/1215 [#1216]: https://github.com/rust-random/rand/pull/1216 ## [0.8.4] - 2021-06-15 ### Additions - Use const-generics to support arrays of all sizes ([#1104]) - Implement `Clone` and `Copy` for `Alphanumeric` ([#1126]) - Add `Distribution::map` to derive a distribution using a closure ([#1129]) - Add `Slice` distribution ([#1107]) - Add `DistString` trait with impls for `Standard` and `Alphanumeric` ([#1133]) ### Other - Reorder asserts in `Uniform` float distributions for easier debugging of non-finite arguments ([#1094], [#1108]) - Add range overflow check in `Uniform` float distributions ([#1108]) - Deprecate `rngs::adapter::ReadRng` ([#1130]) ## [0.8.3] - 2021-01-25 ### Fixes - Fix `no-std` + `alloc` build by gating `choose_multiple_weighted` on `std` ([#1088]) ## [0.8.2] - 2021-01-12 ### Fixes - Fix panic in `UniformInt::sample_single_inclusive` and `Rng::gen_range` when providing a full integer range (eg `0..=MAX`) ([#1087]) ## [0.8.1] - 2020-12-31 ### Other - Enable all stable features in the playground ([#1081]) ## [0.8.0] - 2020-12-18 ### Platform support - The minimum supported Rust version is now 1.36 ([#1011]) - `getrandom` updated to v0.2 ([#1041]) - Remove `wasm-bindgen` and `stdweb` feature flags. For details of WASM support, see the [getrandom documentation](https://docs.rs/getrandom/latest). ([#948]) - `ReadRng::next_u32` and `next_u64` now use little-Endian conversion instead of native-Endian, affecting results on Big-Endian platforms ([#1061]) - The `nightly` feature no longer implies the `simd_support` feature ([#1048]) - Fix `simd_support` feature to work on current nightlies ([#1056]) ### Rngs - `ThreadRng` is no longer `Copy` to enable safe usage within thread-local destructors ([#1035]) - `gen_range(a, b)` was replaced with `gen_range(a..b)`. `gen_range(a..=b)` is also supported. Note that `a` and `b` can no longer be references or SIMD types. ([#744], [#1003]) - Replace `AsByteSliceMut` with `Fill` and add support for `[bool], [char], [f32], [f64]` ([#940]) - Restrict `rand::rngs::adapter` to `std` ([#1027]; see also [#928]) - `StdRng`: add new `std_rng` feature flag (enabled by default, but might need to be used if disabling default crate features) ([#948]) - `StdRng`: Switch from ChaCha20 to ChaCha12 for better performance ([#1028]) - `SmallRng`: Replace PCG algorithm with xoshiro{128,256}++ ([#1038]) ### Sequences - Add `IteratorRandom::choose_stable` as an alternative to `choose` which does not depend on size hints ([#1057]) - Improve accuracy and performance of `IteratorRandom::choose` ([#1059]) - Implement `IntoIterator` for `IndexVec`, replacing the `into_iter` method ([#1007]) - Add value stability tests for `seq` module ([#933]) ### Misc - Support `PartialEq` and `Eq` for `StdRng`, `SmallRng` and `StepRng` ([#979]) - Added a `serde1` feature and added Serialize/Deserialize to `UniformInt` and `WeightedIndex` ([#974]) - Drop some unsafe code ([#962], [#963], [#1011]) - Reduce packaged crate size ([#983]) - Migrate to GitHub Actions from Travis+AppVeyor ([#1073]) ### Distributions - `Alphanumeric` samples bytes instead of chars ([#935]) - `Uniform` now supports `char`, enabling `rng.gen_range('A'..='Z')` ([#1068]) - Add `UniformSampler::sample_single_inclusive` ([#1003]) #### Weighted sampling - Implement weighted sampling without replacement ([#976], [#1013]) - `rand::distributions::alias_method::WeightedIndex` was moved to `rand_distr::WeightedAliasIndex`. The simpler alternative `rand::distribution::WeightedIndex` remains. ([#945]) - Improve treatment of rounding errors in `WeightedIndex::update_weights` ([#956]) - `WeightedIndex`: return error on NaN instead of panic ([#1005]) ### Documentation - Document types supported by `random` ([#994]) - Document notes on password generation ([#995]) - Note that `SmallRng` may not be the best choice for performance and in some other cases ([#1038]) - Use `doc(cfg)` to annotate feature-gated items ([#1019]) - Adjust README ([#1065]) [#744]: https://github.com/rust-random/rand/pull/744 [#933]: https://github.com/rust-random/rand/pull/933 [#935]: https://github.com/rust-random/rand/pull/935 [#940]: https://github.com/rust-random/rand/pull/940 [#945]: https://github.com/rust-random/rand/pull/945 [#948]: https://github.com/rust-random/rand/pull/948 [#956]: https://github.com/rust-random/rand/pull/956 [#962]: https://github.com/rust-random/rand/pull/962 [#963]: https://github.com/rust-random/rand/pull/963 [#974]: https://github.com/rust-random/rand/pull/974 [#976]: https://github.com/rust-random/rand/pull/976 [#979]: https://github.com/rust-random/rand/pull/979 [#983]: https://github.com/rust-random/rand/pull/983 [#994]: https://github.com/rust-random/rand/pull/994 [#995]: https://github.com/rust-random/rand/pull/995 [#1003]: https://github.com/rust-random/rand/pull/1003 [#1005]: https://github.com/rust-random/rand/pull/1005 [#1007]: https://github.com/rust-random/rand/pull/1007 [#1011]: https://github.com/rust-random/rand/pull/1011 [#1013]: https://github.com/rust-random/rand/pull/1013 [#1019]: https://github.com/rust-random/rand/pull/1019 [#1027]: https://github.com/rust-random/rand/pull/1027 [#1028]: https://github.com/rust-random/rand/pull/1028 [#1035]: https://github.com/rust-random/rand/pull/1035 [#1038]: https://github.com/rust-random/rand/pull/1038 [#1041]: https://github.com/rust-random/rand/pull/1041 [#1048]: https://github.com/rust-random/rand/pull/1048 [#1056]: https://github.com/rust-random/rand/pull/1056 [#1057]: https://github.com/rust-random/rand/pull/1057 [#1059]: https://github.com/rust-random/rand/pull/1059 [#1061]: https://github.com/rust-random/rand/pull/1061 [#1065]: https://github.com/rust-random/rand/pull/1065 [#1068]: https://github.com/rust-random/rand/pull/1068 [#1073]: https://github.com/rust-random/rand/pull/1073 ## [0.7.3] - 2020-01-10 ### Fixes - The `Bernoulli` distribution constructors now reports an error on NaN and on `denominator == 0`. ([#925]) - Use `std::sync::Once` to register fork handler, avoiding possible atomicity violation ([#928]) - Fix documentation on the precision of generated floating-point values ### Changes - Unix: make libc dependency optional; only use fork protection with std feature ([#928]) ### Additions - Implement `std::error::Error` for `BernoulliError` ([#919]) ## [0.7.2] - 2019-09-16 ### Fixes - Fix dependency on `rand_core` 0.5.1 ([#890]) ### Additions - Unit tests for value stability of distributions added ([#888]) ## [0.7.1] - 2019-09-13 ### Yanked This release was yanked since it depends on `rand_core::OsRng` added in 0.5.1 but specifies a dependency on version 0.5.0 ([#890]), causing broken builds when updating from `rand 0.7.0` without also updating `rand_core`. ### Fixes - Fix `no_std` behaviour, appropriately enable c2-chacha's `std` feature ([#844]) - `alloc` feature in `no_std` is available since Rust 1.36 ([#856]) - Fix or squelch issues from Clippy lints ([#840]) ### Additions - Add a `no_std` target to CI to continuously evaluate `no_std` status ([#844]) - `WeightedIndex`: allow adjusting a sub-set of weights ([#866]) ## [0.7.0] - 2019-06-28 ### Fixes - Fix incorrect pointer usages revealed by Miri testing ([#780], [#781]) - Fix (tiny!) bias in `Uniform` for 8- and 16-bit ints ([#809]) ### Crate - Bumped MSRV (min supported Rust version) to 1.32.0 - Updated to Rust Edition 2018 ([#823], [#824]) - Removed dependence on `rand_xorshift`, `rand_isaac`, `rand_jitter` crates ([#759], [#765]) - Remove dependency on `winapi` ([#724]) - Removed all `build.rs` files ([#824]) - Removed code already deprecated in version 0.6 ([#757]) - Removed the serde1 feature (It's still available for backwards compatibility, but it does not do anything. [#830]) - Many documentation changes ### rand_core - Updated to `rand_core` 0.5.0 - `Error` type redesigned with new API ([#800]) - Move `from_entropy` method to `SeedableRng` and remove `FromEntropy` ([#800]) - `SeedableRng::from_rng` is now expected to be value-stable ([#815]) ### Standard RNGs - OS interface moved from `rand_os` to new `getrandom` crate ([#765], [getrandom](https://github.com/rust-random/getrandom)) - Use ChaCha for `StdRng` and `ThreadRng` ([#792]) - Feature-gate `SmallRng` ([#792]) - `ThreadRng` now supports `Copy` ([#758]) - Deprecated `EntropyRng` ([#765]) - Enable fork protection of `ReseedingRng` without `std` ([#724]) ### Distributions - Many distributions have been moved to `rand_distr` ([#761]) - `Bernoulli::new` constructor now returns a `Result` ([#803]) - `Distribution::sample_iter` adjusted for more flexibility ([#758]) - Added `distributions::weighted::alias_method::WeightedIndex` for `O(1)` sampling ([#692]) - Support sampling `NonZeroU*` types with the `Standard` distribution ([#728]) - Optimised `Binomial` distribution sampling ([#735], [#740], [#752]) - Optimised SIMD float sampling ([#739]) ### Sequences - Make results portable across 32- and 64-bit by using `u32` samples for `usize` where possible ([#809]) [#692]: https://github.com/rust-random/rand/pull/692 [#724]: https://github.com/rust-random/rand/pull/724 [#728]: https://github.com/rust-random/rand/pull/728 [#735]: https://github.com/rust-random/rand/pull/735 [#739]: https://github.com/rust-random/rand/pull/739 [#740]: https://github.com/rust-random/rand/pull/740 [#752]: https://github.com/rust-random/rand/pull/752 [#757]: https://github.com/rust-random/rand/pull/757 [#758]: https://github.com/rust-random/rand/pull/758 [#759]: https://github.com/rust-random/rand/pull/759 [#761]: https://github.com/rust-random/rand/pull/761 [#765]: https://github.com/rust-random/rand/pull/765 [#780]: https://github.com/rust-random/rand/pull/780 [#781]: https://github.com/rust-random/rand/pull/781 [#792]: https://github.com/rust-random/rand/pull/792 [#800]: https://github.com/rust-random/rand/pull/800 [#803]: https://github.com/rust-random/rand/pull/803 [#809]: https://github.com/rust-random/rand/pull/809 [#815]: https://github.com/rust-random/rand/pull/815 [#823]: https://github.com/rust-random/rand/pull/823 [#824]: https://github.com/rust-random/rand/pull/824 [#830]: https://github.com/rust-random/rand/pull/830 [#840]: https://github.com/rust-random/rand/pull/840 [#844]: https://github.com/rust-random/rand/pull/844 [#856]: https://github.com/rust-random/rand/pull/856 [#866]: https://github.com/rust-random/rand/pull/866 [#888]: https://github.com/rust-random/rand/pull/888 [#890]: https://github.com/rust-random/rand/pull/890 [#919]: https://github.com/rust-random/rand/pull/919 [#925]: https://github.com/rust-random/rand/pull/925 [#928]: https://github.com/rust-random/rand/pull/928 ## [0.6.5] - 2019-01-28 ### Crates - Update `rand_core` to 0.4 ([#703]) - Move `JitterRng` to its own crate ([#685]) - Add a wasm-bindgen test crate ([#696]) ### Platforms - Fuchsia: Replaced fuchsia-zircon with fuchsia-cprng ### Doc - Use RFC 1946 for doc links ([#691]) - Fix some doc links and notes ([#711]) ## [0.6.4] - 2019-01-08 ### Fixes - Move wasm-bindgen shims to correct crate ([#686]) - Make `wasm32-unknown-unknown` compile but fail at run-time if missing bindings ([#686]) ## [0.6.3] - 2019-01-04 ### Fixes - Make the `std` feature require the optional `rand_os` dependency ([#675]) - Re-export the optional WASM dependencies of `rand_os` from `rand` to avoid breakage ([#674]) ## [0.6.2] - 2019-01-04 ### Additions - Add `Default` for `ThreadRng` ([#657]) - Move `rngs::OsRng` to `rand_os` sub-crate; clean up code; use as dependency ([#643]) - Add `rand_xoshiro` sub-crate, plus benchmarks ([#642], [#668]) ### Fixes - Fix bias in `UniformInt::sample_single` ([#662]) - Use `autocfg` instead of `rustc_version` for rustc version detection ([#664]) - Disable `i128` and `u128` if the `target_os` is `emscripten` ([#671]: work-around Emscripten limitation) - CI fixes ([#660], [#671]) ### Optimisations - Optimise memory usage of `UnitCircle` and `UnitSphereSurface` distributions (no PR) ## [0.6.1] - 2018-11-22 - Support sampling `Duration` also for `no_std` (only since Rust 1.25) ([#649]) - Disable default features of `libc` ([#647]) ## [0.6.0] - 2018-11-14 ### Project organisation - Rand has moved from [rust-lang-nursery](https://github.com/rust-lang-nursery/rand) to [rust-random](https://github.com/rust-random/rand)! ([#578]) - Created [The Rust Random Book](https://rust-random.github.io/book/) ([source](https://github.com/rust-random/book)) - Update copyright and licence notices ([#591], [#611]) - Migrate policy documentation from the wiki ([#544]) ### Platforms - Add fork protection on Unix ([#466]) - Added support for wasm-bindgen ([#541], [#559], [#562], [#600]) - Enable `OsRng` for powerpc64, sparc and sparc64 ([#609]) - Use `syscall` from `libc` on Linux instead of redefining it ([#629]) ### RNGs - Switch `SmallRng` to use PCG ([#623]) - Implement `Pcg32` and `Pcg64Mcg` generators ([#632]) - Move ISAAC RNGs to a dedicated crate ([#551]) - Move Xorshift RNG to its own crate ([#557]) - Move ChaCha and HC128 RNGs to dedicated crates ([#607], [#636]) - Remove usage of `Rc` from `ThreadRng` ([#615]) ### Sampling and distributions - Implement `Rng.gen_ratio()` and `Bernoulli::new_ratio()` ([#491]) - Make `Uniform` strictly respect `f32` / `f64` high/low bounds ([#477]) - Allow `gen_range` and `Uniform` to work on non-`Copy` types ([#506]) - `Uniform` supports inclusive ranges: `Uniform::from(a..=b)`. This is automatically enabled for Rust >= 1.27. ([#566]) - Implement `TrustedLen` and `FusedIterator` for `DistIter` ([#620]) #### New distributions - Add the `Dirichlet` distribution ([#485]) - Added sampling from the unit sphere and circle ([#567]) - Implement the triangular distribution ([#575]) - Implement the Weibull distribution ([#576]) - Implement the Beta distribution ([#574]) #### Optimisations - Optimise `Bernoulli::new` ([#500]) - Optimise `char` sampling ([#519]) - Optimise sampling of `std::time::Duration` ([#583]) ### Sequences - Redesign the `seq` module ([#483], [#515]) - Add `WeightedIndex` and `choose_weighted` ([#518], [#547]) - Optimised and changed return type of the `sample_indices` function ([#479]) - Use `Iterator::size_hint()` to speed up `IteratorRandom::choose` ([#593]) ### SIMD - Support for generating SIMD types ([#523], [#542], [#561], [#630]) ### Other - Revise CI scripts ([#632], [#635]) - Remove functionality already deprecated in 0.5 ([#499]) - Support for `i128` and `u128` is automatically enabled for Rust >= 1.26. This renders the `i128_support` feature obsolete. It still exists for backwards compatibility but does not have any effect. This breaks programs using Rand with `i128_support` on nightlies older than Rust 1.26. ([#571]) [#466]: https://github.com/rust-random/rand/pull/466 [#477]: https://github.com/rust-random/rand/pull/477 [#479]: https://github.com/rust-random/rand/pull/479 [#483]: https://github.com/rust-random/rand/pull/483 [#485]: https://github.com/rust-random/rand/pull/485 [#491]: https://github.com/rust-random/rand/pull/491 [#499]: https://github.com/rust-random/rand/pull/499 [#500]: https://github.com/rust-random/rand/pull/500 [#506]: https://github.com/rust-random/rand/pull/506 [#515]: https://github.com/rust-random/rand/pull/515 [#518]: https://github.com/rust-random/rand/pull/518 [#519]: https://github.com/rust-random/rand/pull/519 [#523]: https://github.com/rust-random/rand/pull/523 [#541]: https://github.com/rust-random/rand/pull/541 [#542]: https://github.com/rust-random/rand/pull/542 [#544]: https://github.com/rust-random/rand/pull/544 [#547]: https://github.com/rust-random/rand/pull/547 [#551]: https://github.com/rust-random/rand/pull/551 [#557]: https://github.com/rust-random/rand/pull/557 [#559]: https://github.com/rust-random/rand/pull/559 [#561]: https://github.com/rust-random/rand/pull/561 [#562]: https://github.com/rust-random/rand/pull/562 [#566]: https://github.com/rust-random/rand/pull/566 [#567]: https://github.com/rust-random/rand/pull/567 [#571]: https://github.com/rust-random/rand/pull/571 [#574]: https://github.com/rust-random/rand/pull/574 [#575]: https://github.com/rust-random/rand/pull/575 [#576]: https://github.com/rust-random/rand/pull/576 [#578]: https://github.com/rust-random/rand/pull/578 [#583]: https://github.com/rust-random/rand/pull/583 [#591]: https://github.com/rust-random/rand/pull/591 [#593]: https://github.com/rust-random/rand/pull/593 [#600]: https://github.com/rust-random/rand/pull/600 [#607]: https://github.com/rust-random/rand/pull/607 [#609]: https://github.com/rust-random/rand/pull/609 [#611]: https://github.com/rust-random/rand/pull/611 [#615]: https://github.com/rust-random/rand/pull/615 [#620]: https://github.com/rust-random/rand/pull/620 [#623]: https://github.com/rust-random/rand/pull/623 [#629]: https://github.com/rust-random/rand/pull/629 [#630]: https://github.com/rust-random/rand/pull/630 [#632]: https://github.com/rust-random/rand/pull/632 [#635]: https://github.com/rust-random/rand/pull/635 [#636]: https://github.com/rust-random/rand/pull/636 [#642]: https://github.com/rust-random/rand/pull/642 [#643]: https://github.com/rust-random/rand/pull/643 [#647]: https://github.com/rust-random/rand/pull/647 [#649]: https://github.com/rust-random/rand/pull/649 [#657]: https://github.com/rust-random/rand/pull/657 [#660]: https://github.com/rust-random/rand/pull/660 [#662]: https://github.com/rust-random/rand/pull/662 [#664]: https://github.com/rust-random/rand/pull/664 [#668]: https://github.com/rust-random/rand/pull/668 [#671]: https://github.com/rust-random/rand/pull/671 [#674]: https://github.com/rust-random/rand/pull/674 [#675]: https://github.com/rust-random/rand/pull/675 [#685]: https://github.com/rust-random/rand/pull/685 [#686]: https://github.com/rust-random/rand/pull/686 [#691]: https://github.com/rust-random/rand/pull/691 [#696]: https://github.com/rust-random/rand/pull/696 [#703]: https://github.com/rust-random/rand/pull/703 [#711]: https://github.com/rust-random/rand/pull/711 ## [0.5.5] - 2018-08-07 ### Documentation - Fix links in documentation ([#582]) ## [0.5.4] - 2018-07-11 ### Platform support - Make `OsRng` work via WASM/stdweb for WebWorkers ## [0.5.3] - 2018-06-26 ### Platform support - OpenBSD, Bitrig: fix compilation (broken in 0.5.1) ([#530]) ## [0.5.2] - 2018-06-18 ### Platform support - Hide `OsRng` and `JitterRng` on unsupported platforms ([#512]; fixes [#503]) ## [0.5.1] - 2018-06-08 ### New distributions - Added Cauchy distribution. ([#474], [#486]) - Added Pareto distribution. ([#495]) ### Platform support and `OsRng` - Remove blanket Unix implementation. ([#484]) - Remove Wasm unimplemented stub. ([#484]) - Dragonfly BSD: read from `/dev/random`. ([#484]) - Bitrig: use `getentropy` like OpenBSD. ([#484]) - Solaris: (untested) use `getrandom` if available, otherwise `/dev/random`. ([#484]) - Emscripten, `stdweb`: split the read up in chunks. ([#484]) - Emscripten, Haiku: don't do an extra blocking read from `/dev/random`. ([#484]) - Linux, NetBSD, Solaris: read in blocking mode on first use in `fill_bytes`. ([#484]) - Fuchsia, CloudABI: fix compilation (broken in Rand 0.5). ([#484]) ## [0.5.0] - 2018-05-21 ### Crate features and organisation - Minimum Rust version update: 1.22.0. ([#239]) - Create a separate `rand_core` crate. ([#288]) - Deprecate `rand_derive`. ([#256]) - Add `prelude` (and module reorganisation). ([#435]) - Add `log` feature. Logging is now available in `JitterRng`, `OsRng`, `EntropyRng` and `ReseedingRng`. ([#246]) - Add `serde1` feature for some PRNGs. ([#189]) - `stdweb` feature for `OsRng` support on WASM via stdweb. ([#272], [#336]) ### `Rng` trait - Split `Rng` into `RngCore` and `Rng` extension trait. `next_u32`, `next_u64` and `fill_bytes` are now part of `RngCore`. ([#265]) - Add `Rng::sample`. ([#256]) - Deprecate `Rng::gen_weighted_bool`. ([#308]) - Add `Rng::gen_bool`. ([#308]) - Remove `Rng::next_f32` and `Rng::next_f64`. ([#273]) - Add optimized `Rng::fill` and `Rng::try_fill` methods. ([#247]) - Deprecate `Rng::gen_iter`. ([#286]) - Deprecate `Rng::gen_ascii_chars`. ([#279]) ### `rand_core` crate - `rand` now depends on new `rand_core` crate ([#288]) - `RngCore` and `SeedableRng` are now part of `rand_core`. ([#288]) - Add modules to help implementing RNGs `impl` and `le`. ([#209], [#228]) - Add `Error` and `ErrorKind`. ([#225]) - Add `CryptoRng` marker trait. ([#273]) - Add `BlockRngCore` trait. ([#281]) - Add `BlockRng` and `BlockRng64` wrappers to help implementations. ([#281], [#325]) - Revise the `SeedableRng` trait. ([#233]) - Remove default implementations for `RngCore::next_u64` and `RngCore::fill_bytes`. ([#288]) - Add `RngCore::try_fill_bytes`. ([#225]) ### Other traits and types - Add `FromEntropy` trait. ([#233], [#375]) - Add `SmallRng` wrapper. ([#296]) - Rewrite `ReseedingRng` to only work with `BlockRngCore` (substantial performance improvement). ([#281]) - Deprecate `weak_rng`. Use `SmallRng` instead. ([#296]) - Deprecate `AsciiGenerator`. ([#279]) ### Random number generators - Switch `StdRng` and `thread_rng` to HC-128. ([#277]) - `StdRng` must now be created with `from_entropy` instead of `new` - Change `thread_rng` reseeding threshold to 32 MiB. ([#277]) - PRNGs no longer implement `Copy`. ([#209]) - `Debug` implementations no longer show internals. ([#209]) - Implement `Clone` for `ReseedingRng`, `JitterRng`, OsRng`. ([#383], [#384]) - Implement serialization for `XorShiftRng`, `IsaacRng` and `Isaac64Rng` under the `serde1` feature. ([#189]) - Implement `BlockRngCore` for `ChaChaCore` and `Hc128Core`. ([#281]) - All PRNGs are now portable across big- and little-endian architectures. ([#209]) - `Isaac64Rng::next_u32` no longer throws away half the results. ([#209]) - Add `IsaacRng::new_from_u64` and `Isaac64Rng::new_from_u64`. ([#209]) - Add the HC-128 CSPRNG `Hc128Rng`. ([#210]) - Change ChaCha20 to have 64-bit counter and 64-bit stream. ([#349]) - Changes to `JitterRng` to get its size down from 2112 to 24 bytes. ([#251]) - Various performance improvements to all PRNGs. ### Platform support and `OsRng` - Add support for CloudABI. ([#224]) - Remove support for NaCl. ([#225]) - WASM support for `OsRng` via stdweb, behind the `stdweb` feature. ([#272], [#336]) - Use `getrandom` on more platforms for Linux, and on Android. ([#338]) - Use the `SecRandomCopyBytes` interface on macOS. ([#322]) - On systems that do not have a syscall interface, only keep a single file descriptor open for `OsRng`. ([#239]) - On Unix, first try a single read from `/dev/random`, then `/dev/urandom`. ([#338]) - Better error handling and reporting in `OsRng` (using new error type). ([#225]) - `OsRng` now uses non-blocking when available. ([#225]) - Add `EntropyRng`, which provides `OsRng`, but has `JitterRng` as a fallback. ([#235]) ### Distributions - New `Distribution` trait. ([#256]) - Add `Distribution::sample_iter` and `Rng::::sample_iter`. ([#361]) - Deprecate `Rand`, `Sample` and `IndependentSample` traits. ([#256]) - Add a `Standard` distribution (replaces most `Rand` implementations). ([#256]) - Add `Binomial` and `Poisson` distributions. ([#96]) - Add `Bernoulli` dsitribution. ([#411]) - Add `Alphanumeric` distribution. ([#279]) - Remove `Closed01` distribution, add `OpenClosed01`. ([#274], [#420]) - Rework `Range` type, making it possible to implement it for user types. ([#274]) - Rename `Range` to `Uniform`. ([#395]) - Add `Uniform::new_inclusive` for inclusive ranges. ([#274]) - Use widening multiply method for much faster integer range reduction. ([#274]) - `Standard` distribution for `char` uses `Uniform` internally. ([#274]) - `Standard` distribution for `bool` uses sign test. ([#274]) - Implement `Standard` distribution for `Wrapping`. ([#436]) - Implement `Uniform` distribution for `Duration`. ([#427]) [#96]: https://github.com/rust-random/rand/pull/96 [#189]: https://github.com/rust-random/rand/pull/189 [#209]: https://github.com/rust-random/rand/pull/209 [#210]: https://github.com/rust-random/rand/pull/210 [#224]: https://github.com/rust-random/rand/pull/224 [#225]: https://github.com/rust-random/rand/pull/225 [#228]: https://github.com/rust-random/rand/pull/228 [#233]: https://github.com/rust-random/rand/pull/233 [#235]: https://github.com/rust-random/rand/pull/235 [#239]: https://github.com/rust-random/rand/pull/239 [#246]: https://github.com/rust-random/rand/pull/246 [#247]: https://github.com/rust-random/rand/pull/247 [#251]: https://github.com/rust-random/rand/pull/251 [#256]: https://github.com/rust-random/rand/pull/256 [#265]: https://github.com/rust-random/rand/pull/265 [#272]: https://github.com/rust-random/rand/pull/272 [#273]: https://github.com/rust-random/rand/pull/273 [#274]: https://github.com/rust-random/rand/pull/274 [#277]: https://github.com/rust-random/rand/pull/277 [#279]: https://github.com/rust-random/rand/pull/279 [#281]: https://github.com/rust-random/rand/pull/281 [#286]: https://github.com/rust-random/rand/pull/286 [#288]: https://github.com/rust-random/rand/pull/288 [#296]: https://github.com/rust-random/rand/pull/296 [#308]: https://github.com/rust-random/rand/pull/308 [#322]: https://github.com/rust-random/rand/pull/322 [#325]: https://github.com/rust-random/rand/pull/325 [#336]: https://github.com/rust-random/rand/pull/336 [#338]: https://github.com/rust-random/rand/pull/338 [#349]: https://github.com/rust-random/rand/pull/349 [#361]: https://github.com/rust-random/rand/pull/361 [#375]: https://github.com/rust-random/rand/pull/375 [#383]: https://github.com/rust-random/rand/pull/383 [#384]: https://github.com/rust-random/rand/pull/384 [#395]: https://github.com/rust-random/rand/pull/395 [#411]: https://github.com/rust-random/rand/pull/411 [#420]: https://github.com/rust-random/rand/pull/420 [#427]: https://github.com/rust-random/rand/pull/427 [#435]: https://github.com/rust-random/rand/pull/435 [#436]: https://github.com/rust-random/rand/pull/436 [#474]: https://github.com/rust-random/rand/pull/474 [#484]: https://github.com/rust-random/rand/pull/484 [#486]: https://github.com/rust-random/rand/pull/486 [#495]: https://github.com/rust-random/rand/pull/495 [#503]: https://github.com/rust-random/rand/pull/503 [#512]: https://github.com/rust-random/rand/pull/512 [#530]: https://github.com/rust-random/rand/pull/530 [#582]: https://github.com/rust-random/rand/pull/582 ## [0.4.6] - 2019-01-26 ### Platforms - Fuchsia: Replaced fuchsia-zircon with fuchsia-cprng ## [0.4.5] - 2019-01-09 ### Fixed - Remove dependency on default features of `rand_core` ([#689]) ## [0.4.4] - 2019-01-08 Version yanked due to semver-breaking change ([#688]). ### Added - SGX support ## [0.4.3] - 2018-08-16 ### Fixed - Use correct syscall number for PowerPC ([#589]) ## [0.4.2] - 2018-01-06 ### Changed - Use `winapi` on Windows - Update for Fuchsia OS - Remove dev-dependency on `log` ## [0.4.1] - 2017-12-17 ### Added - `no_std` support ## [0.4.0-pre.0] - 2017-12-11 ### Added - `JitterRng` added as a high-quality alternative entropy source using the system timer - new `seq` module with `sample_iter`, `sample_slice`, etc. - WASM support via dummy implementations (fail at run-time) - Additional benchmarks, covering generators and new seq code ### Changed - `thread_rng` uses `JitterRng` if seeding from system time fails (slower but more secure than previous method) ### Deprecated - `sample` function deprecated (replaced by `sample_iter`) [#589]: https://github.com/rust-random/rand/pull/589 [#688]: https://github.com/rust-random/rand/pull/688 [#689]: https://github.com/rust-random/rand/pull/689 ## [0.3.22] - 2018-02-05 Code replaced with a compatibility layer over rand 0.4. ## [0.3.20] - 2018-01-06 ### Changed - Remove dev-dependency on `log` - Update `fuchsia-zircon` dependency to 0.3.2 ## [0.3.19] - 2017-12-27 ### Changed - Require `log <= 0.3.8` for dev builds - Update `fuchsia-zircon` dependency to 0.3 - Fix broken links in docs (to unblock compiler docs testing CI) ## [0.3.18] - 2017-11-06 ### Changed - `thread_rng` is seeded from the system time if `OsRng` fails - `weak_rng` now uses `thread_rng` internally ## [0.3.17] - 2017-10-07 ### Changed - Fuchsia: Magenta was renamed Zircon ## [0.3.16] - 2017-07-27 ### Added - Implement Debug for mote non-public types - implement `Rand` for (i|u)i128 - Support for Fuchsia ### Changed - Add inline attribute to SampleRange::construct_range. This improves the benchmark for sample in 11% and for shuffle in 16%. - Use `RtlGenRandom` instead of `CryptGenRandom` ## [0.3.15] - 2016-11-26 ### Added - Add `Rng` trait method `choose_mut` - Redox support ### Changed - Use `arc4rand` for `OsRng` on FreeBSD. - Use `arc4random(3)` for `OsRng` on OpenBSD. ### Fixed - Fix filling buffers 4 GiB or larger with `OsRng::fill_bytes` on Windows ## [0.3.14] - 2016-02-13 ### Fixed - Inline definitions from winapi/advapi32, which decreases build times ## [0.3.13] - 2016-01-09 ### Fixed - Compatible with Rust 1.7.0-nightly (needed some extra type annotations) ## [0.3.12] - 2015-11-09 ### Changed - Replaced the methods in `next_f32` and `next_f64` with the technique described Saito & Matsumoto at MCQMC'08. The new method should exhibit a slightly more uniform distribution. - Depend on libc 0.2 ### Fixed - Fix iterator protocol issue in `rand::sample` ## [0.3.11] - 2015-08-31 ### Added - Implement `Rand` for arrays with n <= 32 ## [0.3.10] - 2015-08-17 ### Added - Support for NaCl platforms ### Changed - Allow `Rng` to be `?Sized`, impl for `&mut R` and `Box` where `R: ?Sized + Rng` ## [0.3.9] - 2015-06-18 ### Changed - Use `winapi` for Windows API things ### Fixed - Fixed test on stable/nightly - Fix `getrandom` syscall number for aarch64-unknown-linux-gnu ## [0.3.8] - 2015-04-23 ### Changed - `log` is a dev dependency ### Fixed - Fix race condition of atomics in `is_getrandom_available` ## [0.3.7] - 2015-04-03 ### Fixed - Derive Copy/Clone changes ## [0.3.6] - 2015-04-02 ### Changed - Move to stable Rust! ## [0.3.5] - 2015-04-01 ### Fixed - Compatible with Rust master ## [0.3.4] - 2015-03-31 ### Added - Implement Clone for `Weighted` ### Fixed - Compatible with Rust master ## [0.3.3] - 2015-03-26 ### Fixed - Fix compile on Windows ## [0.3.2] - 2015-03-26 ## [0.3.1] - 2015-03-26 ### Fixed - Fix compile on Windows ## [0.3.0] - 2015-03-25 ### Changed - Update to use log version 0.3.x ## [0.2.1] - 2015-03-22 ### Fixed - Compatible with Rust master - Fixed iOS compilation ## [0.2.0] - 2015-03-06 ### Fixed - Compatible with Rust master (move from `old_io` to `std::io`) ## [0.1.4] - 2015-03-04 ### Fixed - Compatible with Rust master (use wrapping ops) ## [0.1.3] - 2015-02-20 ### Fixed - Compatible with Rust master ### Removed - Removed Copy implementations from RNGs ## [0.1.2] - 2015-02-03 ### Added - Imported functionality from `std::rand`, including: - `StdRng`, `SeedableRng`, `TreadRng`, `weak_rng()` - `ReaderRng`: A wrapper around any Reader to treat it as an RNG. - Imported documentation from `std::rand` - Imported tests from `std::rand` ## 0.1.1 - 2015-02-03 ### Added - Migrate to a cargo-compatible directory structure. ### Fixed - Do not use entropy during `gen_weighted_bool(1)` ## Rust 0.12.0 - 2014-10-09 ### Added - Impl Rand for tuples of arity 11 and 12 - Include ChaCha pseudorandom generator - Add `next_f64` and `next_f32` to Rng - Implement Clone for PRNGs ### Changed - Rename `TaskRng` to `ThreadRng` and `task_rng` to `thread_rng` (since a runtime is removed from Rust). ### Fixed - Improved performance of ISAAC and ISAAC64 by 30% and 12 % respectively, by informing the optimiser that indexing is never out-of-bounds. ### Removed - Removed the Deprecated `choose_option` ## Rust 0.11.0 - 2014-07-02 ### Added - document when to use `OSRng` in cryptographic context, and explain why we use `/dev/urandom` instead of `/dev/random` - `Rng::gen_iter()` which will return an infinite stream of random values - `Rng::gen_ascii_chars()` which will return an infinite stream of random ascii characters ### Changed - Now only depends on libcore! - Remove `Rng.choose()`, rename `Rng.choose_option()` to `.choose()` - Rename OSRng to OsRng - The WeightedChoice structure is no longer built with a `Vec>`, but rather a `&mut [Weighted]`. This means that the WeightedChoice structure now has a lifetime associated with it. - The `sample` method on `Rng` has been moved to a top-level function in the `rand` module due to its dependence on `Vec`. ### Removed - `Rng::gen_vec()` was removed. Previous behavior can be regained with `rng.gen_iter().take(n).collect()` - `Rng::gen_ascii_str()` was removed. Previous behavior can be regained with `rng.gen_ascii_chars().take(n).collect()` - {IsaacRng, Isaac64Rng, XorShiftRng}::new() have all been removed. These all relied on being able to use an OSRng for seeding, but this is no longer available in librand (where these types are defined). To retain the same functionality, these types now implement the `Rand` trait so they can be generated with a random seed from another random number generator. This allows the stdlib to use an OSRng to create seeded instances of these RNGs. - Rand implementations for `Box` and `@T` were removed. These seemed to be pretty rare in the codebase, and it allows for librand to not depend on liballoc. Additionally, other pointer types like Rc and Arc were not supported. - Remove a slew of old deprecated functions ## [Rust 0.10] - 2014-04-03 ### Changed - replace `Rng.shuffle's` functionality with `.shuffle_mut` - bubble up IO errors when creating an OSRng ### Fixed - Use `fill()` instead of `read()` - Rewrite OsRng in Rust for windows ## 0.10-pre - 2014-03-02 ### Added - Separate `rand` out of the standard library [Unreleased]: https://github.com/rust-random/rand/compare/0.10.0...HEAD [0.10.0]: https://github.com/rust-random/rand/compare/0.9.2...0.10.0 [0.9.2]: https://github.com/rust-random/rand/compare/0.9.1...0.9.2 [0.9.1]: https://github.com/rust-random/rand/compare/0.9.0...0.9.1 [0.9.0]: https://github.com/rust-random/rand/compare/0.8.5...0.9.0 [0.8.5]: https://github.com/rust-random/rand/compare/0.8.4...0.8.5 [0.8.4]: https://github.com/rust-random/rand/compare/0.8.3...0.8.4 [0.8.3]: https://github.com/rust-random/rand/compare/0.8.2...0.8.3 [0.8.2]: https://github.com/rust-random/rand/compare/0.8.1...0.8.2 [0.8.1]: https://github.com/rust-random/rand/compare/0.8.0...0.8.1 [0.8.0]: https://github.com/rust-random/rand/compare/0.7.3...0.8.0 [0.7.3]: https://github.com/rust-random/rand/compare/0.7.2...0.7.3 [0.7.2]: https://github.com/rust-random/rand/compare/0.7.1...0.7.2 [0.7.1]: https://github.com/rust-random/rand/compare/0.7.0...0.7.1 [0.7.0]: https://github.com/rust-random/rand/compare/0.6.5...0.7.0 [0.6.5]: https://github.com/rust-random/rand/compare/0.6.4...0.6.5 [0.6.4]: https://github.com/rust-random/rand/compare/0.6.3...0.6.4 [0.6.3]: https://github.com/rust-random/rand/compare/0.6.2...0.6.3 [0.6.2]: https://github.com/rust-random/rand/compare/0.6.1...0.6.2 [0.6.1]: https://github.com/rust-random/rand/compare/0.6.0...0.6.1 [0.6.0]: https://github.com/rust-random/rand/compare/0.5.5...0.6.0 [0.5.5]: https://github.com/rust-random/rand/compare/0.5.4...0.5.5 [0.5.4]: https://github.com/rust-random/rand/compare/0.5.3...0.5.4 [0.5.3]: https://github.com/rust-random/rand/compare/0.5.2...0.5.3 [0.5.2]: https://github.com/rust-random/rand/compare/0.5.1...0.5.2 [0.5.1]: https://github.com/rust-random/rand/compare/0.5.0...0.5.1 [0.5.0]: https://github.com/rust-random/rand/compare/0.4.6...0.5.0 [0.4.6]: https://github.com/rust-random/rand/compare/0.4.5...0.4.6 [0.4.5]: https://github.com/rust-random/rand/compare/0.4.4...0.4.5 [0.4.4]: https://github.com/rust-random/rand/compare/0.4.3...0.4.4 [0.4.3]: https://github.com/rust-random/rand/compare/0.4.2...0.4.3 [0.4.2]: https://github.com/rust-random/rand/compare/0.4.1...0.4.2 [0.4.1]: https://github.com/rust-random/rand/compare/0.4.0-pre.0...0.4.1 [0.4.0-pre.0]: https://github.com/rust-random/rand/compare/0.3.22...0.4.0-pre.0 [0.3.22]: https://github.com/rust-random/rand/compare/0.3.20...0.3.22 [0.3.20]: https://github.com/rust-random/rand/compare/0.3.19...0.3.20 [0.3.19]: https://github.com/rust-random/rand/compare/0.3.18...0.3.19 [0.3.18]: https://github.com/rust-random/rand/compare/0.3.17...0.3.18 [0.3.17]: https://github.com/rust-random/rand/compare/0.3.16...0.3.17 [0.3.16]: https://github.com/rust-random/rand/compare/0.3.15...0.3.16 [0.3.15]: https://github.com/rust-random/rand/compare/0.3.14...0.3.15 [0.3.14]: https://github.com/rust-random/rand/compare/0.3.13...0.3.14 [0.3.13]: https://github.com/rust-random/rand/compare/0.3.12...0.3.13 [0.3.12]: https://github.com/rust-random/rand/compare/0.3.11...0.3.12 [0.3.11]: https://github.com/rust-random/rand/compare/0.3.10...0.3.11 [0.3.10]: https://github.com/rust-random/rand/compare/0.3.9...0.3.10 [0.3.9]: https://github.com/rust-random/rand/compare/0.3.8...0.3.9 [0.3.8]: https://github.com/rust-random/rand/compare/0.3.7...0.3.8 [0.3.7]: https://github.com/rust-random/rand/compare/0.3.6...0.3.7 [0.3.6]: https://github.com/rust-random/rand/compare/0.3.5...0.3.6 [0.3.5]: https://github.com/rust-random/rand/compare/0.3.4...0.3.5 [0.3.4]: https://github.com/rust-random/rand/compare/0.3.3...0.3.4 [0.3.3]: https://github.com/rust-random/rand/compare/0.3.2...0.3.3 [0.3.2]: https://github.com/rust-random/rand/compare/0.3.1...0.3.2 [0.3.1]: https://github.com/rust-random/rand/compare/0.3.0...0.3.1 [0.3.0]: https://github.com/rust-random/rand/compare/0.2.1...0.3.0 [0.2.1]: https://github.com/rust-random/rand/compare/0.2.0...0.2.1 [0.2.0]: https://github.com/rust-random/rand/compare/0.1.4...0.2.0 [0.1.3]: https://github.com/rust-random/rand/compare/0.1.3...0.1.4 [0.1.3]: https://github.com/rust-random/rand/compare/0.1.2...0.1.3 [0.1.2]: https://github.com/rust-random/rand/compare/0.1.1...0.1.2 # Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). A [separate changelog is kept for rand_core](https://github.com/rust-random/core/blob/master/CHANGELOG.md). You may also find the [Upgrade Guide](https://rust-random.github.io/book/update.html) useful. ## [0.10.1] — 2026-02-11 This release includes a fix for a soundness bug; see [#1763]. ### Changes - Document panic behavior of `make_rng` and add `#[track_caller]` ([#1761]) - Deprecate feature `log` ([#1763]) [#1761]: https://github.com/rust-random/rand/pull/1761 [#1763]: https://github.com/rust-random/rand/pull/1763 ## [0.10.0] - 2026-02-08 ### Changes - The dependency on `rand_chacha` has been replaced with a dependency on `chacha20`. This changes the implementation behind `StdRng`, but the output remains the same. There may be some API breakage when using the ChaCha-types directly as these are now the ones in `chacha20` instead of `rand_chacha` ([#1642]). - Rename fns `IndexedRandom::choose_multiple` -> `sample`, `choose_multiple_array` -> `sample_array`, `choose_multiple_weighted` -> `sample_weighted`, struct `SliceChooseIter` -> `IndexedSamples` and fns `IteratorRandom::choose_multiple` -> `sample`, `choose_multiple_fill` -> `sample_fill` ([#1632]) - Use Edition 2024 and MSRV 1.85 ([#1653]) - Let `Fill` be implemented for element types, not sliceable types ([#1652]) - Fix `OsError::raw_os_error` on UEFI targets by returning `Option` ([#1665]) - Replace fn `TryRngCore::read_adapter(..) -> RngReadAdapter` with simpler struct `RngReader` ([#1669]) - Remove fns `SeedableRng::from_os_rng`, `try_from_os_rng` ([#1674]) - Remove `Clone` support for `StdRng`, `ReseedingRng` ([#1677]) - Use `postcard` instead of `bincode` to test the serde feature ([#1693]) - Avoid excessive allocation in `IteratorRandom::sample` when `amount` is much larger than iterator size ([#1695]) - Rename `os_rng` -> `sys_rng`, `OsRng` -> `SysRng`, `OsError` -> `SysError` ([#1697]) - Rename `Rng` -> `RngExt` as upstream `rand_core` has renamed `RngCore` -> `Rng` ([#1717]) ### Additions - Add fns `IndexedRandom::choose_iter`, `choose_weighted_iter` ([#1632]) - Pub export `Xoshiro128PlusPlus`, `Xoshiro256PlusPlus` prngs ([#1649]) - Pub export `ChaCha8Rng`, `ChaCha12Rng`, `ChaCha20Rng` behind `chacha` feature ([#1659]) - Fn `rand::make_rng() -> R where R: SeedableRng` ([#1734]) ### Removals - Removed `ReseedingRng` ([#1722]) - Removed unused feature "nightly" ([#1732]) - Removed feature `small_rng` ([#1732]) [#1632]: https://github.com/rust-random/rand/pull/1632 [#1642]: https://github.com/rust-random/rand/pull/1642 [#1649]: https://github.com/rust-random/rand/pull/1649 [#1652]: https://github.com/rust-random/rand/pull/1652 [#1653]: https://github.com/rust-random/rand/pull/1653 [#1659]: https://github.com/rust-random/rand/pull/1659 [#1665]: https://github.com/rust-random/rand/pull/1665 [#1669]: https://github.com/rust-random/rand/pull/1669 [#1674]: https://github.com/rust-random/rand/pull/1674 [#1677]: https://github.com/rust-random/rand/pull/1677 [#1693]: https://github.com/rust-random/rand/pull/1693 [#1695]: https://github.com/rust-random/rand/pull/1695 [#1697]: https://github.com/rust-random/rand/pull/1697 [#1717]: https://github.com/rust-random/rand/pull/1717 [#1722]: https://github.com/rust-random/rand/pull/1722 [#1732]: https://github.com/rust-random/rand/pull/1732 [#1734]: https://github.com/rust-random/rand/pull/1734 ## [0.9.2] - 2025-07-20 ### Deprecated - Deprecate `rand::rngs::mock` module and `StepRng` generator ([#1634]) ### Additions - Enable `WeightedIndex` (de)serialization ([#1646]) ## [0.9.1] - 2025-04-17 ### Security and unsafe - Revise "not a crypto library" policy again ([#1565]) - Remove `zerocopy` dependency from `rand` ([#1579]) ### Fixes - Fix feature `simd_support` for recent nightly rust ([#1586]) ### Changes - Allow `fn rand::seq::index::sample_weighted` and `fn IndexedRandom::choose_multiple_weighted` to return fewer than `amount` results ([#1623]), reverting an undocumented change ([#1382]) to the previous release. ### Additions - Add `rand::distr::Alphabetic` distribution. ([#1587]) - Re-export `rand_core` ([#1604]) [#1565]: https://github.com/rust-random/rand/pull/1565 [#1579]: https://github.com/rust-random/rand/pull/1579 [#1586]: https://github.com/rust-random/rand/pull/1586 [#1587]: https://github.com/rust-random/rand/pull/1587 [#1604]: https://github.com/rust-random/rand/pull/1604 [#1623]: https://github.com/rust-random/rand/pull/1623 [#1634]: https://github.com/rust-random/rand/pull/1634 [#1646]: https://github.com/rust-random/rand/pull/1646 ## [0.9.0] - 2025-01-27 ### Security and unsafe - Policy: "rand is not a crypto library" ([#1514]) - Remove fork-protection from `ReseedingRng` and `ThreadRng`. Instead, it is recommended to call `ThreadRng::reseed` on fork. ([#1379]) - Use `zerocopy` to replace some `unsafe` code ([#1349], [#1393], [#1446], [#1502]) ### Dependencies - Bump the MSRV to 1.63.0 ([#1207], [#1246], [#1269], [#1341], [#1416], [#1536]); note that 1.60.0 may work for dependents when using `--ignore-rust-version` - Update to `rand_core` v0.9.0 ([#1558]) ### Features - Support `std` feature without `getrandom` or `rand_chacha` ([#1354]) - Enable feature `small_rng` by default ([#1455]) - Remove implicit feature `rand_chacha`; use `std_rng` instead. ([#1473]) - Rename feature `serde1` to `serde` ([#1477]) - Rename feature `getrandom` to `os_rng` ([#1537]) - Add feature `thread_rng` ([#1547]) ### API changes: rand_core traits - Add fn `RngCore::read_adapter` implementing `std::io::Read` ([#1267]) - Add trait `CryptoBlockRng: BlockRngCore`; make `trait CryptoRng: RngCore` ([#1273]) - Add traits `TryRngCore`, `TryCryptoRng` ([#1424], [#1499]) - Rename `fn SeedableRng::from_rng` -> `try_from_rng` and add infallible variant `fn from_rng` ([#1424]) - Rename `fn SeedableRng::from_entropy` -> `from_os_rng` and add fallible variant `fn try_from_os_rng` ([#1424]) - Add bounds `Clone` and `AsRef` to associated type `SeedableRng::Seed` ([#1491]) ### API changes: Rng trait and top-level fns - Rename fn `rand::thread_rng()` to `rand::rng()` and remove from the prelude ([#1506]) - Remove fn `rand::random()` from the prelude ([#1506]) - Add top-level fns `random_iter`, `random_range`, `random_bool`, `random_ratio`, `fill` ([#1488]) - Re-introduce fn `Rng::gen_iter` as `random_iter` ([#1305], [#1500]) - Rename fn `Rng::gen` to `random` to avoid conflict with the new `gen` keyword in Rust 2024 ([#1438]) - Rename fns `Rng::gen_range` to `random_range`, `gen_bool` to `random_bool`, `gen_ratio` to `random_ratio` ([#1505]) - Annotate panicking methods with `#[track_caller]` ([#1442], [#1447]) ### API changes: RNGs - Fix `::Seed` size to 256 bits ([#1455]) - Remove first parameter (`rng`) of `ReseedingRng::new` ([#1533]) ### API changes: Sequences - Split trait `SliceRandom` into `IndexedRandom`, `IndexedMutRandom`, `SliceRandom` ([#1382]) - Add `IndexedRandom::choose_multiple_array`, `index::sample_array` ([#1453], [#1469]) ### API changes: Distributions: renames - Rename module `rand::distributions` to `rand::distr` ([#1470]) - Rename distribution `Standard` to `StandardUniform` ([#1526]) - Move `distr::Slice` -> `distr::slice::Choose`, `distr::EmptySlice` -> `distr::slice::Empty` ([#1548]) - Rename trait `distr::DistString` -> `distr::SampleString` ([#1548]) - Rename `distr::DistIter` -> `distr::Iter`, `distr::DistMap` -> `distr::Map` ([#1548]) ### API changes: Distributions - Relax `Sized` bound on `Distribution for &D` ([#1278]) - Remove impl of `Distribution>` for `StandardUniform` ([#1526]) - Let distribution `StandardUniform` support all `NonZero*` types ([#1332]) - Fns `{Uniform, UniformSampler}::{new, new_inclusive}` return a `Result` (instead of potentially panicking) ([#1229]) - Distribution `Uniform` implements `TryFrom` instead of `From` for ranges ([#1229]) - Add `UniformUsize` ([#1487]) - Remove support for generating `isize` and `usize` values with `StandardUniform`, `Uniform` (except via `UniformUsize`) and `Fill` and usage as a `WeightedAliasIndex` weight ([#1487]) - Add impl `DistString` for distributions `Slice` and `Uniform` ([#1315]) - Add fn `Slice::num_choices` ([#1402]) - Add fn `p()` for distribution `Bernoulli` to access probability ([#1481]) ### API changes: Weighted distributions - Add `pub` module `rand::distr::weighted`, moving `WeightedIndex` there ([#1548]) - Add trait `weighted::Weight`, allowing `WeightedIndex` to trap overflow ([#1353]) - Add fns `weight, weights, total_weight` to distribution `WeightedIndex` ([#1420]) - Rename enum `WeightedError` to `weighted::Error`, revising variants ([#1382]) and mark as `#[non_exhaustive]` ([#1480]) ### API changes: SIMD - Switch to `std::simd`, expand SIMD & docs ([#1239]) ### Reproducibility-breaking changes - Make `ReseedingRng::reseed` discard remaining data from the last block generated ([#1379]) - Change fn `SmallRng::seed_from_u64` implementation ([#1203]) - Allow `UniformFloat::new` samples and `UniformFloat::sample_single` to yield `high` ([#1462]) - Fix portability of distribution `Slice` ([#1469]) - Make `Uniform` for `usize` portable via `UniformUsize` ([#1487]) - Fix `IndexdRandom::choose_multiple_weighted` for very small seeds and optimize for large input length / low memory ([#1530]) ### Reproducibility-breaking optimisations - Optimize fn `sample_floyd`, affecting output of `rand::seq::index::sample` and `rand::seq::SliceRandom::choose_multiple` ([#1277]) - New, faster algorithms for `IteratorRandom::choose` and `choose_stable` ([#1268]) - New, faster algorithms for `SliceRandom::shuffle` and `partial_shuffle` ([#1272]) - Optimize distribution `Uniform`: use Canon's method (single sampling) / Lemire's method (distribution sampling) for faster sampling (breaks value stability; [#1287]) - Optimize fn `sample_single_inclusive` for floats (+~20% perf) ([#1289]) ### Other optimisations - Improve `SmallRng` initialization performance ([#1482]) - Optimise SIMD widening multiply ([#1247]) ### Other - Add `Cargo.lock.msrv` file ([#1275]) - Reformat with `rustfmt` and enforce ([#1448]) - Apply Clippy suggestions and enforce ([#1448], [#1474]) - Move all benchmarks to new `benches` crate ([#1329], [#1439]) and migrate to Criterion ([#1490]) ### Documentation - Improve `ThreadRng` related docs ([#1257]) - Docs: enable experimental `--generate-link-to-definition` feature ([#1327]) - Better doc of crate features, use `doc_auto_cfg` ([#1411], [#1450]) [#1203]: https://github.com/rust-random/rand/pull/1203 [#1207]: https://github.com/rust-random/rand/pull/1207 [#1229]: https://github.com/rust-random/rand/pull/1229 [#1239]: https://github.com/rust-random/rand/pull/1239 [#1246]: https://github.com/rust-random/rand/pull/1246 [#1247]: https://github.com/rust-random/rand/pull/1247 [#1257]: https://github.com/rust-random/rand/pull/1257 [#1267]: https://github.com/rust-random/rand/pull/1267 [#1268]: https://github.com/rust-random/rand/pull/1268 [#1269]: https://github.com/rust-random/rand/pull/1269 [#1272]: https://github.com/rust-random/rand/pull/1272 [#1273]: https://github.com/rust-random/rand/pull/1273 [#1275]: https://github.com/rust-random/rand/pull/1275 [#1277]: https://github.com/rust-random/rand/pull/1277 [#1278]: https://github.com/rust-random/rand/pull/1278 [#1287]: https://github.com/rust-random/rand/pull/1287 [#1289]: https://github.com/rust-random/rand/pull/1289 [#1305]: https://github.com/rust-random/rand/pull/1305 [#1315]: https://github.com/rust-random/rand/pull/1315 [#1327]: https://github.com/rust-random/rand/pull/1327 [#1329]: https://github.com/rust-random/rand/pull/1329 [#1332]: https://github.com/rust-random/rand/pull/1332 [#1341]: https://github.com/rust-random/rand/pull/1341 [#1349]: https://github.com/rust-random/rand/pull/1349 [#1353]: https://github.com/rust-random/rand/pull/1353 [#1354]: https://github.com/rust-random/rand/pull/1354 [#1379]: https://github.com/rust-random/rand/pull/1379 [#1382]: https://github.com/rust-random/rand/pull/1382 [#1393]: https://github.com/rust-random/rand/pull/1393 [#1402]: https://github.com/rust-random/rand/pull/1402 [#1411]: https://github.com/rust-random/rand/pull/1411 [#1416]: https://github.com/rust-random/rand/pull/1416 [#1420]: https://github.com/rust-random/rand/pull/1420 [#1424]: https://github.com/rust-random/rand/pull/1424 [#1438]: https://github.com/rust-random/rand/pull/1438 [#1439]: https://github.com/rust-random/rand/pull/1439 [#1442]: https://github.com/rust-random/rand/pull/1442 [#1446]: https://github.com/rust-random/rand/pull/1446 [#1447]: https://github.com/rust-random/rand/pull/1447 [#1448]: https://github.com/rust-random/rand/pull/1448 [#1450]: https://github.com/rust-random/rand/pull/1450 [#1453]: https://github.com/rust-random/rand/pull/1453 [#1455]: https://github.com/rust-random/rand/pull/1455 [#1462]: https://github.com/rust-random/rand/pull/1462 [#1469]: https://github.com/rust-random/rand/pull/1469 [#1470]: https://github.com/rust-random/rand/pull/1470 [#1473]: https://github.com/rust-random/rand/pull/1473 [#1474]: https://github.com/rust-random/rand/pull/1474 [#1477]: https://github.com/rust-random/rand/pull/1477 [#1480]: https://github.com/rust-random/rand/pull/1480 [#1481]: https://github.com/rust-random/rand/pull/1481 [#1482]: https://github.com/rust-random/rand/pull/1482 [#1487]: https://github.com/rust-random/rand/pull/1487 [#1488]: https://github.com/rust-random/rand/pull/1488 [#1490]: https://github.com/rust-random/rand/pull/1490 [#1491]: https://github.com/rust-random/rand/pull/1491 [#1499]: https://github.com/rust-random/rand/pull/1499 [#1500]: https://github.com/rust-random/rand/pull/1500 [#1502]: https://github.com/rust-random/rand/pull/1502 [#1505]: https://github.com/rust-random/rand/pull/1505 [#1506]: https://github.com/rust-random/rand/pull/1506 [#1514]: https://github.com/rust-random/rand/pull/1514 [#1526]: https://github.com/rust-random/rand/pull/1526 [#1530]: https://github.com/rust-random/rand/pull/1530 [#1533]: https://github.com/rust-random/rand/pull/1533 [#1536]: https://github.com/rust-random/rand/pull/1536 [#1537]: https://github.com/rust-random/rand/pull/1537 [#1547]: https://github.com/rust-random/rand/pull/1547 [#1548]: https://github.com/rust-random/rand/pull/1548 [#1558]: https://github.com/rust-random/rand/pull/1558 ## [0.8.5] - 2021-08-20 ### Fixes - Fix build on non-32/64-bit architectures ([#1144]) - Fix "min_const_gen" feature for `no_std` ([#1173]) - Check `libc::pthread_atfork` return value with panic on error ([#1178]) - More robust reseeding in case `ReseedingRng` is used from a fork handler ([#1178]) - Fix nightly: remove unused `slice_partition_at_index` feature ([#1215]) - Fix nightly + `simd_support`: update `packed_simd` ([#1216]) ### Rngs - `StdRng`: Switch from HC128 to ChaCha12 on emscripten ([#1142]). We now use ChaCha12 on all platforms. ### Documentation - Added docs about rand's use of const generics ([#1150]) - Better random chars example ([#1157]) [#1142]: https://github.com/rust-random/rand/pull/1142 [#1144]: https://github.com/rust-random/rand/pull/1144 [#1150]: https://github.com/rust-random/rand/pull/1150 [#1157]: https://github.com/rust-random/rand/pull/1157 [#1173]: https://github.com/rust-random/rand/pull/1173 [#1178]: https://github.com/rust-random/rand/pull/1178 [#1215]: https://github.com/rust-random/rand/pull/1215 [#1216]: https://github.com/rust-random/rand/pull/1216 ## [0.8.4] - 2021-06-15 ### Additions - Use const-generics to support arrays of all sizes ([#1104]) - Implement `Clone` and `Copy` for `Alphanumeric` ([#1126]) - Add `Distribution::map` to derive a distribution using a closure ([#1129]) - Add `Slice` distribution ([#1107]) - Add `DistString` trait with impls for `Standard` and `Alphanumeric` ([#1133]) ### Other - Reorder asserts in `Uniform` float distributions for easier debugging of non-finite arguments ([#1094], [#1108]) - Add range overflow check in `Uniform` float distributions ([#1108]) - Deprecate `rngs::adapter::ReadRng` ([#1130]) ## [0.8.3] - 2021-01-25 ### Fixes - Fix `no-std` + `alloc` build by gating `choose_multiple_weighted` on `std` ([#1088]) ## [0.8.2] - 2021-01-12 ### Fixes - Fix panic in `UniformInt::sample_single_inclusive` and `Rng::gen_range` when providing a full integer range (eg `0..=MAX`) ([#1087]) ## [0.8.1] - 2020-12-31 ### Other - Enable all stable features in the playground ([#1081]) ## [0.8.0] - 2020-12-18 ### Platform support - The minimum supported Rust version is now 1.36 ([#1011]) - `getrandom` updated to v0.2 ([#1041]) - Remove `wasm-bindgen` and `stdweb` feature flags. For details of WASM support, see the [getrandom documentation](https://docs.rs/getrandom/latest). ([#948]) - `ReadRng::next_u32` and `next_u64` now use little-Endian conversion instead of native-Endian, affecting results on Big-Endian platforms ([#1061]) - The `nightly` feature no longer implies the `simd_support` feature ([#1048]) - Fix `simd_support` feature to work on current nightlies ([#1056]) ### Rngs - `ThreadRng` is no longer `Copy` to enable safe usage within thread-local destructors ([#1035]) - `gen_range(a, b)` was replaced with `gen_range(a..b)`. `gen_range(a..=b)` is also supported. Note that `a` and `b` can no longer be references or SIMD types. ([#744], [#1003]) - Replace `AsByteSliceMut` with `Fill` and add support for `[bool], [char], [f32], [f64]` ([#940]) - Restrict `rand::rngs::adapter` to `std` ([#1027]; see also [#928]) - `StdRng`: add new `std_rng` feature flag (enabled by default, but might need to be used if disabling default crate features) ([#948]) - `StdRng`: Switch from ChaCha20 to ChaCha12 for better performance ([#1028]) - `SmallRng`: Replace PCG algorithm with xoshiro{128,256}++ ([#1038]) ### Sequences - Add `IteratorRandom::choose_stable` as an alternative to `choose` which does not depend on size hints ([#1057]) - Improve accuracy and performance of `IteratorRandom::choose` ([#1059]) - Implement `IntoIterator` for `IndexVec`, replacing the `into_iter` method ([#1007]) - Add value stability tests for `seq` module ([#933]) ### Misc - Support `PartialEq` and `Eq` for `StdRng`, `SmallRng` and `StepRng` ([#979]) - Added a `serde1` feature and added Serialize/Deserialize to `UniformInt` and `WeightedIndex` ([#974]) - Drop some unsafe code ([#962], [#963], [#1011]) - Reduce packaged crate size ([#983]) - Migrate to GitHub Actions from Travis+AppVeyor ([#1073]) ### Distributions - `Alphanumeric` samples bytes instead of chars ([#935]) - `Uniform` now supports `char`, enabling `rng.gen_range('A'..='Z')` ([#1068]) - Add `UniformSampler::sample_single_inclusive` ([#1003]) #### Weighted sampling - Implement weighted sampling without replacement ([#976], [#1013]) - `rand::distributions::alias_method::WeightedIndex` was moved to `rand_distr::WeightedAliasIndex`. The simpler alternative `rand::distribution::WeightedIndex` remains. ([#945]) - Improve treatment of rounding errors in `WeightedIndex::update_weights` ([#956]) - `WeightedIndex`: return error on NaN instead of panic ([#1005]) ### Documentation - Document types supported by `random` ([#994]) - Document notes on password generation ([#995]) - Note that `SmallRng` may not be the best choice for performance and in some other cases ([#1038]) - Use `doc(cfg)` to annotate feature-gated items ([#1019]) - Adjust README ([#1065]) [#744]: https://github.com/rust-random/rand/pull/744 [#933]: https://github.com/rust-random/rand/pull/933 [#935]: https://github.com/rust-random/rand/pull/935 [#940]: https://github.com/rust-random/rand/pull/940 [#945]: https://github.com/rust-random/rand/pull/945 [#948]: https://github.com/rust-random/rand/pull/948 [#956]: https://github.com/rust-random/rand/pull/956 [#962]: https://github.com/rust-random/rand/pull/962 [#963]: https://github.com/rust-random/rand/pull/963 [#974]: https://github.com/rust-random/rand/pull/974 [#976]: https://github.com/rust-random/rand/pull/976 [#979]: https://github.com/rust-random/rand/pull/979 [#983]: https://github.com/rust-random/rand/pull/983 [#994]: https://github.com/rust-random/rand/pull/994 [#995]: https://github.com/rust-random/rand/pull/995 [#1003]: https://github.com/rust-random/rand/pull/1003 [#1005]: https://github.com/rust-random/rand/pull/1005 [#1007]: https://github.com/rust-random/rand/pull/1007 [#1011]: https://github.com/rust-random/rand/pull/1011 [#1013]: https://github.com/rust-random/rand/pull/1013 [#1019]: https://github.com/rust-random/rand/pull/1019 [#1027]: https://github.com/rust-random/rand/pull/1027 [#1028]: https://github.com/rust-random/rand/pull/1028 [#1035]: https://github.com/rust-random/rand/pull/1035 [#1038]: https://github.com/rust-random/rand/pull/1038 [#1041]: https://github.com/rust-random/rand/pull/1041 [#1048]: https://github.com/rust-random/rand/pull/1048 [#1056]: https://github.com/rust-random/rand/pull/1056 [#1057]: https://github.com/rust-random/rand/pull/1057 [#1059]: https://github.com/rust-random/rand/pull/1059 [#1061]: https://github.com/rust-random/rand/pull/1061 [#1065]: https://github.com/rust-random/rand/pull/1065 [#1068]: https://github.com/rust-random/rand/pull/1068 [#1073]: https://github.com/rust-random/rand/pull/1073 ## [0.7.3] - 2020-01-10 ### Fixes - The `Bernoulli` distribution constructors now reports an error on NaN and on `denominator == 0`. ([#925]) - Use `std::sync::Once` to register fork handler, avoiding possible atomicity violation ([#928]) - Fix documentation on the precision of generated floating-point values ### Changes - Unix: make libc dependency optional; only use fork protection with std feature ([#928]) ### Additions - Implement `std::error::Error` for `BernoulliError` ([#919]) ## [0.7.2] - 2019-09-16 ### Fixes - Fix dependency on `rand_core` 0.5.1 ([#890]) ### Additions - Unit tests for value stability of distributions added ([#888]) ## [0.7.1] - 2019-09-13 ### Yanked This release was yanked since it depends on `rand_core::OsRng` added in 0.5.1 but specifies a dependency on version 0.5.0 ([#890]), causing broken builds when updating from `rand 0.7.0` without also updating `rand_core`. ### Fixes - Fix `no_std` behaviour, appropriately enable c2-chacha's `std` feature ([#844]) - `alloc` feature in `no_std` is available since Rust 1.36 ([#856]) - Fix or squelch issues from Clippy lints ([#840]) ### Additions - Add a `no_std` target to CI to continuously evaluate `no_std` status ([#844]) - `WeightedIndex`: allow adjusting a sub-set of weights ([#866]) ## [0.7.0] - 2019-06-28 ### Fixes - Fix incorrect pointer usages revealed by Miri testing ([#780], [#781]) - Fix (tiny!) bias in `Uniform` for 8- and 16-bit ints ([#809]) ### Crate - Bumped MSRV (min supported Rust version) to 1.32.0 - Updated to Rust Edition 2018 ([#823], [#824]) - Removed dependence on `rand_xorshift`, `rand_isaac`, `rand_jitter` crates ([#759], [#765]) - Remove dependency on `winapi` ([#724]) - Removed all `build.rs` files ([#824]) - Removed code already deprecated in version 0.6 ([#757]) - Removed the serde1 feature (It's still available for backwards compatibility, but it does not do anything. [#830]) - Many documentation changes ### rand_core - Updated to `rand_core` 0.5.0 - `Error` type redesigned with new API ([#800]) - Move `from_entropy` method to `SeedableRng` and remove `FromEntropy` ([#800]) - `SeedableRng::from_rng` is now expected to be value-stable ([#815]) ### Standard RNGs - OS interface moved from `rand_os` to new `getrandom` crate ([#765], [getrandom](https://github.com/rust-random/getrandom)) - Use ChaCha for `StdRng` and `ThreadRng` ([#792]) - Feature-gate `SmallRng` ([#792]) - `ThreadRng` now supports `Copy` ([#758]) - Deprecated `EntropyRng` ([#765]) - Enable fork protection of `ReseedingRng` without `std` ([#724]) ### Distributions - Many distributions have been moved to `rand_distr` ([#761]) - `Bernoulli::new` constructor now returns a `Result` ([#803]) - `Distribution::sample_iter` adjusted for more flexibility ([#758]) - Added `distributions::weighted::alias_method::WeightedIndex` for `O(1)` sampling ([#692]) - Support sampling `NonZeroU*` types with the `Standard` distribution ([#728]) - Optimised `Binomial` distribution sampling ([#735], [#740], [#752]) - Optimised SIMD float sampling ([#739]) ### Sequences - Make results portable across 32- and 64-bit by using `u32` samples for `usize` where possible ([#809]) [#692]: https://github.com/rust-random/rand/pull/692 [#724]: https://github.com/rust-random/rand/pull/724 [#728]: https://github.com/rust-random/rand/pull/728 [#735]: https://github.com/rust-random/rand/pull/735 [#739]: https://github.com/rust-random/rand/pull/739 [#740]: https://github.com/rust-random/rand/pull/740 [#752]: https://github.com/rust-random/rand/pull/752 [#757]: https://github.com/rust-random/rand/pull/757 [#758]: https://github.com/rust-random/rand/pull/758 [#759]: https://github.com/rust-random/rand/pull/759 [#761]: https://github.com/rust-random/rand/pull/761 [#765]: https://github.com/rust-random/rand/pull/765 [#780]: https://github.com/rust-random/rand/pull/780 [#781]: https://github.com/rust-random/rand/pull/781 [#792]: https://github.com/rust-random/rand/pull/792 [#800]: https://github.com/rust-random/rand/pull/800 [#803]: https://github.com/rust-random/rand/pull/803 [#809]: https://github.com/rust-random/rand/pull/809 [#815]: https://github.com/rust-random/rand/pull/815 [#823]: https://github.com/rust-random/rand/pull/823 [#824]: https://github.com/rust-random/rand/pull/824 [#830]: https://github.com/rust-random/rand/pull/830 [#840]: https://github.com/rust-random/rand/pull/840 [#844]: https://github.com/rust-random/rand/pull/844 [#856]: https://github.com/rust-random/rand/pull/856 [#866]: https://github.com/rust-random/rand/pull/866 [#888]: https://github.com/rust-random/rand/pull/888 [#890]: https://github.com/rust-random/rand/pull/890 [#919]: https://github.com/rust-random/rand/pull/919 [#925]: https://github.com/rust-random/rand/pull/925 [#928]: https://github.com/rust-random/rand/pull/928 ## [0.6.5] - 2019-01-28 ### Crates - Update `rand_core` to 0.4 ([#703]) - Move `JitterRng` to its own crate ([#685]) - Add a wasm-bindgen test crate ([#696]) ### Platforms - Fuchsia: Replaced fuchsia-zircon with fuchsia-cprng ### Doc - Use RFC 1946 for doc links ([#691]) - Fix some doc links and notes ([#711]) ## [0.6.4] - 2019-01-08 ### Fixes - Move wasm-bindgen shims to correct crate ([#686]) - Make `wasm32-unknown-unknown` compile but fail at run-time if missing bindings ([#686]) ## [0.6.3] - 2019-01-04 ### Fixes - Make the `std` feature require the optional `rand_os` dependency ([#675]) - Re-export the optional WASM dependencies of `rand_os` from `rand` to avoid breakage ([#674]) ## [0.6.2] - 2019-01-04 ### Additions - Add `Default` for `ThreadRng` ([#657]) - Move `rngs::OsRng` to `rand_os` sub-crate; clean up code; use as dependency ([#643]) - Add `rand_xoshiro` sub-crate, plus benchmarks ([#642], [#668]) ### Fixes - Fix bias in `UniformInt::sample_single` ([#662]) - Use `autocfg` instead of `rustc_version` for rustc version detection ([#664]) - Disable `i128` and `u128` if the `target_os` is `emscripten` ([#671]: work-around Emscripten limitation) - CI fixes ([#660], [#671]) ### Optimisations - Optimise memory usage of `UnitCircle` and `UnitSphereSurface` distributions (no PR) ## [0.6.1] - 2018-11-22 - Support sampling `Duration` also for `no_std` (only since Rust 1.25) ([#649]) - Disable default features of `libc` ([#647]) ## [0.6.0] - 2018-11-14 ### Project organisation - Rand has moved from [rust-lang-nursery](https://github.com/rust-lang-nursery/rand) to [rust-random](https://github.com/rust-random/rand)! ([#578]) - Created [The Rust Random Book](https://rust-random.github.io/book/) ([source](https://github.com/rust-random/book)) - Update copyright and licence notices ([#591], [#611]) - Migrate policy documentation from the wiki ([#544]) ### Platforms - Add fork protection on Unix ([#466]) - Added support for wasm-bindgen ([#541], [#559], [#562], [#600]) - Enable `OsRng` for powerpc64, sparc and sparc64 ([#609]) - Use `syscall` from `libc` on Linux instead of redefining it ([#629]) ### RNGs - Switch `SmallRng` to use PCG ([#623]) - Implement `Pcg32` and `Pcg64Mcg` generators ([#632]) - Move ISAAC RNGs to a dedicated crate ([#551]) - Move Xorshift RNG to its own crate ([#557]) - Move ChaCha and HC128 RNGs to dedicated crates ([#607], [#636]) - Remove usage of `Rc` from `ThreadRng` ([#615]) ### Sampling and distributions - Implement `Rng.gen_ratio()` and `Bernoulli::new_ratio()` ([#491]) - Make `Uniform` strictly respect `f32` / `f64` high/low bounds ([#477]) - Allow `gen_range` and `Uniform` to work on non-`Copy` types ([#506]) - `Uniform` supports inclusive ranges: `Uniform::from(a..=b)`. This is automatically enabled for Rust >= 1.27. ([#566]) - Implement `TrustedLen` and `FusedIterator` for `DistIter` ([#620]) #### New distributions - Add the `Dirichlet` distribution ([#485]) - Added sampling from the unit sphere and circle ([#567]) - Implement the triangular distribution ([#575]) - Implement the Weibull distribution ([#576]) - Implement the Beta distribution ([#574]) #### Optimisations - Optimise `Bernoulli::new` ([#500]) - Optimise `char` sampling ([#519]) - Optimise sampling of `std::time::Duration` ([#583]) ### Sequences - Redesign the `seq` module ([#483], [#515]) - Add `WeightedIndex` and `choose_weighted` ([#518], [#547]) - Optimised and changed return type of the `sample_indices` function ([#479]) - Use `Iterator::size_hint()` to speed up `IteratorRandom::choose` ([#593]) ### SIMD - Support for generating SIMD types ([#523], [#542], [#561], [#630]) ### Other - Revise CI scripts ([#632], [#635]) - Remove functionality already deprecated in 0.5 ([#499]) - Support for `i128` and `u128` is automatically enabled for Rust >= 1.26. This renders the `i128_support` feature obsolete. It still exists for backwards compatibility but does not have any effect. This breaks programs using Rand with `i128_support` on nightlies older than Rust 1.26. ([#571]) [#466]: https://github.com/rust-random/rand/pull/466 [#477]: https://github.com/rust-random/rand/pull/477 [#479]: https://github.com/rust-random/rand/pull/479 [#483]: https://github.com/rust-random/rand/pull/483 [#485]: https://github.com/rust-random/rand/pull/485 [#491]: https://github.com/rust-random/rand/pull/491 [#499]: https://github.com/rust-random/rand/pull/499 [#500]: https://github.com/rust-random/rand/pull/500 [#506]: https://github.com/rust-random/rand/pull/506 [#515]: https://github.com/rust-random/rand/pull/515 [#518]: https://github.com/rust-random/rand/pull/518 [#519]: https://github.com/rust-random/rand/pull/519 [#523]: https://github.com/rust-random/rand/pull/523 [#541]: https://github.com/rust-random/rand/pull/541 [#542]: https://github.com/rust-random/rand/pull/542 [#544]: https://github.com/rust-random/rand/pull/544 [#547]: https://github.com/rust-random/rand/pull/547 [#551]: https://github.com/rust-random/rand/pull/551 [#557]: https://github.com/rust-random/rand/pull/557 [#559]: https://github.com/rust-random/rand/pull/559 [#561]: https://github.com/rust-random/rand/pull/561 [#562]: https://github.com/rust-random/rand/pull/562 [#566]: https://github.com/rust-random/rand/pull/566 [#567]: https://github.com/rust-random/rand/pull/567 [#571]: https://github.com/rust-random/rand/pull/571 [#574]: https://github.com/rust-random/rand/pull/574 [#575]: https://github.com/rust-random/rand/pull/575 [#576]: https://github.com/rust-random/rand/pull/576 [#578]: https://github.com/rust-random/rand/pull/578 [#583]: https://github.com/rust-random/rand/pull/583 [#591]: https://github.com/rust-random/rand/pull/591 [#593]: https://github.com/rust-random/rand/pull/593 [#600]: https://github.com/rust-random/rand/pull/600 [#607]: https://github.com/rust-random/rand/pull/607 [#609]: https://github.com/rust-random/rand/pull/609 [#611]: https://github.com/rust-random/rand/pull/611 [#615]: https://github.com/rust-random/rand/pull/615 [#620]: https://github.com/rust-random/rand/pull/620 [#623]: https://github.com/rust-random/rand/pull/623 [#629]: https://github.com/rust-random/rand/pull/629 [#630]: https://github.com/rust-random/rand/pull/630 [#632]: https://github.com/rust-random/rand/pull/632 [#635]: https://github.com/rust-random/rand/pull/635 [#636]: https://github.com/rust-random/rand/pull/636 [#642]: https://github.com/rust-random/rand/pull/642 [#643]: https://github.com/rust-random/rand/pull/643 [#647]: https://github.com/rust-random/rand/pull/647 [#649]: https://github.com/rust-random/rand/pull/649 [#657]: https://github.com/rust-random/rand/pull/657 [#660]: https://github.com/rust-random/rand/pull/660 [#662]: https://github.com/rust-random/rand/pull/662 [#664]: https://github.com/rust-random/rand/pull/664 [#668]: https://github.com/rust-random/rand/pull/668 [#671]: https://github.com/rust-random/rand/pull/671 [#674]: https://github.com/rust-random/rand/pull/674 [#675]: https://github.com/rust-random/rand/pull/675 [#685]: https://github.com/rust-random/rand/pull/685 [#686]: https://github.com/rust-random/rand/pull/686 [#691]: https://github.com/rust-random/rand/pull/691 [#696]: https://github.com/rust-random/rand/pull/696 [#703]: https://github.com/rust-random/rand/pull/703 [#711]: https://github.com/rust-random/rand/pull/711 ## [0.5.5] - 2018-08-07 ### Documentation - Fix links in documentation ([#582]) ## [0.5.4] - 2018-07-11 ### Platform support - Make `OsRng` work via WASM/stdweb for WebWorkers ## [0.5.3] - 2018-06-26 ### Platform support - OpenBSD, Bitrig: fix compilation (broken in 0.5.1) ([#530]) ## [0.5.2] - 2018-06-18 ### Platform support - Hide `OsRng` and `JitterRng` on unsupported platforms ([#512]; fixes [#503]) ## [0.5.1] - 2018-06-08 ### New distributions - Added Cauchy distribution. ([#474], [#486]) - Added Pareto distribution. ([#495]) ### Platform support and `OsRng` - Remove blanket Unix implementation. ([#484]) - Remove Wasm unimplemented stub. ([#484]) - Dragonfly BSD: read from `/dev/random`. ([#484]) - Bitrig: use `getentropy` like OpenBSD. ([#484]) - Solaris: (untested) use `getrandom` if available, otherwise `/dev/random`. ([#484]) - Emscripten, `stdweb`: split the read up in chunks. ([#484]) - Emscripten, Haiku: don't do an extra blocking read from `/dev/random`. ([#484]) - Linux, NetBSD, Solaris: read in blocking mode on first use in `fill_bytes`. ([#484]) - Fuchsia, CloudABI: fix compilation (broken in Rand 0.5). ([#484]) ## [0.5.0] - 2018-05-21 ### Crate features and organisation - Minimum Rust version update: 1.22.0. ([#239]) - Create a separate `rand_core` crate. ([#288]) - Deprecate `rand_derive`. ([#256]) - Add `prelude` (and module reorganisation). ([#435]) - Add `log` feature. Logging is now available in `JitterRng`, `OsRng`, `EntropyRng` and `ReseedingRng`. ([#246]) - Add `serde1` feature for some PRNGs. ([#189]) - `stdweb` feature for `OsRng` support on WASM via stdweb. ([#272], [#336]) ### `Rng` trait - Split `Rng` into `RngCore` and `Rng` extension trait. `next_u32`, `next_u64` and `fill_bytes` are now part of `RngCore`. ([#265]) - Add `Rng::sample`. ([#256]) - Deprecate `Rng::gen_weighted_bool`. ([#308]) - Add `Rng::gen_bool`. ([#308]) - Remove `Rng::next_f32` and `Rng::next_f64`. ([#273]) - Add optimized `Rng::fill` and `Rng::try_fill` methods. ([#247]) - Deprecate `Rng::gen_iter`. ([#286]) - Deprecate `Rng::gen_ascii_chars`. ([#279]) ### `rand_core` crate - `rand` now depends on new `rand_core` crate ([#288]) - `RngCore` and `SeedableRng` are now part of `rand_core`. ([#288]) - Add modules to help implementing RNGs `impl` and `le`. ([#209], [#228]) - Add `Error` and `ErrorKind`. ([#225]) - Add `CryptoRng` marker trait. ([#273]) - Add `BlockRngCore` trait. ([#281]) - Add `BlockRng` and `BlockRng64` wrappers to help implementations. ([#281], [#325]) - Revise the `SeedableRng` trait. ([#233]) - Remove default implementations for `RngCore::next_u64` and `RngCore::fill_bytes`. ([#288]) - Add `RngCore::try_fill_bytes`. ([#225]) ### Other traits and types - Add `FromEntropy` trait. ([#233], [#375]) - Add `SmallRng` wrapper. ([#296]) - Rewrite `ReseedingRng` to only work with `BlockRngCore` (substantial performance improvement). ([#281]) - Deprecate `weak_rng`. Use `SmallRng` instead. ([#296]) - Deprecate `AsciiGenerator`. ([#279]) ### Random number generators - Switch `StdRng` and `thread_rng` to HC-128. ([#277]) - `StdRng` must now be created with `from_entropy` instead of `new` - Change `thread_rng` reseeding threshold to 32 MiB. ([#277]) - PRNGs no longer implement `Copy`. ([#209]) - `Debug` implementations no longer show internals. ([#209]) - Implement `Clone` for `ReseedingRng`, `JitterRng`, OsRng`. ([#383], [#384]) - Implement serialization for `XorShiftRng`, `IsaacRng` and `Isaac64Rng` under the `serde1` feature. ([#189]) - Implement `BlockRngCore` for `ChaChaCore` and `Hc128Core`. ([#281]) - All PRNGs are now portable across big- and little-endian architectures. ([#209]) - `Isaac64Rng::next_u32` no longer throws away half the results. ([#209]) - Add `IsaacRng::new_from_u64` and `Isaac64Rng::new_from_u64`. ([#209]) - Add the HC-128 CSPRNG `Hc128Rng`. ([#210]) - Change ChaCha20 to have 64-bit counter and 64-bit stream. ([#349]) - Changes to `JitterRng` to get its size down from 2112 to 24 bytes. ([#251]) - Various performance improvements to all PRNGs. ### Platform support and `OsRng` - Add support for CloudABI. ([#224]) - Remove support for NaCl. ([#225]) - WASM support for `OsRng` via stdweb, behind the `stdweb` feature. ([#272], [#336]) - Use `getrandom` on more platforms for Linux, and on Android. ([#338]) - Use the `SecRandomCopyBytes` interface on macOS. ([#322]) - On systems that do not have a syscall interface, only keep a single file descriptor open for `OsRng`. ([#239]) - On Unix, first try a single read from `/dev/random`, then `/dev/urandom`. ([#338]) - Better error handling and reporting in `OsRng` (using new error type). ([#225]) - `OsRng` now uses non-blocking when available. ([#225]) - Add `EntropyRng`, which provides `OsRng`, but has `JitterRng` as a fallback. ([#235]) ### Distributions - New `Distribution` trait. ([#256]) - Add `Distribution::sample_iter` and `Rng::::sample_iter`. ([#361]) - Deprecate `Rand`, `Sample` and `IndependentSample` traits. ([#256]) - Add a `Standard` distribution (replaces most `Rand` implementations). ([#256]) - Add `Binomial` and `Poisson` distributions. ([#96]) - Add `Bernoulli` dsitribution. ([#411]) - Add `Alphanumeric` distribution. ([#279]) - Remove `Closed01` distribution, add `OpenClosed01`. ([#274], [#420]) - Rework `Range` type, making it possible to implement it for user types. ([#274]) - Rename `Range` to `Uniform`. ([#395]) - Add `Uniform::new_inclusive` for inclusive ranges. ([#274]) - Use widening multiply method for much faster integer range reduction. ([#274]) - `Standard` distribution for `char` uses `Uniform` internally. ([#274]) - `Standard` distribution for `bool` uses sign test. ([#274]) - Implement `Standard` distribution for `Wrapping`. ([#436]) - Implement `Uniform` distribution for `Duration`. ([#427]) [#96]: https://github.com/rust-random/rand/pull/96 [#189]: https://github.com/rust-random/rand/pull/189 [#209]: https://github.com/rust-random/rand/pull/209 [#210]: https://github.com/rust-random/rand/pull/210 [#224]: https://github.com/rust-random/rand/pull/224 [#225]: https://github.com/rust-random/rand/pull/225 [#228]: https://github.com/rust-random/rand/pull/228 [#233]: https://github.com/rust-random/rand/pull/233 [#235]: https://github.com/rust-random/rand/pull/235 [#239]: https://github.com/rust-random/rand/pull/239 [#246]: https://github.com/rust-random/rand/pull/246 [#247]: https://github.com/rust-random/rand/pull/247 [#251]: https://github.com/rust-random/rand/pull/251 [#256]: https://github.com/rust-random/rand/pull/256 [#265]: https://github.com/rust-random/rand/pull/265 [#272]: https://github.com/rust-random/rand/pull/272 [#273]: https://github.com/rust-random/rand/pull/273 [#274]: https://github.com/rust-random/rand/pull/274 [#277]: https://github.com/rust-random/rand/pull/277 [#279]: https://github.com/rust-random/rand/pull/279 [#281]: https://github.com/rust-random/rand/pull/281 [#286]: https://github.com/rust-random/rand/pull/286 [#288]: https://github.com/rust-random/rand/pull/288 [#296]: https://github.com/rust-random/rand/pull/296 [#308]: https://github.com/rust-random/rand/pull/308 [#322]: https://github.com/rust-random/rand/pull/322 [#325]: https://github.com/rust-random/rand/pull/325 [#336]: https://github.com/rust-random/rand/pull/336 [#338]: https://github.com/rust-random/rand/pull/338 [#349]: https://github.com/rust-random/rand/pull/349 [#361]: https://github.com/rust-random/rand/pull/361 [#375]: https://github.com/rust-random/rand/pull/375 [#383]: https://github.com/rust-random/rand/pull/383 [#384]: https://github.com/rust-random/rand/pull/384 [#395]: https://github.com/rust-random/rand/pull/395 [#411]: https://github.com/rust-random/rand/pull/411 [#420]: https://github.com/rust-random/rand/pull/420 [#427]: https://github.com/rust-random/rand/pull/427 [#435]: https://github.com/rust-random/rand/pull/435 [#436]: https://github.com/rust-random/rand/pull/436 [#474]: https://github.com/rust-random/rand/pull/474 [#484]: https://github.com/rust-random/rand/pull/484 [#486]: https://github.com/rust-random/rand/pull/486 [#495]: https://github.com/rust-random/rand/pull/495 [#503]: https://github.com/rust-random/rand/pull/503 [#512]: https://github.com/rust-random/rand/pull/512 [#530]: https://github.com/rust-random/rand/pull/530 [#582]: https://github.com/rust-random/rand/pull/582 ## [0.4.6] - 2019-01-26 ### Platforms - Fuchsia: Replaced fuchsia-zircon with fuchsia-cprng ## [0.4.5] - 2019-01-09 ### Fixed - Remove dependency on default features of `rand_core` ([#689]) ## [0.4.4] - 2019-01-08 Version yanked due to semver-breaking change ([#688]). ### Added - SGX support ## [0.4.3] - 2018-08-16 ### Fixed - Use correct syscall number for PowerPC ([#589]) ## [0.4.2] - 2018-01-06 ### Changed - Use `winapi` on Windows - Update for Fuchsia OS - Remove dev-dependency on `log` ## [0.4.1] - 2017-12-17 ### Added - `no_std` support ## [0.4.0-pre.0] - 2017-12-11 ### Added - `JitterRng` added as a high-quality alternative entropy source using the system timer - new `seq` module with `sample_iter`, `sample_slice`, etc. - WASM support via dummy implementations (fail at run-time) - Additional benchmarks, covering generators and new seq code ### Changed - `thread_rng` uses `JitterRng` if seeding from system time fails (slower but more secure than previous method) ### Deprecated - `sample` function deprecated (replaced by `sample_iter`) [#589]: https://github.com/rust-random/rand/pull/589 [#688]: https://github.com/rust-random/rand/pull/688 [#689]: https://github.com/rust-random/rand/pull/689 ## [0.3.22] - 2018-02-05 Code replaced with a compatibility layer over rand 0.4. ## [0.3.20] - 2018-01-06 ### Changed - Remove dev-dependency on `log` - Update `fuchsia-zircon` dependency to 0.3.2 ## [0.3.19] - 2017-12-27 ### Changed - Require `log <= 0.3.8` for dev builds - Update `fuchsia-zircon` dependency to 0.3 - Fix broken links in docs (to unblock compiler docs testing CI) ## [0.3.18] - 2017-11-06 ### Changed - `thread_rng` is seeded from the system time if `OsRng` fails - `weak_rng` now uses `thread_rng` internally ## [0.3.17] - 2017-10-07 ### Changed - Fuchsia: Magenta was renamed Zircon ## [0.3.16] - 2017-07-27 ### Added - Implement Debug for mote non-public types - implement `Rand` for (i|u)i128 - Support for Fuchsia ### Changed - Add inline attribute to SampleRange::construct_range. This improves the benchmark for sample in 11% and for shuffle in 16%. - Use `RtlGenRandom` instead of `CryptGenRandom` ## [0.3.15] - 2016-11-26 ### Added - Add `Rng` trait method `choose_mut` - Redox support ### Changed - Use `arc4rand` for `OsRng` on FreeBSD. - Use `arc4random(3)` for `OsRng` on OpenBSD. ### Fixed - Fix filling buffers 4 GiB or larger with `OsRng::fill_bytes` on Windows ## [0.3.14] - 2016-02-13 ### Fixed - Inline definitions from winapi/advapi32, which decreases build times ## [0.3.13] - 2016-01-09 ### Fixed - Compatible with Rust 1.7.0-nightly (needed some extra type annotations) ## [0.3.12] - 2015-11-09 ### Changed - Replaced the methods in `next_f32` and `next_f64` with the technique described Saito & Matsumoto at MCQMC'08. The new method should exhibit a slightly more uniform distribution. - Depend on libc 0.2 ### Fixed - Fix iterator protocol issue in `rand::sample` ## [0.3.11] - 2015-08-31 ### Added - Implement `Rand` for arrays with n <= 32 ## [0.3.10] - 2015-08-17 ### Added - Support for NaCl platforms ### Changed - Allow `Rng` to be `?Sized`, impl for `&mut R` and `Box` where `R: ?Sized + Rng` ## [0.3.9] - 2015-06-18 ### Changed - Use `winapi` for Windows API things ### Fixed - Fixed test on stable/nightly - Fix `getrandom` syscall number for aarch64-unknown-linux-gnu ## [0.3.8] - 2015-04-23 ### Changed - `log` is a dev dependency ### Fixed - Fix race condition of atomics in `is_getrandom_available` ## [0.3.7] - 2015-04-03 ### Fixed - Derive Copy/Clone changes ## [0.3.6] - 2015-04-02 ### Changed - Move to stable Rust! ## [0.3.5] - 2015-04-01 ### Fixed - Compatible with Rust master ## [0.3.4] - 2015-03-31 ### Added - Implement Clone for `Weighted` ### Fixed - Compatible with Rust master ## [0.3.3] - 2015-03-26 ### Fixed - Fix compile on Windows ## [0.3.2] - 2015-03-26 ## [0.3.1] - 2015-03-26 ### Fixed - Fix compile on Windows ## [0.3.0] - 2015-03-25 ### Changed - Update to use log version 0.3.x ## [0.2.1] - 2015-03-22 ### Fixed - Compatible with Rust master - Fixed iOS compilation ## [0.2.0] - 2015-03-06 ### Fixed - Compatible with Rust master (move from `old_io` to `std::io`) ## [0.1.4] - 2015-03-04 ### Fixed - Compatible with Rust master (use wrapping ops) ## [0.1.3] - 2015-02-20 ### Fixed - Compatible with Rust master ### Removed - Removed Copy implementations from RNGs ## [0.1.2] - 2015-02-03 ### Added - Imported functionality from `std::rand`, including: - `StdRng`, `SeedableRng`, `TreadRng`, `weak_rng()` - `ReaderRng`: A wrapper around any Reader to treat it as an RNG. - Imported documentation from `std::rand` - Imported tests from `std::rand` ## 0.1.1 - 2015-02-03 ### Added - Migrate to a cargo-compatible directory structure. ### Fixed - Do not use entropy during `gen_weighted_bool(1)` ## Rust 0.12.0 - 2014-10-09 ### Added - Impl Rand for tuples of arity 11 and 12 - Include ChaCha pseudorandom generator - Add `next_f64` and `next_f32` to Rng - Implement Clone for PRNGs ### Changed - Rename `TaskRng` to `ThreadRng` and `task_rng` to `thread_rng` (since a runtime is removed from Rust). ### Fixed - Improved performance of ISAAC and ISAAC64 by 30% and 12 % respectively, by informing the optimiser that indexing is never out-of-bounds. ### Removed - Removed the Deprecated `choose_option` ## Rust 0.11.0 - 2014-07-02 ### Added - document when to use `OSRng` in cryptographic context, and explain why we use `/dev/urandom` instead of `/dev/random` - `Rng::gen_iter()` which will return an infinite stream of random values - `Rng::gen_ascii_chars()` which will return an infinite stream of random ascii characters ### Changed - Now only depends on libcore! - Remove `Rng.choose()`, rename `Rng.choose_option()` to `.choose()` - Rename OSRng to OsRng - The WeightedChoice structure is no longer built with a `Vec>`, but rather a `&mut [Weighted]`. This means that the WeightedChoice structure now has a lifetime associated with it. - The `sample` method on `Rng` has been moved to a top-level function in the `rand` module due to its dependence on `Vec`. ### Removed - `Rng::gen_vec()` was removed. Previous behavior can be regained with `rng.gen_iter().take(n).collect()` - `Rng::gen_ascii_str()` was removed. Previous behavior can be regained with `rng.gen_ascii_chars().take(n).collect()` - {IsaacRng, Isaac64Rng, XorShiftRng}::new() have all been removed. These all relied on being able to use an OSRng for seeding, but this is no longer available in librand (where these types are defined). To retain the same functionality, these types now implement the `Rand` trait so they can be generated with a random seed from another random number generator. This allows the stdlib to use an OSRng to create seeded instances of these RNGs. - Rand implementations for `Box` and `@T` were removed. These seemed to be pretty rare in the codebase, and it allows for librand to not depend on liballoc. Additionally, other pointer types like Rc and Arc were not supported. - Remove a slew of old deprecated functions ## [Rust 0.10] - 2014-04-03 ### Changed - replace `Rng.shuffle's` functionality with `.shuffle_mut` - bubble up IO errors when creating an OSRng ### Fixed - Use `fill()` instead of `read()` - Rewrite OsRng in Rust for windows ## 0.10-pre - 2014-03-02 ### Added - Separate `rand` out of the standard library [Unreleased]: https://github.com/rust-random/rand/compare/0.10.0...HEAD [0.10.1]: https://github.com/rust-random/rand/compare/0.10.0...0.10.1 [0.10.0]: https://github.com/rust-random/rand/compare/0.9.2...0.10.0 [0.9.2]: https://github.com/rust-random/rand/compare/0.9.1...0.9.2 [0.9.1]: https://github.com/rust-random/rand/compare/0.9.0...0.9.1 [0.9.0]: https://github.com/rust-random/rand/compare/0.8.5...0.9.0 [0.8.5]: https://github.com/rust-random/rand/compare/0.8.4...0.8.5 [0.8.4]: https://github.com/rust-random/rand/compare/0.8.3...0.8.4 [0.8.3]: https://github.com/rust-random/rand/compare/0.8.2...0.8.3 [0.8.2]: https://github.com/rust-random/rand/compare/0.8.1...0.8.2 [0.8.1]: https://github.com/rust-random/rand/compare/0.8.0...0.8.1 [0.8.0]: https://github.com/rust-random/rand/compare/0.7.3...0.8.0 [0.7.3]: https://github.com/rust-random/rand/compare/0.7.2...0.7.3 [0.7.2]: https://github.com/rust-random/rand/compare/0.7.1...0.7.2 [0.7.1]: https://github.com/rust-random/rand/compare/0.7.0...0.7.1 [0.7.0]: https://github.com/rust-random/rand/compare/0.6.5...0.7.0 [0.6.5]: https://github.com/rust-random/rand/compare/0.6.4...0.6.5 [0.6.4]: https://github.com/rust-random/rand/compare/0.6.3...0.6.4 [0.6.3]: https://github.com/rust-random/rand/compare/0.6.2...0.6.3 [0.6.2]: https://github.com/rust-random/rand/compare/0.6.1...0.6.2 [0.6.1]: https://github.com/rust-random/rand/compare/0.6.0...0.6.1 [0.6.0]: https://github.com/rust-random/rand/compare/0.5.5...0.6.0 [0.5.5]: https://github.com/rust-random/rand/compare/0.5.4...0.5.5 [0.5.4]: https://github.com/rust-random/rand/compare/0.5.3...0.5.4 [0.5.3]: https://github.com/rust-random/rand/compare/0.5.2...0.5.3 [0.5.2]: https://github.com/rust-random/rand/compare/0.5.1...0.5.2 [0.5.1]: https://github.com/rust-random/rand/compare/0.5.0...0.5.1 [0.5.0]: https://github.com/rust-random/rand/compare/0.4.6...0.5.0 [0.4.6]: https://github.com/rust-random/rand/compare/0.4.5...0.4.6 [0.4.5]: https://github.com/rust-random/rand/compare/0.4.4...0.4.5 [0.4.4]: https://github.com/rust-random/rand/compare/0.4.3...0.4.4 [0.4.3]: https://github.com/rust-random/rand/compare/0.4.2...0.4.3 [0.4.2]: https://github.com/rust-random/rand/compare/0.4.1...0.4.2 [0.4.1]: https://github.com/rust-random/rand/compare/0.4.0-pre.0...0.4.1 [0.4.0-pre.0]: https://github.com/rust-random/rand/compare/0.3.22...0.4.0-pre.0 [0.3.22]: https://github.com/rust-random/rand/compare/0.3.20...0.3.22 [0.3.20]: https://github.com/rust-random/rand/compare/0.3.19...0.3.20 [0.3.19]: https://github.com/rust-random/rand/compare/0.3.18...0.3.19 [0.3.18]: https://github.com/rust-random/rand/compare/0.3.17...0.3.18 [0.3.17]: https://github.com/rust-random/rand/compare/0.3.16...0.3.17 [0.3.16]: https://github.com/rust-random/rand/compare/0.3.15...0.3.16 [0.3.15]: https://github.com/rust-random/rand/compare/0.3.14...0.3.15 [0.3.14]: https://github.com/rust-random/rand/compare/0.3.13...0.3.14 [0.3.13]: https://github.com/rust-random/rand/compare/0.3.12...0.3.13 [0.3.12]: https://github.com/rust-random/rand/compare/0.3.11...0.3.12 [0.3.11]: https://github.com/rust-random/rand/compare/0.3.10...0.3.11 [0.3.10]: https://github.com/rust-random/rand/compare/0.3.9...0.3.10 [0.3.9]: https://github.com/rust-random/rand/compare/0.3.8...0.3.9 [0.3.8]: https://github.com/rust-random/rand/compare/0.3.7...0.3.8 [0.3.7]: https://github.com/rust-random/rand/compare/0.3.6...0.3.7 [0.3.6]: https://github.com/rust-random/rand/compare/0.3.5...0.3.6 [0.3.5]: https://github.com/rust-random/rand/compare/0.3.4...0.3.5 [0.3.4]: https://github.com/rust-random/rand/compare/0.3.3...0.3.4 [0.3.3]: https://github.com/rust-random/rand/compare/0.3.2...0.3.3 [0.3.2]: https://github.com/rust-random/rand/compare/0.3.1...0.3.2 [0.3.1]: https://github.com/rust-random/rand/compare/0.3.0...0.3.1 [0.3.0]: https://github.com/rust-random/rand/compare/0.2.1...0.3.0 [0.2.1]: https://github.com/rust-random/rand/compare/0.2.0...0.2.1 [0.2.0]: https://github.com/rust-random/rand/compare/0.1.4...0.2.0 [0.1.3]: https://github.com/rust-random/rand/compare/0.1.3...0.1.4 [0.1.3]: https://github.com/rust-random/rand/compare/0.1.2...0.1.3 [0.1.2]: https://github.com/rust-random/rand/compare/0.1.1...0.1.2 # Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). A [separate changelog is kept for rand_core](rand_core/CHANGELOG.md). You may also find the [Upgrade Guide](https://rust-random.github.io/book/update.html) useful. ## [0.9.3] — 2026-02-11 This release back-ports a fix from v0.10. See also [#1763]. ### Changes - Deprecate feature `log` (#1764) - Replace usages of `doc_auto_cfg` (#1764) [#1763]: https://github.com/rust-random/rand/pull/1763 ## [0.9.2] — 2025-07-20 ### Deprecated - Deprecate `rand::rngs::mock` module and `StepRng` generator (#1634) ### Additions - Enable `WeightedIndex` (de)serialization (#1646) ## [0.9.1] - 2025-04-17 ### Security and unsafe - Revise "not a crypto library" policy again (#1565) - Remove `zerocopy` dependency from `rand` (#1579) ### Fixes - Fix feature `simd_support` for recent nightly rust (#1586) ### Changes - Allow `fn rand::seq::index::sample_weighted` and `fn IndexedRandom::choose_multiple_weighted` to return fewer than `amount` results (#1623), reverting an undocumented change (#1382) to the previous release. ### Additions - Add `rand::distr::Alphabetic` distribution. (#1587) - Re-export `rand_core` (#1604) ## [0.9.0] - 2025-01-27 ### Security and unsafe - Policy: "rand is not a crypto library" (#1514) - Remove fork-protection from `ReseedingRng` and `ThreadRng`. Instead, it is recommended to call `ThreadRng::reseed` on fork. (#1379) - Use `zerocopy` to replace some `unsafe` code (#1349, #1393, #1446, #1502) ### Dependencies - Bump the MSRV to 1.63.0 (#1207, #1246, #1269, #1341, #1416, #1536); note that 1.60.0 may work for dependents when using `--ignore-rust-version` - Update to `rand_core` v0.9.0 (#1558) ### Features - Support `std` feature without `getrandom` or `rand_chacha` (#1354) - Enable feature `small_rng` by default (#1455) - Remove implicit feature `rand_chacha`; use `std_rng` instead. (#1473) - Rename feature `serde1` to `serde` (#1477) - Rename feature `getrandom` to `os_rng` (#1537) - Add feature `thread_rng` (#1547) ### API changes: rand_core traits - Add fn `RngCore::read_adapter` implementing `std::io::Read` (#1267) - Add trait `CryptoBlockRng: BlockRngCore`; make `trait CryptoRng: RngCore` (#1273) - Add traits `TryRngCore`, `TryCryptoRng` (#1424, #1499) - Rename `fn SeedableRng::from_rng` -> `try_from_rng` and add infallible variant `fn from_rng` (#1424) - Rename `fn SeedableRng::from_entropy` -> `from_os_rng` and add fallible variant `fn try_from_os_rng` (#1424) - Add bounds `Clone` and `AsRef` to associated type `SeedableRng::Seed` (#1491) ### API changes: Rng trait and top-level fns - Rename fn `rand::thread_rng()` to `rand::rng()` and remove from the prelude (#1506) - Remove fn `rand::random()` from the prelude (#1506) - Add top-level fns `random_iter`, `random_range`, `random_bool`, `random_ratio`, `fill` (#1488) - Re-introduce fn `Rng::gen_iter` as `random_iter` (#1305, #1500) - Rename fn `Rng::gen` to `random` to avoid conflict with the new `gen` keyword in Rust 2024 (#1438) - Rename fns `Rng::gen_range` to `random_range`, `gen_bool` to `random_bool`, `gen_ratio` to `random_ratio` (#1505) - Annotate panicking methods with `#[track_caller]` (#1442, #1447) ### API changes: RNGs - Fix `::Seed` size to 256 bits (#1455) - Remove first parameter (`rng`) of `ReseedingRng::new` (#1533) ### API changes: Sequences - Split trait `SliceRandom` into `IndexedRandom`, `IndexedMutRandom`, `SliceRandom` (#1382) - Add `IndexedRandom::choose_multiple_array`, `index::sample_array` (#1453, #1469) ### API changes: Distributions: renames - Rename module `rand::distributions` to `rand::distr` (#1470) - Rename distribution `Standard` to `StandardUniform` (#1526) - Move `distr::Slice` -> `distr::slice::Choose`, `distr::EmptySlice` -> `distr::slice::Empty` (#1548) - Rename trait `distr::DistString` -> `distr::SampleString` (#1548) - Rename `distr::DistIter` -> `distr::Iter`, `distr::DistMap` -> `distr::Map` (#1548) ### API changes: Distributions - Relax `Sized` bound on `Distribution for &D` (#1278) - Remove impl of `Distribution>` for `StandardUniform` (#1526) - Let distribution `StandardUniform` support all `NonZero*` types (#1332) - Fns `{Uniform, UniformSampler}::{new, new_inclusive}` return a `Result` (instead of potentially panicking) (#1229) - Distribution `Uniform` implements `TryFrom` instead of `From` for ranges (#1229) - Add `UniformUsize` (#1487) - Remove support for generating `isize` and `usize` values with `StandardUniform`, `Uniform` (except via `UniformUsize`) and `Fill` and usage as a `WeightedAliasIndex` weight (#1487) - Add impl `DistString` for distributions `Slice` and `Uniform` (#1315) - Add fn `Slice::num_choices` (#1402) - Add fn `p()` for distribution `Bernoulli` to access probability (#1481) ### API changes: Weighted distributions - Add `pub` module `rand::distr::weighted`, moving `WeightedIndex` there (#1548) - Add trait `weighted::Weight`, allowing `WeightedIndex` to trap overflow (#1353) - Add fns `weight, weights, total_weight` to distribution `WeightedIndex` (#1420) - Rename enum `WeightedError` to `weighted::Error`, revising variants (#1382) and mark as `#[non_exhaustive]` (#1480) ### API changes: SIMD - Switch to `std::simd`, expand SIMD & docs (#1239) ### Reproducibility-breaking changes - Make `ReseedingRng::reseed` discard remaining data from the last block generated (#1379) - Change fn `SmallRng::seed_from_u64` implementation (#1203) - Allow `UniformFloat::new` samples and `UniformFloat::sample_single` to yield `high` (#1462) - Fix portability of distribution `Slice` (#1469) - Make `Uniform` for `usize` portable via `UniformUsize` (#1487) - Fix `IndexdRandom::choose_multiple_weighted` for very small seeds and optimize for large input length / low memory (#1530) ### Reproducibility-breaking optimisations - Optimize fn `sample_floyd`, affecting output of `rand::seq::index::sample` and `rand::seq::SliceRandom::choose_multiple` (#1277) - New, faster algorithms for `IteratorRandom::choose` and `choose_stable` (#1268) - New, faster algorithms for `SliceRandom::shuffle` and `partial_shuffle` (#1272) - Optimize distribution `Uniform`: use Canon's method (single sampling) / Lemire's method (distribution sampling) for faster sampling (breaks value stability; #1287) - Optimize fn `sample_single_inclusive` for floats (+~20% perf) (#1289) ### Other optimisations - Improve `SmallRng` initialization performance (#1482) - Optimise SIMD widening multiply (#1247) ### Other - Add `Cargo.lock.msrv` file (#1275) - Reformat with `rustfmt` and enforce (#1448) - Apply Clippy suggestions and enforce (#1448, #1474) - Move all benchmarks to new `benches` crate (#1329, #1439) and migrate to Criterion (#1490) ### Documentation - Improve `ThreadRng` related docs (#1257) - Docs: enable experimental `--generate-link-to-definition` feature (#1327) - Better doc of crate features, use `doc_auto_cfg` (#1411, #1450) ## [0.8.5] - 2021-08-20 ### Fixes - Fix build on non-32/64-bit architectures (#1144) - Fix "min_const_gen" feature for `no_std` (#1173) - Check `libc::pthread_atfork` return value with panic on error (#1178) - More robust reseeding in case `ReseedingRng` is used from a fork handler (#1178) - Fix nightly: remove unused `slice_partition_at_index` feature (#1215) - Fix nightly + `simd_support`: update `packed_simd` (#1216) ### Rngs - `StdRng`: Switch from HC128 to ChaCha12 on emscripten (#1142). We now use ChaCha12 on all platforms. ### Documentation - Added docs about rand's use of const generics (#1150) - Better random chars example (#1157) ## [0.8.4] - 2021-06-15 ### Additions - Use const-generics to support arrays of all sizes (#1104) - Implement `Clone` and `Copy` for `Alphanumeric` (#1126) - Add `Distribution::map` to derive a distribution using a closure (#1129) - Add `Slice` distribution (#1107) - Add `DistString` trait with impls for `Standard` and `Alphanumeric` (#1133) ### Other - Reorder asserts in `Uniform` float distributions for easier debugging of non-finite arguments (#1094, #1108) - Add range overflow check in `Uniform` float distributions (#1108) - Deprecate `rngs::adapter::ReadRng` (#1130) ## [0.8.3] - 2021-01-25 ### Fixes - Fix `no-std` + `alloc` build by gating `choose_multiple_weighted` on `std` (#1088) ## [0.8.2] - 2021-01-12 ### Fixes - Fix panic in `UniformInt::sample_single_inclusive` and `Rng::gen_range` when providing a full integer range (eg `0..=MAX`) (#1087) ## [0.8.1] - 2020-12-31 ### Other - Enable all stable features in the playground (#1081) ## [0.8.0] - 2020-12-18 ### Platform support - The minimum supported Rust version is now 1.36 (#1011) - `getrandom` updated to v0.2 (#1041) - Remove `wasm-bindgen` and `stdweb` feature flags. For details of WASM support, see the [getrandom documentation](https://docs.rs/getrandom/latest). (#948) - `ReadRng::next_u32` and `next_u64` now use little-Endian conversion instead of native-Endian, affecting results on Big-Endian platforms (#1061) - The `nightly` feature no longer implies the `simd_support` feature (#1048) - Fix `simd_support` feature to work on current nightlies (#1056) ### Rngs - `ThreadRng` is no longer `Copy` to enable safe usage within thread-local destructors (#1035) - `gen_range(a, b)` was replaced with `gen_range(a..b)`. `gen_range(a..=b)` is also supported. Note that `a` and `b` can no longer be references or SIMD types. (#744, #1003) - Replace `AsByteSliceMut` with `Fill` and add support for `[bool], [char], [f32], [f64]` (#940) - Restrict `rand::rngs::adapter` to `std` (#1027; see also #928) - `StdRng`: add new `std_rng` feature flag (enabled by default, but might need to be used if disabling default crate features) (#948) - `StdRng`: Switch from ChaCha20 to ChaCha12 for better performance (#1028) - `SmallRng`: Replace PCG algorithm with xoshiro{128,256}++ (#1038) ### Sequences - Add `IteratorRandom::choose_stable` as an alternative to `choose` which does not depend on size hints (#1057) - Improve accuracy and performance of `IteratorRandom::choose` (#1059) - Implement `IntoIterator` for `IndexVec`, replacing the `into_iter` method (#1007) - Add value stability tests for `seq` module (#933) ### Misc - Support `PartialEq` and `Eq` for `StdRng`, `SmallRng` and `StepRng` (#979) - Added a `serde1` feature and added Serialize/Deserialize to `UniformInt` and `WeightedIndex` (#974) - Drop some unsafe code (#962, #963, #1011) - Reduce packaged crate size (#983) - Migrate to GitHub Actions from Travis+AppVeyor (#1073) ### Distributions - `Alphanumeric` samples bytes instead of chars (#935) - `Uniform` now supports `char`, enabling `rng.gen_range('A'..='Z')` (#1068) - Add `UniformSampler::sample_single_inclusive` (#1003) #### Weighted sampling - Implement weighted sampling without replacement (#976, #1013) - `rand::distributions::alias_method::WeightedIndex` was moved to `rand_distr::WeightedAliasIndex`. The simpler alternative `rand::distribution::WeightedIndex` remains. (#945) - Improve treatment of rounding errors in `WeightedIndex::update_weights` (#956) - `WeightedIndex`: return error on NaN instead of panic (#1005) ### Documentation - Document types supported by `random` (#994) - Document notes on password generation (#995) - Note that `SmallRng` may not be the best choice for performance and in some other cases (#1038) - Use `doc(cfg)` to annotate feature-gated items (#1019) - Adjust README (#1065) ## [0.7.3] - 2020-01-10 ### Fixes - The `Bernoulli` distribution constructors now reports an error on NaN and on `denominator == 0`. (#925) - Use `std::sync::Once` to register fork handler, avoiding possible atomicity violation (#928) - Fix documentation on the precision of generated floating-point values ### Changes - Unix: make libc dependency optional; only use fork protection with std feature (#928) ### Additions - Implement `std::error::Error` for `BernoulliError` (#919) ## [0.7.2] - 2019-09-16 ### Fixes - Fix dependency on `rand_core` 0.5.1 (#890) ### Additions - Unit tests for value stability of distributions added (#888) ## [0.7.1] - 2019-09-13 ### Yanked This release was yanked since it depends on `rand_core::OsRng` added in 0.5.1 but specifies a dependency on version 0.5.0 (#890), causing a broken builds when updating from `rand 0.7.0` without also updating `rand_core`. ### Fixes - Fix `no_std` behaviour, appropriately enable c2-chacha's `std` feature (#844) - `alloc` feature in `no_std` is available since Rust 1.36 (#856) - Fix or squelch issues from Clippy lints (#840) ### Additions - Add a `no_std` target to CI to continuously evaluate `no_std` status (#844) - `WeightedIndex`: allow adjusting a sub-set of weights (#866) ## [0.7.0] - 2019-06-28 ### Fixes - Fix incorrect pointer usages revealed by Miri testing (#780, #781) - Fix (tiny!) bias in `Uniform` for 8- and 16-bit ints (#809) ### Crate - Bumped MSRV (min supported Rust version) to 1.32.0 - Updated to Rust Edition 2018 (#823, #824) - Removed dependence on `rand_xorshift`, `rand_isaac`, `rand_jitter` crates (#759, #765) - Remove dependency on `winapi` (#724) - Removed all `build.rs` files (#824) - Removed code already deprecated in version 0.6 (#757) - Removed the serde1 feature (It's still available for backwards compatibility, but it does not do anything. #830) - Many documentation changes ### rand_core - Updated to `rand_core` 0.5.0 - `Error` type redesigned with new API (#800) - Move `from_entropy` method to `SeedableRng` and remove `FromEntropy` (#800) - `SeedableRng::from_rng` is now expected to be value-stable (#815) ### Standard RNGs - OS interface moved from `rand_os` to new `getrandom` crate (#765, [getrandom](https://github.com/rust-random/getrandom)) - Use ChaCha for `StdRng` and `ThreadRng` (#792) - Feature-gate `SmallRng` (#792) - `ThreadRng` now supports `Copy` (#758) - Deprecated `EntropyRng` (#765) - Enable fork protection of ReseedingRng without `std` (#724) ### Distributions - Many distributions have been moved to `rand_distr` (#761) - `Bernoulli::new` constructor now returns a `Result` (#803) - `Distribution::sample_iter` adjusted for more flexibility (#758) - Added `distributions::weighted::alias_method::WeightedIndex` for `O(1)` sampling (#692) - Support sampling `NonZeroU*` types with the `Standard` distribution (#728) - Optimised `Binomial` distribution sampling (#735, #740, #752) - Optimised SIMD float sampling (#739) ### Sequences - Make results portable across 32- and 64-bit by using `u32` samples for `usize` where possible (#809) ## [0.6.5] - 2019-01-28 ### Crates - Update `rand_core` to 0.4 (#703) - Move `JitterRng` to its own crate (#685) - Add a wasm-bindgen test crate (#696) ### Platforms - Fuchsia: Replaced fuchsia-zircon with fuchsia-cprng ### Doc - Use RFC 1946 for doc links (#691) - Fix some doc links and notes (#711) ## [0.6.4] - 2019-01-08 ### Fixes - Move wasm-bindgen shims to correct crate (#686) - Make `wasm32-unknown-unknown` compile but fail at run-time if missing bindingsg (#686) ## [0.6.3] - 2019-01-04 ### Fixes - Make the `std` feature require the optional `rand_os` dependency (#675) - Re-export the optional WASM dependencies of `rand_os` from `rand` to avoid breakage (#674) ## [0.6.2] - 2019-01-04 ### Additions - Add `Default` for `ThreadRng` (#657) - Move `rngs::OsRng` to `rand_os` sub-crate; clean up code; use as dependency (#643) ##BLOCKER## - Add `rand_xoshiro` sub-crate, plus benchmarks (#642, #668) ### Fixes - Fix bias in `UniformInt::sample_single` (#662) - Use `autocfg` instead of `rustc_version` for rustc version detection (#664) - Disable `i128` and `u128` if the `target_os` is `emscripten` (#671: work-around Emscripten limitation) - CI fixes (#660, #671) ### Optimisations - Optimise memory usage of `UnitCircle` and `UnitSphereSurface` distributions (no PR) ## [0.6.1] - 2018-11-22 - Support sampling `Duration` also for `no_std` (only since Rust 1.25) (#649) - Disable default features of `libc` (#647) ## [0.6.0] - 2018-11-14 ### Project organisation - Rand has moved from [rust-lang-nursery](https://github.com/rust-lang-nursery/rand) to [rust-random](https://github.com/rust-random/rand)! (#578) - Created [The Rust Random Book](https://rust-random.github.io/book/) ([source](https://github.com/rust-random/book)) - Update copyright and licence notices (#591, #611) - Migrate policy documentation from the wiki (#544) ### Platforms - Add fork protection on Unix (#466) - Added support for wasm-bindgen. (#541, #559, #562, #600) - Enable `OsRng` for powerpc64, sparc and sparc64 (#609) - Use `syscall` from `libc` on Linux instead of redefining it (#629) ### RNGs - Switch `SmallRng` to use PCG (#623) - Implement `Pcg32` and `Pcg64Mcg` generators (#632) - Move ISAAC RNGs to a dedicated crate (#551) - Move Xorshift RNG to its own crate (#557) - Move ChaCha and HC128 RNGs to dedicated crates (#607, #636) - Remove usage of `Rc` from `ThreadRng` (#615) ### Sampling and distributions - Implement `Rng.gen_ratio()` and `Bernoulli::new_ratio()` (#491) - Make `Uniform` strictly respect `f32` / `f64` high/low bounds (#477) - Allow `gen_range` and `Uniform` to work on non-`Copy` types (#506) - `Uniform` supports inclusive ranges: `Uniform::from(a..=b)`. This is automatically enabled for Rust >= 1.27. (#566) - Implement `TrustedLen` and `FusedIterator` for `DistIter` (#620) #### New distributions - Add the `Dirichlet` distribution (#485) - Added sampling from the unit sphere and circle. (#567) - Implement the triangular distribution (#575) - Implement the Weibull distribution (#576) - Implement the Beta distribution (#574) #### Optimisations - Optimise `Bernoulli::new` (#500) - Optimise `char` sampling (#519) - Optimise sampling of `std::time::Duration` (#583) ### Sequences - Redesign the `seq` module (#483, #515) - Add `WeightedIndex` and `choose_weighted` (#518, #547) - Optimised and changed return type of the `sample_indices` function. (#479) - Use `Iterator::size_hint()` to speed up `IteratorRandom::choose` (#593) ### SIMD - Support for generating SIMD types (#523, #542, #561, #630) ### Other - Revise CI scripts (#632, #635) - Remove functionality already deprecated in 0.5 (#499) - Support for `i128` and `u128` is automatically enabled for Rust >= 1.26. This renders the `i128_support` feature obsolete. It still exists for backwards compatibility but does not have any effect. This breaks programs using Rand with `i128_support` on nightlies older than Rust 1.26. (#571) ## [0.5.5] - 2018-08-07 ### Documentation - Fix links in documentation (#582) ## [0.5.4] - 2018-07-11 ### Platform support - Make `OsRng` work via WASM/stdweb for WebWorkers ## [0.5.3] - 2018-06-26 ### Platform support - OpenBSD, Bitrig: fix compilation (broken in 0.5.1) (#530) ## [0.5.2] - 2018-06-18 ### Platform support - Hide `OsRng` and `JitterRng` on unsupported platforms (#512; fixes #503). ## [0.5.1] - 2018-06-08 ### New distributions - Added Cauchy distribution. (#474, #486) - Added Pareto distribution. (#495) ### Platform support and `OsRng` - Remove blanket Unix implementation. (#484) - Remove Wasm unimplemented stub. (#484) - Dragonfly BSD: read from `/dev/random`. (#484) - Bitrig: use `getentropy` like OpenBSD. (#484) - Solaris: (untested) use `getrandom` if available, otherwise `/dev/random`. (#484) - Emscripten, `stdweb`: split the read up in chunks. (#484) - Emscripten, Haiku: don't do an extra blocking read from `/dev/random`. (#484) - Linux, NetBSD, Solaris: read in blocking mode on first use in `fill_bytes`. (#484) - Fuchsia, CloudABI: fix compilation (broken in Rand 0.5). (#484) ## [0.5.0] - 2018-05-21 ### Crate features and organisation - Minimum Rust version update: 1.22.0. (#239) - Create a separate `rand_core` crate. (#288) - Deprecate `rand_derive`. (#256) - Add `prelude` (and module reorganisation). (#435) - Add `log` feature. Logging is now available in `JitterRng`, `OsRng`, `EntropyRng` and `ReseedingRng`. (#246) - Add `serde1` feature for some PRNGs. (#189) - `stdweb` feature for `OsRng` support on WASM via stdweb. (#272, #336) ### `Rng` trait - Split `Rng` in `RngCore` and `Rng` extension trait. `next_u32`, `next_u64` and `fill_bytes` are now part of `RngCore`. (#265) - Add `Rng::sample`. (#256) - Deprecate `Rng::gen_weighted_bool`. (#308) - Add `Rng::gen_bool`. (#308) - Remove `Rng::next_f32` and `Rng::next_f64`. (#273) - Add optimized `Rng::fill` and `Rng::try_fill` methods. (#247) - Deprecate `Rng::gen_iter`. (#286) - Deprecate `Rng::gen_ascii_chars`. (#279) ### `rand_core` crate - `rand` now depends on new `rand_core` crate (#288) - `RngCore` and `SeedableRng` are now part of `rand_core`. (#288) - Add modules to help implementing RNGs `impl` and `le`. (#209, #228) - Add `Error` and `ErrorKind`. (#225) - Add `CryptoRng` marker trait. (#273) - Add `BlockRngCore` trait. (#281) - Add `BlockRng` and `BlockRng64` wrappers to help implementations. (#281, #325) - Revise the `SeedableRng` trait. (#233) - Remove default implementations for `RngCore::next_u64` and `RngCore::fill_bytes`. (#288) - Add `RngCore::try_fill_bytes`. (#225) ### Other traits and types - Add `FromEntropy` trait. (#233, #375) - Add `SmallRng` wrapper. (#296) - Rewrite `ReseedingRng` to only work with `BlockRngCore` (substantial performance improvement). (#281) - Deprecate `weak_rng`. Use `SmallRng` instead. (#296) - Deprecate `AsciiGenerator`. (#279) ### Random number generators - Switch `StdRng` and `thread_rng` to HC-128. (#277) - `StdRng` must now be created with `from_entropy` instead of `new` - Change `thread_rng` reseeding threshold to 32 MiB. (#277) - PRNGs no longer implement `Copy`. (#209) - `Debug` implementations no longer show internals. (#209) - Implement `Clone` for `ReseedingRng`, `JitterRng`, OsRng`. (#383, #384) - Implement serialization for `XorShiftRng`, `IsaacRng` and `Isaac64Rng` under the `serde1` feature. (#189) - Implement `BlockRngCore` for `ChaChaCore` and `Hc128Core`. (#281) - All PRNGs are now portable across big- and little-endian architectures. (#209) - `Isaac64Rng::next_u32` no longer throws away half the results. (#209) - Add `IsaacRng::new_from_u64` and `Isaac64Rng::new_from_u64`. (#209) - Add the HC-128 CSPRNG `Hc128Rng`. (#210) - Change ChaCha20 to have 64-bit counter and 64-bit stream. (#349) - Changes to `JitterRng` to get its size down from 2112 to 24 bytes. (#251) - Various performance improvements to all PRNGs. ### Platform support and `OsRng` - Add support for CloudABI. (#224) - Remove support for NaCl. (#225) - WASM support for `OsRng` via stdweb, behind the `stdweb` feature. (#272, #336) - Use `getrandom` on more platforms for Linux, and on Android. (#338) - Use the `SecRandomCopyBytes` interface on macOS. (#322) - On systems that do not have a syscall interface, only keep a single file descriptor open for `OsRng`. (#239) - On Unix, first try a single read from `/dev/random`, then `/dev/urandom`. (#338) - Better error handling and reporting in `OsRng` (using new error type). (#225) - `OsRng` now uses non-blocking when available. (#225) - Add `EntropyRng`, which provides `OsRng`, but has `JitterRng` as a fallback. (#235) ### Distributions - New `Distribution` trait. (#256) - Add `Distribution::sample_iter` and `Rng::::sample_iter`. (#361) - Deprecate `Rand`, `Sample` and `IndependentSample` traits. (#256) - Add a `Standard` distribution (replaces most `Rand` implementations). (#256) - Add `Binomial` and `Poisson` distributions. (#96) - Add `Bernoulli` dsitribution. (#411) - Add `Alphanumeric` distribution. (#279) - Remove `Closed01` distribution, add `OpenClosed01`. (#274, #420) - Rework `Range` type, making it possible to implement it for user types. (#274) - Rename `Range` to `Uniform`. (#395) - Add `Uniform::new_inclusive` for inclusive ranges. (#274) - Use widening multiply method for much faster integer range reduction. (#274) - `Standard` distribution for `char` uses `Uniform` internally. (#274) - `Standard` distribution for `bool` uses sign test. (#274) - Implement `Standard` distribution for `Wrapping`. (#436) - Implement `Uniform` distribution for `Duration`. (#427) ## [0.4.3] - 2018-08-16 ### Fixed - Use correct syscall number for PowerPC (#589) ## [0.4.2] - 2018-01-06 ### Changed - Use `winapi` on Windows - Update for Fuchsia OS - Remove dev-dependency on `log` ## [0.4.1] - 2017-12-17 ### Added - `no_std` support ## [0.4.0-pre.0] - 2017-12-11 ### Added - `JitterRng` added as a high-quality alternative entropy source using the system timer - new `seq` module with `sample_iter`, `sample_slice`, etc. - WASM support via dummy implementations (fail at run-time) - Additional benchmarks, covering generators and new seq code ### Changed - `thread_rng` uses `JitterRng` if seeding from system time fails (slower but more secure than previous method) ### Deprecated - `sample` function deprecated (replaced by `sample_iter`) ## [0.3.20] - 2018-01-06 ### Changed - Remove dev-dependency on `log` - Update `fuchsia-zircon` dependency to 0.3.2 ## [0.3.19] - 2017-12-27 ### Changed - Require `log <= 0.3.8` for dev builds - Update `fuchsia-zircon` dependency to 0.3 - Fix broken links in docs (to unblock compiler docs testing CI) ## [0.3.18] - 2017-11-06 ### Changed - `thread_rng` is seeded from the system time if `OsRng` fails - `weak_rng` now uses `thread_rng` internally ## [0.3.17] - 2017-10-07 ### Changed - Fuchsia: Magenta was renamed Zircon ## [0.3.16] - 2017-07-27 ### Added - Implement Debug for mote non-public types - implement `Rand` for (i|u)i128 - Support for Fuchsia ### Changed - Add inline attribute to SampleRange::construct_range. This improves the benchmark for sample in 11% and for shuffle in 16%. - Use `RtlGenRandom` instead of `CryptGenRandom` ## [0.3.15] - 2016-11-26 ### Added - Add `Rng` trait method `choose_mut` - Redox support ### Changed - Use `arc4rand` for `OsRng` on FreeBSD. - Use `arc4random(3)` for `OsRng` on OpenBSD. ### Fixed - Fix filling buffers 4 GiB or larger with `OsRng::fill_bytes` on Windows ## [0.3.14] - 2016-02-13 ### Fixed - Inline definitions from winapi/advapi32, which decreases build times ## [0.3.13] - 2016-01-09 ### Fixed - Compatible with Rust 1.7.0-nightly (needed some extra type annotations) ## [0.3.12] - 2015-11-09 ### Changed - Replaced the methods in `next_f32` and `next_f64` with the technique described Saito & Matsumoto at MCQMC'08. The new method should exhibit a slightly more uniform distribution. - Depend on libc 0.2 ### Fixed - Fix iterator protocol issue in `rand::sample` ## [0.3.11] - 2015-08-31 ### Added - Implement `Rand` for arrays with n <= 32 ## [0.3.10] - 2015-08-17 ### Added - Support for NaCl platforms ### Changed - Allow `Rng` to be `?Sized`, impl for `&mut R` and `Box` where `R: ?Sized + Rng` ## [0.3.9] - 2015-06-18 ### Changed - Use `winapi` for Windows API things ### Fixed - Fixed test on stable/nightly - Fix `getrandom` syscall number for aarch64-unknown-linux-gnu ## [0.3.8] - 2015-04-23 ### Changed - `log` is a dev dependency ### Fixed - Fix race condition of atomics in `is_getrandom_available` ## [0.3.7] - 2015-04-03 ### Fixed - Derive Copy/Clone changes ## [0.3.6] - 2015-04-02 ### Changed - Move to stable Rust! ## [0.3.5] - 2015-04-01 ### Fixed - Compatible with Rust master ## [0.3.4] - 2015-03-31 ### Added - Implement Clone for `Weighted` ### Fixed - Compatible with Rust master ## [0.3.3] - 2015-03-26 ### Fixed - Fix compile on Windows ## [0.3.2] - 2015-03-26 ## [0.3.1] - 2015-03-26 ### Fixed - Fix compile on Windows ## [0.3.0] - 2015-03-25 ### Changed - Update to use log version 0.3.x ## [0.2.1] - 2015-03-22 ### Fixed - Compatible with Rust master - Fixed iOS compilation ## [0.2.0] - 2015-03-06 ### Fixed - Compatible with Rust master (move from `old_io` to `std::io`) ## [0.1.4] - 2015-03-04 ### Fixed - Compatible with Rust master (use wrapping ops) ## [0.1.3] - 2015-02-20 ### Fixed - Compatible with Rust master ### Removed - Removed Copy implementations from RNGs ## [0.1.2] - 2015-02-03 ### Added - Imported functionality from `std::rand`, including: - `StdRng`, `SeedableRng`, `TreadRng`, `weak_rng()` - `ReaderRng`: A wrapper around any Reader to treat it as an RNG. - Imported documentation from `std::rand` - Imported tests from `std::rand` ## [0.1.1] - 2015-02-03 ### Added - Migrate to a cargo-compatible directory structure. ### Fixed - Do not use entropy during `gen_weighted_bool(1)` ## [Rust 0.12.0] - 2014-10-09 ### Added - Impl Rand for tuples of arity 11 and 12 - Include ChaCha pseudorandom generator - Add `next_f64` and `next_f32` to Rng - Implement Clone for PRNGs ### Changed - Rename `TaskRng` to `ThreadRng` and `task_rng` to `thread_rng` (since a runtime is removed from Rust). ### Fixed - Improved performance of ISAAC and ISAAC64 by 30% and 12 % respectively, by informing the optimiser that indexing is never out-of-bounds. ### Removed - Removed the Deprecated `choose_option` ## [Rust 0.11.0] - 2014-07-02 ### Added - document when to use `OSRng` in cryptographic context, and explain why we use `/dev/urandom` instead of `/dev/random` - `Rng::gen_iter()` which will return an infinite stream of random values - `Rng::gen_ascii_chars()` which will return an infinite stream of random ascii characters ### Changed - Now only depends on libcore! - Remove `Rng.choose()`, rename `Rng.choose_option()` to `.choose()` - Rename OSRng to OsRng - The WeightedChoice structure is no longer built with a `Vec>`, but rather a `&mut [Weighted]`. This means that the WeightedChoice structure now has a lifetime associated with it. - The `sample` method on `Rng` has been moved to a top-level function in the `rand` module due to its dependence on `Vec`. ### Removed - `Rng::gen_vec()` was removed. Previous behavior can be regained with `rng.gen_iter().take(n).collect()` - `Rng::gen_ascii_str()` was removed. Previous behavior can be regained with `rng.gen_ascii_chars().take(n).collect()` - {IsaacRng, Isaac64Rng, XorShiftRng}::new() have all been removed. These all relied on being able to use an OSRng for seeding, but this is no longer available in librand (where these types are defined). To retain the same functionality, these types now implement the `Rand` trait so they can be generated with a random seed from another random number generator. This allows the stdlib to use an OSRng to create seeded instances of these RNGs. - Rand implementations for `Box` and `@T` were removed. These seemed to be pretty rare in the codebase, and it allows for librand to not depend on liballoc. Additionally, other pointer types like Rc and Arc were not supported. - Remove a slew of old deprecated functions ## [Rust 0.10] - 2014-04-03 ### Changed - replace `Rng.shuffle's` functionality with `.shuffle_mut` - bubble up IO errors when creating an OSRng ### Fixed - Use `fill()` instead of `read()` - Rewrite OsRng in Rust for windows ## [0.10-pre] - 2014-03-02 ### Added - Separate `rand` out of the standard library [0.9.3]: https://github.com/rust-random/rand/compare/0.9.2...0.9.3 # Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). A [separate changelog is kept for rand_core](rand_core/CHANGELOG.md). You may also find the [Upgrade Guide](https://rust-random.github.io/book/update.html) useful. ## [0.9.4] — 2026-04-13 ### Fixes - Fix doc build ([#1766]) [#1766]: https://github.com/rust-random/rand/pull/1766 ## [0.9.3] — 2026-04-11 This release back-ports a fix from v0.10. See also [#1763]. ### Changes - Deprecate feature `log` (#1764) - Replace usages of `doc_auto_cfg` (#1764) [#1763]: https://github.com/rust-random/rand/pull/1763 ## [0.9.2] — 2025-07-20 ### Deprecated - Deprecate `rand::rngs::mock` module and `StepRng` generator (#1634) ### Additions - Enable `WeightedIndex` (de)serialization (#1646) ## [0.9.1] - 2025-04-17 ### Security and unsafe - Revise "not a crypto library" policy again (#1565) - Remove `zerocopy` dependency from `rand` (#1579) ### Fixes - Fix feature `simd_support` for recent nightly rust (#1586) ### Changes - Allow `fn rand::seq::index::sample_weighted` and `fn IndexedRandom::choose_multiple_weighted` to return fewer than `amount` results (#1623), reverting an undocumented change (#1382) to the previous release. ### Additions - Add `rand::distr::Alphabetic` distribution. (#1587) - Re-export `rand_core` (#1604) ## [0.9.0] - 2025-01-27 ### Security and unsafe - Policy: "rand is not a crypto library" (#1514) - Remove fork-protection from `ReseedingRng` and `ThreadRng`. Instead, it is recommended to call `ThreadRng::reseed` on fork. (#1379) - Use `zerocopy` to replace some `unsafe` code (#1349, #1393, #1446, #1502) ### Dependencies - Bump the MSRV to 1.63.0 (#1207, #1246, #1269, #1341, #1416, #1536); note that 1.60.0 may work for dependents when using `--ignore-rust-version` - Update to `rand_core` v0.9.0 (#1558) ### Features - Support `std` feature without `getrandom` or `rand_chacha` (#1354) - Enable feature `small_rng` by default (#1455) - Remove implicit feature `rand_chacha`; use `std_rng` instead. (#1473) - Rename feature `serde1` to `serde` (#1477) - Rename feature `getrandom` to `os_rng` (#1537) - Add feature `thread_rng` (#1547) ### API changes: rand_core traits - Add fn `RngCore::read_adapter` implementing `std::io::Read` (#1267) - Add trait `CryptoBlockRng: BlockRngCore`; make `trait CryptoRng: RngCore` (#1273) - Add traits `TryRngCore`, `TryCryptoRng` (#1424, #1499) - Rename `fn SeedableRng::from_rng` -> `try_from_rng` and add infallible variant `fn from_rng` (#1424) - Rename `fn SeedableRng::from_entropy` -> `from_os_rng` and add fallible variant `fn try_from_os_rng` (#1424) - Add bounds `Clone` and `AsRef` to associated type `SeedableRng::Seed` (#1491) ### API changes: Rng trait and top-level fns - Rename fn `rand::thread_rng()` to `rand::rng()` and remove from the prelude (#1506) - Remove fn `rand::random()` from the prelude (#1506) - Add top-level fns `random_iter`, `random_range`, `random_bool`, `random_ratio`, `fill` (#1488) - Re-introduce fn `Rng::gen_iter` as `random_iter` (#1305, #1500) - Rename fn `Rng::gen` to `random` to avoid conflict with the new `gen` keyword in Rust 2024 (#1438) - Rename fns `Rng::gen_range` to `random_range`, `gen_bool` to `random_bool`, `gen_ratio` to `random_ratio` (#1505) - Annotate panicking methods with `#[track_caller]` (#1442, #1447) ### API changes: RNGs - Fix `::Seed` size to 256 bits (#1455) - Remove first parameter (`rng`) of `ReseedingRng::new` (#1533) ### API changes: Sequences - Split trait `SliceRandom` into `IndexedRandom`, `IndexedMutRandom`, `SliceRandom` (#1382) - Add `IndexedRandom::choose_multiple_array`, `index::sample_array` (#1453, #1469) ### API changes: Distributions: renames - Rename module `rand::distributions` to `rand::distr` (#1470) - Rename distribution `Standard` to `StandardUniform` (#1526) - Move `distr::Slice` -> `distr::slice::Choose`, `distr::EmptySlice` -> `distr::slice::Empty` (#1548) - Rename trait `distr::DistString` -> `distr::SampleString` (#1548) - Rename `distr::DistIter` -> `distr::Iter`, `distr::DistMap` -> `distr::Map` (#1548) ### API changes: Distributions - Relax `Sized` bound on `Distribution for &D` (#1278) - Remove impl of `Distribution>` for `StandardUniform` (#1526) - Let distribution `StandardUniform` support all `NonZero*` types (#1332) - Fns `{Uniform, UniformSampler}::{new, new_inclusive}` return a `Result` (instead of potentially panicking) (#1229) - Distribution `Uniform` implements `TryFrom` instead of `From` for ranges (#1229) - Add `UniformUsize` (#1487) - Remove support for generating `isize` and `usize` values with `StandardUniform`, `Uniform` (except via `UniformUsize`) and `Fill` and usage as a `WeightedAliasIndex` weight (#1487) - Add impl `DistString` for distributions `Slice` and `Uniform` (#1315) - Add fn `Slice::num_choices` (#1402) - Add fn `p()` for distribution `Bernoulli` to access probability (#1481) ### API changes: Weighted distributions - Add `pub` module `rand::distr::weighted`, moving `WeightedIndex` there (#1548) - Add trait `weighted::Weight`, allowing `WeightedIndex` to trap overflow (#1353) - Add fns `weight, weights, total_weight` to distribution `WeightedIndex` (#1420) - Rename enum `WeightedError` to `weighted::Error`, revising variants (#1382) and mark as `#[non_exhaustive]` (#1480) ### API changes: SIMD - Switch to `std::simd`, expand SIMD & docs (#1239) ### Reproducibility-breaking changes - Make `ReseedingRng::reseed` discard remaining data from the last block generated (#1379) - Change fn `SmallRng::seed_from_u64` implementation (#1203) - Allow `UniformFloat::new` samples and `UniformFloat::sample_single` to yield `high` (#1462) - Fix portability of distribution `Slice` (#1469) - Make `Uniform` for `usize` portable via `UniformUsize` (#1487) - Fix `IndexdRandom::choose_multiple_weighted` for very small seeds and optimize for large input length / low memory (#1530) ### Reproducibility-breaking optimisations - Optimize fn `sample_floyd`, affecting output of `rand::seq::index::sample` and `rand::seq::SliceRandom::choose_multiple` (#1277) - New, faster algorithms for `IteratorRandom::choose` and `choose_stable` (#1268) - New, faster algorithms for `SliceRandom::shuffle` and `partial_shuffle` (#1272) - Optimize distribution `Uniform`: use Canon's method (single sampling) / Lemire's method (distribution sampling) for faster sampling (breaks value stability; #1287) - Optimize fn `sample_single_inclusive` for floats (+~20% perf) (#1289) ### Other optimisations - Improve `SmallRng` initialization performance (#1482) - Optimise SIMD widening multiply (#1247) ### Other - Add `Cargo.lock.msrv` file (#1275) - Reformat with `rustfmt` and enforce (#1448) - Apply Clippy suggestions and enforce (#1448, #1474) - Move all benchmarks to new `benches` crate (#1329, #1439) and migrate to Criterion (#1490) ### Documentation - Improve `ThreadRng` related docs (#1257) - Docs: enable experimental `--generate-link-to-definition` feature (#1327) - Better doc of crate features, use `doc_auto_cfg` (#1411, #1450) ## [0.8.5] - 2021-08-20 ### Fixes - Fix build on non-32/64-bit architectures (#1144) - Fix "min_const_gen" feature for `no_std` (#1173) - Check `libc::pthread_atfork` return value with panic on error (#1178) - More robust reseeding in case `ReseedingRng` is used from a fork handler (#1178) - Fix nightly: remove unused `slice_partition_at_index` feature (#1215) - Fix nightly + `simd_support`: update `packed_simd` (#1216) ### Rngs - `StdRng`: Switch from HC128 to ChaCha12 on emscripten (#1142). We now use ChaCha12 on all platforms. ### Documentation - Added docs about rand's use of const generics (#1150) - Better random chars example (#1157) ## [0.8.4] - 2021-06-15 ### Additions - Use const-generics to support arrays of all sizes (#1104) - Implement `Clone` and `Copy` for `Alphanumeric` (#1126) - Add `Distribution::map` to derive a distribution using a closure (#1129) - Add `Slice` distribution (#1107) - Add `DistString` trait with impls for `Standard` and `Alphanumeric` (#1133) ### Other - Reorder asserts in `Uniform` float distributions for easier debugging of non-finite arguments (#1094, #1108) - Add range overflow check in `Uniform` float distributions (#1108) - Deprecate `rngs::adapter::ReadRng` (#1130) ## [0.8.3] - 2021-01-25 ### Fixes - Fix `no-std` + `alloc` build by gating `choose_multiple_weighted` on `std` (#1088) ## [0.8.2] - 2021-01-12 ### Fixes - Fix panic in `UniformInt::sample_single_inclusive` and `Rng::gen_range` when providing a full integer range (eg `0..=MAX`) (#1087) ## [0.8.1] - 2020-12-31 ### Other - Enable all stable features in the playground (#1081) ## [0.8.0] - 2020-12-18 ### Platform support - The minimum supported Rust version is now 1.36 (#1011) - `getrandom` updated to v0.2 (#1041) - Remove `wasm-bindgen` and `stdweb` feature flags. For details of WASM support, see the [getrandom documentation](https://docs.rs/getrandom/latest). (#948) - `ReadRng::next_u32` and `next_u64` now use little-Endian conversion instead of native-Endian, affecting results on Big-Endian platforms (#1061) - The `nightly` feature no longer implies the `simd_support` feature (#1048) - Fix `simd_support` feature to work on current nightlies (#1056) ### Rngs - `ThreadRng` is no longer `Copy` to enable safe usage within thread-local destructors (#1035) - `gen_range(a, b)` was replaced with `gen_range(a..b)`. `gen_range(a..=b)` is also supported. Note that `a` and `b` can no longer be references or SIMD types. (#744, #1003) - Replace `AsByteSliceMut` with `Fill` and add support for `[bool], [char], [f32], [f64]` (#940) - Restrict `rand::rngs::adapter` to `std` (#1027; see also #928) - `StdRng`: add new `std_rng` feature flag (enabled by default, but might need to be used if disabling default crate features) (#948) - `StdRng`: Switch from ChaCha20 to ChaCha12 for better performance (#1028) - `SmallRng`: Replace PCG algorithm with xoshiro{128,256}++ (#1038) ### Sequences - Add `IteratorRandom::choose_stable` as an alternative to `choose` which does not depend on size hints (#1057) - Improve accuracy and performance of `IteratorRandom::choose` (#1059) - Implement `IntoIterator` for `IndexVec`, replacing the `into_iter` method (#1007) - Add value stability tests for `seq` module (#933) ### Misc - Support `PartialEq` and `Eq` for `StdRng`, `SmallRng` and `StepRng` (#979) - Added a `serde1` feature and added Serialize/Deserialize to `UniformInt` and `WeightedIndex` (#974) - Drop some unsafe code (#962, #963, #1011) - Reduce packaged crate size (#983) - Migrate to GitHub Actions from Travis+AppVeyor (#1073) ### Distributions - `Alphanumeric` samples bytes instead of chars (#935) - `Uniform` now supports `char`, enabling `rng.gen_range('A'..='Z')` (#1068) - Add `UniformSampler::sample_single_inclusive` (#1003) #### Weighted sampling - Implement weighted sampling without replacement (#976, #1013) - `rand::distributions::alias_method::WeightedIndex` was moved to `rand_distr::WeightedAliasIndex`. The simpler alternative `rand::distribution::WeightedIndex` remains. (#945) - Improve treatment of rounding errors in `WeightedIndex::update_weights` (#956) - `WeightedIndex`: return error on NaN instead of panic (#1005) ### Documentation - Document types supported by `random` (#994) - Document notes on password generation (#995) - Note that `SmallRng` may not be the best choice for performance and in some other cases (#1038) - Use `doc(cfg)` to annotate feature-gated items (#1019) - Adjust README (#1065) ## [0.7.3] - 2020-01-10 ### Fixes - The `Bernoulli` distribution constructors now reports an error on NaN and on `denominator == 0`. (#925) - Use `std::sync::Once` to register fork handler, avoiding possible atomicity violation (#928) - Fix documentation on the precision of generated floating-point values ### Changes - Unix: make libc dependency optional; only use fork protection with std feature (#928) ### Additions - Implement `std::error::Error` for `BernoulliError` (#919) ## [0.7.2] - 2019-09-16 ### Fixes - Fix dependency on `rand_core` 0.5.1 (#890) ### Additions - Unit tests for value stability of distributions added (#888) ## [0.7.1] - 2019-09-13 ### Yanked This release was yanked since it depends on `rand_core::OsRng` added in 0.5.1 but specifies a dependency on version 0.5.0 (#890), causing a broken builds when updating from `rand 0.7.0` without also updating `rand_core`. ### Fixes - Fix `no_std` behaviour, appropriately enable c2-chacha's `std` feature (#844) - `alloc` feature in `no_std` is available since Rust 1.36 (#856) - Fix or squelch issues from Clippy lints (#840) ### Additions - Add a `no_std` target to CI to continuously evaluate `no_std` status (#844) - `WeightedIndex`: allow adjusting a sub-set of weights (#866) ## [0.7.0] - 2019-06-28 ### Fixes - Fix incorrect pointer usages revealed by Miri testing (#780, #781) - Fix (tiny!) bias in `Uniform` for 8- and 16-bit ints (#809) ### Crate - Bumped MSRV (min supported Rust version) to 1.32.0 - Updated to Rust Edition 2018 (#823, #824) - Removed dependence on `rand_xorshift`, `rand_isaac`, `rand_jitter` crates (#759, #765) - Remove dependency on `winapi` (#724) - Removed all `build.rs` files (#824) - Removed code already deprecated in version 0.6 (#757) - Removed the serde1 feature (It's still available for backwards compatibility, but it does not do anything. #830) - Many documentation changes ### rand_core - Updated to `rand_core` 0.5.0 - `Error` type redesigned with new API (#800) - Move `from_entropy` method to `SeedableRng` and remove `FromEntropy` (#800) - `SeedableRng::from_rng` is now expected to be value-stable (#815) ### Standard RNGs - OS interface moved from `rand_os` to new `getrandom` crate (#765, [getrandom](https://github.com/rust-random/getrandom)) - Use ChaCha for `StdRng` and `ThreadRng` (#792) - Feature-gate `SmallRng` (#792) - `ThreadRng` now supports `Copy` (#758) - Deprecated `EntropyRng` (#765) - Enable fork protection of ReseedingRng without `std` (#724) ### Distributions - Many distributions have been moved to `rand_distr` (#761) - `Bernoulli::new` constructor now returns a `Result` (#803) - `Distribution::sample_iter` adjusted for more flexibility (#758) - Added `distributions::weighted::alias_method::WeightedIndex` for `O(1)` sampling (#692) - Support sampling `NonZeroU*` types with the `Standard` distribution (#728) - Optimised `Binomial` distribution sampling (#735, #740, #752) - Optimised SIMD float sampling (#739) ### Sequences - Make results portable across 32- and 64-bit by using `u32` samples for `usize` where possible (#809) ## [0.6.5] - 2019-01-28 ### Crates - Update `rand_core` to 0.4 (#703) - Move `JitterRng` to its own crate (#685) - Add a wasm-bindgen test crate (#696) ### Platforms - Fuchsia: Replaced fuchsia-zircon with fuchsia-cprng ### Doc - Use RFC 1946 for doc links (#691) - Fix some doc links and notes (#711) ## [0.6.4] - 2019-01-08 ### Fixes - Move wasm-bindgen shims to correct crate (#686) - Make `wasm32-unknown-unknown` compile but fail at run-time if missing bindingsg (#686) ## [0.6.3] - 2019-01-04 ### Fixes - Make the `std` feature require the optional `rand_os` dependency (#675) - Re-export the optional WASM dependencies of `rand_os` from `rand` to avoid breakage (#674) ## [0.6.2] - 2019-01-04 ### Additions - Add `Default` for `ThreadRng` (#657) - Move `rngs::OsRng` to `rand_os` sub-crate; clean up code; use as dependency (#643) ##BLOCKER## - Add `rand_xoshiro` sub-crate, plus benchmarks (#642, #668) ### Fixes - Fix bias in `UniformInt::sample_single` (#662) - Use `autocfg` instead of `rustc_version` for rustc version detection (#664) - Disable `i128` and `u128` if the `target_os` is `emscripten` (#671: work-around Emscripten limitation) - CI fixes (#660, #671) ### Optimisations - Optimise memory usage of `UnitCircle` and `UnitSphereSurface` distributions (no PR) ## [0.6.1] - 2018-11-22 - Support sampling `Duration` also for `no_std` (only since Rust 1.25) (#649) - Disable default features of `libc` (#647) ## [0.6.0] - 2018-11-14 ### Project organisation - Rand has moved from [rust-lang-nursery](https://github.com/rust-lang-nursery/rand) to [rust-random](https://github.com/rust-random/rand)! (#578) - Created [The Rust Random Book](https://rust-random.github.io/book/) ([source](https://github.com/rust-random/book)) - Update copyright and licence notices (#591, #611) - Migrate policy documentation from the wiki (#544) ### Platforms - Add fork protection on Unix (#466) - Added support for wasm-bindgen. (#541, #559, #562, #600) - Enable `OsRng` for powerpc64, sparc and sparc64 (#609) - Use `syscall` from `libc` on Linux instead of redefining it (#629) ### RNGs - Switch `SmallRng` to use PCG (#623) - Implement `Pcg32` and `Pcg64Mcg` generators (#632) - Move ISAAC RNGs to a dedicated crate (#551) - Move Xorshift RNG to its own crate (#557) - Move ChaCha and HC128 RNGs to dedicated crates (#607, #636) - Remove usage of `Rc` from `ThreadRng` (#615) ### Sampling and distributions - Implement `Rng.gen_ratio()` and `Bernoulli::new_ratio()` (#491) - Make `Uniform` strictly respect `f32` / `f64` high/low bounds (#477) - Allow `gen_range` and `Uniform` to work on non-`Copy` types (#506) - `Uniform` supports inclusive ranges: `Uniform::from(a..=b)`. This is automatically enabled for Rust >= 1.27. (#566) - Implement `TrustedLen` and `FusedIterator` for `DistIter` (#620) #### New distributions - Add the `Dirichlet` distribution (#485) - Added sampling from the unit sphere and circle. (#567) - Implement the triangular distribution (#575) - Implement the Weibull distribution (#576) - Implement the Beta distribution (#574) #### Optimisations - Optimise `Bernoulli::new` (#500) - Optimise `char` sampling (#519) - Optimise sampling of `std::time::Duration` (#583) ### Sequences - Redesign the `seq` module (#483, #515) - Add `WeightedIndex` and `choose_weighted` (#518, #547) - Optimised and changed return type of the `sample_indices` function. (#479) - Use `Iterator::size_hint()` to speed up `IteratorRandom::choose` (#593) ### SIMD - Support for generating SIMD types (#523, #542, #561, #630) ### Other - Revise CI scripts (#632, #635) - Remove functionality already deprecated in 0.5 (#499) - Support for `i128` and `u128` is automatically enabled for Rust >= 1.26. This renders the `i128_support` feature obsolete. It still exists for backwards compatibility but does not have any effect. This breaks programs using Rand with `i128_support` on nightlies older than Rust 1.26. (#571) ## [0.5.5] - 2018-08-07 ### Documentation - Fix links in documentation (#582) ## [0.5.4] - 2018-07-11 ### Platform support - Make `OsRng` work via WASM/stdweb for WebWorkers ## [0.5.3] - 2018-06-26 ### Platform support - OpenBSD, Bitrig: fix compilation (broken in 0.5.1) (#530) ## [0.5.2] - 2018-06-18 ### Platform support - Hide `OsRng` and `JitterRng` on unsupported platforms (#512; fixes #503). ## [0.5.1] - 2018-06-08 ### New distributions - Added Cauchy distribution. (#474, #486) - Added Pareto distribution. (#495) ### Platform support and `OsRng` - Remove blanket Unix implementation. (#484) - Remove Wasm unimplemented stub. (#484) - Dragonfly BSD: read from `/dev/random`. (#484) - Bitrig: use `getentropy` like OpenBSD. (#484) - Solaris: (untested) use `getrandom` if available, otherwise `/dev/random`. (#484) - Emscripten, `stdweb`: split the read up in chunks. (#484) - Emscripten, Haiku: don't do an extra blocking read from `/dev/random`. (#484) - Linux, NetBSD, Solaris: read in blocking mode on first use in `fill_bytes`. (#484) - Fuchsia, CloudABI: fix compilation (broken in Rand 0.5). (#484) ## [0.5.0] - 2018-05-21 ### Crate features and organisation - Minimum Rust version update: 1.22.0. (#239) - Create a separate `rand_core` crate. (#288) - Deprecate `rand_derive`. (#256) - Add `prelude` (and module reorganisation). (#435) - Add `log` feature. Logging is now available in `JitterRng`, `OsRng`, `EntropyRng` and `ReseedingRng`. (#246) - Add `serde1` feature for some PRNGs. (#189) - `stdweb` feature for `OsRng` support on WASM via stdweb. (#272, #336) ### `Rng` trait - Split `Rng` in `RngCore` and `Rng` extension trait. `next_u32`, `next_u64` and `fill_bytes` are now part of `RngCore`. (#265) - Add `Rng::sample`. (#256) - Deprecate `Rng::gen_weighted_bool`. (#308) - Add `Rng::gen_bool`. (#308) - Remove `Rng::next_f32` and `Rng::next_f64`. (#273) - Add optimized `Rng::fill` and `Rng::try_fill` methods. (#247) - Deprecate `Rng::gen_iter`. (#286) - Deprecate `Rng::gen_ascii_chars`. (#279) ### `rand_core` crate - `rand` now depends on new `rand_core` crate (#288) - `RngCore` and `SeedableRng` are now part of `rand_core`. (#288) - Add modules to help implementing RNGs `impl` and `le`. (#209, #228) - Add `Error` and `ErrorKind`. (#225) - Add `CryptoRng` marker trait. (#273) - Add `BlockRngCore` trait. (#281) - Add `BlockRng` and `BlockRng64` wrappers to help implementations. (#281, #325) - Revise the `SeedableRng` trait. (#233) - Remove default implementations for `RngCore::next_u64` and `RngCore::fill_bytes`. (#288) - Add `RngCore::try_fill_bytes`. (#225) ### Other traits and types - Add `FromEntropy` trait. (#233, #375) - Add `SmallRng` wrapper. (#296) - Rewrite `ReseedingRng` to only work with `BlockRngCore` (substantial performance improvement). (#281) - Deprecate `weak_rng`. Use `SmallRng` instead. (#296) - Deprecate `AsciiGenerator`. (#279) ### Random number generators - Switch `StdRng` and `thread_rng` to HC-128. (#277) - `StdRng` must now be created with `from_entropy` instead of `new` - Change `thread_rng` reseeding threshold to 32 MiB. (#277) - PRNGs no longer implement `Copy`. (#209) - `Debug` implementations no longer show internals. (#209) - Implement `Clone` for `ReseedingRng`, `JitterRng`, OsRng`. (#383, #384) - Implement serialization for `XorShiftRng`, `IsaacRng` and `Isaac64Rng` under the `serde1` feature. (#189) - Implement `BlockRngCore` for `ChaChaCore` and `Hc128Core`. (#281) - All PRNGs are now portable across big- and little-endian architectures. (#209) - `Isaac64Rng::next_u32` no longer throws away half the results. (#209) - Add `IsaacRng::new_from_u64` and `Isaac64Rng::new_from_u64`. (#209) - Add the HC-128 CSPRNG `Hc128Rng`. (#210) - Change ChaCha20 to have 64-bit counter and 64-bit stream. (#349) - Changes to `JitterRng` to get its size down from 2112 to 24 bytes. (#251) - Various performance improvements to all PRNGs. ### Platform support and `OsRng` - Add support for CloudABI. (#224) - Remove support for NaCl. (#225) - WASM support for `OsRng` via stdweb, behind the `stdweb` feature. (#272, #336) - Use `getrandom` on more platforms for Linux, and on Android. (#338) - Use the `SecRandomCopyBytes` interface on macOS. (#322) - On systems that do not have a syscall interface, only keep a single file descriptor open for `OsRng`. (#239) - On Unix, first try a single read from `/dev/random`, then `/dev/urandom`. (#338) - Better error handling and reporting in `OsRng` (using new error type). (#225) - `OsRng` now uses non-blocking when available. (#225) - Add `EntropyRng`, which provides `OsRng`, but has `JitterRng` as a fallback. (#235) ### Distributions - New `Distribution` trait. (#256) - Add `Distribution::sample_iter` and `Rng::::sample_iter`. (#361) - Deprecate `Rand`, `Sample` and `IndependentSample` traits. (#256) - Add a `Standard` distribution (replaces most `Rand` implementations). (#256) - Add `Binomial` and `Poisson` distributions. (#96) - Add `Bernoulli` dsitribution. (#411) - Add `Alphanumeric` distribution. (#279) - Remove `Closed01` distribution, add `OpenClosed01`. (#274, #420) - Rework `Range` type, making it possible to implement it for user types. (#274) - Rename `Range` to `Uniform`. (#395) - Add `Uniform::new_inclusive` for inclusive ranges. (#274) - Use widening multiply method for much faster integer range reduction. (#274) - `Standard` distribution for `char` uses `Uniform` internally. (#274) - `Standard` distribution for `bool` uses sign test. (#274) - Implement `Standard` distribution for `Wrapping`. (#436) - Implement `Uniform` distribution for `Duration`. (#427) ## [0.4.3] - 2018-08-16 ### Fixed - Use correct syscall number for PowerPC (#589) ## [0.4.2] - 2018-01-06 ### Changed - Use `winapi` on Windows - Update for Fuchsia OS - Remove dev-dependency on `log` ## [0.4.1] - 2017-12-17 ### Added - `no_std` support ## [0.4.0-pre.0] - 2017-12-11 ### Added - `JitterRng` added as a high-quality alternative entropy source using the system timer - new `seq` module with `sample_iter`, `sample_slice`, etc. - WASM support via dummy implementations (fail at run-time) - Additional benchmarks, covering generators and new seq code ### Changed - `thread_rng` uses `JitterRng` if seeding from system time fails (slower but more secure than previous method) ### Deprecated - `sample` function deprecated (replaced by `sample_iter`) ## [0.3.20] - 2018-01-06 ### Changed - Remove dev-dependency on `log` - Update `fuchsia-zircon` dependency to 0.3.2 ## [0.3.19] - 2017-12-27 ### Changed - Require `log <= 0.3.8` for dev builds - Update `fuchsia-zircon` dependency to 0.3 - Fix broken links in docs (to unblock compiler docs testing CI) ## [0.3.18] - 2017-11-06 ### Changed - `thread_rng` is seeded from the system time if `OsRng` fails - `weak_rng` now uses `thread_rng` internally ## [0.3.17] - 2017-10-07 ### Changed - Fuchsia: Magenta was renamed Zircon ## [0.3.16] - 2017-07-27 ### Added - Implement Debug for mote non-public types - implement `Rand` for (i|u)i128 - Support for Fuchsia ### Changed - Add inline attribute to SampleRange::construct_range. This improves the benchmark for sample in 11% and for shuffle in 16%. - Use `RtlGenRandom` instead of `CryptGenRandom` ## [0.3.15] - 2016-11-26 ### Added - Add `Rng` trait method `choose_mut` - Redox support ### Changed - Use `arc4rand` for `OsRng` on FreeBSD. - Use `arc4random(3)` for `OsRng` on OpenBSD. ### Fixed - Fix filling buffers 4 GiB or larger with `OsRng::fill_bytes` on Windows ## [0.3.14] - 2016-02-13 ### Fixed - Inline definitions from winapi/advapi32, which decreases build times ## [0.3.13] - 2016-01-09 ### Fixed - Compatible with Rust 1.7.0-nightly (needed some extra type annotations) ## [0.3.12] - 2015-11-09 ### Changed - Replaced the methods in `next_f32` and `next_f64` with the technique described Saito & Matsumoto at MCQMC'08. The new method should exhibit a slightly more uniform distribution. - Depend on libc 0.2 ### Fixed - Fix iterator protocol issue in `rand::sample` ## [0.3.11] - 2015-08-31 ### Added - Implement `Rand` for arrays with n <= 32 ## [0.3.10] - 2015-08-17 ### Added - Support for NaCl platforms ### Changed - Allow `Rng` to be `?Sized`, impl for `&mut R` and `Box` where `R: ?Sized + Rng` ## [0.3.9] - 2015-06-18 ### Changed - Use `winapi` for Windows API things ### Fixed - Fixed test on stable/nightly - Fix `getrandom` syscall number for aarch64-unknown-linux-gnu ## [0.3.8] - 2015-04-23 ### Changed - `log` is a dev dependency ### Fixed - Fix race condition of atomics in `is_getrandom_available` ## [0.3.7] - 2015-04-03 ### Fixed - Derive Copy/Clone changes ## [0.3.6] - 2015-04-02 ### Changed - Move to stable Rust! ## [0.3.5] - 2015-04-01 ### Fixed - Compatible with Rust master ## [0.3.4] - 2015-03-31 ### Added - Implement Clone for `Weighted` ### Fixed - Compatible with Rust master ## [0.3.3] - 2015-03-26 ### Fixed - Fix compile on Windows ## [0.3.2] - 2015-03-26 ## [0.3.1] - 2015-03-26 ### Fixed - Fix compile on Windows ## [0.3.0] - 2015-03-25 ### Changed - Update to use log version 0.3.x ## [0.2.1] - 2015-03-22 ### Fixed - Compatible with Rust master - Fixed iOS compilation ## [0.2.0] - 2015-03-06 ### Fixed - Compatible with Rust master (move from `old_io` to `std::io`) ## [0.1.4] - 2015-03-04 ### Fixed - Compatible with Rust master (use wrapping ops) ## [0.1.3] - 2015-02-20 ### Fixed - Compatible with Rust master ### Removed - Removed Copy implementations from RNGs ## [0.1.2] - 2015-02-03 ### Added - Imported functionality from `std::rand`, including: - `StdRng`, `SeedableRng`, `TreadRng`, `weak_rng()` - `ReaderRng`: A wrapper around any Reader to treat it as an RNG. - Imported documentation from `std::rand` - Imported tests from `std::rand` ## [0.1.1] - 2015-02-03 ### Added - Migrate to a cargo-compatible directory structure. ### Fixed - Do not use entropy during `gen_weighted_bool(1)` ## [Rust 0.12.0] - 2014-10-09 ### Added - Impl Rand for tuples of arity 11 and 12 - Include ChaCha pseudorandom generator - Add `next_f64` and `next_f32` to Rng - Implement Clone for PRNGs ### Changed - Rename `TaskRng` to `ThreadRng` and `task_rng` to `thread_rng` (since a runtime is removed from Rust). ### Fixed - Improved performance of ISAAC and ISAAC64 by 30% and 12 % respectively, by informing the optimiser that indexing is never out-of-bounds. ### Removed - Removed the Deprecated `choose_option` ## [Rust 0.11.0] - 2014-07-02 ### Added - document when to use `OSRng` in cryptographic context, and explain why we use `/dev/urandom` instead of `/dev/random` - `Rng::gen_iter()` which will return an infinite stream of random values - `Rng::gen_ascii_chars()` which will return an infinite stream of random ascii characters ### Changed - Now only depends on libcore! - Remove `Rng.choose()`, rename `Rng.choose_option()` to `.choose()` - Rename OSRng to OsRng - The WeightedChoice structure is no longer built with a `Vec>`, but rather a `&mut [Weighted]`. This means that the WeightedChoice structure now has a lifetime associated with it. - The `sample` method on `Rng` has been moved to a top-level function in the `rand` module due to its dependence on `Vec`. ### Removed - `Rng::gen_vec()` was removed. Previous behavior can be regained with `rng.gen_iter().take(n).collect()` - `Rng::gen_ascii_str()` was removed. Previous behavior can be regained with `rng.gen_ascii_chars().take(n).collect()` - {IsaacRng, Isaac64Rng, XorShiftRng}::new() have all been removed. These all relied on being able to use an OSRng for seeding, but this is no longer available in librand (where these types are defined). To retain the same functionality, these types now implement the `Rand` trait so they can be generated with a random seed from another random number generator. This allows the stdlib to use an OSRng to create seeded instances of these RNGs. - Rand implementations for `Box` and `@T` were removed. These seemed to be pretty rare in the codebase, and it allows for librand to not depend on liballoc. Additionally, other pointer types like Rc and Arc were not supported. - Remove a slew of old deprecated functions ## [Rust 0.10] - 2014-04-03 ### Changed - replace `Rng.shuffle's` functionality with `.shuffle_mut` - bubble up IO errors when creating an OSRng ### Fixed - Use `fill()` instead of `read()` - Rewrite OsRng in Rust for windows ## [0.10-pre] - 2014-03-02 ### Added - Separate `rand` out of the standard library [0.9.3]: https://github.com/rust-random/rand/compare/0.9.2...0.9.3 # Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [0.10.0] - 2026-02-01 This release makes a number of significant changes which we hope will be the last significant breakage before 1.0. Code has moved from the [rust-random/rand] repository to its own [rust-random/rand_core]. ### User-facing API changes #### Changed - Edition changed to 2024 and MSRV bumped to 1.85 ([rand#1668]) - `RngCore` and `TryRngCore` are renamed to `Rng` and `TryRng` respectively ([#54]) - `Rng` is now an extension trait of `TryRng` ([#45]) - `TryRng::Error` is bound on `core::error::Error` instead of `Debug + Display` ([#58]) - Relax `Sized` bound on impls of `SeedableRng` ([rand#1641]) #### Added - `SeedableRng::{fork, try_fork}` methods ([#17]) - Re-export of `core::convert::Infallible` ([#56]) #### Removed - `TryRng::read_adapter` method (replaced with `rand::RngReader`) ([rand#1669]) - `os_rng` crate feature ([rand#1674]) - `OsRng` and `OsError` structs ([rand#1674]) - `SeedableRng::from_os_rng` and `SeedableRng::try_from_os_rng` methods ([rand#1674]) - `getrandom` dependency ([rand#1674]) - `std` crate feature ([rand#1674]) - Optional `serde` dependency ([#28]) - `UnwrapMut` struct and `Rng::unwrap_mut` method ([#45]) - `Rng::unwrap_err` method in favor of explicit wrapping in `UnwrapErr` ([#53]) ### API changes to PRNG implementation helpers ### Added - `BlockRng::reconstruct` and `BlockRng::remaining_results` methods ([#36]) - `block::Generator::drop` method ([#35]) - `BlockRng::word_offset` method ([#44]) ### Changed - Replaced `le` helper functions with new `utils` helpers ([rand#1667], [#34], [#38], [#45]) - Rename `BlockRng::generate_and_set` method to `reset_and_skip` ([#44]) - Rename `block::BlockRngCore` trait to `block::Generator` ([#26]) - Rename `BlockRngCore::Results` associated type to `Output` and remove type bounds on it ([#26]) ### Removed - Implementation of `Rng` for `BlockRng`, making the latter more generic ([#34]) - `BlockRng64` struct ([#34]) - `BlockRng::reset` method ([#44]) - `BlockRng::index` method (replaced with `BlockRng::word_offset`) ([#44]) - `Generator::Item` associated type ([#26]) - `CryptoBlockRng` ([#69]) [0.10.0]: https://github.com/rust-random/rand_core/compare/v0.9.3...HEAD [rand#1641]: https://github.com/rust-random/rand/pull/1641 [rand#1667]: https://github.com/rust-random/rand/pull/1667 [rand#1668]: https://github.com/rust-random/rand/pull/1668 [rand#1669]: https://github.com/rust-random/rand/pull/1669 [rand#1674]: https://github.com/rust-random/rand/pull/1674 [#17]: https://github.com/rust-random/rand_core/pull/17 [#26]: https://github.com/rust-random/rand_core/pull/28 [#28]: https://github.com/rust-random/rand_core/pull/28 [#34]: https://github.com/rust-random/rand_core/pull/34 [#35]: https://github.com/rust-random/rand_core/pull/35 [#36]: https://github.com/rust-random/rand_core/pull/36 [#38]: https://github.com/rust-random/rand_core/pull/38 [#44]: https://github.com/rust-random/rand_core/pull/44 [#45]: https://github.com/rust-random/rand_core/pull/45 [#53]: https://github.com/rust-random/rand_core/pull/53 [#54]: https://github.com/rust-random/rand_core/pull/54 [#56]: https://github.com/rust-random/rand_core/pull/56 [#58]: https://github.com/rust-random/rand_core/pull/58 [#69]: https://github.com/rust-random/rand_core/pull/69 [rust-random/rand]: https://github.com/rust-random/rand [rust-random/rand_core]: https://github.com/rust-random/rand_core ## [0.9.3] - 2025-02-29 ### Other - Remove `zerocopy` dependency ([rand#1607]) - Deprecate `rand_core::impls::fill_via_u32_chunks`, `fill_via_u64_chunks` ([rand#1607]) [0.9.3]: https://github.com/rust-random/rand_core/compare/v0.9.2...v0.9.3 [rand#1607]: https://github.com/rust-random/rand/pull/1607 ## [0.9.2] - 2025-02-22 ### API changes - Relax `Sized` bound on impls of `TryRngCore`, `TryCryptoRng` and `UnwrapMut` ([rand#1593]) - Add `UnwrapMut::re` to reborrow the inner rng with a tighter lifetime ([rand#1595]) [0.9.2]: https://github.com/rust-random/rand_core/compare/v0.9.1...v0.9.2 [rand#1593]: https://github.com/rust-random/rand/pull/1593 [rand#1595]: https://github.com/rust-random/rand/pull/1595 ## [0.9.1] - 2025-02-16 ### API changes - Add `TryRngCore::unwrap_mut`, providing an impl of `RngCore` over `&mut rng` ([rand#1589]) [0.9.1]: https://github.com/rust-random/rand_core/compare/v0.9.0...v0.9.1 [rand#1589]: https://github.com/rust-random/rand/pull/1589 ## [0.9.0] - 2025-01-27 ### Dependencies and features - Bump the MSRV to 1.63.0 ([rand#1536]); note that 1.60.0 may work for dependents when using `--ignore-rust-version` - Update to `getrandom` v0.3.0 ([rand#1558]) - Use `zerocopy` to replace some `unsafe` code ([rand#1349], [rand#1393], [rand#1446], [rand#1502]) - Rename feature `serde1` to `serde` ([rand#1477]) - Rename feature `getrandom` to `os_rng` ([rand#1537]) ### API changes - Allow `rand_core::impls::fill_via_u*_chunks` to mutate source ([rand#1182]) - Add fn `RngCore::read_adapter` implementing `std::io::Read` ([rand#1267]) - Add trait `CryptoBlockRng: BlockRngCore`; make `trait CryptoRng: RngCore` replacing `CryptoRngCore` ([rand#1273]) - Add traits `TryRngCore`, `TryCryptoRng` ([rand#1424], [rand#1499]) - Rename `fn SeedableRng::from_rng` -> `try_from_rng` and add infallible variant `fn from_rng` ([rand#1424]) - Rename `fn SeedableRng::from_entropy` -> `from_os_rng` and add fallible variant `fn try_from_os_rng` ([rand#1424]) - Add bounds `Clone` and `AsRef` to associated type `SeedableRng::Seed` ([rand#1491]) [0.9.0]: https://github.com/rust-random/rand_core/compare/v0.6.4...v0.9.0 [rand#1182]: https://github.com/rust-random/rand/pull/1182 [rand#1267]: https://github.com/rust-random/rand/pull/1267 [rand#1273]: https://github.com/rust-random/rand/pull/1273 [rand#1349]: https://github.com/rust-random/rand/pull/1349 [rand#1393]: https://github.com/rust-random/rand/pull/1393 [rand#1424]: https://github.com/rust-random/rand/pull/1424 [rand#1446]: https://github.com/rust-random/rand/pull/1446 [rand#1477]: https://github.com/rust-random/rand/pull/1477 [rand#1491]: https://github.com/rust-random/rand/pull/1491 [rand#1499]: https://github.com/rust-random/rand/pull/1499 [rand#1502]: https://github.com/rust-random/rand/pull/1502 [rand#1536]: https://github.com/rust-random/rand/pull/1536 [rand#1537]: https://github.com/rust-random/rand/pull/1537 [rand#1558]: https://github.com/rust-random/rand/pull/1558 ## [0.6.4] - 2022-09-15 - Fix unsoundness in `::next_u32` ([rand#1160]) - Reduce use of `unsafe` and improve gen_bytes performance ([rand#1180]) - Add `CryptoRngCore` trait ([rand#1187], [rand#1230]) [0.6.4]: https://github.com/rust-random/rand_core/compare/v0.6.3...v0.6.4 [rand#1160]: https://github.com/rust-random/rand/pull/1160 [rand#1180]: https://github.com/rust-random/rand/pull/1180 [rand#1187]: https://github.com/rust-random/rand/pull/1187 [rand#1230]: https://github.com/rust-random/rand/pull/1230 ## [0.6.3] - 2021-06-15 ### Changed - Improved bound for `serde` impls on `BlockRng` ([rand#1130]) - Minor doc additions ([rand#1118]) [0.6.3]: https://github.com/rust-random/rand_core/compare/v0.6.2...v0.6.3 [rand#1118]: https://github.com/rust-random/rand/pull/1118 [rand#1130]: https://github.com/rust-random/rand/pull/1130 ## [0.6.2] - 2021-02-12 ### Fixed - Fixed assertions in `le::read_u32_into` and `le::read_u64_into` which could have allowed buffers not to be fully populated ([rand#1096]) [0.6.2]: https://github.com/rust-random/rand_core/compare/v0.6.1...v0.6.2 [rand#1096]: https://github.com/rust-random/rand/pull/1096 ## [0.6.1] - 2021-01-03 ### Fixed - Avoid panic when using `RngCore::seed_from_u64` with a seed which is not a multiple of four ([rand#1082]) ### Other - Enable all stable features in the playground ([rand#1081]) [0.6.1]: https://github.com/rust-random/rand_core/compare/v0.6.0...v0.6.1 [rand#1081]: https://github.com/rust-random/rand/pull/1081 [rand#1082]: https://github.com/rust-random/rand/pull/1082 ## [0.6.0] - 2020-12-08 ### Breaking changes - Bump MSRV to 1.36, various code improvements ([rand#1011]) - Update to getrandom v0.2 ([rand#1041]) - Fix: `next_u32_via_fill` and `next_u64_via_fill` now use LE as documented ([rand#1061]) ### Other - Reduce usage of `unsafe` ([rand#962], [rand#963], [rand#1011]) - Annotate feature-gates in documentation ([rand#1019]) - Document available error codes ([rand#1061]) - Various documentation tweaks - Fix some clippy warnings ([rand#1036]) - Apply rustfmt ([rand#926]) [0.6.0]: https://github.com/rust-random/rand_core/compare/v0.5.1...v0.6.0 [rand#926]: https://github.com/rust-random/rand/pull/926 [rand#962]: https://github.com/rust-random/rand/pull/962 [rand#963]: https://github.com/rust-random/rand/pull/963 [rand#1011]: https://github.com/rust-random/rand/pull/1011 [rand#1019]: https://github.com/rust-random/rand/pull/1019 [rand#1036]: https://github.com/rust-random/rand/pull/1036 [rand#1041]: https://github.com/rust-random/rand/pull/1041 [rand#1061]: https://github.com/rust-random/rand/pull/1061 ## [0.5.1] - 2019-08-28 - `OsRng` added to `rand_core` ([rand#863]) - `Error::INTERNAL_START` and `Error::CUSTOM_START` constants ([rand#864]) - `Error::raw_os_error` method ([rand#864]) - `Debug` and `Display` formatting for `getrandom` error codes without `std` ([rand#864]) ### Changed - `alloc` feature in `no_std` is available since Rust 1.36 ([rand#856]) - Added `#[inline]` to `Error` conversion methods ([rand#864]) [0.5.1]: https://github.com/rust-random/rand_core/compare/v0.5.0...v0.5.1 [rand#863]: https://github.com/rust-random/rand/pull/863 [rand#864]: https://github.com/rust-random/rand/pull/864 [rand#856]: https://github.com/rust-random/rand/pull/856 [rand#864]: https://github.com/rust-random/rand/pull/864 ## [0.5.0] - 2019-06-06 ### Changed - Enable testing with Miri and fix incorrect pointer usages ([rand#779], [rand#780], [rand#781], [rand#783], [rand#784]) - Rewrite `Error` type and adjust API ([rand#800]) - Adjust usage of `#[inline]` for `BlockRng` and `BlockRng64` [0.5.0]: https://github.com/rust-random/rand_core/compare/v0.4.0...v0.5.0 [rand#779]: https://github.com/rust-random/rand/pull/779 [rand#780]: https://github.com/rust-random/rand/pull/780 [rand#781]: https://github.com/rust-random/rand/pull/781 [rand#783]: https://github.com/rust-random/rand/pull/783 [rand#784]: https://github.com/rust-random/rand/pull/784 [rand#800]: https://github.com/rust-random/rand/pull/800 ## [0.4.0] - 2019-01-24 ### Changed - Disable the `std` feature by default ([rand#702]) [0.4.0]: https://github.com/rust-random/rand_core/compare/v0.3.0...v0.4.0 [rand#702]: https://github.com/rust-random/rand/pull/702 ## [0.3.0] - 2018-09-24 ### Added - Add `SeedableRng::seed_from_u64` for convenient seeding. ([rand#537]) [0.3.0]: https://github.com/rust-random/rand_core/compare/v0.2.1...v0.3.0 [rand#537]: https://github.com/rust-random/rand/pull/537 ## [0.2.1] - 2018-06-08 ### Added - References to a `CryptoRng` now also implement `CryptoRng`. ([rand#470]) [0.2.1]: https://github.com/rust-random/rand_core/compare/v0.2.0...v0.2.1 [rand#470]: https://github.com/rust-random/rand/pull/470 ## [0.2.0] - 2018-05-21 ### Changed - Enable the `std` feature by default. ([rand#409]) - Remove `BlockRng{64}::inner` and `BlockRng::inner_mut`; instead making `core` public - Change `BlockRngCore::Results` bound to also require `AsMut<[Self::Item]>`. ([rand#419]) ### Added - Add `BlockRng{64}::index` and `BlockRng{64}::generate_and_set`. ([rand#374], [rand#419]) - Implement `std::io::Read` for RngCore. ([rand#434]) [0.2.0]: https://github.com/rust-random/rand_core/compare/v0.1.0...v0.2.0 [rand#374]: https://github.com/rust-random/rand/pull/374 [rand#409]: https://github.com/rust-random/rand/pull/409 [rand#419]: https://github.com/rust-random/rand/pull/419 [rand#434]: https://github.com/rust-random/rand/pull/434 ## [0.1.0] - 2018-04-17 (Split out of the Rand crate, changes here are relative to rand 0.4.2.) ### Added - `RngCore` and `SeedableRng` are now part of `rand_core`. ([rand#288]) - Add modules to help implementing RNGs `impl` and `le`. ([rand#209], [rand#228]) - Add `Error` and `ErrorKind`. ([rand#225]) - Add `CryptoRng` marker trait. ([rand#273]) - Add `BlockRngCore` trait. ([rand#281]) - Add `BlockRng` and `BlockRng64` wrappers to help implementations. ([rand#281], [rand#325]) - Add `RngCore::try_fill_bytes`. ([rand#225]) ### Changed - Revise the `SeedableRng` trait. ([rand#233]) - Remove default implementations for `RngCore::next_u64` and `RngCore::fill_bytes`. ([rand#288]) [0.1.0]: https://github.com/rust-random/rand_core/compare/v0.0.0...v0.1.0 [rand#209]: https://github.com/rust-random/rand/pull/209 [rand#225]: https://github.com/rust-random/rand/pull/225 [rand#228]: https://github.com/rust-random/rand/pull/228 [rand#233]: https://github.com/rust-random/rand/pull/233 [rand#273]: https://github.com/rust-random/rand/pull/273 [rand#281]: https://github.com/rust-random/rand/pull/281 [rand#288]: https://github.com/rust-random/rand/pull/288 [rand#325]: https://github.com/rust-random/rand/pull/325 # Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [0.10.1] - 2026-04-13 ### Fixed - Reference to the `rand` crate in `TryRng` docs ([#75]) [0.10.1]: https://github.com/rust-random/rand_core/compare/v0.10.0...v0.10.1 [#75]: https://github.com/rust-random/rand_core/pull/75 ## [0.10.0] - 2026-02-01 This release makes a number of significant changes which we hope will be the last significant breakage before 1.0. Code has moved from the [rust-random/rand] repository to its own [rust-random/rand_core]. ### User-facing API changes #### Changed - Edition changed to 2024 and MSRV bumped to 1.85 ([rand#1668]) - `RngCore` and `TryRngCore` are renamed to `Rng` and `TryRng` respectively ([#54]) - `Rng` is now an extension trait of `TryRng` ([#45]) - `TryRng::Error` is bound on `core::error::Error` instead of `Debug + Display` ([#58]) - Relax `Sized` bound on impls of `SeedableRng` ([rand#1641]) #### Added - `SeedableRng::{fork, try_fork}` methods ([#17]) - Re-export of `core::convert::Infallible` ([#56]) #### Removed - `TryRng::read_adapter` method (replaced with `rand::RngReader`) ([rand#1669]) - `os_rng` crate feature ([rand#1674]) - `OsRng` and `OsError` structs ([rand#1674]) - `SeedableRng::from_os_rng` and `SeedableRng::try_from_os_rng` methods ([rand#1674]) - `getrandom` dependency ([rand#1674]) - `std` crate feature ([rand#1674]) - Optional `serde` dependency ([#28]) - `UnwrapMut` struct and `Rng::unwrap_mut` method ([#45]) - `Rng::unwrap_err` method in favor of explicit wrapping in `UnwrapErr` ([#53]) ### API changes to PRNG implementation helpers ### Added - `BlockRng::reconstruct` and `BlockRng::remaining_results` methods ([#36]) - `block::Generator::drop` method ([#35]) - `BlockRng::word_offset` method ([#44]) ### Changed - Replaced `le` helper functions with new `utils` helpers ([rand#1667], [#34], [#38], [#45]) - Rename `BlockRng::generate_and_set` method to `reset_and_skip` ([#44]) - Rename `block::BlockRngCore` trait to `block::Generator` ([#26]) - Rename `BlockRngCore::Results` associated type to `Output` and remove type bounds on it ([#26]) ### Removed - Implementation of `Rng` for `BlockRng`, making the latter more generic ([#34]) - `BlockRng64` struct ([#34]) - `BlockRng::reset` method ([#44]) - `BlockRng::index` method (replaced with `BlockRng::word_offset`) ([#44]) - `Generator::Item` associated type ([#26]) - `CryptoBlockRng` ([#69]) [0.10.0]: https://github.com/rust-random/rand_core/compare/v0.9.3...v0.10.0 [rand#1641]: https://github.com/rust-random/rand/pull/1641 [rand#1667]: https://github.com/rust-random/rand/pull/1667 [rand#1668]: https://github.com/rust-random/rand/pull/1668 [rand#1669]: https://github.com/rust-random/rand/pull/1669 [rand#1674]: https://github.com/rust-random/rand/pull/1674 [#17]: https://github.com/rust-random/rand_core/pull/17 [#26]: https://github.com/rust-random/rand_core/pull/28 [#28]: https://github.com/rust-random/rand_core/pull/28 [#34]: https://github.com/rust-random/rand_core/pull/34 [#35]: https://github.com/rust-random/rand_core/pull/35 [#36]: https://github.com/rust-random/rand_core/pull/36 [#38]: https://github.com/rust-random/rand_core/pull/38 [#44]: https://github.com/rust-random/rand_core/pull/44 [#45]: https://github.com/rust-random/rand_core/pull/45 [#53]: https://github.com/rust-random/rand_core/pull/53 [#54]: https://github.com/rust-random/rand_core/pull/54 [#56]: https://github.com/rust-random/rand_core/pull/56 [#58]: https://github.com/rust-random/rand_core/pull/58 [#69]: https://github.com/rust-random/rand_core/pull/69 [rust-random/rand]: https://github.com/rust-random/rand [rust-random/rand_core]: https://github.com/rust-random/rand_core ## [0.9.3] - 2025-02-29 ### Other - Remove `zerocopy` dependency ([rand#1607]) - Deprecate `rand_core::impls::fill_via_u32_chunks`, `fill_via_u64_chunks` ([rand#1607]) [0.9.3]: https://github.com/rust-random/rand_core/compare/v0.9.2...v0.9.3 [rand#1607]: https://github.com/rust-random/rand/pull/1607 ## [0.9.2] - 2025-02-22 ### API changes - Relax `Sized` bound on impls of `TryRngCore`, `TryCryptoRng` and `UnwrapMut` ([rand#1593]) - Add `UnwrapMut::re` to reborrow the inner rng with a tighter lifetime ([rand#1595]) [0.9.2]: https://github.com/rust-random/rand_core/compare/v0.9.1...v0.9.2 [rand#1593]: https://github.com/rust-random/rand/pull/1593 [rand#1595]: https://github.com/rust-random/rand/pull/1595 ## [0.9.1] - 2025-02-16 ### API changes - Add `TryRngCore::unwrap_mut`, providing an impl of `RngCore` over `&mut rng` ([rand#1589]) [0.9.1]: https://github.com/rust-random/rand_core/compare/v0.9.0...v0.9.1 [rand#1589]: https://github.com/rust-random/rand/pull/1589 ## [0.9.0] - 2025-01-27 ### Dependencies and features - Bump the MSRV to 1.63.0 ([rand#1536]); note that 1.60.0 may work for dependents when using `--ignore-rust-version` - Update to `getrandom` v0.3.0 ([rand#1558]) - Use `zerocopy` to replace some `unsafe` code ([rand#1349], [rand#1393], [rand#1446], [rand#1502]) - Rename feature `serde1` to `serde` ([rand#1477]) - Rename feature `getrandom` to `os_rng` ([rand#1537]) ### API changes - Allow `rand_core::impls::fill_via_u*_chunks` to mutate source ([rand#1182]) - Add fn `RngCore::read_adapter` implementing `std::io::Read` ([rand#1267]) - Add trait `CryptoBlockRng: BlockRngCore`; make `trait CryptoRng: RngCore` replacing `CryptoRngCore` ([rand#1273]) - Add traits `TryRngCore`, `TryCryptoRng` ([rand#1424], [rand#1499]) - Rename `fn SeedableRng::from_rng` -> `try_from_rng` and add infallible variant `fn from_rng` ([rand#1424]) - Rename `fn SeedableRng::from_entropy` -> `from_os_rng` and add fallible variant `fn try_from_os_rng` ([rand#1424]) - Add bounds `Clone` and `AsRef` to associated type `SeedableRng::Seed` ([rand#1491]) [0.9.0]: https://github.com/rust-random/rand_core/compare/v0.6.4...v0.9.0 [rand#1182]: https://github.com/rust-random/rand/pull/1182 [rand#1267]: https://github.com/rust-random/rand/pull/1267 [rand#1273]: https://github.com/rust-random/rand/pull/1273 [rand#1349]: https://github.com/rust-random/rand/pull/1349 [rand#1393]: https://github.com/rust-random/rand/pull/1393 [rand#1424]: https://github.com/rust-random/rand/pull/1424 [rand#1446]: https://github.com/rust-random/rand/pull/1446 [rand#1477]: https://github.com/rust-random/rand/pull/1477 [rand#1491]: https://github.com/rust-random/rand/pull/1491 [rand#1499]: https://github.com/rust-random/rand/pull/1499 [rand#1502]: https://github.com/rust-random/rand/pull/1502 [rand#1536]: https://github.com/rust-random/rand/pull/1536 [rand#1537]: https://github.com/rust-random/rand/pull/1537 [rand#1558]: https://github.com/rust-random/rand/pull/1558 ## [0.6.4] - 2022-09-15 - Fix unsoundness in `::next_u32` ([rand#1160]) - Reduce use of `unsafe` and improve gen_bytes performance ([rand#1180]) - Add `CryptoRngCore` trait ([rand#1187], [rand#1230]) [0.6.4]: https://github.com/rust-random/rand_core/compare/v0.6.3...v0.6.4 [rand#1160]: https://github.com/rust-random/rand/pull/1160 [rand#1180]: https://github.com/rust-random/rand/pull/1180 [rand#1187]: https://github.com/rust-random/rand/pull/1187 [rand#1230]: https://github.com/rust-random/rand/pull/1230 ## [0.6.3] - 2021-06-15 ### Changed - Improved bound for `serde` impls on `BlockRng` ([rand#1130]) - Minor doc additions ([rand#1118]) [0.6.3]: https://github.com/rust-random/rand_core/compare/v0.6.2...v0.6.3 [rand#1118]: https://github.com/rust-random/rand/pull/1118 [rand#1130]: https://github.com/rust-random/rand/pull/1130 ## [0.6.2] - 2021-02-12 ### Fixed - Fixed assertions in `le::read_u32_into` and `le::read_u64_into` which could have allowed buffers not to be fully populated ([rand#1096]) [0.6.2]: https://github.com/rust-random/rand_core/compare/v0.6.1...v0.6.2 [rand#1096]: https://github.com/rust-random/rand/pull/1096 ## [0.6.1] - 2021-01-03 ### Fixed - Avoid panic when using `RngCore::seed_from_u64` with a seed which is not a multiple of four ([rand#1082]) ### Other - Enable all stable features in the playground ([rand#1081]) [0.6.1]: https://github.com/rust-random/rand_core/compare/v0.6.0...v0.6.1 [rand#1081]: https://github.com/rust-random/rand/pull/1081 [rand#1082]: https://github.com/rust-random/rand/pull/1082 ## [0.6.0] - 2020-12-08 ### Breaking changes - Bump MSRV to 1.36, various code improvements ([rand#1011]) - Update to getrandom v0.2 ([rand#1041]) - Fix: `next_u32_via_fill` and `next_u64_via_fill` now use LE as documented ([rand#1061]) ### Other - Reduce usage of `unsafe` ([rand#962], [rand#963], [rand#1011]) - Annotate feature-gates in documentation ([rand#1019]) - Document available error codes ([rand#1061]) - Various documentation tweaks - Fix some clippy warnings ([rand#1036]) - Apply rustfmt ([rand#926]) [0.6.0]: https://github.com/rust-random/rand_core/compare/v0.5.1...v0.6.0 [rand#926]: https://github.com/rust-random/rand/pull/926 [rand#962]: https://github.com/rust-random/rand/pull/962 [rand#963]: https://github.com/rust-random/rand/pull/963 [rand#1011]: https://github.com/rust-random/rand/pull/1011 [rand#1019]: https://github.com/rust-random/rand/pull/1019 [rand#1036]: https://github.com/rust-random/rand/pull/1036 [rand#1041]: https://github.com/rust-random/rand/pull/1041 [rand#1061]: https://github.com/rust-random/rand/pull/1061 ## [0.5.1] - 2019-08-28 - `OsRng` added to `rand_core` ([rand#863]) - `Error::INTERNAL_START` and `Error::CUSTOM_START` constants ([rand#864]) - `Error::raw_os_error` method ([rand#864]) - `Debug` and `Display` formatting for `getrandom` error codes without `std` ([rand#864]) ### Changed - `alloc` feature in `no_std` is available since Rust 1.36 ([rand#856]) - Added `#[inline]` to `Error` conversion methods ([rand#864]) [0.5.1]: https://github.com/rust-random/rand_core/compare/v0.5.0...v0.5.1 [rand#863]: https://github.com/rust-random/rand/pull/863 [rand#864]: https://github.com/rust-random/rand/pull/864 [rand#856]: https://github.com/rust-random/rand/pull/856 [rand#864]: https://github.com/rust-random/rand/pull/864 ## [0.5.0] - 2019-06-06 ### Changed - Enable testing with Miri and fix incorrect pointer usages ([rand#779], [rand#780], [rand#781], [rand#783], [rand#784]) - Rewrite `Error` type and adjust API ([rand#800]) - Adjust usage of `#[inline]` for `BlockRng` and `BlockRng64` [0.5.0]: https://github.com/rust-random/rand_core/compare/v0.4.0...v0.5.0 [rand#779]: https://github.com/rust-random/rand/pull/779 [rand#780]: https://github.com/rust-random/rand/pull/780 [rand#781]: https://github.com/rust-random/rand/pull/781 [rand#783]: https://github.com/rust-random/rand/pull/783 [rand#784]: https://github.com/rust-random/rand/pull/784 [rand#800]: https://github.com/rust-random/rand/pull/800 ## [0.4.0] - 2019-01-24 ### Changed - Disable the `std` feature by default ([rand#702]) [0.4.0]: https://github.com/rust-random/rand_core/compare/v0.3.0...v0.4.0 [rand#702]: https://github.com/rust-random/rand/pull/702 ## [0.3.0] - 2018-09-24 ### Added - Add `SeedableRng::seed_from_u64` for convenient seeding. ([rand#537]) [0.3.0]: https://github.com/rust-random/rand_core/compare/v0.2.1...v0.3.0 [rand#537]: https://github.com/rust-random/rand/pull/537 ## [0.2.1] - 2018-06-08 ### Added - References to a `CryptoRng` now also implement `CryptoRng`. ([rand#470]) [0.2.1]: https://github.com/rust-random/rand_core/compare/v0.2.0...v0.2.1 [rand#470]: https://github.com/rust-random/rand/pull/470 ## [0.2.0] - 2018-05-21 ### Changed - Enable the `std` feature by default. ([rand#409]) - Remove `BlockRng{64}::inner` and `BlockRng::inner_mut`; instead making `core` public - Change `BlockRngCore::Results` bound to also require `AsMut<[Self::Item]>`. ([rand#419]) ### Added - Add `BlockRng{64}::index` and `BlockRng{64}::generate_and_set`. ([rand#374], [rand#419]) - Implement `std::io::Read` for RngCore. ([rand#434]) [0.2.0]: https://github.com/rust-random/rand_core/compare/v0.1.0...v0.2.0 [rand#374]: https://github.com/rust-random/rand/pull/374 [rand#409]: https://github.com/rust-random/rand/pull/409 [rand#419]: https://github.com/rust-random/rand/pull/419 [rand#434]: https://github.com/rust-random/rand/pull/434 ## [0.1.0] - 2018-04-17 (Split out of the Rand crate, changes here are relative to rand 0.4.2.) ### Added - `RngCore` and `SeedableRng` are now part of `rand_core`. ([rand#288]) - Add modules to help implementing RNGs `impl` and `le`. ([rand#209], [rand#228]) - Add `Error` and `ErrorKind`. ([rand#225]) - Add `CryptoRng` marker trait. ([rand#273]) - Add `BlockRngCore` trait. ([rand#281]) - Add `BlockRng` and `BlockRng64` wrappers to help implementations. ([rand#281], [rand#325]) - Add `RngCore::try_fill_bytes`. ([rand#225]) ### Changed - Revise the `SeedableRng` trait. ([rand#233]) - Remove default implementations for `RngCore::next_u64` and `RngCore::fill_bytes`. ([rand#288]) [0.1.0]: https://github.com/rust-random/rand_core/compare/v0.0.0...v0.1.0 [rand#209]: https://github.com/rust-random/rand/pull/209 [rand#225]: https://github.com/rust-random/rand/pull/225 [rand#228]: https://github.com/rust-random/rand/pull/228 [rand#233]: https://github.com/rust-random/rand/pull/233 [rand#273]: https://github.com/rust-random/rand/pull/273 [rand#281]: https://github.com/rust-random/rand/pull/281 [rand#288]: https://github.com/rust-random/rand/pull/288 [rand#325]: https://github.com/rust-random/rand/pull/325 # Release rayon 1.12.0 (2026-04-13) - Fixed a bug in parallel `Range` when the end is 0xE000, just past the surrogate boundary, which was unsafely producing invalid `char` values. - The new method `ParallelSlice::par_array_windows` works like `par_windows` but with a constant length, producing `&[T; N]` items. # Release rayon 1.11.0 / rayon-core 1.13.0 (2025-08-12) - The minimum supported `rustc` is now 1.80. - `iter::repeatn` has been renamed to `iter::repeat_n` to match the name stabilized in the standard library. The old name still exists as a deprecated function for compatibility. - Fixed a bug in `in_place_scope` when the default global registry uses the current thread, like on WebAssembly without threading support. - `binary_heap::Iter` no longer requires a temporary allocation. - Relaxed trait bounds on many of the public structs. - Implemented `IntoParallelIterator for Box<[T]>` and its references. - Implemented `FromParallelIterator<_> for Box` via `String`. # Release rayon 1.10.0 (2024-03-23) - The new methods `ParallelSlice::par_chunk_by` and `ParallelSliceMut::par_chunk_by_mut` work like the slice methods `chunk_by` and `chunk_by_mut` added in Rust 1.77. # Release rayon 1.9.0 (2024-02-27) - The new methods `IndexedParallelIterator::by_exponential_blocks` and `by_uniform_blocks` allow processing items in smaller groups at a time. - The new `iter::walk_tree`, `walk_tree_prefix`, and `walk_tree_postfix` functions enable custom parallel iteration over tree-like structures. - The new method `ParallelIterator::collect_vec_list` returns items as a linked list of vectors, which is an efficient mode of parallel collection used by many of the internal implementations of `collect`. - The new methods `ParallelSliceMut::par_split_inclusive_mut`, `ParallelSlice::par_split_inclusive`, and `ParallelString::par_split_inclusive` all work like a normal split but keeping the separator as part of the left slice. - The new `ParallelString::par_split_ascii_whitespace` splits only on ASCII whitespace, which is faster than including Unicode multi-byte whitespace. - `OsString` now implements `FromParallelIterator<_>` and `ParallelExtend<_>` for a few item types similar to the standard `FromIterator` and `Extend`. - The internal `Pattern` trait for string methods is now implemented for `[char; N]` and `&[char; N]`, matching any of the given characters. # Release rayon 1.8.1 / rayon-core 1.12.1 (2024-01-17) - The new `"web_spin_lock"` crate feature makes mutexes spin on the main browser thread in WebAssembly, rather than suffer an error about forbidden `atomics.wait` if they were to block in that context. Thanks @RReverser! # Release rayon 1.8.0 / rayon-core 1.12.0 (2023-09-20) - The minimum supported `rustc` is now 1.63. - Added `ThreadPoolBuilder::use_current_thread` to use the builder thread as part of the new thread pool. That thread does not run the pool's main loop, but it may participate in work-stealing if it yields to rayon in some way. - Implemented `FromParallelIterator` for `Box<[T]>`, `Rc<[T]>`, and `Arc<[T]>`, as well as `FromParallelIterator>` and `ParallelExtend>` for `String`. - `ThreadPoolBuilder::build_scoped` now uses `std::thread::scope`. - The default number of threads is now determined using `std::thread::available_parallelism` instead of the `num_cpus` crate. - The internal logging facility has been removed, reducing bloat for all users. - Many smaller performance tweaks and documentation updates. # Release rayon 1.7.0 / rayon-core 1.11.0 (2023-03-03) - The minimum supported `rustc` is now 1.59. - Added a fallback when threading is unsupported. - The new `ParallelIterator::take_any` and `skip_any` methods work like unordered `IndexedParallelIterator::take` and `skip`, counting items in whatever order they are visited in parallel. - The new `ParallelIterator::take_any_while` and `skip_any_while` methods work like unordered `Iterator::take_while` and `skip_while`, which previously had no parallel equivalent. The "while" condition may be satisfied from anywhere in the parallel iterator, affecting all future items regardless of position. - The new `yield_now` and `yield_local` functions will cooperatively yield execution to Rayon, either trying to execute pending work from the entire pool or from just the local deques of the current thread, respectively. # Release rayon-core 1.10.2 (2023-01-22) - Fixed miri-reported UB for SharedReadOnly tags protected by a call. # Release rayon 1.6.1 (2022-12-09) - Simplified `par_bridge` to only pull one item at a time from the iterator, without batching. Threads that are waiting for iterator items will now block appropriately rather than spinning CPU. (Thanks @njaard!) - Added protection against recursion in `par_bridge`, so iterators that also invoke rayon will not cause mutex recursion deadlocks. # Release rayon-core 1.10.1 (2022-11-18) - Fixed a race condition with threads going to sleep while a broadcast starts. # Release rayon 1.6.0 / rayon-core 1.10.0 (2022-11-18) - The minimum supported `rustc` is now 1.56. - The new `IndexedParallelIterator::fold_chunks` and `fold_chunks_with` methods work like `ParallelIterator::fold` and `fold_with` with fixed-size chunks of items. This may be useful for predictable batching performance, without the allocation overhead of `IndexedParallelIterator::chunks`. - New "broadcast" methods run a given function on all threads in the pool. These run at a sort of reduced priority after each thread has exhausted their local work queue, but before they attempt work-stealing from other threads. - The global `broadcast` function and `ThreadPool::broadcast` method will block until completion, returning a `Vec` of all return values. - The global `spawn_broadcast` function and methods on `ThreadPool`, `Scope`, and `ScopeFifo` will run detached, without blocking the current thread. - Panicking methods now use `#[track_caller]` to report the caller's location. - Fixed a truncated length in `vec::Drain` when given an empty range. ## Contributors Thanks to all of the contributors for this release! - @cuviper - @idanmuze - @JoeyBF - @JustForFun88 - @kianmeng - @kornelski - @ritchie46 - @ryanrussell - @steffahn - @TheIronBorn - @willcrozi # Release rayon 1.5.3 (2022-05-13) - The new `ParallelSliceMut::par_sort_by_cached_key` is a stable sort that caches the keys for each item -- a parallel version of `slice::sort_by_cached_key`. # Release rayon-core 1.9.3 (2022-05-13) - Fixed a use-after-free race in job notification. # Release rayon 1.5.2 / rayon-core 1.9.2 (2022-04-13) - The new `ParallelSlice::par_rchunks()` and `par_rchunks_exact()` iterate slice chunks in reverse, aligned the against the end of the slice if the length is not a perfect multiple of the chunk size. The new `ParallelSliceMut::par_rchunks_mut()` and `par_rchunks_exact_mut()` are the same for mutable slices. - The `ParallelIterator::try_*` methods now support `std::ops::ControlFlow` and `std::task::Poll` items, mirroring the unstable `Try` implementations in the standard library. - The `ParallelString` pattern-based methods now support `&[char]` patterns, which match when any character in that slice is found in the string. - A soft limit is now enforced on the number of threads allowed in a single thread pool, respecting internal bit limits that already existed. The current maximum is publicly available from the new function `max_num_threads()`. - Fixed several Stacked Borrow and provenance issues found by `cargo miri`. ## Contributors Thanks to all of the contributors for this release! - @atouchet - @bluss - @cuviper - @fzyzcjy - @nyanzebra - @paolobarbolini - @RReverser - @saethlin # Release rayon 1.5.1 / rayon-core 1.9.1 (2021-05-18) - The new `in_place_scope` and `in_place_scope_fifo` are variations of `scope` and `scope_fifo`, running the initial non-`Send` callback directly on the current thread, rather than moving execution to the thread pool. - With Rust 1.51 or later, arrays now implement `IntoParallelIterator`. - New implementations of `FromParallelIterator` make it possible to `collect` complicated nestings of items. - `FromParallelIterator<(A, B)> for (FromA, FromB)` works like `unzip`. - `FromParallelIterator> for (A, B)` works like `partition_map`. - Type inference now works better with parallel `Range` and `RangeInclusive`. - The implementation of `FromParallelIterator` and `ParallelExtend` for `Vec` now uses `MaybeUninit` internally to avoid creating any references to uninitialized data. - `ParallelBridge` fixed a bug with threads missing available work. ## Contributors Thanks to all of the contributors for this release! - @atouchet - @cuviper - @Hywan - @iRaiko - @Qwaz - @rocallahan # Release rayon 1.5.0 / rayon-core 1.9.0 (2020-10-21) - Update crossbeam dependencies. - The minimum supported `rustc` is now 1.36. ## Contributors Thanks to all of the contributors for this release! - @cuviper - @mbrubeck - @mrksu # Release rayon 1.4.1 (2020-09-29) - The new `flat_map_iter` and `flatten_iter` methods can be used to flatten sequential iterators, which may perform better in cases that don't need the nested parallelism of `flat_map` and `flatten`. - The new `par_drain` method is a parallel version of the standard `drain` for collections, removing items while keeping the original capacity. Collections that implement this through `ParallelDrainRange` support draining items from arbitrary index ranges, while `ParallelDrainFull` always drains everything. - The new `positions` method finds all items that match the given predicate and returns their indices in a new iterator. # Release rayon-core 1.8.1 (2020-09-17) - Fixed an overflow panic on high-contention workloads, for a counter that was meant to simply wrap. This panic only occurred with debug assertions enabled, and was much more likely on 32-bit targets. # Release rayon 1.4.0 / rayon-core 1.8.0 (2020-08-24) - Implemented a new thread scheduler, [RFC 5], which uses targeted wakeups for new work and for notifications of completed stolen work, reducing wasteful CPU usage in idle threads. - Implemented `IntoParallelIterator for Range` and `RangeInclusive` with the same iteration semantics as Rust 1.45. - Relaxed the lifetime requirements of the initial `scope` closure. [RFC 5]: https://github.com/rayon-rs/rfcs/pull/5 ## Contributors Thanks to all of the contributors for this release! - @CAD97 - @cuviper - @kmaork - @nikomatsakis - @SuperFluffy # Release rayon 1.3.1 / rayon-core 1.7.1 (2020-06-15) - Fixed a use-after-free race in calls blocked between two rayon thread pools. - Collecting to an indexed `Vec` now drops any partial writes while unwinding, rather than just leaking them. If dropping also panics, Rust will abort. - Note: the old leaking behavior is considered _safe_, just not ideal. - The new `IndexedParallelIterator::step_by()` adapts an iterator to step through items by the given count, like `Iterator::step_by()`. - The new `ParallelSlice::par_chunks_exact()` and mutable equivalent `ParallelSliceMut::par_chunks_exact_mut()` ensure that the chunks always have the exact length requested, leaving any remainder separate, like the slice methods `chunks_exact()` and `chunks_exact_mut()`. ## Contributors Thanks to all of the contributors for this release! - @adrian5 - @bluss - @cuviper - @FlyingCanoe - @GuillaumeGomez - @matthiasbeyer - @picoHz - @zesterer # Release rayon 1.3.0 / rayon-core 1.7.0 (2019-12-21) - Tuples up to length 12 now implement `IntoParallelIterator`, creating a `MultiZip` iterator that produces items as similarly-shaped tuples. - The `--cfg=rayon_unstable` supporting code for `rayon-futures` is removed. - The minimum supported `rustc` is now 1.31. ## Contributors Thanks to all of the contributors for this release! - @cuviper - @c410-f3r - @silwol # Release rayon-futures 0.1.1 (2019-12-21) - `Send` bounds have been added for the `Item` and `Error` associated types on all generic `F: Future` interfaces. While technically a breaking change, this is a soundness fix, so we are not increasing the semantic version for this. - This crate is now deprecated, and the `--cfg=rayon_unstable` supporting code will be removed in `rayon-core 1.7.0`. This only supported the now-obsolete `Future` from `futures 0.1`, while support for `std::future::Future` is expected to come directly in `rayon-core` -- although that is not ready yet. ## Contributors Thanks to all of the contributors for this release! - @cuviper - @kornelski - @jClaireCodesStuff - @jwass - @seanchen1991 # Release rayon 1.2.1 / rayon-core 1.6.1 (2019-11-20) - Update crossbeam dependencies. - Add top-level doc links for the iterator traits. - Document that the iterator traits are not object safe. ## Contributors Thanks to all of the contributors for this release! - @cuviper - @dnaka91 - @matklad - @nikomatsakis - @Qqwy - @vorner # Release rayon 1.2.0 / rayon-core 1.6.0 (2019-08-30) - The new `ParallelIterator::copied()` converts an iterator of references into copied values, like `Iterator::copied()`. - `ParallelExtend` is now implemented for the unit `()`. - Internal updates were made to improve test determinism, reduce closure type sizes, reduce task allocations, and update dependencies. - The minimum supported `rustc` is now 1.28. ## Contributors Thanks to all of the contributors for this release! - @Aaron1011 - @cuviper - @ralfbiedert # Release rayon 1.1.0 / rayon-core 1.5.0 (2019-06-12) - FIFO spawns are now supported using the new `spawn_fifo()` and `scope_fifo()` global functions, and their corresponding `ThreadPool` methods. - Normally when tasks are queued on a thread, the most recent is processed first (LIFO) while other threads will steal the oldest (FIFO). With FIFO spawns, those tasks are processed locally in FIFO order too. - Regular spawns and other tasks like `join` are not affected. - The `breadth_first` configuration flag, which globally approximated this effect, is now deprecated. - For more design details, please see [RFC 1]. - `ThreadPoolBuilder` can now take a custom `spawn_handler` to control how threads will be created in the pool. - `ThreadPoolBuilder::build_scoped()` uses this to create a scoped thread pool, where the threads are able to use non-static data. - This may also be used to support threading in exotic environments, like WebAssembly, which don't support the normal `std::thread`. - `ParallelIterator` has 3 new methods: `find_map_any()`, `find_map_first()`, and `find_map_last()`, like `Iterator::find_map()` with ordering constraints. - The new `ParallelIterator::panic_fuse()` makes a parallel iterator halt as soon as possible if any of its threads panic. Otherwise, the panic state is not usually noticed until the iterator joins its parallel tasks back together. - `IntoParallelIterator` is now implemented for integral `RangeInclusive`. - Several internal `Folder`s now have optimized `consume_iter` implementations. - `rayon_core::current_thread_index()` is now re-exported in `rayon`. - The minimum `rustc` is now 1.26, following the update policy defined in [RFC 3]. ## Contributors Thanks to all of the contributors for this release! - @cuviper - @didroe - @GuillaumeGomez - @huonw - @janriemer - @kornelski - @nikomatsakis - @seanchen1991 - @yegeun542 [RFC 1]: https://github.com/rayon-rs/rfcs/blob/main/accepted/rfc0001-scope-scheduling.md [RFC 3]: https://github.com/rayon-rs/rfcs/blob/main/accepted/rfc0003-minimum-rustc.md # Release rayon 1.0.3 (2018-11-02) - `ParallelExtend` is now implemented for tuple pairs, enabling nested `unzip()` and `partition_map()` operations. For instance, `(A, (B, C))` items can be unzipped into `(Vec, (Vec, Vec))`. - `ParallelExtend<(A, B)>` works like `unzip()`. - `ParallelExtend>` works like `partition_map()`. - `ParallelIterator` now has a method `map_init()` which calls an `init` function for a value to pair with items, like `map_with()` but dynamically constructed. That value type has no constraints, not even `Send` or `Sync`. - The new `for_each_init()` is a variant of this for simple iteration. - The new `try_for_each_init()` is a variant for fallible iteration. ## Contributors Thanks to all of the contributors for this release! - @cuviper - @dan-zheng - @dholbert - @ignatenkobrain - @mdonoughe # Release rayon 1.0.2 / rayon-core 1.4.1 (2018-07-17) - The `ParallelBridge` trait with method `par_bridge()` makes it possible to use any `Send`able `Iterator` in parallel! - This trait has been added to `rayon::prelude`. - It automatically implements internal synchronization and queueing to spread the `Item`s across the thread pool. Iteration order is not preserved by this adaptor. - "Native" Rayon iterators like `par_iter()` should still be preferred when possible for better efficiency. - `ParallelString` now has additional methods for parity with `std` string iterators: `par_char_indices()`, `par_bytes()`, `par_encode_utf16()`, `par_matches()`, and `par_match_indices()`. - `ParallelIterator` now has fallible methods `try_fold()`, `try_reduce()`, and `try_for_each`, plus `*_with()` variants of each, for automatically short-circuiting iterators on `None` or `Err` values. These are inspired by `Iterator::try_fold()` and `try_for_each()` that were stabilized in Rust 1.27. - `Range` and `Range` are now supported with Rust 1.26 and later. - Small improvements have been made to the documentation. - `rayon-core` now only depends on `rand` for testing. - Rayon tests now work on stable Rust. ## Contributors Thanks to all of the contributors for this release! - @AndyGauge - @cuviper - @ignatenkobrain - @LukasKalbertodt - @MajorBreakfast - @nikomatsakis - @paulkernfeld - @QuietMisdreavus # Release rayon 1.0.1 (2018-03-16) - Added more documentation for `rayon::iter::split()`. - Corrected links and typos in documentation. ## Contributors Thanks to all of the contributors for this release! - @cuviper - @HadrienG2 - @matthiasbeyer - @nikomatsakis # Release rayon 1.0.0 / rayon-core 1.4.0 (2018-02-15) - `ParallelIterator` added the `update` method which applies a function to mutable references, inspired by `itertools`. - `IndexedParallelIterator` added the `chunks` method which yields vectors of consecutive items from the base iterator, inspired by `itertools`. - `String` now implements `FromParallelIterator>` and `ParallelExtend>`, inspired by `std`. - `()` now implements `FromParallelIterator<()>`, inspired by `std`. - The new `ThreadPoolBuilder` replaces and deprecates `Configuration`. - Errors from initialization now have the concrete `ThreadPoolBuildError` type, rather than `Box`, and this type implements `Send` and `Sync`. - `ThreadPool::new` is deprecated in favor of `ThreadPoolBuilder::build`. - `initialize` is deprecated in favor of `ThreadPoolBuilder::build_global`. - Examples have been added to most of the parallel iterator methods. - A lot of the documentation has been reorganized and extended. ## Breaking changes - Rayon now requires rustc 1.13 or greater. - `IndexedParallelIterator::len` and `ParallelIterator::opt_len` now operate on `&self` instead of `&mut self`. - `IndexedParallelIterator::collect_into` is now `collect_into_vec`. - `IndexedParallelIterator::unzip_into` is now `unzip_into_vecs`. - Rayon no longer exports the deprecated `Configuration` and `initialize` from rayon-core. ## Contributors Thanks to all of the contributors for this release! - @Bilkow - @cuviper - @Enet4 - @ignatenkobrain - @iwillspeak - @jeehoonkang - @jwass - @Kerollmops - @KodrAus - @kornelski - @MaloJaffre - @nikomatsakis - @obv-mikhail - @oddg - @phimuemue - @stjepang - @tmccombs - bors[bot] # Release rayon 0.9.0 / rayon-core 1.3.0 / rayon-futures 0.1.0 (2017-11-09) - `Configuration` now has a `build` method. - `ParallelIterator` added `flatten` and `intersperse`, both inspired by itertools. - `IndexedParallelIterator` added `interleave`, `interleave_shortest`, and `zip_eq`, all inspired by itertools. - The new functions `iter::empty` and `once` create parallel iterators of exactly zero or one item, like their `std` counterparts. - The new functions `iter::repeat` and `repeatn` create parallel iterators repeating an item indefinitely or `n` times, respectively. - The new function `join_context` works like `join`, with an added `FnContext` parameter that indicates whether the job was stolen. - `Either` (used by `ParallelIterator::partition_map`) is now re-exported from the `either` crate, instead of defining our own type. - `Either` also now implements `ParallelIterator`, `IndexedParallelIterator`, and `ParallelExtend` when both of its `Left` and `Right` types do. - All public types now implement `Debug`. - Many of the parallel iterators now implement `Clone` where possible. - Much of the documentation has been extended. (but still could use more help!) - All rayon crates have improved metadata. - Rayon was evaluated in the Libz Blitz, leading to many of these improvements. - Rayon pull requests are now guarded by bors-ng. ## Futures The `spawn_future()` method has been refactored into its own `rayon-futures` crate, now through a `ScopeFutureExt` trait for `ThreadPool` and `Scope`. The supporting `rayon-core` APIs are still gated by `--cfg rayon_unstable`. ## Breaking changes - Two breaking changes have been made to `rayon-core`, but since they're fixing soundness bugs, we are considering these _minor_ changes for semver. - `Scope::spawn` now requires `Send` for the closure. - `ThreadPool::install` now requires `Send` for the return value. - The `iter::internal` module has been renamed to `iter::plumbing`, to hopefully indicate that while these are low-level details, they're not really internal or private to rayon. The contents of that module are needed for third-parties to implement new parallel iterators, and we'll treat them with normal semver stability guarantees. - The function `rayon::iter::split` is no longer re-exported as `rayon::split`. ## Contributors Thanks to all of the contributors for this release! - @AndyGauge - @ChristopherDavenport - @chrisvittal - @cuviper - @dns2utf8 - @dtolnay - @frewsxcv - @gsquire - @Hittherhod - @jdr023 - @laumann - @leodasvacas - @lvillani - @MajorBreakfast - @mamuleanu - @marmistrz - @mbrubeck - @mgattozzi - @nikomatsakis - @smt923 - @stjepang - @tmccombs - @vishalsodani - bors[bot] # Release rayon 0.8.2 (2017-06-28) - `ParallelSliceMut` now has six parallel sorting methods with the same variations as the standard library. - `par_sort`, `par_sort_by`, and `par_sort_by_key` perform stable sorts in parallel, using the default order, a custom comparator, or a key extraction function, respectively. - `par_sort_unstable`, `par_sort_unstable_by`, and `par_sort_unstable_by_key` perform unstable sorts with the same comparison options. - Thanks to @stjepang! # Release rayon 0.8.1 / rayon-core 1.2.0 (2017-06-14) - The following core APIs are being stabilized: - `rayon::spawn()` -- spawns a task into the Rayon thread pool; as it is contained in the global scope (rather than a user-created scope), the task cannot capture anything from the current stack frame. - `ThreadPool::join()`, `ThreadPool::spawn()`, `ThreadPool::scope()` -- convenience APIs for launching new work within a thread pool. - The various iterator adapters are now tagged with `#[must_use]` - Parallel iterators now offer a `for_each_with` adapter, similar to `map_with`. - We are adopting a new approach to handling the remaining unstable APIs (which primarily pertain to futures integration). As awlays, unstable APIs are intended for experimentation, but do not come with any promise of compatibility (in other words, we might change them in arbitrary ways in any release). Previously, we designated such APIs using a Cargo feature "unstable". Now, we are using a regular `#[cfg]` flag. This means that to see the unstable APIs, you must do `RUSTFLAGS='--cfg rayon_unstable' cargo build`. This is intentionally inconvenient; in particular, if you are a library, then your clients must also modify their environment, signaling their agreement to instability. # Release rayon 0.8.0 / rayon-core 1.1.0 (2017-06-13) ## Rayon 0.8.0 - Added the `map_with` and `fold_with` combinators, which help for passing along state (like channels) that cannot be shared between threads but which can be cloned on each thread split. - Added the `while_some` combinator, which helps for writing short-circuiting iterators. - Added support for "short-circuiting" collection: e.g., collecting from an iterator producing `Option` or `Result` into a `Option>` or `Result, E>`. - Support `FromParallelIterator` for `Cow`. - Removed the deprecated weight APIs. - Simplified the parallel iterator trait hierarchy by removing the `BoundedParallelIterator` and `ExactParallelIterator` traits, which were not serving much purpose. - Improved documentation. - Added some missing `Send` impls. - Fixed some small bugs. ## Rayon-core 1.1.0 - We now have more documentation. - Renamed the (unstable) methods `spawn_async` and `spawn_future_async` -- which spawn tasks that cannot hold references -- to simply `spawn` and `spawn_future`, respectively. - We are now using the coco library for our deque. - Individual thread pools can now be configured in "breadth-first" mode, which causes them to execute spawned tasks in the reverse order that they used to. In some specific scenarios, this can be a win (though it is not generally the right choice). - Added top-level functions: - `current_thread_index`, for querying the index of the current worker thread within its thread pool (previously available as `thread_pool.current_thread_index()`); - `current_thread_has_pending_tasks`, for querying whether the current worker that has an empty task deque or not. This can be useful when deciding whether to spawn a task. - The environment variables for controlling Rayon are now `RAYON_NUM_THREADS` and `RAYON_LOG`. The older variables (e.g., `RAYON_RS_NUM_CPUS` are still supported but deprecated). ## Rayon-demo - Added a new game-of-life benchmark. ## Contributors Thanks to the following contributors: - @ChristopherDavenport - @SuperFluffy - @antoinewdg - @crazymykl - @cuviper - @glandium - @julian-seward1 - @leodasvacas - @leshow - @lilianmoraru - @mschmo - @nikomatsakis - @stjepang # Release rayon 0.7.1 / rayon-core 1.0.2 (2017-05-30) This release is a targeted performance fix for #343, an issue where rayon threads could sometimes enter into a spin loop where they would be unable to make progress until they are pre-empted. # Release rayon 0.7 / rayon-core 1.0 (2017-04-06) This release marks the first step towards Rayon 1.0. **For best performance, it is important that all Rayon users update to at least Rayon 0.7.** This is because, as of Rayon 0.7, we have taken steps to ensure that, no matter how many versions of rayon are actively in use, there will only be a single global scheduler. This is achieved via the `rayon-core` crate, which is being released at version 1.0, and which encapsulates the core schedule APIs like `join()`. (Note: the `rayon-core` crate is, to some degree, an implementation detail, and not intended to be imported directly; it's entire API surface is mirrored through the rayon crate.) We have also done a lot of work reorganizing the API for Rayon 0.7 in preparation for 1.0. The names of iterator types have been changed and reorganized (but few users are expected to be naming those types explicitly anyhow). In addition, a number of parallel iterator methods have been adjusted to match those in the standard iterator traits more closely. See the "Breaking Changes" section below for details. Finally, Rayon 0.7 includes a number of new features and new parallel iterator methods. **As of this release, Rayon's parallel iterators have officially reached parity with sequential iterators** -- that is, every sequential iterator method that makes any sense in parallel is supported in some capacity. ### New features and methods - The internal `Producer` trait now features `fold_with`, which enables better performance for some parallel iterators. - Strings now support `par_split()` and `par_split_whitespace()`. - The `Configuration` API is expanded and simplified: - `num_threads(0)` no longer triggers an error - you can now supply a closure to name the Rayon threads that get created by using `Configuration::thread_name`. - you can now inject code when Rayon threads start up and finish - you can now set a custom panic handler to handle panics in various odd situations - Threadpools are now able to more gracefully put threads to sleep when not needed. - Parallel iterators now support `find_first()`, `find_last()`, `position_first()`, and `position_last()`. - Parallel iterators now support `rev()`, which primarily affects subsequent calls to `enumerate()`. - The `scope()` API is now considered stable (and part of `rayon-core`). - There is now a useful `rayon::split` function for creating custom Rayon parallel iterators. - Parallel iterators now allow you to customize the min/max number of items to be processed in a given thread. This mechanism replaces the older `weight` mechanism, which is deprecated. - `sum()` and friends now use the standard `Sum` traits ### Breaking changes In the move towards 1.0, there have been a number of minor breaking changes: - Configuration setters like `Configuration::set_num_threads()` lost the `set_` prefix, and hence become something like `Configuration::num_threads()`. - `Configuration` getters are removed - Iterator types have been shuffled around and exposed more consistently: - combinator types live in `rayon::iter`, e.g. `rayon::iter::Filter` - iterators over various types live in a module named after their type, e.g. `rayon::slice::Windows` - When doing a `sum()` or `product()`, type annotations are needed for the result since it is now possible to have the resulting sum be of a type other than the value you are iterating over (this mirrors sequential iterators). ### Experimental features Experimental features require the use of the `unstable` feature. Their APIs may change or disappear entirely in future releases (even minor releases) and hence they should be avoided for production code. - We now have (unstable) support for futures integration. You can use `Scope::spawn_future` or `rayon::spawn_future_async()`. - There is now a `rayon::spawn_async()` function for using the Rayon thread pool to run tasks that do not have references to the stack. ### Contributors Thanks to the following people for their contributions to this release: - @Aaronepower - @ChristopherDavenport - @bluss - @cuviper - @froydnj - @gaurikholkar - @hniksic - @leodasvacas - @leshow - @martinhath - @mbrubeck - @nikomatsakis - @pegomes - @schuster - @torkleyy # Release 0.6 (2016-12-21) This release includes a lot of progress towards the goal of parity with the sequential iterator API, though there are still a few methods that are not yet complete. If you'd like to help with that effort, [check out the milestone](https://github.com/rayon-rs/rayon/issues?q=is%3Aopen+is%3Aissue+milestone%3A%22Parity+with+the+%60Iterator%60+trait%22) to see the remaining issues. **Announcement:** @cuviper has been added as a collaborator to the Rayon repository for all of his outstanding work on Rayon, which includes both internal refactoring and helping to shape the public API. Thanks @cuviper! Keep it up. - We now support `collect()` and not just `collect_with()`. You can use `collect()` to build a number of collections, including vectors, maps, and sets. Moreover, when building a vector with `collect()`, you are no longer limited to exact parallel iterators. Thanks @nikomatsakis, @cuviper! - We now support `skip()` and `take()` on parallel iterators. Thanks @martinhath! - **Breaking change:** We now match the sequential APIs for `min()` and `max()`. We also support `min_by_key()` and `max_by_key()`. Thanks @tapeinosyne! - **Breaking change:** The `mul()` method is now renamed to `product()`, to match sequential iterators. Thanks @jonathandturner! - We now support parallel iterator over ranges on `u64` values. Thanks @cuviper! - We now offer a `par_chars()` method on strings for iterating over characters in parallel. Thanks @cuviper! - We now have new demos: a traveling salesman problem solver as well as matrix multiplication. Thanks @nikomatsakis, @edre! - We are now documenting our minimum rustc requirement (currently v1.12.0). We will attempt to maintain compatibility with rustc stable v1.12.0 as long as it remains convenient, but if new features are stabilized or added that would be helpful to Rayon, or there are bug fixes that we need, we will bump to the most recent rustc. Thanks @cuviper! - The `reduce()` functionality now has better inlining. Thanks @bluss! - The `join()` function now has some documentation. Thanks @gsquire! - The project source has now been fully run through rustfmt. Thanks @ChristopherDavenport! - Exposed helper methods for accessing the current thread index. Thanks @bholley! # Release 0.5 (2016-11-04) - **Breaking change:** The `reduce` method has been vastly simplified, and `reduce_with_identity` has been deprecated. - **Breaking change:** The `fold` method has been changed. It used to always reduce the values, but now instead it is a combinator that returns a parallel iterator which can itself be reduced. See the docs for more information. - The following parallel iterator combinators are now available (thanks @cuviper!): - `find_any()`: similar to `find` on a sequential iterator, but doesn't necessarily return the *first* matching item - `position_any()`: similar to `position` on a sequential iterator, but doesn't necessarily return the index of *first* matching item - `any()`, `all()`: just like their sequential counterparts - The `count()` combinator is now available for parallel iterators. - We now build with older versions of rustc again (thanks @durango!), as we removed a stray semicolon from `thread_local!`. - Various improvements to the (unstable) `scope()` API implementation. # Release 0.4.3 (2016-10-25) - Parallel iterators now offer an adaptive weight scheme, which means that explicit weights should no longer be necessary in most cases! Thanks @cuviper! - We are considering removing weights or changing the weight mechanism before 1.0. Examples of scenarios where you still need weights even with this adaptive mechanism would be great. Join the discussion at . - New (unstable) scoped threads API, see `rayon::scope` for details. - You will need to supply the [cargo feature] `unstable`. - The various demos and benchmarks have been consolidated into one program, `rayon-demo`. - Optimizations in Rayon's inner workings. Thanks @emilio! - Update `num_cpus` to 1.0. Thanks @jamwt! - Various internal cleanup in the implementation and typo fixes. Thanks @cuviper, @Eh2406, and @spacejam! [cargo feature]: https://doc.rust-lang.org/cargo/reference/features.html#the-features-section # Release 0.4.2 (2016-09-15) - Updated crates.io metadata. # Release 0.4.1 (2016-09-14) - New `chain` combinator for parallel iterators. - `Option`, `Result`, as well as many more collection types now have parallel iterators. - New mergesort demo. - Misc fixes. Thanks to @cuviper, @edre, @jdanford, @frewsxcv for their contributions! # Release 0.4 (2016-05-16) - Make use of latest versions of catch-panic and various fixes to panic propagation. - Add new prime sieve demo. - Add `cloned()` and `inspect()` combinators. - Misc fixes for Rust RFC 1214. Thanks to @areilb1, @Amanieu, @SharplEr, and @cuviper for their contributions! # Release 0.3 (2016-02-23) - Expanded `par_iter` APIs now available: - `into_par_iter` is now supported on vectors (taking ownership of the elements) - Panic handling is much improved: - if you use the Nightly feature, experimental panic recovery is available - otherwise, panics propagate out and poision the workpool - New `Configuration` object to control number of threads and other details - New demos and benchmarks - try `cargo run --release -- visualize` in `demo/nbody` :) - Note: a nightly compiler is required for this demo due to the use of the `+=` syntax Thanks to @bjz, @cuviper, @Amanieu, and @willi-kappler for their contributions! # Release 0.2 and earlier No release notes were being kept at this time. # Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] ## [0.25.2](https://github.com/salsa-rs/salsa/compare/salsa-v0.25.1...salsa-v0.25.2) - 2025-12-17 ### Other - Revert #958 ([#1039](https://github.com/salsa-rs/salsa/pull/1039)) ## [0.25.1](https://github.com/salsa-rs/salsa/compare/salsa-v0.25.0...salsa-v0.25.1) - 2025-12-16 ### Other - Fix a remainder that was forgotten in #1036 ([#1037](https://github.com/salsa-rs/salsa/pull/1037)) ## [0.25.0](https://github.com/salsa-rs/salsa/compare/salsa-v0.24.0...salsa-v0.25.0) - 2025-12-16 ### Other - Require interned structs' fields to be `Update` ([#1036](https://github.com/salsa-rs/salsa/pull/1036)) - Make `ordermap` an optional feature ([#1034](https://github.com/salsa-rs/salsa/pull/1034)) - implement `Update` for `OrderMap` and `OrderSet` ([#1033](https://github.com/salsa-rs/salsa/pull/1033)) - Fully qualify std Result type ([#1025](https://github.com/salsa-rs/salsa/pull/1025)) - pass `Cycle` to the cycle recovery function ([#1028](https://github.com/salsa-rs/salsa/pull/1028)) - Fix cycle head durability ([#1024](https://github.com/salsa-rs/salsa/pull/1024)) - Call `cycle_fn` for every iteration ([#1021](https://github.com/salsa-rs/salsa/pull/1021)) - Track cycle function dependencies as part of the cyclic query ([#1018](https://github.com/salsa-rs/salsa/pull/1018)) - Always increment iteration count ([#1017](https://github.com/salsa-rs/salsa/pull/1017)) - Update compile fail snapshots to match new rust stable output ([#1020](https://github.com/salsa-rs/salsa/pull/1020)) - Only use provisional values from the same revision ([#1019](https://github.com/salsa-rs/salsa/pull/1019)) - Explain the motivation for breaking API changes made in #1012 and #1015 ([#1016](https://github.com/salsa-rs/salsa/pull/1016)) - Expose the Input query Id with cycle_initial ([#1015](https://github.com/salsa-rs/salsa/pull/1015)) - Add `SyncTable::peek_claim` fast path for `function::Ingredient::wait_for` ([#1011](https://github.com/salsa-rs/salsa/pull/1011)) - Fix cache invalidation when cycle head becomes non-head ([#1014](https://github.com/salsa-rs/salsa/pull/1014)) - Expose the query ID and the last provisional value to the cycle recovery function ([#1012](https://github.com/salsa-rs/salsa/pull/1012)) - Fix hangs in multithreaded fixpoint iteration ([#1010](https://github.com/salsa-rs/salsa/pull/1010)) - Remove experimental parallel feature ([#1013](https://github.com/salsa-rs/salsa/pull/1013)) - Simplify `WaitGroup` implementation ([#958](https://github.com/salsa-rs/salsa/pull/958)) - Fix missing license files in published macros/macro-rules crates ([#1009](https://github.com/salsa-rs/salsa/pull/1009)) - Run fixpoint per strongly connected component ([#999](https://github.com/salsa-rs/salsa/pull/999)) - Add benchmark for a fixpoint iteration with nested cycles ([#1001](https://github.com/salsa-rs/salsa/pull/1001)) ## [0.24.0](https://github.com/salsa-rs/salsa/compare/salsa-v0.23.0...salsa-v0.24.0) - 2025-09-30 ### Fixed - Cleanup provisional cycle head memos when query panics ([#993](https://github.com/salsa-rs/salsa/pull/993)) - Runaway for unchanged queries participating in cycle ([#981](https://github.com/salsa-rs/salsa/pull/981)) - Delete not re-created tracked structs after fixpoint iteration ([#979](https://github.com/salsa-rs/salsa/pull/979)) - fix assertion during interned deserialization ([#978](https://github.com/salsa-rs/salsa/pull/978)) - Do not unnecessarily require `Debug` on fields for interned structs ([#951](https://github.com/salsa-rs/salsa/pull/951)) - Fix phantom data usage in salsa structs affecting auto traits ([#932](https://github.com/salsa-rs/salsa/pull/932)) ### Other - Replace unsafe unwrap with `expect` call ([#998](https://github.com/salsa-rs/salsa/pull/998)) - Push active query in execute ([#996](https://github.com/salsa-rs/salsa/pull/996)) - Update codspeed action ([#997](https://github.com/salsa-rs/salsa/pull/997)) - Add implementations for Lookup and HashEqLike for CompactString ([#988](https://github.com/salsa-rs/salsa/pull/988)) - Provide a method to attach a database even if it's different from the current attached one ([#992](https://github.com/salsa-rs/salsa/pull/992)) - Allow fallback to take longer than one iteration to converge ([#991](https://github.com/salsa-rs/salsa/pull/991)) - refactor `entries` API ([#987](https://github.com/salsa-rs/salsa/pull/987)) - Persistent caching fixes ([#982](https://github.com/salsa-rs/salsa/pull/982)) - outline cold path of `lookup_ingredient` ([#984](https://github.com/salsa-rs/salsa/pull/984)) - Update snapshot to fix nightly type rendering ([#983](https://github.com/salsa-rs/salsa/pull/983)) - avoid cycles during serialization ([#977](https://github.com/salsa-rs/salsa/pull/977)) - Flatten unserializable query dependencies ([#975](https://github.com/salsa-rs/salsa/pull/975)) - optimize `Id::hash` ([#974](https://github.com/salsa-rs/salsa/pull/974)) - Make `thin-vec/serde` dependency dependent on `persistence` feature ([#973](https://github.com/salsa-rs/salsa/pull/973)) - Remove tracked structs from query outputs ([#969](https://github.com/salsa-rs/salsa/pull/969)) - Remove jemalloc ([#972](https://github.com/salsa-rs/salsa/pull/972)) - Initial persistent caching prototype ([#967](https://github.com/salsa-rs/salsa/pull/967)) - Fix `maybe_changed_after` runnaway for fixpoint queries ([#961](https://github.com/salsa-rs/salsa/pull/961)) - add parallel maybe changed after test ([#963](https://github.com/salsa-rs/salsa/pull/963)) - Update tests for Rust 1.89 ([#966](https://github.com/salsa-rs/salsa/pull/966)) - remove allocation lock ([#962](https://github.com/salsa-rs/salsa/pull/962)) - consolidate memory usage information API ([#964](https://github.com/salsa-rs/salsa/pull/964)) - Add heap size support for salsa structs ([#943](https://github.com/salsa-rs/salsa/pull/943)) - Extract the cycle branches from `fetch` and `maybe_changed_after` ([#955](https://github.com/salsa-rs/salsa/pull/955)) - allow reuse of cached provisional memos within the same cycle iteration during `maybe_changed_after` ([#954](https://github.com/salsa-rs/salsa/pull/954)) - Expose API to manually trigger cancellation ([#959](https://github.com/salsa-rs/salsa/pull/959)) - Upgrade dependencies ([#956](https://github.com/salsa-rs/salsa/pull/956)) - Use `CycleHeadSet` in `maybe_update_after` ([#953](https://github.com/salsa-rs/salsa/pull/953)) - Gate accumulator feature behind a feature flag ([#946](https://github.com/salsa-rs/salsa/pull/946)) - optimize allocation fast-path ([#949](https://github.com/salsa-rs/salsa/pull/949)) - remove borrow checks from `ZalsaLocal` ([#939](https://github.com/salsa-rs/salsa/pull/939)) - Do manual trait casting ([#922](https://github.com/salsa-rs/salsa/pull/922)) - Retain backing allocation of `ActiveQuery::input_outputs` in `ActiveQuery::seed_iteration` ([#948](https://github.com/salsa-rs/salsa/pull/948)) - remove extra bounds checks from memo table hot-paths ([#938](https://github.com/salsa-rs/salsa/pull/938)) - Outline all tracing events ([#942](https://github.com/salsa-rs/salsa/pull/942)) - remove bounds and type checks from `IngredientCache` ([#937](https://github.com/salsa-rs/salsa/pull/937)) - Avoid dynamic dispatch to access memo tables ([#941](https://github.com/salsa-rs/salsa/pull/941)) - optimize page access ([#940](https://github.com/salsa-rs/salsa/pull/940)) - Use `inventory` for static ingredient registration ([#934](https://github.com/salsa-rs/salsa/pull/934)) - Fix `heap_size` option not being preserved in tracked impls ([#930](https://github.com/salsa-rs/salsa/pull/930)) - update papaya ([#928](https://github.com/salsa-rs/salsa/pull/928)) ## [0.23.0](https://github.com/salsa-rs/salsa/compare/salsa-v0.22.0...salsa-v0.23.0) - 2025-06-27 ### Added - `Update` derive field overwrite support ([#747](https://github.com/salsa-rs/salsa/pull/747)) ### Fixed - fix race in `MemoTableTypes` ([#912](https://github.com/salsa-rs/salsa/pull/912)) - multithreaded nested fixpoint iteration ([#882](https://github.com/salsa-rs/salsa/pull/882)) ### Other - Emit self ty for query debug name of assoc function queries ([#927](https://github.com/salsa-rs/salsa/pull/927)) - Replace ingredient cache with faster ingredient map ([#921](https://github.com/salsa-rs/salsa/pull/921)) - add option to track heap memory usage of memos ([#925](https://github.com/salsa-rs/salsa/pull/925)) - Hide generated structs of tracked functions from docs via `#[doc(hidden)]` ([#917](https://github.com/salsa-rs/salsa/pull/917)) - Add API to dump memory usage ([#916](https://github.com/salsa-rs/salsa/pull/916)) - Revert "Assert size for interned Value" & Mark `Slot` trait as unsafe ([#915](https://github.com/salsa-rs/salsa/pull/915)) - add an option to tune interned garbage collection ([#911](https://github.com/salsa-rs/salsa/pull/911)) - Use explicit discriminants for `QueryOriginKind` for better comparisons ([#913](https://github.com/salsa-rs/salsa/pull/913)) - update boxcar ([#910](https://github.com/salsa-rs/salsa/pull/910)) - use latest revision for dependencies on interned values ([#908](https://github.com/salsa-rs/salsa/pull/908)) - remove high-durability values from interned LRU ([#907](https://github.com/salsa-rs/salsa/pull/907)) - Preserve attributes on interned/tracked struct fields ([#905](https://github.com/salsa-rs/salsa/pull/905)) - Assert size for interned `Value` ([#901](https://github.com/salsa-rs/salsa/pull/901)) - reduce size of interned value metadata ([#903](https://github.com/salsa-rs/salsa/pull/903)) - panic with string message again for cycle panics ([#898](https://github.com/salsa-rs/salsa/pull/898)) - Use `Revision` and `Durability` directly in input `Value` ([#902](https://github.com/salsa-rs/salsa/pull/902)) - Fix flaky parallel_join test ([#900](https://github.com/salsa-rs/salsa/pull/900)) - Bump MSRV to 1.85 ([#899](https://github.com/salsa-rs/salsa/pull/899)) - Simple LRU garbage collection for interned values ([#839](https://github.com/salsa-rs/salsa/pull/839)) - Capture execution backtrace when throwing `UnexpectedCycle` ([#883](https://github.com/salsa-rs/salsa/pull/883)) - Store tracked struct ids as ThinVec on Revisions ([#892](https://github.com/salsa-rs/salsa/pull/892)) - Update dependencies, remove unused `heck` dependency ([#894](https://github.com/salsa-rs/salsa/pull/894)) - Set `validate_final` in `execute` after removing the last cycle head ([#890](https://github.com/salsa-rs/salsa/pull/890)) - Pack `QueryEdge` memory layout ([#886](https://github.com/salsa-rs/salsa/pull/886)) - Lazily allocate extra memo state ([#888](https://github.com/salsa-rs/salsa/pull/888)) - Pack `QueryOrigin` memory layout ([#885](https://github.com/salsa-rs/salsa/pull/885)) - Restrict memo size assertion to 64bit platforms ([#884](https://github.com/salsa-rs/salsa/pull/884)) - Don't report stale outputs if there is newer generation in new_outputs ([#879](https://github.com/salsa-rs/salsa/pull/879)) - Fix hang in nested fixpoint iteration ([#871](https://github.com/salsa-rs/salsa/pull/871)) - Add debug spans for `new_revision` and `evict_lru` ([#881](https://github.com/salsa-rs/salsa/pull/881)) - Add fetch span ([#875](https://github.com/salsa-rs/salsa/pull/875)) - shrink_to_fit `IdentityMap` before storing it ([#816](https://github.com/salsa-rs/salsa/pull/816)) - Allow lifetimes in arguments in tracked fns with >1 parameters ([#880](https://github.com/salsa-rs/salsa/pull/880)) - Replace loom with shuttle ([#876](https://github.com/salsa-rs/salsa/pull/876)) - Use generational identifiers for tracked structs ([#864](https://github.com/salsa-rs/salsa/pull/864)) ### Fixed - `#[doc(hidden)]` auto-generated tracked-fn structs ([#917](https://github.com/salsa-rs/salsa/pull/917)) ## [0.22.0](https://github.com/salsa-rs/salsa/compare/salsa-v0.21.1...salsa-v0.22.0) - 2025-05-23 ### Fixed - fix memo table growth condition ([#850](https://github.com/salsa-rs/salsa/pull/850)) - incorrect caching for queries participating in fixpoint ([#843](https://github.com/salsa-rs/salsa/pull/843)) - change detection for fixpoint queries ([#836](https://github.com/salsa-rs/salsa/pull/836)) ### Other - Allow creation of tracked associated functions (without `self`) ([#859](https://github.com/salsa-rs/salsa/pull/859)) - Short-circuit `block-on` if same thread ([#862](https://github.com/salsa-rs/salsa/pull/862)) - Skip release-plz jobs on forks ([#873](https://github.com/salsa-rs/salsa/pull/873)) - Unwind with specific type when encountering an unexpected cycle ([#856](https://github.com/salsa-rs/salsa/pull/856)) - Remove jar mentions from book ([#775](https://github.com/salsa-rs/salsa/pull/775)) - Implement an `!Update` bound escape hatch for tracked fn ([#867](https://github.com/salsa-rs/salsa/pull/867)) - Only enable `boxcar/loom` when `loom` feature is enabled ([#869](https://github.com/salsa-rs/salsa/pull/869)) - Remove default `PartialOrd` and `Ord` derives for salsa-structs ([#868](https://github.com/salsa-rs/salsa/pull/868)) - update boxcar ([#865](https://github.com/salsa-rs/salsa/pull/865)) - speed-up cycle-retry logic ([#861](https://github.com/salsa-rs/salsa/pull/861)) - Fix returns(deref | as_ref | as_deref) in tracked methods ([#857](https://github.com/salsa-rs/salsa/pull/857)) - Changed `return_ref` syntax to `returns(as_ref)` and `returns(cloned)` ([#772](https://github.com/salsa-rs/salsa/pull/772)) - Work around a rust-analyzer bug ([#855](https://github.com/salsa-rs/salsa/pull/855)) - Lazy finalization of cycle participants in `maybe_changed_after` ([#854](https://github.com/salsa-rs/salsa/pull/854)) - Do not re-verify already verified memoized value in cycle verification ([#851](https://github.com/salsa-rs/salsa/pull/851)) - Pass cycle heads as out parameter for `maybe_changed_after` ([#852](https://github.com/salsa-rs/salsa/pull/852)) - Move salsa event system into `Zalsa` ([#849](https://github.com/salsa-rs/salsa/pull/849)) - gate loom dependency under feature flag ([#844](https://github.com/salsa-rs/salsa/pull/844)) - Add loom support ([#842](https://github.com/salsa-rs/salsa/pull/842)) - Clean up some unsafety ([#830](https://github.com/salsa-rs/salsa/pull/830)) ## [0.21.1](https://github.com/salsa-rs/salsa/compare/salsa-v0.21.0...salsa-v0.21.1) - 2025-04-30 ### Added - Make `attach` pub ([#832](https://github.com/salsa-rs/salsa/pull/832)) ### Other - better debug name for interned query arguments ([#837](https://github.com/salsa-rs/salsa/pull/837)) - Avoid panic in `Backtrace::capture` if `query_stack` is already borrowed ([#835](https://github.com/salsa-rs/salsa/pull/835)) - Clean up `function::execute` ([#833](https://github.com/salsa-rs/salsa/pull/833)) - Change an `assert!` to `assert_eq!` ([#828](https://github.com/salsa-rs/salsa/pull/828)) ## [0.21.0](https://github.com/salsa-rs/salsa/compare/salsa-v0.20.0...salsa-v0.21.0) - 2025-04-29 ### Fixed - Access to tracked-struct that was freed during fixpoint ([#817](https://github.com/salsa-rs/salsa/pull/817)) - correct debug output for tracked fields ([#826](https://github.com/salsa-rs/salsa/pull/826)) - Fix incorrect `values_equal` signature ([#825](https://github.com/salsa-rs/salsa/pull/825)) - allow unused lifetimes in tracked_struct expansion ([#824](https://github.com/salsa-rs/salsa/pull/824)) ### Other - Implement a query stack `Backtrace` analog ([#827](https://github.com/salsa-rs/salsa/pull/827)) - Simplify ID conversions ([#822](https://github.com/salsa-rs/salsa/pull/822)) - Attempt to fix codspeed ([#823](https://github.com/salsa-rs/salsa/pull/823)) - Remove unnecessary `Array` abstraction ([#821](https://github.com/salsa-rs/salsa/pull/821)) - Add a compile-fail test for a `'static` `!Update` struct ([#820](https://github.com/salsa-rs/salsa/pull/820)) - squelch most clippy warnings in generated code ([#809](https://github.com/salsa-rs/salsa/pull/809)) - Include struct name in formatted input-field index ([#819](https://github.com/salsa-rs/salsa/pull/819)) - Force inline `fetch_hot` ([#818](https://github.com/salsa-rs/salsa/pull/818)) - Per ingredient sync table ([#650](https://github.com/salsa-rs/salsa/pull/650)) - Use `DatabaseKey` for interned events ([#813](https://github.com/salsa-rs/salsa/pull/813)) - [refactor] More `fetch_hot` simplification ([#793](https://github.com/salsa-rs/salsa/pull/793)) - Don't store the fields in the interned map ([#812](https://github.com/salsa-rs/salsa/pull/812)) - Fix ci not always running ([#810](https://github.com/salsa-rs/salsa/pull/810)) ## [0.20.0](https://github.com/salsa-rs/salsa/compare/salsa-v0.19.0...salsa-v0.20.0) - 2025-04-22 ### Added - Drop `Debug` requirements and flip implementation defaults ([#756](https://github.com/salsa-rs/salsa/pull/756)) ### Fixed - Dereferencing freed memos when verifying provisional memos ([#788](https://github.com/salsa-rs/salsa/pull/788)) - `#[doc(hidden)]` `plumbing` module ([#781](https://github.com/salsa-rs/salsa/pull/781)) - Use `changed_at` revision when updating fields ([#778](https://github.com/salsa-rs/salsa/pull/778)) ### Other - Reduce memory usage by deduplicating type information ([#803](https://github.com/salsa-rs/salsa/pull/803)) - Make interned's `last_interned_at` equal `Revision::MAX` if they are interned outside a query ([#804](https://github.com/salsa-rs/salsa/pull/804)) - Add a third cycle mode, equivalent to old Salsa cycle behavior ([#801](https://github.com/salsa-rs/salsa/pull/801)) - Update compact_str from 0.8 to 0.9 ([#794](https://github.com/salsa-rs/salsa/pull/794)) - Implement `Update` for `ThinVec` ([#807](https://github.com/salsa-rs/salsa/pull/807)) - Don't push an unnecessary active query for `deep_verify_memo` ([#806](https://github.com/salsa-rs/salsa/pull/806)) - Inline/Outline more cold and slow paths ([#805](https://github.com/salsa-rs/salsa/pull/805)) - `#[inline]` some things ([#799](https://github.com/salsa-rs/salsa/pull/799)) - Discard unnecessary atomic load ([#780](https://github.com/salsa-rs/salsa/pull/780)) - Print query stack when encountering unexpected cycle ([#796](https://github.com/salsa-rs/salsa/pull/796)) - Remove incorrect `parallel_scope` API ([#797](https://github.com/salsa-rs/salsa/pull/797)) - [refactor] Simplify `fetch_hot` ([#792](https://github.com/salsa-rs/salsa/pull/792)) - [refactor] Reuse the same stack for all cycles heads in `validate_same_iteration` ([#791](https://github.com/salsa-rs/salsa/pull/791)) - add WillIterateCycle event ([#790](https://github.com/salsa-rs/salsa/pull/790)) - [fix] Use `validate_maybe_provisional` instead of `validate_provisional` ([#789](https://github.com/salsa-rs/salsa/pull/789)) - Use `ThinVec` for `CycleHeads` ([#787](https://github.com/salsa-rs/salsa/pull/787)) - Keep edge condvar on stack instead of allocating it in an `Arc` ([#773](https://github.com/salsa-rs/salsa/pull/773)) - allow reuse of cached provisional memos within the same cycle iteration ([#786](https://github.com/salsa-rs/salsa/pull/786)) - Implement `Lookup`/`HashEqLike` for `Arc` ([#784](https://github.com/salsa-rs/salsa/pull/784)) - Normalize imports style ([#779](https://github.com/salsa-rs/salsa/pull/779)) - Clean up `par_map` a bit ([#742](https://github.com/salsa-rs/salsa/pull/742)) - Fix typo in comment ([#777](https://github.com/salsa-rs/salsa/pull/777)) - Document most safety blocks ([#776](https://github.com/salsa-rs/salsa/pull/776)) - Use html directory for mdbook artifact ([#774](https://github.com/salsa-rs/salsa/pull/774)) - Move `verified_final` from `Memo` into `QueryRevisions` ([#769](https://github.com/salsa-rs/salsa/pull/769)) - Use `ThinVec` for `MemoTable`, halving its size ([#770](https://github.com/salsa-rs/salsa/pull/770)) - Remove unnecessary query stack acess in `block_on` ([#771](https://github.com/salsa-rs/salsa/pull/771)) - Replace memo queue with append-only vector ([#767](https://github.com/salsa-rs/salsa/pull/767)) - update boxcar ([#696](https://github.com/salsa-rs/salsa/pull/696)) - Remove extra page indirection in `Table` ([#710](https://github.com/salsa-rs/salsa/pull/710)) - update release steps ([#705](https://github.com/salsa-rs/salsa/pull/705)) - Remove some unnecessary panicking paths in cycle execution ([#765](https://github.com/salsa-rs/salsa/pull/765)) - *(perf)* Pool `ActiveQuerys` in the query stack ([#629](https://github.com/salsa-rs/salsa/pull/629)) - Resolve unwind safety fixme ([#761](https://github.com/salsa-rs/salsa/pull/761)) - Enable Garbage Collection for Interned Values ([#602](https://github.com/salsa-rs/salsa/pull/602)) - bug [salsa-macros]: Improve debug name of tracked methods ([#755](https://github.com/salsa-rs/salsa/pull/755)) - Remove dead code ([#764](https://github.com/salsa-rs/salsa/pull/764)) - Reduce unnecessary conditional work in `deep_verify_memo` ([#759](https://github.com/salsa-rs/salsa/pull/759)) - Use a `Vec` for `CycleHeads` ([#760](https://github.com/salsa-rs/salsa/pull/760)) - Use nextest for miri test runs ([#758](https://github.com/salsa-rs/salsa/pull/758)) - Pin `half` version to prevent CI failure ([#757](https://github.com/salsa-rs/salsa/pull/757)) - rewrite cycle handling to support fixed-point iteration ([#603](https://github.com/salsa-rs/salsa/pull/603)) ## [0.19.0](https://github.com/salsa-rs/salsa/compare/salsa-v0.18.0...salsa-v0.19.0) - 2025-03-10 ### Fixed - fix typo - fix enums bug ### Other - Have salsa not depend on salsa-macros ([#750](https://github.com/salsa-rs/salsa/pull/750)) - Group versions of packages together for releases ([#751](https://github.com/salsa-rs/salsa/pull/751)) - use `portable-atomic` in `IngredientCache` to compile on `powerpc-unknown-linux-gnu` ([#749](https://github.com/salsa-rs/salsa/pull/749)) - Store view downcaster in function ingredients directly ([#720](https://github.com/salsa-rs/salsa/pull/720)) - Some small perf things ([#744](https://github.com/salsa-rs/salsa/pull/744)) - :replace instead of std::mem::replace ([#746](https://github.com/salsa-rs/salsa/pull/746)) - Cleanup `Cargo.toml`s ([#745](https://github.com/salsa-rs/salsa/pull/745)) - Drop clone requirement for accumulated values - implement `Update` trait for `IndexMap`, and `IndexSet` - more correct bounds on `Send` and `Sync` implementation `DeletedEntries` - replace `arc-swap` with manual `AtomicPtr` - Remove unnecessary `current_revision` call from `setup_interned_struct` - Merge pull request #731 from Veykril/veykril/push-nzkwqzxxkxou - Remove some dynamically dispatched `Database::event` calls - Lazy fetching - Add small supertype input benchmark - Replace a `DashMap` with `RwLock` as writing is rare for it - address review comments - Skip memo ingredient index mapping for non enum tracked functions - Trade off a bit of memory for more speed in `MemoIngredientIndices` - Introduce Salsa enums - Cancel duplicate test workflow runs - implement `Update` trait for `hashbrown::HashMap` - Move `unwind_if_revision_cancelled` from `ZalsaLocal` to `Zalsa` - Don't clone strings in benchmarks - Merge pull request #714 from Veykril/veykril/push-synxntlkqqsq - Merge pull request #711 from Veykril/veykril/push-stmmwmtprovt - Merge pull request #715 from Veykril/veykril/push-plwpsqknwulq - Enforce `unsafe_op_in_unsafe_fn` - Remove some `ZalsaDatabase::zalsa` calls - Remove outdated FIXME - Replace `IngredientCache` lock with atomic primitive - Reduce method delegation duplication - Automatically clear the cancellation flag when cancellation completes - Allow trigger LRU eviction without increasing the current revision - Simplify `Ingredient::reset_for_new_revision` setup - Require mut Zalsa access for setting the lru limit - Split off revision bumping from `zalsa_mut` access - Update `hashbrown` (0.15) and `hashlink` (0.10)
Memo with value exists:
last verified in Rv with durability D
Memo with value exists:...
No previous memo,
or memo has no value
No previous memo,...
Load memo_map[K]
Load memo_map[K]
Already
claimed
Already...
Claimed
Claimed
Claim sync_map[K]
Claim sync_map[K]
Thread completed
normally
Thread completed...
Cycle detected
or thread panicked
Cycle detected...
Block until other thread completes
Block until other th...
Load memo_map[K]
Load memo_map[K]
Push K onto stack
Push K onto stack
Release claim.
Release claim.
Pop stack frame.
Pop stack frame.
(Destructor)
(Destructo...
(Destructor)
(Destructo...
False
False
Panic
Panic
True
True
Deep verify memo
Deep verify memo
False
False
True
True
Shallow verify memo
Shallow verify memo
Return changed_at > revision
Return changed_at >...
Return changed_at > revision
Return changed_at >...
Panic
Panic
Execute
Execute
Yes
Yes
No
No
Have old memo?
Have old memo?
Return true (maybe changed)
Return true (maybe c...
maybe_changed_since(revision)
maybe_changed_since(revision)
maybe_changed_after_cold()
maybe_changed_after_cold()
Text is not SVG - cannot display
# Maybe changed after The `maybe_changed_after` operation computes whether a query's value *may have changed* **after** the given revision. In other words, `Q.maybe_change_since(R)` is true if the value of the query `Q` may have changed in the revisions `(R+1)..R_now`, where `R_now` is the current revision. Note that it doesn't make sense to ask `maybe_changed_after(R_now)`. ## Input queries Input queries are set explicitly by the user. `maybe_changed_after` can therefore just check when the value was last set and compare. ## Interned queries ## Derived queries The logic for derived queries is more complex. We summarize the high-level ideas here, but you may find the [flowchart](./derived_flowchart.md) useful to dig deeper. The [terminology](./terminology.md) section may also be useful; in some cases, we link to that section on the first usage of a word. * If an existing [memo] is found, then we check if the memo was [verified] in the current [revision]. If so, we can compare its [changed at] revision and return true or false appropriately. * Otherwise, we must check whether [dependencies] have been modified: * Let R be the revision in which the memo was last verified; we wish to know if any of the dependencies have changed since revision R. * First, we check the [durability]. For each memo, we track the minimum durability of the memo's dependencies. If the memo has durability D, and there have been no changes to an input with durability D since the last time the memo was verified, then we can consider the memo verified without any further work. * If the durability check is not sufficient, then we must check the dependencies individually. For this, we iterate over each dependency D and invoke the [maybe changed after](./maybe_changed_after.md) operation to check whether D has changed since the revision R. * If no dependency was modified: * We can mark the memo as verified and use its [changed at] revision to return true or false. * Assuming dependencies have been modified: * Then we execute the user's query function (same as in [fetch]), which potentially [backdates] the resulting value. * Compare the [changed at] revision in the resulting memo and return true or false. [changed at]: ./terminology/changed_at.md [durability]: ./terminology/durability.md [backdate]: ./terminology/backdate.md [backdates]: ./terminology/backdate.md [dependency]: ./terminology/dependency.md [dependencies]: ./terminology/dependency.md [memo]: ./terminology/memo.md [revision]: ./terminology/revision.md [verified]: ./terminology/verified.md [fetch]: ./fetch.md [LRU]: ./terminology/LRU.md # Changed at The *changed at* revision for a [memo] is the [revision] in which that memo's value last changed. Typically, this is the same as the revision in which the [query function] was last executed, but it may be an earlier revision if the memo was [backdated]. [query function]: ./query_function.md [backdated]: ./backdate.md [revision]: ./revision.md [memo]: ./memo.md use rustc_hash::FxHashMap; #[cfg(feature = "accumulator")] use crate::accumulator::accumulated_map::InputAccumulatedValues; use crate::cycle::{CycleHeads, CycleRecoveryStrategy, ProvisionalStatus}; use crate::function::memo::{Memo, TryClaimCycleHeadsIter, TryClaimHeadsResult}; use crate::function::sync::ClaimResult; use crate::function::{Configuration, IngredientImpl, Reentrancy}; use crate::key::DatabaseKeyIndex; use crate::sync::atomic::Ordering; use crate::zalsa::{MemoIngredientIndex, Zalsa, ZalsaDatabase}; use crate::zalsa_local::{QueryEdgeKind, QueryOriginRef, ZalsaLocal}; use crate::{Id, Revision}; /// Result of memo validation. #[derive(Debug, Copy, Clone)] pub enum VerifyResult { /// Memo has changed and needs to be recomputed. Changed, /// Memo remains valid. /// /// The inner value tracks whether the memo or any of its dependencies have an /// accumulated value. Unchanged { #[cfg(feature = "accumulator")] accumulated: InputAccumulatedValues, }, } impl VerifyResult { pub(crate) const fn changed_if(changed: bool) -> Self { if changed { Self::changed() } else { Self::unchanged() } } pub(crate) const fn changed() -> Self { Self::Changed } pub(crate) const fn unchanged() -> Self { Self::Unchanged { #[cfg(feature = "accumulator")] accumulated: InputAccumulatedValues::Empty, } } #[inline] #[cfg(feature = "accumulator")] pub(crate) fn unchanged_with_accumulated(accumulated: InputAccumulatedValues) -> Self { Self::Unchanged { accumulated } } #[inline] #[cfg(not(feature = "accumulator"))] pub(crate) fn unchanged_with_accumulated() -> Self { Self::unchanged() } pub(crate) const fn is_unchanged(&self) -> bool { matches!(self, Self::Unchanged { .. }) } } impl IngredientImpl where C: Configuration, { pub(super) fn maybe_changed_after<'db>( &'db self, db: &'db C::DbView, id: Id, revision: Revision, cycle_heads: &mut VerifyCycleHeads, ) -> VerifyResult { let (zalsa, zalsa_local) = db.zalsas(); let memo_ingredient_index = self.memo_ingredient_index(zalsa, id); zalsa.unwind_if_revision_cancelled(zalsa_local); loop { let database_key_index = self.database_key_index(id); crate::tracing::debug!( "{database_key_index:?}: maybe_changed_after(revision = {revision:?})" ); // Check if we have a verified version: this is the hot path. let memo_guard = self.get_memo_from_table_for(zalsa, id, memo_ingredient_index); let Some(memo) = memo_guard else { // No memo? Assume has changed. return VerifyResult::changed(); }; let can_shallow_update = self.shallow_verify_memo(zalsa, database_key_index, memo); if can_shallow_update.yes() && !memo.may_be_provisional() { self.update_shallow(zalsa, database_key_index, memo, can_shallow_update); return if memo.revisions.changed_at > revision { VerifyResult::changed() } else { VerifyResult::unchanged_with_accumulated( #[cfg(feature = "accumulator")] { memo.revisions.accumulated_inputs.load() }, ) }; } if let Some(mcs) = self.maybe_changed_after_cold( zalsa, zalsa_local, db, id, revision, memo_ingredient_index, cycle_heads, ) { return mcs; } else { // We failed to claim, have to retry. } } } #[inline(never)] #[expect(clippy::too_many_arguments)] fn maybe_changed_after_cold<'db>( &'db self, zalsa: &Zalsa, zalsa_local: &ZalsaLocal, db: &'db C::DbView, key_index: Id, revision: Revision, memo_ingredient_index: MemoIngredientIndex, cycle_heads: &mut VerifyCycleHeads, ) -> Option { let database_key_index = self.database_key_index(key_index); let claim_guard = match self .sync_table .try_claim(zalsa, key_index, Reentrancy::Deny) { ClaimResult::Claimed(guard) => guard, ClaimResult::Running(blocked_on) => { blocked_on.block_on(zalsa); return None; } ClaimResult::Cycle { .. } => { return Some(self.maybe_changed_after_cold_cycle( zalsa_local, database_key_index, cycle_heads, )) } }; // Load the current memo, if any. let Some(old_memo) = self.get_memo_from_table_for(zalsa, key_index, memo_ingredient_index) else { return Some(VerifyResult::changed()); }; crate::tracing::debug!( "{database_key_index:?}: maybe_changed_after_cold, successful claim, \ revision = {revision:?}, old_memo = {old_memo:#?}", old_memo = old_memo.tracing_debug() ); let can_shallow_update = self.shallow_verify_memo(zalsa, database_key_index, old_memo); if can_shallow_update.yes() && self.validate_may_be_provisional(zalsa, zalsa_local, database_key_index, old_memo) { self.update_shallow(zalsa, database_key_index, old_memo, can_shallow_update); // If `validate_maybe_provisional` returns `true`, but only because all cycle heads are from the same iteration, // carry over the cycle heads so that the caller verifies them. for head in old_memo.cycle_heads() { cycle_heads.insert_head(head.database_key_index); } return Some(if old_memo.revisions.changed_at > revision { VerifyResult::changed() } else { VerifyResult::unchanged_with_accumulated( #[cfg(feature = "accumulator")] { old_memo.revisions.accumulated_inputs.load() }, ) }); } if let Some(cached) = cycle_heads.get_result(database_key_index) { return Some(*cached); } let deep_verify = self.deep_verify_memo( db, zalsa, old_memo, database_key_index, cycle_heads, can_shallow_update, ); if deep_verify.is_unchanged() { // Check if the inputs are still valid. We can just compare `changed_at`. return Some(if old_memo.revisions.changed_at > revision { VerifyResult::changed() } else { // Returns unchanged but propagates the accumulated values deep_verify }); } // If inputs have changed, but we have an old value, we can re-execute. // It is possible the result will be equal to the old value and hence // backdated. In that case, although we will have computed a new memo, // the value has not logically changed. // However, executing the query here is only safe if we are not in a cycle. // In a cycle, it's important that the cycle head gets executed or we // risk that some dependencies of this query haven't been verified yet because // the cycle head returned *fixpoint initial* without validating its dependencies. // `in_cycle` tracks if the enclosing query is in a cycle. `deep_verify.cycle_heads` tracks // if **this query** encountered a cycle (which means there's some provisional value somewhere floating around). if old_memo.value.is_some() && !cycle_heads.has_any() { let memo = self.execute(db, claim_guard, zalsa_local, Some(old_memo))?; let changed_at = memo.revisions.changed_at; // Always assume that a provisional value has changed. // // We don't know if a provisional value has actually changed. To determine whether a provisional // value has changed, we need to iterate the outer cycle, which cannot be done here. return Some(if changed_at > revision || memo.may_be_provisional() { VerifyResult::changed() } else { VerifyResult::unchanged_with_accumulated( #[cfg(feature = "accumulator")] match memo.revisions.accumulated() { Some(_) => InputAccumulatedValues::Any, None => memo.revisions.accumulated_inputs.load(), }, ) }); } // Otherwise, nothing for it: have to consider the value to have changed. Some(VerifyResult::changed()) } #[cold] #[inline(never)] fn maybe_changed_after_cold_cycle( &self, zalsa_local: &ZalsaLocal, database_key_index: DatabaseKeyIndex, cycle_heads: &mut VerifyCycleHeads, ) -> VerifyResult { match C::CYCLE_STRATEGY { // SAFETY: We do not access the query stack reentrantly. CycleRecoveryStrategy::Panic => unsafe { zalsa_local.with_query_stack_unchecked(|stack| { panic!( "dependency graph cycle when validating {database_key_index:#?}, \ set cycle_fn/cycle_initial to fixpoint iterate.\n\ Query stack:\n{stack:#?}", ); }) }, CycleRecoveryStrategy::FallbackImmediate => VerifyResult::unchanged(), CycleRecoveryStrategy::Fixpoint => { crate::tracing::debug!( "hit cycle at {database_key_index:?} in `maybe_changed_after`, returning fixpoint initial value", ); cycle_heads.insert_head(database_key_index); // SAFETY: We don't access the query stack reentrantly. let running = unsafe { zalsa_local.with_query_stack_unchecked(|stack| { stack .iter() .any(|query| query.database_key_index == database_key_index) }) }; // If the cycle head is being executed, consider this query as changed. if running { VerifyResult::changed() } else { VerifyResult::unchanged() } } } } /// `Some` if the memo's value and `changed_at` time is still valid in this revision. /// Does only a shallow O(1) check, doesn't walk the dependencies. /// /// In general, a provisional memo (from cycle iteration) does not verify. Since we don't /// eagerly finalize all provisional memos in cycle iteration, we have to lazily check here /// (via `validate_provisional`) whether a may-be-provisional memo should actually be verified /// final, because its cycle heads are all now final. #[inline] pub(super) fn shallow_verify_memo( &self, zalsa: &Zalsa, database_key_index: DatabaseKeyIndex, memo: &Memo<'_, C>, ) -> ShallowUpdate { crate::tracing::debug!( "{database_key_index:?}: shallow_verify_memo(memo = {memo:#?})", memo = memo.tracing_debug() ); let verified_at = memo.verified_at.load(); let revision_now = zalsa.current_revision(); if verified_at == revision_now { // Already verified. return ShallowUpdate::Verified; } let last_changed = zalsa.last_changed_revision(memo.revisions.durability); crate::tracing::trace!( "{database_key_index:?}: check_durability({database_key_index:#?}, last_changed={:?} <= verified_at={:?}) = {:?}", last_changed, verified_at, last_changed <= verified_at, ); if last_changed <= verified_at { // No input of the suitable durability has changed since last verified. ShallowUpdate::HigherDurability } else { ShallowUpdate::No } } #[inline] pub(super) fn update_shallow( &self, zalsa: &Zalsa, database_key_index: DatabaseKeyIndex, memo: &Memo<'_, C>, update: ShallowUpdate, ) { if let ShallowUpdate::HigherDurability = update { memo.mark_as_verified(zalsa, database_key_index); memo.mark_outputs_as_verified(zalsa, database_key_index); } } /// Validates this memo if it is a provisional memo. Returns true for: /// * non provisional memos /// * provisional memos that have been successfully marked as verified final, that is, its /// cycle heads have all been finalized. /// * provisional memos that have been created in the same revision and iteration and are part of the same cycle. #[inline] pub(super) fn validate_may_be_provisional( &self, zalsa: &Zalsa, zalsa_local: &ZalsaLocal, database_key_index: DatabaseKeyIndex, memo: &Memo<'_, C>, ) -> bool { if !memo.may_be_provisional() { return true; } let cycle_heads = memo.cycle_heads(); if cycle_heads.is_empty() { return true; } crate::tracing::trace!( "{database_key_index:?}: validate_may_be_provisional(memo = {memo:#?})", memo = memo.tracing_debug() ); let verified_at = memo.verified_at.load(); self.validate_provisional(zalsa, database_key_index, memo, verified_at, cycle_heads) || self.validate_same_iteration( zalsa, zalsa_local, database_key_index, verified_at, cycle_heads, ) } /// Check if this memo's cycle heads have all been finalized. If so, mark it verified final and /// return true, if not return false. fn validate_provisional( &self, zalsa: &Zalsa, database_key_index: DatabaseKeyIndex, memo: &Memo<'_, C>, memo_verified_at: Revision, cycle_heads: &CycleHeads, ) -> bool { crate::tracing::trace!( "{database_key_index:?}: validate_provisional({database_key_index:?})", ); for cycle_head in cycle_heads { // Test if our cycle heads (with the same revision) are now finalized. let Some(kind) = zalsa .lookup_ingredient(cycle_head.database_key_index.ingredient_index()) .provisional_status(zalsa, cycle_head.database_key_index.key_index()) else { return false; }; match kind { ProvisionalStatus::Provisional { .. } => return false, ProvisionalStatus::Final { iteration, verified_at, } => { // Only consider the cycle head if it is from the same revision as the memo if verified_at != memo_verified_at { return false; } // It's important to also account for the iteration for the case where: // thread 1: `b` -> `a` (but only in the first iteration) // -> `c` -> `b` // thread 2: `a` -> `b` // // If we don't account for the iteration, then `a` (from iteration 0) will be finalized // because its cycle head `b` is now finalized, but `b` never pulled `a` in the last iteration. if iteration != cycle_head.iteration_count.load() { return false; } // FIXME: We can ignore this, I just don't have a use-case for this. if C::CYCLE_STRATEGY == CycleRecoveryStrategy::FallbackImmediate { panic!("cannot mix `cycle_fn` and `cycle_result` in cycles") } } ProvisionalStatus::FallbackImmediate => match C::CYCLE_STRATEGY { CycleRecoveryStrategy::Panic => { // Queries without fallback are not considered when inside a cycle. return false; } // FIXME: We can do the same as with `CycleRecoveryStrategy::Panic` here, I just don't have // a use-case for this. CycleRecoveryStrategy::Fixpoint => { panic!("cannot mix `cycle_fn` and `cycle_result` in cycles") } CycleRecoveryStrategy::FallbackImmediate => {} }, } } // Relaxed is sufficient here because there are no other writes we need to ensure have // happened before marking this memo as verified-final. memo.revisions.verified_final.store(true, Ordering::Relaxed); true } /// If this is a provisional memo, validate that it was cached in the same iteration of the /// same cycle(s) that we are still executing. If so, it is valid for reuse. This avoids /// runaway re-execution of the same queries within a fixpoint iteration. fn validate_same_iteration( &self, zalsa: &Zalsa, zalsa_local: &ZalsaLocal, memo_database_key_index: DatabaseKeyIndex, memo_verified_at: Revision, cycle_heads: &CycleHeads, ) -> bool { crate::tracing::trace!("validate_same_iteration({memo_database_key_index:?})",); // This is an optimization to avoid unnecessary re-execution within the same revision. // Don't apply it when verifying memos from past revisions. We want them to re-execute // to verify their cycle heads and all participating queries. if memo_verified_at != zalsa.current_revision() { return false; } // Always return `false` for cycle initial values "unless" they are running in the same thread. if cycle_heads .iter_not_eq(memo_database_key_index) .next() .is_none() { // SAFETY: We do not access the query stack reentrantly. let on_stack = unsafe { zalsa_local.with_query_stack_unchecked(|stack| { stack .iter() .rev() .any(|query| query.database_key_index == memo_database_key_index) }) }; return on_stack; } let cycle_heads_iter = TryClaimCycleHeadsIter::new(zalsa, cycle_heads); for cycle_head in cycle_heads_iter { match cycle_head { TryClaimHeadsResult::Cycle { head_iteration_count, memo_iteration_count: current_iteration_count, verified_at: head_verified_at, } => { if head_verified_at != memo_verified_at { return false; } if head_iteration_count != current_iteration_count { return false; } } _ => { return false; } } } true } /// VerifyResult::Unchanged if the memo's value and `changed_at` time is up-to-date in the /// current revision. When this returns Unchanged with no cycle heads, it also updates the /// memo's `verified_at` field if needed to make future calls cheaper. /// /// Takes an [`ActiveQueryGuard`] argument because this function recursively /// walks dependencies of `old_memo` and may even execute them to see if their /// outputs have changed. pub(super) fn deep_verify_memo( &self, db: &C::DbView, zalsa: &Zalsa, old_memo: &Memo<'_, C>, database_key_index: DatabaseKeyIndex, cycle_heads: &mut VerifyCycleHeads, can_shallow_update: ShallowUpdate, ) -> VerifyResult { // If the value is from the same revision but is still provisional, consider it changed // because we're now in a new iteration. if can_shallow_update == ShallowUpdate::Verified && old_memo.may_be_provisional() { return VerifyResult::changed(); } crate::tracing::debug!( "{database_key_index:?}: deep_verify_memo(old_memo = {old_memo:#?})", old_memo = old_memo.tracing_debug() ); debug_assert!(!cycle_heads.contains_head(database_key_index)); match old_memo.revisions.origin.as_ref() { QueryOriginRef::Derived(edges) => { #[cfg(feature = "accumulator")] let mut inputs = InputAccumulatedValues::Empty; let mut child_cycle_heads = Vec::new(); // Fully tracked inputs? Iterate over the inputs and check them, one by one. // // NB: It's important here that we are iterating the inputs in the order that // they executed. It's possible that if the value of some input I0 is no longer // valid, then some later input I1 might never have executed at all, so verifying // it is still up to date is meaningless. for &edge in edges { match edge.kind() { QueryEdgeKind::Input(dependency_index) => { debug_assert!(child_cycle_heads.is_empty()); // The `MaybeChangeAfterCycleHeads` is used as an out parameter and it's // the caller's responsibility to pass an empty `heads`, which is what we do here. let mut inner_cycle_heads = VerifyCycleHeads { has_outer_cycles: cycle_heads.has_any(), heads: &mut child_cycle_heads, participating_queries: cycle_heads.participating_queries, }; let input_result = dependency_index.maybe_changed_after( db.into(), zalsa, old_memo.verified_at.load(), &mut inner_cycle_heads, ); // Aggregate the cycle heads into the parent cycle heads cycle_heads.append_heads(&mut child_cycle_heads); match input_result { VerifyResult::Changed => { cycle_heads.remove_head(database_key_index); return VerifyResult::changed(); } #[cfg(feature = "accumulator")] VerifyResult::Unchanged { accumulated } => { inputs |= accumulated; } #[cfg(not(feature = "accumulator"))] VerifyResult::Unchanged { .. } => {} } } QueryEdgeKind::Output(dependency_index) => { // Subtle: Mark outputs as validated now, even though we may // later find an input that requires us to re-execute the function. // Even if it re-execute, the function will wind up writing the same value, // since all prior inputs were green. It's important to do this during // this loop, because it's possible that one of our input queries will // re-execute and may read one of our earlier outputs // (e.g., in a scenario where we do something like // `e = Entity::new(..); query(e);` and `query` reads a field of `e`). // // NB. Accumulators are also outputs, but the above logic doesn't // quite apply to them. Since multiple values are pushed, the first value // may be unchanged, but later values could be different. // In that case, however, the data accumulated // by this function cannot be read until this function is marked green, // so even if we mark them as valid here, the function will re-execute // and overwrite the contents. dependency_index.mark_validated_output(zalsa, database_key_index); } } } // Possible scenarios here: // // 1. Cycle heads is empty. We traversed our full dependency graph and neither hit any // cycles, nor found any changed dependencies. We can mark our memo verified and // return Unchanged with empty cycle heads. // // 2. Cycle heads is non-empty, and does not contain our own key index. We are part of // a cycle, and since we don't know if some other cycle participant that hasn't been // traversed yet (that is, some other dependency of the cycle head, which is only a // dependency of ours via the cycle) might still have changed, we can't yet mark our // memo verified. We can return a provisional Unchanged, with cycle heads. // // 3. Cycle heads is non-empty, and contains only our own key index. We are the head of // a cycle, and we've now traversed the entire cycle and found no changes, but no // other cycle participants were verified (they would have all hit case 2 above). // Similar to `execute`, return unchanged and lazily verify the other cycle-participants // when they're used next. // // 4. Cycle heads is non-empty, and contains our own key index as well as other key // indices. We are the head of a cycle nested within another cycle. We can't mark // our own memo verified (for the same reason as in case 2: the full outer cycle // hasn't been validated unchanged yet). We return Unchanged, with ourself removed // from cycle heads. We will handle our own memo (and the rest of our cycle) on a // future iteration; first the outer cycle head needs to verify itself. cycle_heads.remove_head(database_key_index); let result = VerifyResult::unchanged_with_accumulated( #[cfg(feature = "accumulator")] inputs, ); // This value is only read once the memo is verified. It's therefore safe // to write a non-final value here. #[cfg(feature = "accumulator")] old_memo.revisions.accumulated_inputs.store(inputs); // 1 and 3 if !cycle_heads.has_own() { old_memo.mark_as_verified(zalsa, database_key_index); old_memo .revisions .verified_final .store(true, Ordering::Relaxed); } else { cycle_heads.insert_participating_query(database_key_index, result); } result } QueryOriginRef::Assigned(_) => { // If the value was assigned by another query, // and that query were up-to-date, // then we would have updated the `verified_at` field already. // So the fact that we are here means that it was not specified // during this revision or is otherwise stale. // // Example of how this can happen: // // Conditionally specified queries // where the value is specified // in rev 1 but not in rev 2. VerifyResult::changed() } // Return `Unchanged` similar to the initial value that we insert // when we hit the cycle. Any dependencies accessed when creating the fixpoint initial // are tracked by the outer query. Nothing should have changed assuming that the // fixpoint initial function is deterministic. QueryOriginRef::FixpointInitial => { cycle_heads.insert_head(database_key_index); VerifyResult::unchanged() } QueryOriginRef::DerivedUntracked(_) => { // Untracked inputs? Have to assume that it changed. VerifyResult::changed() } } } } #[derive(Copy, Clone, Eq, PartialEq)] pub(super) enum ShallowUpdate { /// The memo is from this revision and has already been verified Verified, /// The revision for the memo's durability hasn't changed. It can be marked as verified /// in this revision. HigherDurability, /// The memo requires a deep verification. No, } impl ShallowUpdate { pub(super) fn yes(&self) -> bool { matches!( self, ShallowUpdate::Verified | ShallowUpdate::HigherDurability ) } } /// The cycles encountered while verifying if an ingredient has changed after a given revision. /// /// We use this as an out parameter to avoid increasing the size of [`VerifyResult`]. /// The `heads` of a `MaybeChangeAfterCycleHeads` must be empty when /// calling [`maybe_changed_after`]. The [`maybe_changed_after`] then collects all cycle heads /// encountered while verifying this ingredient and its subtree. /// /// Note that `heads` only contains the cycle heads up to the point where [`maybe_changed_after`] /// returned [`VerifyResult::Changed`]. Cycles that only manifest when verifying later dependencies /// aren't included. /// /// [`maybe_changed_after`]: crate::ingredient::Ingredient::maybe_changed_after #[derive(Debug)] pub struct VerifyCycleHeads<'a> { /// The cycle heads encountered while verifying this ingredient and its subtree. heads: &'a mut Vec, /// The cached `maybe_changed_after` results for queries that participate in cycles but aren't a cycle head /// themselves. We need to cache the results here to avoid calling `deep_verify_memo` repeatedly /// for queries that have cyclic dependencies (b depends on a (iteration 0) and a depends on b(iteration 1)) /// as well as to avoid a run-away situation if a query is dependet on a lot inside a single cycle. participating_queries: &'a mut FxHashMap, /// Whether the outer query (e.g. the parent query running `maybe_changed_after`) has encountered /// any cycles to this point. has_outer_cycles: bool, } impl<'a> VerifyCycleHeads<'a> { pub(crate) fn new( heads: &'a mut Vec, participating_queries: &'a mut FxHashMap, ) -> Self { Self { heads, participating_queries, has_outer_cycles: false, } } /// Returns `true` if this query or any of its dependencies depend on this cycle. #[inline] fn contains_head(&self, key: DatabaseKeyIndex) -> bool { self.heads.contains(&key) } #[inline] fn insert_head(&mut self, key: DatabaseKeyIndex) { if !self.heads.contains(&key) { self.heads.push(key); } } #[inline] fn remove_head(&mut self, key: DatabaseKeyIndex) -> bool { if self.heads.is_empty() { return false; } self.remove_head_slow(key) } #[cold] fn remove_head_slow(&mut self, key: DatabaseKeyIndex) -> bool { let found = self.heads.iter().position(|&head| head == key); let Some(found) = found else { return false }; self.heads.swap_remove(found); true } #[inline] fn append_heads(&mut self, heads: &mut Vec) { if heads.is_empty() { return; } self.append_heads_slow(heads); } #[cold] fn append_heads_slow(&mut self, other: &mut Vec) { for key in other.drain(..) { self.insert_head(key); } } fn insert_participating_query(&mut self, key: DatabaseKeyIndex, result: VerifyResult) { self.participating_queries.insert(key, result); } #[inline] fn get_result(&self, key: DatabaseKeyIndex) -> Option<&VerifyResult> { self.participating_queries.get(&key) } /// Returns `true` if this query or any of its dependencies has encountered a cycle or /// if the outer query has encountered a cycle. pub fn has_any(&self) -> bool { self.has_outer_cycles || !self.heads.is_empty() } /// Returns `true` if this query has encountered a cycle. fn has_own(&self) -> bool { !self.heads.is_empty() } } name: Release-plz permissions: pull-requests: write contents: write on: push: branches: - master jobs: # Release unpublished packages. release-plz-release: if: ${{ github.repository_owner == 'salsa-rs' }} name: Release-plz release runs-on: ubuntu-latest permissions: contents: write steps: - name: Checkout repository uses: actions/checkout@v4 with: fetch-depth: 0 - name: Install Rust toolchain uses: dtolnay/rust-toolchain@stable - name: Run release-plz uses: release-plz/action@v0.5 with: command: release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} # Create a PR with the new versions and changelog, preparing the next release. release-plz-pr: if: ${{ github.repository_owner == 'salsa-rs' }} name: Release-plz PR runs-on: ubuntu-latest permissions: contents: write pull-requests: write concurrency: group: release-plz-${{ github.ref }} cancel-in-progress: false steps: - name: Checkout repository uses: actions/checkout@v4 with: fetch-depth: 0 - name: Install Rust toolchain uses: dtolnay/rust-toolchain@stable - name: Run release-plz uses: release-plz/action@v0.5 with: command: release-pr env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} # Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] ## [0.26.2](https://github.com/salsa-rs/salsa/compare/salsa-v0.26.1...salsa-v0.26.2) - 2026-05-03 ### Fixed - fix tracked impl db lifetime for as_deref return mode ([#1084](https://github.com/salsa-rs/salsa/pull/1084)) ### Other - Do not use `#[allow(non_local_definitions)]` ([#1090](https://github.com/salsa-rs/salsa/pull/1090)) - Exclude the book from published crates ([#1089](https://github.com/salsa-rs/salsa/pull/1089)) - Detect overlapping supertype variants via leaf type IDs ([#1080](https://github.com/salsa-rs/salsa/pull/1080)) - Bump hashbrown to 0.17 ([#1087](https://github.com/salsa-rs/salsa/pull/1087)) - Expose `Revision::max()` and make it const ([#1086](https://github.com/salsa-rs/salsa/pull/1086)) ## [0.26.1](https://github.com/salsa-rs/salsa/compare/salsa-v0.26.0...salsa-v0.26.1) - 2026-03-20 ### Other - Bump the edition to 2024 ([#1073](https://github.com/salsa-rs/salsa/pull/1073)) - Don't panic if a query branched on an untracked state ([#1075](https://github.com/salsa-rs/salsa/pull/1075)) ## [0.26.0](https://github.com/salsa-rs/salsa/compare/salsa-v0.25.2...salsa-v0.26.0) - 2026-02-02 ### Added - Allow opt-ing out of LRU at compile time ([#1051](https://github.com/salsa-rs/salsa/pull/1051)) - Allow tracked function cycle attributes to take closures ([#1048](https://github.com/salsa-rs/salsa/pull/1048)) ### Fixed - Do not alias fields of `tracked_struct` `Value`s when updating ([#741](https://github.com/salsa-rs/salsa/pull/741)) ### Other - Remove unnecessary `boxcar::Vec` ([#1072](https://github.com/salsa-rs/salsa/pull/1072)) - replace remaining instances of `cycle_fallback` with `cycle_result` in the docs ([#1071](https://github.com/salsa-rs/salsa/pull/1071)) - Fix out-of-order verification of cycle head dependencies ([#1061](https://github.com/salsa-rs/salsa/pull/1061)) - Update compile fail tests ([#1070](https://github.com/salsa-rs/salsa/pull/1070)) - Merge `FallbackImmediate` and `Fixpoint` code paths ([#1063](https://github.com/salsa-rs/salsa/pull/1063)) - Introduce a `CancellationToken` for cancelling specific computations ([#1007](https://github.com/salsa-rs/salsa/pull/1007)) - Remove unnecessary backdate field macros ([#1069](https://github.com/salsa-rs/salsa/pull/1069)) - Remove `ValueWithMetadata` ([#1057](https://github.com/salsa-rs/salsa/pull/1057)) - Fix stale tracked struct values in later iterations ([#1068](https://github.com/salsa-rs/salsa/pull/1068)) - Skip book deployment on forks ([#1066](https://github.com/salsa-rs/salsa/pull/1066)) - Remove `QueryOriginKind::FixpointInitial` ([#1062](https://github.com/salsa-rs/salsa/pull/1062)) - Document cycle_fallback in the book ([#1056](https://github.com/salsa-rs/salsa/pull/1056)) - Fix book build with newer mdbook versions ([#1055](https://github.com/salsa-rs/salsa/pull/1055)) - Implement `Lookup` and `HashEqLike` for `Cow` ([#1054](https://github.com/salsa-rs/salsa/pull/1054)) - Add `DidFinalizeCycle` event, add more tests for cyclic nested queries ([#1052](https://github.com/salsa-rs/salsa/pull/1052)) - Collect cycle heads transitively ([#1050](https://github.com/salsa-rs/salsa/pull/1050)) - Remove unused database forking ([#1049](https://github.com/salsa-rs/salsa/pull/1049)) - Reduce monomorphized code in maybe_changed_after ([#1047](https://github.com/salsa-rs/salsa/pull/1047)) - Reduce monomorphized code in `execute_maybe_iterate` ([#1046](https://github.com/salsa-rs/salsa/pull/1046)) - Add `salsa::Update` trait bounds to generics when deriving `salsa::Update` ([#1041](https://github.com/salsa-rs/salsa/pull/1041)) ## [0.25.2](https://github.com/salsa-rs/salsa/compare/salsa-v0.25.1...salsa-v0.25.2) - 2025-12-17 ### Other - Revert #958 ([#1039](https://github.com/salsa-rs/salsa/pull/1039)) ## [0.25.1](https://github.com/salsa-rs/salsa/compare/salsa-v0.25.0...salsa-v0.25.1) - 2025-12-16 ### Other - Fix a remainder that was forgotten in #1036 ([#1037](https://github.com/salsa-rs/salsa/pull/1037)) ## [0.25.0](https://github.com/salsa-rs/salsa/compare/salsa-v0.24.0...salsa-v0.25.0) - 2025-12-16 ### Other - Require interned structs' fields to be `Update` ([#1036](https://github.com/salsa-rs/salsa/pull/1036)) - Make `ordermap` an optional feature ([#1034](https://github.com/salsa-rs/salsa/pull/1034)) - implement `Update` for `OrderMap` and `OrderSet` ([#1033](https://github.com/salsa-rs/salsa/pull/1033)) - Fully qualify std Result type ([#1025](https://github.com/salsa-rs/salsa/pull/1025)) - pass `Cycle` to the cycle recovery function ([#1028](https://github.com/salsa-rs/salsa/pull/1028)) - Fix cycle head durability ([#1024](https://github.com/salsa-rs/salsa/pull/1024)) - Call `cycle_fn` for every iteration ([#1021](https://github.com/salsa-rs/salsa/pull/1021)) - Track cycle function dependencies as part of the cyclic query ([#1018](https://github.com/salsa-rs/salsa/pull/1018)) - Always increment iteration count ([#1017](https://github.com/salsa-rs/salsa/pull/1017)) - Update compile fail snapshots to match new rust stable output ([#1020](https://github.com/salsa-rs/salsa/pull/1020)) - Only use provisional values from the same revision ([#1019](https://github.com/salsa-rs/salsa/pull/1019)) - Explain the motivation for breaking API changes made in #1012 and #1015 ([#1016](https://github.com/salsa-rs/salsa/pull/1016)) - Expose the Input query Id with cycle_initial ([#1015](https://github.com/salsa-rs/salsa/pull/1015)) - Add `SyncTable::peek_claim` fast path for `function::Ingredient::wait_for` ([#1011](https://github.com/salsa-rs/salsa/pull/1011)) - Fix cache invalidation when cycle head becomes non-head ([#1014](https://github.com/salsa-rs/salsa/pull/1014)) - Expose the query ID and the last provisional value to the cycle recovery function ([#1012](https://github.com/salsa-rs/salsa/pull/1012)) - Fix hangs in multithreaded fixpoint iteration ([#1010](https://github.com/salsa-rs/salsa/pull/1010)) - Remove experimental parallel feature ([#1013](https://github.com/salsa-rs/salsa/pull/1013)) - Simplify `WaitGroup` implementation ([#958](https://github.com/salsa-rs/salsa/pull/958)) - Fix missing license files in published macros/macro-rules crates ([#1009](https://github.com/salsa-rs/salsa/pull/1009)) - Run fixpoint per strongly connected component ([#999](https://github.com/salsa-rs/salsa/pull/999)) - Add benchmark for a fixpoint iteration with nested cycles ([#1001](https://github.com/salsa-rs/salsa/pull/1001)) ## [0.24.0](https://github.com/salsa-rs/salsa/compare/salsa-v0.23.0...salsa-v0.24.0) - 2025-09-30 ### Fixed - Cleanup provisional cycle head memos when query panics ([#993](https://github.com/salsa-rs/salsa/pull/993)) - Runaway for unchanged queries participating in cycle ([#981](https://github.com/salsa-rs/salsa/pull/981)) - Delete not re-created tracked structs after fixpoint iteration ([#979](https://github.com/salsa-rs/salsa/pull/979)) - fix assertion during interned deserialization ([#978](https://github.com/salsa-rs/salsa/pull/978)) - Do not unnecessarily require `Debug` on fields for interned structs ([#951](https://github.com/salsa-rs/salsa/pull/951)) - Fix phantom data usage in salsa structs affecting auto traits ([#932](https://github.com/salsa-rs/salsa/pull/932)) ### Other - Replace unsafe unwrap with `expect` call ([#998](https://github.com/salsa-rs/salsa/pull/998)) - Push active query in execute ([#996](https://github.com/salsa-rs/salsa/pull/996)) - Update codspeed action ([#997](https://github.com/salsa-rs/salsa/pull/997)) - Add implementations for Lookup and HashEqLike for CompactString ([#988](https://github.com/salsa-rs/salsa/pull/988)) - Provide a method to attach a database even if it's different from the current attached one ([#992](https://github.com/salsa-rs/salsa/pull/992)) - Allow fallback to take longer than one iteration to converge ([#991](https://github.com/salsa-rs/salsa/pull/991)) - refactor `entries` API ([#987](https://github.com/salsa-rs/salsa/pull/987)) - Persistent caching fixes ([#982](https://github.com/salsa-rs/salsa/pull/982)) - outline cold path of `lookup_ingredient` ([#984](https://github.com/salsa-rs/salsa/pull/984)) - Update snapshot to fix nightly type rendering ([#983](https://github.com/salsa-rs/salsa/pull/983)) - avoid cycles during serialization ([#977](https://github.com/salsa-rs/salsa/pull/977)) - Flatten unserializable query dependencies ([#975](https://github.com/salsa-rs/salsa/pull/975)) - optimize `Id::hash` ([#974](https://github.com/salsa-rs/salsa/pull/974)) - Make `thin-vec/serde` dependency dependent on `persistence` feature ([#973](https://github.com/salsa-rs/salsa/pull/973)) - Remove tracked structs from query outputs ([#969](https://github.com/salsa-rs/salsa/pull/969)) - Remove jemalloc ([#972](https://github.com/salsa-rs/salsa/pull/972)) - Initial persistent caching prototype ([#967](https://github.com/salsa-rs/salsa/pull/967)) - Fix `maybe_changed_after` runnaway for fixpoint queries ([#961](https://github.com/salsa-rs/salsa/pull/961)) - add parallel maybe changed after test ([#963](https://github.com/salsa-rs/salsa/pull/963)) - Update tests for Rust 1.89 ([#966](https://github.com/salsa-rs/salsa/pull/966)) - remove allocation lock ([#962](https://github.com/salsa-rs/salsa/pull/962)) - consolidate memory usage information API ([#964](https://github.com/salsa-rs/salsa/pull/964)) - Add heap size support for salsa structs ([#943](https://github.com/salsa-rs/salsa/pull/943)) - Extract the cycle branches from `fetch` and `maybe_changed_after` ([#955](https://github.com/salsa-rs/salsa/pull/955)) - allow reuse of cached provisional memos within the same cycle iteration during `maybe_changed_after` ([#954](https://github.com/salsa-rs/salsa/pull/954)) - Expose API to manually trigger cancellation ([#959](https://github.com/salsa-rs/salsa/pull/959)) - Upgrade dependencies ([#956](https://github.com/salsa-rs/salsa/pull/956)) - Use `CycleHeadSet` in `maybe_update_after` ([#953](https://github.com/salsa-rs/salsa/pull/953)) - Gate accumulator feature behind a feature flag ([#946](https://github.com/salsa-rs/salsa/pull/946)) - optimize allocation fast-path ([#949](https://github.com/salsa-rs/salsa/pull/949)) - remove borrow checks from `ZalsaLocal` ([#939](https://github.com/salsa-rs/salsa/pull/939)) - Do manual trait casting ([#922](https://github.com/salsa-rs/salsa/pull/922)) - Retain backing allocation of `ActiveQuery::input_outputs` in `ActiveQuery::seed_iteration` ([#948](https://github.com/salsa-rs/salsa/pull/948)) - remove extra bounds checks from memo table hot-paths ([#938](https://github.com/salsa-rs/salsa/pull/938)) - Outline all tracing events ([#942](https://github.com/salsa-rs/salsa/pull/942)) - remove bounds and type checks from `IngredientCache` ([#937](https://github.com/salsa-rs/salsa/pull/937)) - Avoid dynamic dispatch to access memo tables ([#941](https://github.com/salsa-rs/salsa/pull/941)) - optimize page access ([#940](https://github.com/salsa-rs/salsa/pull/940)) - Use `inventory` for static ingredient registration ([#934](https://github.com/salsa-rs/salsa/pull/934)) - Fix `heap_size` option not being preserved in tracked impls ([#930](https://github.com/salsa-rs/salsa/pull/930)) - update papaya ([#928](https://github.com/salsa-rs/salsa/pull/928)) ## [0.23.0](https://github.com/salsa-rs/salsa/compare/salsa-v0.22.0...salsa-v0.23.0) - 2025-06-27 ### Added - `Update` derive field overwrite support ([#747](https://github.com/salsa-rs/salsa/pull/747)) ### Fixed - fix race in `MemoTableTypes` ([#912](https://github.com/salsa-rs/salsa/pull/912)) - multithreaded nested fixpoint iteration ([#882](https://github.com/salsa-rs/salsa/pull/882)) ### Other - Emit self ty for query debug name of assoc function queries ([#927](https://github.com/salsa-rs/salsa/pull/927)) - Replace ingredient cache with faster ingredient map ([#921](https://github.com/salsa-rs/salsa/pull/921)) - add option to track heap memory usage of memos ([#925](https://github.com/salsa-rs/salsa/pull/925)) - Hide generated structs of tracked functions from docs via `#[doc(hidden)]` ([#917](https://github.com/salsa-rs/salsa/pull/917)) - Add API to dump memory usage ([#916](https://github.com/salsa-rs/salsa/pull/916)) - Revert "Assert size for interned Value" & Mark `Slot` trait as unsafe ([#915](https://github.com/salsa-rs/salsa/pull/915)) - add an option to tune interned garbage collection ([#911](https://github.com/salsa-rs/salsa/pull/911)) - Use explicit discriminants for `QueryOriginKind` for better comparisons ([#913](https://github.com/salsa-rs/salsa/pull/913)) - update boxcar ([#910](https://github.com/salsa-rs/salsa/pull/910)) - use latest revision for dependencies on interned values ([#908](https://github.com/salsa-rs/salsa/pull/908)) - remove high-durability values from interned LRU ([#907](https://github.com/salsa-rs/salsa/pull/907)) - Preserve attributes on interned/tracked struct fields ([#905](https://github.com/salsa-rs/salsa/pull/905)) - Assert size for interned `Value` ([#901](https://github.com/salsa-rs/salsa/pull/901)) - reduce size of interned value metadata ([#903](https://github.com/salsa-rs/salsa/pull/903)) - panic with string message again for cycle panics ([#898](https://github.com/salsa-rs/salsa/pull/898)) - Use `Revision` and `Durability` directly in input `Value` ([#902](https://github.com/salsa-rs/salsa/pull/902)) - Fix flaky parallel_join test ([#900](https://github.com/salsa-rs/salsa/pull/900)) - Bump MSRV to 1.85 ([#899](https://github.com/salsa-rs/salsa/pull/899)) - Simple LRU garbage collection for interned values ([#839](https://github.com/salsa-rs/salsa/pull/839)) - Capture execution backtrace when throwing `UnexpectedCycle` ([#883](https://github.com/salsa-rs/salsa/pull/883)) - Store tracked struct ids as ThinVec on Revisions ([#892](https://github.com/salsa-rs/salsa/pull/892)) - Update dependencies, remove unused `heck` dependency ([#894](https://github.com/salsa-rs/salsa/pull/894)) - Set `validate_final` in `execute` after removing the last cycle head ([#890](https://github.com/salsa-rs/salsa/pull/890)) - Pack `QueryEdge` memory layout ([#886](https://github.com/salsa-rs/salsa/pull/886)) - Lazily allocate extra memo state ([#888](https://github.com/salsa-rs/salsa/pull/888)) - Pack `QueryOrigin` memory layout ([#885](https://github.com/salsa-rs/salsa/pull/885)) - Restrict memo size assertion to 64bit platforms ([#884](https://github.com/salsa-rs/salsa/pull/884)) - Don't report stale outputs if there is newer generation in new_outputs ([#879](https://github.com/salsa-rs/salsa/pull/879)) - Fix hang in nested fixpoint iteration ([#871](https://github.com/salsa-rs/salsa/pull/871)) - Add debug spans for `new_revision` and `evict_lru` ([#881](https://github.com/salsa-rs/salsa/pull/881)) - Add fetch span ([#875](https://github.com/salsa-rs/salsa/pull/875)) - shrink_to_fit `IdentityMap` before storing it ([#816](https://github.com/salsa-rs/salsa/pull/816)) - Allow lifetimes in arguments in tracked fns with >1 parameters ([#880](https://github.com/salsa-rs/salsa/pull/880)) - Replace loom with shuttle ([#876](https://github.com/salsa-rs/salsa/pull/876)) - Use generational identifiers for tracked structs ([#864](https://github.com/salsa-rs/salsa/pull/864)) ### Fixed - `#[doc(hidden)]` auto-generated tracked-fn structs ([#917](https://github.com/salsa-rs/salsa/pull/917)) ## [0.22.0](https://github.com/salsa-rs/salsa/compare/salsa-v0.21.1...salsa-v0.22.0) - 2025-05-23 ### Fixed - fix memo table growth condition ([#850](https://github.com/salsa-rs/salsa/pull/850)) - incorrect caching for queries participating in fixpoint ([#843](https://github.com/salsa-rs/salsa/pull/843)) - change detection for fixpoint queries ([#836](https://github.com/salsa-rs/salsa/pull/836)) ### Other - Allow creation of tracked associated functions (without `self`) ([#859](https://github.com/salsa-rs/salsa/pull/859)) - Short-circuit `block-on` if same thread ([#862](https://github.com/salsa-rs/salsa/pull/862)) - Skip release-plz jobs on forks ([#873](https://github.com/salsa-rs/salsa/pull/873)) - Unwind with specific type when encountering an unexpected cycle ([#856](https://github.com/salsa-rs/salsa/pull/856)) - Remove jar mentions from book ([#775](https://github.com/salsa-rs/salsa/pull/775)) - Implement an `!Update` bound escape hatch for tracked fn ([#867](https://github.com/salsa-rs/salsa/pull/867)) - Only enable `boxcar/loom` when `loom` feature is enabled ([#869](https://github.com/salsa-rs/salsa/pull/869)) - Remove default `PartialOrd` and `Ord` derives for salsa-structs ([#868](https://github.com/salsa-rs/salsa/pull/868)) - update boxcar ([#865](https://github.com/salsa-rs/salsa/pull/865)) - speed-up cycle-retry logic ([#861](https://github.com/salsa-rs/salsa/pull/861)) - Fix returns(deref | as_ref | as_deref) in tracked methods ([#857](https://github.com/salsa-rs/salsa/pull/857)) - Changed `return_ref` syntax to `returns(as_ref)` and `returns(cloned)` ([#772](https://github.com/salsa-rs/salsa/pull/772)) - Work around a rust-analyzer bug ([#855](https://github.com/salsa-rs/salsa/pull/855)) - Lazy finalization of cycle participants in `maybe_changed_after` ([#854](https://github.com/salsa-rs/salsa/pull/854)) - Do not re-verify already verified memoized value in cycle verification ([#851](https://github.com/salsa-rs/salsa/pull/851)) - Pass cycle heads as out parameter for `maybe_changed_after` ([#852](https://github.com/salsa-rs/salsa/pull/852)) - Move salsa event system into `Zalsa` ([#849](https://github.com/salsa-rs/salsa/pull/849)) - gate loom dependency under feature flag ([#844](https://github.com/salsa-rs/salsa/pull/844)) - Add loom support ([#842](https://github.com/salsa-rs/salsa/pull/842)) - Clean up some unsafety ([#830](https://github.com/salsa-rs/salsa/pull/830)) ## [0.21.1](https://github.com/salsa-rs/salsa/compare/salsa-v0.21.0...salsa-v0.21.1) - 2025-04-30 ### Added - Make `attach` pub ([#832](https://github.com/salsa-rs/salsa/pull/832)) ### Other - better debug name for interned query arguments ([#837](https://github.com/salsa-rs/salsa/pull/837)) - Avoid panic in `Backtrace::capture` if `query_stack` is already borrowed ([#835](https://github.com/salsa-rs/salsa/pull/835)) - Clean up `function::execute` ([#833](https://github.com/salsa-rs/salsa/pull/833)) - Change an `assert!` to `assert_eq!` ([#828](https://github.com/salsa-rs/salsa/pull/828)) ## [0.21.0](https://github.com/salsa-rs/salsa/compare/salsa-v0.20.0...salsa-v0.21.0) - 2025-04-29 ### Fixed - Access to tracked-struct that was freed during fixpoint ([#817](https://github.com/salsa-rs/salsa/pull/817)) - correct debug output for tracked fields ([#826](https://github.com/salsa-rs/salsa/pull/826)) - Fix incorrect `values_equal` signature ([#825](https://github.com/salsa-rs/salsa/pull/825)) - allow unused lifetimes in tracked_struct expansion ([#824](https://github.com/salsa-rs/salsa/pull/824)) ### Other - Implement a query stack `Backtrace` analog ([#827](https://github.com/salsa-rs/salsa/pull/827)) - Simplify ID conversions ([#822](https://github.com/salsa-rs/salsa/pull/822)) - Attempt to fix codspeed ([#823](https://github.com/salsa-rs/salsa/pull/823)) - Remove unnecessary `Array` abstraction ([#821](https://github.com/salsa-rs/salsa/pull/821)) - Add a compile-fail test for a `'static` `!Update` struct ([#820](https://github.com/salsa-rs/salsa/pull/820)) - squelch most clippy warnings in generated code ([#809](https://github.com/salsa-rs/salsa/pull/809)) - Include struct name in formatted input-field index ([#819](https://github.com/salsa-rs/salsa/pull/819)) - Force inline `fetch_hot` ([#818](https://github.com/salsa-rs/salsa/pull/818)) - Per ingredient sync table ([#650](https://github.com/salsa-rs/salsa/pull/650)) - Use `DatabaseKey` for interned events ([#813](https://github.com/salsa-rs/salsa/pull/813)) - [refactor] More `fetch_hot` simplification ([#793](https://github.com/salsa-rs/salsa/pull/793)) - Don't store the fields in the interned map ([#812](https://github.com/salsa-rs/salsa/pull/812)) - Fix ci not always running ([#810](https://github.com/salsa-rs/salsa/pull/810)) ## [0.20.0](https://github.com/salsa-rs/salsa/compare/salsa-v0.19.0...salsa-v0.20.0) - 2025-04-22 ### Added - Drop `Debug` requirements and flip implementation defaults ([#756](https://github.com/salsa-rs/salsa/pull/756)) ### Fixed - Dereferencing freed memos when verifying provisional memos ([#788](https://github.com/salsa-rs/salsa/pull/788)) - `#[doc(hidden)]` `plumbing` module ([#781](https://github.com/salsa-rs/salsa/pull/781)) - Use `changed_at` revision when updating fields ([#778](https://github.com/salsa-rs/salsa/pull/778)) ### Other - Reduce memory usage by deduplicating type information ([#803](https://github.com/salsa-rs/salsa/pull/803)) - Make interned's `last_interned_at` equal `Revision::MAX` if they are interned outside a query ([#804](https://github.com/salsa-rs/salsa/pull/804)) - Add a third cycle mode, equivalent to old Salsa cycle behavior ([#801](https://github.com/salsa-rs/salsa/pull/801)) - Update compact_str from 0.8 to 0.9 ([#794](https://github.com/salsa-rs/salsa/pull/794)) - Implement `Update` for `ThinVec` ([#807](https://github.com/salsa-rs/salsa/pull/807)) - Don't push an unnecessary active query for `deep_verify_memo` ([#806](https://github.com/salsa-rs/salsa/pull/806)) - Inline/Outline more cold and slow paths ([#805](https://github.com/salsa-rs/salsa/pull/805)) - `#[inline]` some things ([#799](https://github.com/salsa-rs/salsa/pull/799)) - Discard unnecessary atomic load ([#780](https://github.com/salsa-rs/salsa/pull/780)) - Print query stack when encountering unexpected cycle ([#796](https://github.com/salsa-rs/salsa/pull/796)) - Remove incorrect `parallel_scope` API ([#797](https://github.com/salsa-rs/salsa/pull/797)) - [refactor] Simplify `fetch_hot` ([#792](https://github.com/salsa-rs/salsa/pull/792)) - [refactor] Reuse the same stack for all cycles heads in `validate_same_iteration` ([#791](https://github.com/salsa-rs/salsa/pull/791)) - add WillIterateCycle event ([#790](https://github.com/salsa-rs/salsa/pull/790)) - [fix] Use `validate_maybe_provisional` instead of `validate_provisional` ([#789](https://github.com/salsa-rs/salsa/pull/789)) - Use `ThinVec` for `CycleHeads` ([#787](https://github.com/salsa-rs/salsa/pull/787)) - Keep edge condvar on stack instead of allocating it in an `Arc` ([#773](https://github.com/salsa-rs/salsa/pull/773)) - allow reuse of cached provisional memos within the same cycle iteration ([#786](https://github.com/salsa-rs/salsa/pull/786)) - Implement `Lookup`/`HashEqLike` for `Arc` ([#784](https://github.com/salsa-rs/salsa/pull/784)) - Normalize imports style ([#779](https://github.com/salsa-rs/salsa/pull/779)) - Clean up `par_map` a bit ([#742](https://github.com/salsa-rs/salsa/pull/742)) - Fix typo in comment ([#777](https://github.com/salsa-rs/salsa/pull/777)) - Document most safety blocks ([#776](https://github.com/salsa-rs/salsa/pull/776)) - Use html directory for mdbook artifact ([#774](https://github.com/salsa-rs/salsa/pull/774)) - Move `verified_final` from `Memo` into `QueryRevisions` ([#769](https://github.com/salsa-rs/salsa/pull/769)) - Use `ThinVec` for `MemoTable`, halving its size ([#770](https://github.com/salsa-rs/salsa/pull/770)) - Remove unnecessary query stack acess in `block_on` ([#771](https://github.com/salsa-rs/salsa/pull/771)) - Replace memo queue with append-only vector ([#767](https://github.com/salsa-rs/salsa/pull/767)) - update boxcar ([#696](https://github.com/salsa-rs/salsa/pull/696)) - Remove extra page indirection in `Table` ([#710](https://github.com/salsa-rs/salsa/pull/710)) - update release steps ([#705](https://github.com/salsa-rs/salsa/pull/705)) - Remove some unnecessary panicking paths in cycle execution ([#765](https://github.com/salsa-rs/salsa/pull/765)) - *(perf)* Pool `ActiveQuerys` in the query stack ([#629](https://github.com/salsa-rs/salsa/pull/629)) - Resolve unwind safety fixme ([#761](https://github.com/salsa-rs/salsa/pull/761)) - Enable Garbage Collection for Interned Values ([#602](https://github.com/salsa-rs/salsa/pull/602)) - bug [salsa-macros]: Improve debug name of tracked methods ([#755](https://github.com/salsa-rs/salsa/pull/755)) - Remove dead code ([#764](https://github.com/salsa-rs/salsa/pull/764)) - Reduce unnecessary conditional work in `deep_verify_memo` ([#759](https://github.com/salsa-rs/salsa/pull/759)) - Use a `Vec` for `CycleHeads` ([#760](https://github.com/salsa-rs/salsa/pull/760)) - Use nextest for miri test runs ([#758](https://github.com/salsa-rs/salsa/pull/758)) - Pin `half` version to prevent CI failure ([#757](https://github.com/salsa-rs/salsa/pull/757)) - rewrite cycle handling to support fixed-point iteration ([#603](https://github.com/salsa-rs/salsa/pull/603)) ## [0.19.0](https://github.com/salsa-rs/salsa/compare/salsa-v0.18.0...salsa-v0.19.0) - 2025-03-10 ### Fixed - fix typo - fix enums bug ### Other - Have salsa not depend on salsa-macros ([#750](https://github.com/salsa-rs/salsa/pull/750)) - Group versions of packages together for releases ([#751](https://github.com/salsa-rs/salsa/pull/751)) - use `portable-atomic` in `IngredientCache` to compile on `powerpc-unknown-linux-gnu` ([#749](https://github.com/salsa-rs/salsa/pull/749)) - Store view downcaster in function ingredients directly ([#720](https://github.com/salsa-rs/salsa/pull/720)) - Some small perf things ([#744](https://github.com/salsa-rs/salsa/pull/744)) - :replace instead of std::mem::replace ([#746](https://github.com/salsa-rs/salsa/pull/746)) - Cleanup `Cargo.toml`s ([#745](https://github.com/salsa-rs/salsa/pull/745)) - Drop clone requirement for accumulated values - implement `Update` trait for `IndexMap`, and `IndexSet` - more correct bounds on `Send` and `Sync` implementation `DeletedEntries` - replace `arc-swap` with manual `AtomicPtr` - Remove unnecessary `current_revision` call from `setup_interned_struct` - Merge pull request #731 from Veykril/veykril/push-nzkwqzxxkxou - Remove some dynamically dispatched `Database::event` calls - Lazy fetching - Add small supertype input benchmark - Replace a `DashMap` with `RwLock` as writing is rare for it - address review comments - Skip memo ingredient index mapping for non enum tracked functions - Trade off a bit of memory for more speed in `MemoIngredientIndices` - Introduce Salsa enums - Cancel duplicate test workflow runs - implement `Update` trait for `hashbrown::HashMap` - Move `unwind_if_revision_cancelled` from `ZalsaLocal` to `Zalsa` - Don't clone strings in benchmarks - Merge pull request #714 from Veykril/veykril/push-synxntlkqqsq - Merge pull request #711 from Veykril/veykril/push-stmmwmtprovt - Merge pull request #715 from Veykril/veykril/push-plwpsqknwulq - Enforce `unsafe_op_in_unsafe_fn` - Remove some `ZalsaDatabase::zalsa` calls - Remove outdated FIXME - Replace `IngredientCache` lock with atomic primitive - Reduce method delegation duplication - Automatically clear the cancellation flag when cancellation completes - Allow trigger LRU eviction without increasing the current revision - Simplify `Ingredient::reset_for_new_revision` setup - Require mut Zalsa access for setting the lru limit - Split off revision bumping from `zalsa_mut` access - Update `hashbrown` (0.15) and `hashlink` (0.10) # 0.13.0 - **Breaking change:** adopt the new `Durability` API proposed in [RFC #6] - this replaces and generalizes the existing concepts of constants - **Breaking change:** remove "volatile" queries - instead, create a normal query which invokes the `report_untracked_read` method on the salsa runtime - introduce "slots", an optimization to salsa's internal workings - document `#[salsa::requires]` attribute, which permits private dependencies - Adopt `AtomicU64` for `runtimeId` (#182) - use `ptr::eq` and `ptr::hash` for readability - upgrade parking lot, rand dependencies [RFC #6]: https://github.com/salsa-rs/salsa-rfcs/pull/6 [[package]] name = "salsa" version_group = "salsa" [[package]] name = "salsa-macros" version_group = "salsa" [[package]] name = "salsa-macro-rules" version_group = "salsa" #[cfg(feature = "accumulator")] use crate::accumulator::accumulated_map::InputAccumulatedValues; use crate::cycle::{CycleHeads, CycleRecoveryStrategy, ProvisionalStatus}; use crate::function::memo::{Memo, TryClaimCycleHeadsIter, TryClaimHeadsResult}; use crate::function::sync::ClaimResult; use crate::function::{Configuration, IngredientImpl, Reentrancy}; use std::sync::atomic::Ordering; use crate::key::DatabaseKeyIndex; use crate::zalsa::{MemoIngredientIndex, Zalsa, ZalsaDatabase}; use crate::zalsa_local::{QueryEdge, QueryEdgeKind, QueryOriginRef, QueryRevisions, ZalsaLocal}; use crate::{Id, Revision}; /// Result of memo validation. #[derive(Debug, Copy, Clone)] pub enum VerifyResult { /// Memo has changed and needs to be recomputed. Changed, /// Memo remains valid. /// /// The inner value tracks whether the memo or any of its dependencies have an /// accumulated value. Unchanged { #[cfg(feature = "accumulator")] accumulated: InputAccumulatedValues, }, } impl VerifyResult { pub(crate) const fn changed_if(changed: bool) -> Self { if changed { Self::changed() } else { Self::unchanged() } } pub(crate) const fn changed() -> Self { Self::Changed } pub(crate) const fn unchanged() -> Self { Self::Unchanged { #[cfg(feature = "accumulator")] accumulated: InputAccumulatedValues::Empty, } } #[inline] #[cfg(feature = "accumulator")] pub(crate) fn unchanged_with_accumulated(accumulated: InputAccumulatedValues) -> Self { Self::Unchanged { accumulated } } #[inline] #[cfg(not(feature = "accumulator"))] pub(crate) fn unchanged_with_accumulated() -> Self { Self::unchanged() } pub(crate) const fn is_unchanged(&self) -> bool { matches!(self, Self::Unchanged { .. }) } } impl IngredientImpl where C: Configuration, { pub(super) fn maybe_changed_after<'db>( &'db self, db: &'db C::DbView, id: Id, revision: Revision, ) -> VerifyResult { let (zalsa, zalsa_local) = db.zalsas(); let memo_ingredient_index = self.memo_ingredient_index(zalsa, id); zalsa.unwind_if_revision_cancelled(zalsa_local); loop { let database_key_index = self.database_key_index(id); crate::tracing::debug!( "{database_key_index:?}: maybe_changed_after(revision = {revision:?})" ); // Check if we have a verified version: this is the hot path. let memo_guard = self.get_memo_from_table_for(zalsa, id, memo_ingredient_index); let Some(memo) = memo_guard else { // No memo? Assume has changed. return VerifyResult::changed(); }; let can_shallow_update = self.shallow_verify_memo(zalsa, database_key_index, memo); if can_shallow_update.yes() && !memo.may_be_provisional() { self.update_shallow(zalsa, database_key_index, memo, can_shallow_update); return if memo.revisions.changed_at > revision { VerifyResult::changed() } else { VerifyResult::unchanged_with_accumulated( #[cfg(feature = "accumulator")] { memo.revisions.accumulated_inputs.load() }, ) }; } if let Some(mcs) = self.maybe_changed_after_cold( zalsa, zalsa_local, db, id, revision, memo_ingredient_index, ) { return mcs; } else { // We failed to claim, have to retry. } } } #[inline(never)] fn maybe_changed_after_cold<'db>( &'db self, zalsa: &Zalsa, zalsa_local: &ZalsaLocal, db: &'db C::DbView, key_index: Id, revision: Revision, memo_ingredient_index: MemoIngredientIndex, ) -> Option { let database_key_index = self.database_key_index(key_index); let claim_guard = match self .sync_table .try_claim(zalsa, zalsa_local, key_index, Reentrancy::Deny) { ClaimResult::Claimed(guard) => guard, ClaimResult::Running(blocked_on) => { let _ = blocked_on.block_on(zalsa); return None; } ClaimResult::Cycle { .. } => { return Some(maybe_changed_after_cold_cycle( zalsa_local, database_key_index, C::CYCLE_STRATEGY, )); } }; // Load the current memo, if any. let Some(old_memo) = self.get_memo_from_table_for(zalsa, key_index, memo_ingredient_index) else { return Some(VerifyResult::changed()); }; crate::tracing::debug!( "{database_key_index:?}: maybe_changed_after_cold, successful claim, \ revision = {revision:?}, old_memo = {old_memo:#?}", old_memo = old_memo.tracing_debug() ); let can_shallow_update = self.shallow_verify_memo(zalsa, database_key_index, old_memo); if can_shallow_update.yes() && self.validate_may_be_provisional(zalsa, zalsa_local, database_key_index, old_memo) { self.update_shallow(zalsa, database_key_index, old_memo, can_shallow_update); return Some(if old_memo.revisions.changed_at > revision { VerifyResult::changed() } else { VerifyResult::unchanged_with_accumulated( #[cfg(feature = "accumulator")] { old_memo.revisions.accumulated_inputs.load() }, ) }); } let deep_verify = self.deep_verify_memo(db, zalsa, old_memo, database_key_index); if deep_verify.is_unchanged() { // Check if the inputs are still valid. We can just compare `changed_at`. return Some(if old_memo.revisions.changed_at > revision { VerifyResult::changed() } else { // Returns unchanged but propagates the accumulated values deep_verify }); } // If inputs have changed, but we have an old value, we can re-execute. // It is possible the result will be equal to the old value and hence // backdated. In that case, although we will have computed a new memo, // the value has not logically changed. if old_memo.value.is_some() && !old_memo.may_be_provisional() { let memo = self.execute(db, claim_guard, Some(old_memo))?; let changed_at = memo.revisions.changed_at; // Always assume that a provisional value has changed. // // We don't know if a provisional value has actually changed. To determine whether a provisional // value has changed, we need to iterate the outer cycle, which cannot be done here. return Some(if changed_at > revision || memo.may_be_provisional() { VerifyResult::changed() } else { VerifyResult::unchanged_with_accumulated( #[cfg(feature = "accumulator")] match memo.revisions.accumulated() { Some(_) => InputAccumulatedValues::Any, None => memo.revisions.accumulated_inputs.load(), }, ) }); } // Otherwise, nothing for it: have to consider the value to have changed. Some(VerifyResult::changed()) } /// `Some` if the memo's value and `changed_at` time is still valid in this revision. /// Does only a shallow O(1) check, doesn't walk the dependencies. /// /// In general, a provisional memo (from cycle iteration) does not verify. Since we don't /// eagerly finalize all provisional memos in cycle iteration, we have to lazily check here /// (via `validate_provisional`) whether a may-be-provisional memo should actually be verified /// final, because its cycle heads are all now final. #[inline] pub(super) fn shallow_verify_memo( &self, zalsa: &Zalsa, database_key_index: DatabaseKeyIndex, memo: &Memo<'_, C>, ) -> ShallowUpdate { crate::tracing::debug!( "{database_key_index:?}: shallow_verify_memo(memo = {memo:#?})", memo = memo.tracing_debug() ); let verified_at = memo.verified_at.load(); let revision_now = zalsa.current_revision(); if verified_at == revision_now { // Already verified. return ShallowUpdate::Verified; } let last_changed = zalsa.last_changed_revision(memo.revisions.durability); crate::tracing::trace!( "{database_key_index:?}: check_durability({database_key_index:#?}, last_changed={:?} <= verified_at={:?}) = {:?}", last_changed, verified_at, last_changed <= verified_at, ); if last_changed <= verified_at { // No input of the suitable durability has changed since last verified. ShallowUpdate::HigherDurability } else { ShallowUpdate::No } } #[inline] pub(super) fn update_shallow( &self, zalsa: &Zalsa, database_key_index: DatabaseKeyIndex, memo: &Memo<'_, C>, update: ShallowUpdate, ) { if let ShallowUpdate::HigherDurability = update { memo.mark_as_verified(zalsa, database_key_index); memo.mark_outputs_as_verified(zalsa, database_key_index); } } /// Validates this memo if it is a provisional memo. Returns true for: /// * non provisional memos /// * provisional memos that have been successfully marked as verified final, that is, its /// cycle heads have all been finalized. /// * provisional memos that have been created in the same revision and iteration and are part of the same cycle. #[inline] pub(super) fn validate_may_be_provisional( &self, zalsa: &Zalsa, zalsa_local: &ZalsaLocal, database_key_index: DatabaseKeyIndex, memo: &Memo<'_, C>, ) -> bool { if !memo.may_be_provisional() { return true; } let cycle_heads = memo.cycle_heads(); if cycle_heads.is_empty() { return true; } crate::tracing::trace!( "{database_key_index:?}: validate_may_be_provisional(memo = {memo:#?})", memo = memo.tracing_debug() ); let verified_at = memo.verified_at.load(); validate_provisional( zalsa, database_key_index, &memo.revisions, verified_at, cycle_heads, ) || validate_same_iteration( zalsa, zalsa_local, database_key_index, verified_at, cycle_heads, ) } /// VerifyResult::Unchanged if the memo's value and `changed_at` time is up-to-date in the /// current revision. When this returns Unchanged with no cycle heads, it also updates the /// memo's `verified_at` field if needed to make future calls cheaper. /// /// Takes an [`ActiveQueryGuard`] argument because this function recursively /// walks dependencies of `old_memo` and may even execute them to see if their /// outputs have changed. pub(super) fn deep_verify_memo( &self, db: &C::DbView, zalsa: &Zalsa, old_memo: &Memo<'_, C>, database_key_index: DatabaseKeyIndex, ) -> VerifyResult { match old_memo.revisions.origin.as_ref() { QueryOriginRef::Derived(edges) => { crate::tracing::debug!( "{database_key_index:?}: deep_verify_memo(old_memo = {old_memo:#?})", old_memo = old_memo.tracing_debug() ); let is_provisional = old_memo.may_be_provisional(); // If the value is from the same revision but is still provisional, consider it changed // because we're now in a new iteration. if is_provisional { return VerifyResult::changed(); } // If the old memo participate in a cycle, but the query doesn't have cycle handling, // always return changed. The reasoning here is: // // * cycle heads flatten their dependecies. Therefore, no query with cycle handling // participating in the same cycle should ever call `maybe_changed_after` on any other query. // (we don't get here). // * the query can't be reached from any other query without cycle handling because, // executing it would immediately panic because of the cycle. // * The only other place where we can reach this code is from `fetch`, this is when // the outer cycle is being re-executed. Given that the cycle re-executes, this // query must always be considered changed. // // For queries with cycle handling, verify the flattened // dependencies of the cycle head instead. if C::CYCLE_STRATEGY == CycleRecoveryStrategy::Panic && old_memo.was_cycle_participant() { return VerifyResult::changed(); } let verified_at = old_memo.verified_at.load(); let result = deep_verify_edges( db.into(), zalsa, &old_memo.revisions, verified_at, edges, database_key_index, ); if result.is_unchanged() { old_memo.mark_as_verified(zalsa, database_key_index); } result } QueryOriginRef::Assigned(_) => { // If the value was assigned by another query, // and that query were up-to-date, // then we would have updated the `verified_at` field already. // So the fact that we are here means that it was not specified // during this revision or is otherwise stale. // // Example of how this can happen: // // Conditionally specified queries // where the value is specified // in rev 1 but not in rev 2. VerifyResult::changed() } QueryOriginRef::DerivedUntracked(_) => { // Untracked inputs? Have to assume that it changed. VerifyResult::changed() } } } } fn maybe_changed_after_cold_cycle( zalsa_local: &ZalsaLocal, database_key_index: DatabaseKeyIndex, cycle_recovery_strategy: CycleRecoveryStrategy, ) -> VerifyResult { match cycle_recovery_strategy { // SAFETY: We do not access the query stack reentrantly. CycleRecoveryStrategy::Panic => unsafe { zalsa_local.with_query_stack_unchecked(|stack| { panic!( "dependency graph cycle when validating {database_key_index:#?}, \ set cycle_fn/cycle_initial to fixpoint iterate.\n\ Query stack:\n{stack:#?}", ); }) }, // We flatten the dependencies of queries with cycle handling that participate in a query. // Verifying those queries should never result in a cycle because all function dependencies were removed. // That means, if we hit this path, then some query introduced a new cycle that didn't exist // in the previous revision. We have to consider this query changed so that we ultimately // insert the fixpoint initial value in `fetch_cold_cycle`. CycleRecoveryStrategy::FallbackImmediate | CycleRecoveryStrategy::Fixpoint => { crate::tracing::debug!( "hit cycle at {database_key_index:?} in `maybe_changed_after`, returning changed", ); VerifyResult::changed() } } } fn deep_verify_edges( db: crate::database::RawDatabase, zalsa: &Zalsa, #[allow(unused)] old_revisions: &QueryRevisions, old_verified_at: Revision, edges: &[QueryEdge], database_key_index: DatabaseKeyIndex, ) -> VerifyResult { #[cfg(feature = "accumulator")] let mut inputs = InputAccumulatedValues::Empty; // Fully tracked inputs? Iterate over the inputs and check them, one by one. // // NB: It's important here that we are iterating the inputs in the order that // they executed. It's possible that if the value of some input I0 is no longer // valid, then some later input I1 might never have executed at all, so verifying // it is still up to date is meaningless. for &edge in edges { match edge.kind() { QueryEdgeKind::Input(dependency_index) => { let input_result = dependency_index.maybe_changed_after(db, zalsa, old_verified_at); match input_result { VerifyResult::Changed => { return VerifyResult::changed(); } #[cfg(feature = "accumulator")] VerifyResult::Unchanged { accumulated } => { inputs |= accumulated; } #[cfg(not(feature = "accumulator"))] VerifyResult::Unchanged { .. } => {} } } QueryEdgeKind::Output(dependency_index) => { // Subtle: Mark outputs as validated now, even though we may // later find an input that requires us to re-execute the function. // Even if it re-execute, the function will wind up writing the same value, // since all prior inputs were green. It's important to do this during // this loop, because it's possible that one of our input queries will // re-execute and may read one of our earlier outputs // (e.g., in a scenario where we do something like // `e = Entity::new(..); query(e);` and `query` reads a field of `e`). // // NB. Accumulators are also outputs, but the above logic doesn't // quite apply to them. Since multiple values are pushed, the first value // may be unchanged, but later values could be different. // In that case, however, the data accumulated // by this function cannot be read until this function is marked green, // so even if we mark them as valid here, the function will re-execute // and overwrite the contents. dependency_index.mark_validated_output(zalsa, database_key_index); } } } let result = VerifyResult::unchanged_with_accumulated( #[cfg(feature = "accumulator")] inputs, ); // This value is only read once the memo is verified. It's therefore safe // to write a non-final value here. #[cfg(feature = "accumulator")] old_revisions.accumulated_inputs.store(inputs); result } /// Check if this memo's cycle heads have all been finalized. If so, mark it verified final and /// return true, if not return false. fn validate_provisional( zalsa: &Zalsa, database_key_index: DatabaseKeyIndex, memo_revisions: &QueryRevisions, memo_verified_at: Revision, cycle_heads: &CycleHeads, ) -> bool { crate::tracing::trace!("{database_key_index:?}: validate_provisional({database_key_index:?})",); // Test if our cycle heads (with the same revision) are now finalized. for cycle_head in cycle_heads { let Some(provisional_status) = zalsa .lookup_ingredient(cycle_head.database_key_index.ingredient_index()) .provisional_status(zalsa, cycle_head.database_key_index.key_index()) else { return false; }; match provisional_status { ProvisionalStatus::Provisional { .. } => return false, ProvisionalStatus::Final { iteration, verified_at, .. } => { // Only consider the cycle head if it is from the same revision as the memo if verified_at != memo_verified_at { return false; } // It's important to also account for the iteration for the case where: // thread 1: `b` -> `a` (but only in the first iteration) // -> `c` -> `b` // thread 2: `a` -> `b` // // If we don't account for the iteration, then `a` (from iteration 0) will be finalized // because its cycle head `b` is now finalized, but `b` never pulled `a` in the last iteration. if iteration != cycle_head.iteration_count.load() { return false; } } } } // Relaxed is sufficient here because there are no other writes we need to ensure have // happened before marking this memo as verified-final. memo_revisions.verified_final.store(true, Ordering::Relaxed); true } /// If this is a provisional memo, validate that it was cached in the same iteration of the /// same cycle(s) that we are still executing. If so, it is valid for reuse. This avoids /// runaway re-execution of the same queries within a fixpoint iteration. fn validate_same_iteration( zalsa: &Zalsa, zalsa_local: &ZalsaLocal, memo_database_key_index: DatabaseKeyIndex, memo_verified_at: Revision, cycle_heads: &CycleHeads, ) -> bool { crate::tracing::trace!("validate_same_iteration({memo_database_key_index:?})",); // This is an optimization to avoid unnecessary re-execution within the same revision. // Don't apply it when verifying memos from past revisions. We want them to re-execute // to verify their cycle heads and all participating queries. if memo_verified_at != zalsa.current_revision() { return false; } // Always return `false` for cycle initial values "unless" they are running in the same thread. if cycle_heads .iter_not_eq(memo_database_key_index) .next() .is_none() { // SAFETY: We do not access the query stack reentrantly. let on_stack = unsafe { zalsa_local.with_query_stack_unchecked(|stack| { stack .iter() .rev() .any(|query| query.database_key_index == memo_database_key_index) }) }; return on_stack; } let cycle_heads_iter = TryClaimCycleHeadsIter::new(zalsa, cycle_heads); for cycle_head in cycle_heads_iter { match cycle_head { TryClaimHeadsResult::Cycle { head_iteration_count, memo_iteration_count: current_iteration_count, verified_at: head_verified_at, } => { if head_verified_at != memo_verified_at { return false; } if head_iteration_count != current_iteration_count { return false; } } _ => { return false; } } } true } #[derive(Copy, Clone, Eq, PartialEq)] pub(super) enum ShallowUpdate { /// The memo is from this revision and has already been verified Verified, /// The revision for the memo's durability hasn't changed. It can be marked as verified /// in this revision. HigherDurability, /// The memo requires a deep verification. No, } impl ShallowUpdate { pub(super) fn yes(&self) -> bool { matches!( self, ShallowUpdate::Verified | ShallowUpdate::HigherDurability ) } } #![cfg(feature = "inventory")] //! Tests for incremental validation for queries involved in a cycle. mod common; use crate::common::EventLoggerDatabase; use salsa::{Database, Durability, Setter}; #[salsa::input(debug)] struct Input { value: u32, max: u32, } #[salsa::interned(debug)] struct Output<'db> { value: u32, } #[salsa::tracked(cycle_initial=query_a_initial)] fn query_c(db: &dyn salsa::Database, input: Input) -> u32 { query_d(db, input) } #[salsa::tracked] fn query_d(db: &dyn salsa::Database, input: Input) -> u32 { let value = query_c(db, input); if value < input.max(db) * 2 { // Only the first iteration depends on value but the entire // cycle must re-run if input changes. let result = value + input.value(db); Output::new(db, result); result } else { value } } fn query_a_initial(_db: &dyn Database, _id: salsa::Id, _input: Input) -> u32 { 0 } /// Only the first iteration depends on `input.value`. It's important that the entire query /// reruns if `input.value` changes. That's why salsa has to carry-over the inputs and outputs /// from the previous iteration. #[test_log::test] fn first_iteration_input_only() { #[salsa::tracked(cycle_initial=query_a_initial)] fn query_a(db: &dyn salsa::Database, input: Input) -> u32 { query_b(db, input) } #[salsa::tracked] fn query_b(db: &dyn salsa::Database, input: Input) -> u32 { let value = query_a(db, input); if value < input.max(db) { // Only the first iteration depends on value but the entire // cycle must re-run if input changes. value + input.value(db) } else { value } } let mut db = EventLoggerDatabase::default(); let input = Input::builder(4, 5).durability(Durability::MEDIUM).new(&db); { let result = query_a(&db, input); assert_eq!(result, 8); } { input.set_value(&mut db).to(3); let result = query_a(&db, input); assert_eq!(result, 6); } } /// Very similar to the previous test, but the difference is that the called function /// isn't the cycle head and that `cycle_participant` is called from /// both the `cycle_head` and the `entry` function. #[test_log::test] fn nested_cycle_fewer_dependencies_in_first_iteration() { #[salsa::interned(debug)] struct ClassLiteral<'db> { scope: Scope<'db>, } #[salsa::tracked] impl<'db> ClassLiteral<'db> { #[salsa::tracked] fn context(self, db: &'db dyn salsa::Database) -> u32 { let scope = self.scope(db); // Access a field on `scope` that changed in the new revision. scope.field(db) } } #[salsa::tracked(debug)] struct Scope<'db> { field: u32, } #[salsa::tracked] fn create_interned<'db>(db: &'db dyn salsa::Database, scope: Scope<'db>) -> ClassLiteral<'db> { ClassLiteral::new(db, scope) } #[derive(Eq, PartialEq, Debug, salsa::Update)] struct Index<'db> { scope: Scope<'db>, } #[salsa::tracked(cycle_initial=head_initial)] fn cycle_head(db: &dyn salsa::Database, input: Input) -> Option> { let b = cycle_outer(db, input); tracing::info!("query_b = {b:?}"); b.or_else(|| { let index = index(db, input); Some(create_interned(db, index.scope)) }) } fn head_initial(_db: &dyn Database, _id: salsa::Id, _input: Input) -> Option> { None } #[salsa::tracked] fn cycle_outer(db: &dyn salsa::Database, input: Input) -> Option> { cycle_participant(db, input) } #[salsa::tracked] fn cycle_participant(db: &dyn salsa::Database, input: Input) -> Option> { let value = cycle_head(db, input); tracing::info!("cycle_head = {value:?}"); if let Some(value) = value { value.context(db); Some(value) } else { None } } #[salsa::tracked(returns(ref))] fn index(db: &dyn salsa::Database, input: Input) -> Index<'_> { Index { scope: Scope::new(db, input.value(db) * 2), } } #[salsa::tracked] fn entry(db: &dyn salsa::Database, input: Input) -> u32 { let _ = input.value(db); let head = cycle_head(db, input); let participant = cycle_participant(db, input); tracing::debug!("head: {head:?}, participant: {participant:?}"); head.or(participant) .map(|class| class.scope(db).field(db)) .unwrap_or(0) } let mut db = EventLoggerDatabase::default(); let input = Input::builder(3, 5) .max_durability(Durability::HIGH) .value_durability(Durability::LOW) .new(&db); { let result = entry(&db, input); assert_eq!(result, 6); } db.synthetic_write(Durability::MEDIUM); { input.set_value(&mut db).to(4); let result = entry(&db, input); assert_eq!(result, 8); } } #![cfg(feature = "inventory")] //! Test that if field X of a tracked struct changes but not field Y, //! functions that depend on X re-execute, but those depending only on Y do not //! compiles and executes successfully. #![allow(dead_code)] mod common; use common::LogDatabase; use expect_test::expect; use salsa::Setter; #[salsa::input(debug)] struct MyInput { field: u32, } #[salsa::tracked] fn final_result_depends_on_x(db: &dyn LogDatabase, input: MyInput) -> u32 { db.push_log(format!("final_result_depends_on_x({input:?})")); intermediate_result(db, input).x(db) * 2 } #[salsa::tracked] fn final_result_depends_on_y(db: &dyn LogDatabase, input: MyInput) -> u32 { db.push_log(format!("final_result_depends_on_y({input:?})")); intermediate_result(db, input).y(db) * 2 } #[salsa::tracked] struct MyTracked<'db> { #[tracked] x: u32, #[tracked] y: u32, } #[salsa::tracked] fn intermediate_result(db: &dyn LogDatabase, input: MyInput) -> MyTracked<'_> { MyTracked::new(db, input.field(db).div_ceil(2), input.field(db) / 2) } #[test] fn execute() { // x = (input.field + 1) / 2 // y = input.field / 2 // final_result_depends_on_x = x * 2 = (input.field + 1) / 2 * 2 // final_result_depends_on_y = y * 2 = input.field / 2 * 2 let mut db = common::LoggerDatabase::default(); // intermediate results: // x = (22 + 1) / 2 = 11 // y = 22 / 2 = 11 let input = MyInput::new(&db, 22); assert_eq!(final_result_depends_on_x(&db, input), 22); db.assert_logs(expect![[r#" [ "final_result_depends_on_x(MyInput { [salsa id]: Id(0), field: 22 })", ]"#]]); assert_eq!(final_result_depends_on_y(&db, input), 22); db.assert_logs(expect![[r#" [ "final_result_depends_on_y(MyInput { [salsa id]: Id(0), field: 22 })", ]"#]]); input.set_field(&mut db).to(23); // x = (23 + 1) / 2 = 12 // Intermediate result x changes, so final result depends on x // needs to be recomputed; assert_eq!(final_result_depends_on_x(&db, input), 24); db.assert_logs(expect![[r#" [ "final_result_depends_on_x(MyInput { [salsa id]: Id(0), field: 23 })", ]"#]]); // y = 23 / 2 = 11 // Intermediate result y is the same, so final result depends on y // does not need to be recomputed; assert_eq!(final_result_depends_on_y(&db, input), 22); db.assert_logs(expect!["[]"]); } #![cfg(feature = "inventory")] //! Test that if field X of an input changes but not field Y, //! functions that depend on X re-execute, but those depending only on Y do not //! compiles and executes successfully. #![allow(dead_code)] mod common; use common::LogDatabase; use expect_test::expect; use salsa::Setter; #[salsa::input(debug)] struct MyInput { x: u32, y: u32, } #[salsa::tracked] fn result_depends_on_x(db: &dyn LogDatabase, input: MyInput) -> u32 { db.push_log(format!("result_depends_on_x({input:?})")); input.x(db) + 1 } #[salsa::tracked] fn result_depends_on_y(db: &dyn LogDatabase, input: MyInput) -> u32 { db.push_log(format!("result_depends_on_y({input:?})")); input.y(db) - 1 } #[test] fn execute() { // result_depends_on_x = x + 1 // result_depends_on_y = y - 1 let mut db = common::LoggerDatabase::default(); let input = MyInput::new(&db, 22, 33); assert_eq!(result_depends_on_x(&db, input), 23); db.assert_logs(expect![[r#" [ "result_depends_on_x(MyInput { [salsa id]: Id(0), x: 22, y: 33 })", ]"#]]); assert_eq!(result_depends_on_y(&db, input), 32); db.assert_logs(expect![[r#" [ "result_depends_on_y(MyInput { [salsa id]: Id(0), x: 22, y: 33 })", ]"#]]); input.set_x(&mut db).to(23); // input x changes, so result depends on x needs to be recomputed; assert_eq!(result_depends_on_x(&db, input), 24); db.assert_logs(expect![[r#" [ "result_depends_on_x(MyInput { [salsa id]: Id(0), x: 23, y: 33 })", ]"#]]); // input y is the same, so result depends on y // does not need to be recomputed; assert_eq!(result_depends_on_y(&db, input), 32); db.assert_logs(expect!["[]"]); } //! Test a deeply nested-cycle scenario where cycles have changing query dependencies. //! //! The trick is that different threads call into the same cycle from different entry queries and //! the cycle heads change over different iterations //! //! * Thread 1: `a` -> `b` -> `c` //! * Thread 2: `b` //! * Thread 3: `d` -> `c` //! * Thread 4: `e` -> `c` //! //! `c` calls: //! * `d` and `a` in the first few iterations //! * `d`, `b` and `e` in the last iterations //! //! Specifically, the maybe_changed_after flow. use crate::sync::thread; #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Copy, salsa::Update)] struct CycleValue(u32); const MIN: CycleValue = CycleValue(0); const MAX: CycleValue = CycleValue(3); #[salsa::input] struct Input { value: u32, } #[salsa::tracked(cycle_initial=initial)] fn query_a(db: &dyn salsa::Database, input: Input) -> CycleValue { query_b(db, input) } #[salsa::tracked(cycle_initial=initial)] fn query_b(db: &dyn salsa::Database, input: Input) -> CycleValue { let c_value = query_c(db, input); CycleValue(c_value.0 + input.value(db).max(1)).min(MAX) } #[salsa::tracked(cycle_initial=initial)] fn query_c(db: &dyn salsa::Database, input: Input) -> CycleValue { let d_value = query_d(db, input); if d_value > CycleValue(0) { let e_value = query_e(db, input); let b_value = query_b(db, input); CycleValue(d_value.0.max(e_value.0).max(b_value.0)) } else { let a_value = query_a(db, input); CycleValue(d_value.0.max(a_value.0)) } } #[salsa::tracked(cycle_initial=initial)] fn query_d(db: &dyn salsa::Database, input: Input) -> CycleValue { query_c(db, input) } #[salsa::tracked(cycle_initial=initial)] fn query_e(db: &dyn salsa::Database, input: Input) -> CycleValue { query_c(db, input) } fn initial(_db: &dyn salsa::Database, _id: salsa::Id, _input: Input) -> CycleValue { MIN } #[test_log::test] fn the_test() { use crate::sync; use salsa::Setter as _; sync::check(|| { tracing::debug!("Starting new run"); // This is a bit silly but it works around https://github.com/awslabs/shuttle/issues/192 static INITIALIZE: sync::Mutex> = sync::Mutex::new(None); fn get_db(f: impl FnOnce(&salsa::DatabaseImpl, Input)) -> (salsa::DatabaseImpl, Input) { let mut shared = INITIALIZE.lock().unwrap(); if let Some((db, input)) = shared.as_ref() { return (db.clone(), *input); } let mut db = salsa::DatabaseImpl::default(); let input = Input::new(&db, 0); f(&db, input); input.set_value(&mut db).to(1); *shared = Some((db.clone(), input)); (db, input) } let t1 = thread::spawn(move || { let _span = tracing::info_span!("t1", thread_id = ?thread::current().id()).entered(); let (db, input) = get_db(|db, input| { query_a(db, input); }); query_a(&db, input) }); let t2 = thread::spawn(move || { let _span = tracing::info_span!("t2", thread_id = ?thread::current().id()).entered(); let (db, input) = get_db(|db, input| { query_b(db, input); }); query_b(&db, input) }); let t3 = thread::spawn(move || { let _span = tracing::info_span!("t3", thread_id = ?thread::current().id()).entered(); let (db, input) = get_db(|db, input| { query_d(db, input); }); query_d(&db, input) }); let t4 = thread::spawn(move || { let _span = tracing::info_span!("t4", thread_id = ?thread::current().id()).entered(); let (db, input) = get_db(|db, input| { query_e(db, input); }); query_e(&db, input) }); let r_t1 = t1.join().unwrap(); let r_t2 = t2.join().unwrap(); let r_t3 = t3.join().unwrap(); let r_t4 = t4.join().unwrap(); assert_eq!((r_t1, r_t2, r_t3, r_t4), (MAX, MAX, MAX, MAX)); }); } //! Test a nested-cycle scenario across three threads: //! //! ```text //! Thread T1 Thread T2 Thread T3 //! --------- --------- --------- //! | | | //! v | | //! query_a() | | //! ^ | v | //! | +------------> query_b() | //! | ^ | v //! | | +------------> query_c() //! | | | //! +------------------+--------------------+ //! ``` //! //! Specifically, the maybe_changed_after flow. use crate::sync; use crate::sync::thread; use salsa::{DatabaseImpl, Setter as _}; #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Copy, salsa::Update)] struct CycleValue(u32); const MIN: CycleValue = CycleValue(0); const MAX: CycleValue = CycleValue(3); #[salsa::input] struct Input { value: u32, } // Signal 1: T1 has entered `query_a` // Signal 2: T2 has entered `query_b` // Signal 3: T3 has entered `query_c` #[salsa::tracked(cycle_initial=initial)] fn query_a(db: &dyn salsa::Database, input: Input) -> CycleValue { query_b(db, input) } #[salsa::tracked(cycle_initial=initial)] fn query_b(db: &dyn salsa::Database, input: Input) -> CycleValue { let c_value = query_c(db, input); CycleValue(c_value.0 + input.value(db)).min(MAX) } #[salsa::tracked(cycle_initial=initial)] fn query_c(db: &dyn salsa::Database, input: Input) -> CycleValue { let a_value = query_a(db, input); let b_value = query_b(db, input); CycleValue(a_value.0.max(b_value.0)) } fn initial(_db: &dyn salsa::Database, _id: salsa::Id, _input: Input) -> CycleValue { MIN } #[test_log::test] fn the_test() { crate::sync::check(move || { // This is a bit silly but it works around https://github.com/awslabs/shuttle/issues/192 static INITIALIZE: sync::Mutex> = sync::Mutex::new(None); fn get_db(f: impl FnOnce(&salsa::DatabaseImpl, Input)) -> (salsa::DatabaseImpl, Input) { let mut shared = INITIALIZE.lock().unwrap(); if let Some((db, input)) = shared.as_ref() { return (db.clone(), *input); } let mut db = DatabaseImpl::default(); let input = Input::new(&db, 1); f(&db, input); input.set_value(&mut db).to(2); *shared = Some((db.clone(), input)); (db, input) } let t1 = thread::spawn(|| { let (db, input) = get_db(|db, input| { query_a(db, input); }); query_a(&db, input) }); let t2 = thread::spawn(|| { let (db, input) = get_db(|db, input| { query_b(db, input); }); query_b(&db, input) }); let t3 = thread::spawn(|| { let (db, input) = get_db(|db, input| { query_c(db, input); }); query_c(&db, input) }); let r_t1 = t1.join().unwrap(); let r_t2 = t2.join().unwrap(); let r_t3 = t3.join().unwrap(); assert_eq!((r_t1, r_t2, r_t3), (MAX, MAX, MAX)); }); } #![cfg(feature = "inventory")] use salsa::{Database as Db, Setter}; use test_log::test; #[salsa::input] struct MyInput { field: u32, } #[salsa::tracked] struct MyTracked<'db> { field: u32, } #[salsa::tracked] fn tracked_fn(db: &dyn Db, input: MyInput) -> MyTracked<'_> { MyTracked::new(db, input.field(db) / 2) } #[test] fn execute() { let mut db = salsa::DatabaseImpl::new(); let input1 = MyInput::new(&db, 22); let input2 = MyInput::new(&db, 44); let _tracked1 = tracked_fn(&db, input1); let _tracked2 = tracked_fn(&db, input2); // modify the input and change the revision input1.set_field(&mut db).to(24); let tracked2 = tracked_fn(&db, input2); // this should not panic tracked2.field(&db); } # Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] ## [0.25.0](https://github.com/salsa-rs/salsa/compare/salsa-macro-rules-v0.24.0...salsa-macro-rules-v0.25.0) - 2025-12-16 ### Other - Require interned structs' fields to be `Update` ([#1036](https://github.com/salsa-rs/salsa/pull/1036)) - Fully qualify std Result type ([#1025](https://github.com/salsa-rs/salsa/pull/1025)) - pass `Cycle` to the cycle recovery function ([#1028](https://github.com/salsa-rs/salsa/pull/1028)) - Call `cycle_fn` for every iteration ([#1021](https://github.com/salsa-rs/salsa/pull/1021)) - Expose the Input query Id with cycle_initial ([#1015](https://github.com/salsa-rs/salsa/pull/1015)) - Expose the query ID and the last provisional value to the cycle recovery function ([#1012](https://github.com/salsa-rs/salsa/pull/1012)) - Fix missing license files in published macros/macro-rules crates ([#1009](https://github.com/salsa-rs/salsa/pull/1009)) - Add benchmark for a fixpoint iteration with nested cycles ([#1001](https://github.com/salsa-rs/salsa/pull/1001)) ## [0.24.0](https://github.com/salsa-rs/salsa/compare/salsa-macro-rules-v0.23.0...salsa-macro-rules-v0.24.0) - 2025-09-30 ### Fixed - Do not unnecessarily require `Debug` on fields for interned structs ([#951](https://github.com/salsa-rs/salsa/pull/951)) - Fix phantom data usage in salsa structs affecting auto traits ([#932](https://github.com/salsa-rs/salsa/pull/932)) ### Other - refactor `entries` API ([#987](https://github.com/salsa-rs/salsa/pull/987)) - Flatten unserializable query dependencies ([#975](https://github.com/salsa-rs/salsa/pull/975)) - Initial persistent caching prototype ([#967](https://github.com/salsa-rs/salsa/pull/967)) - Add heap size support for salsa structs ([#943](https://github.com/salsa-rs/salsa/pull/943)) - Gate accumulator feature behind a feature flag ([#946](https://github.com/salsa-rs/salsa/pull/946)) - Do manual trait casting ([#922](https://github.com/salsa-rs/salsa/pull/922)) - remove bounds and type checks from `IngredientCache` ([#937](https://github.com/salsa-rs/salsa/pull/937)) - Avoid dynamic dispatch to access memo tables ([#941](https://github.com/salsa-rs/salsa/pull/941)) - Use `inventory` for static ingredient registration ([#934](https://github.com/salsa-rs/salsa/pull/934)) ## [0.23.0](https://github.com/salsa-rs/salsa/compare/salsa-macro-rules-v0.22.0...salsa-macro-rules-v0.23.0) - 2025-06-27 ### Added - `Update` derive field overwrite support ([#747](https://github.com/salsa-rs/salsa/pull/747)) ### Other - Emit self ty for query debug name of assoc function queries ([#927](https://github.com/salsa-rs/salsa/pull/927)) - Replace ingredient cache with faster ingredient map ([#921](https://github.com/salsa-rs/salsa/pull/921)) - add option to track heap memory usage of memos ([#925](https://github.com/salsa-rs/salsa/pull/925)) - Hide generated structs of tracked functions from docs via `#[doc(hidden)]` ([#917](https://github.com/salsa-rs/salsa/pull/917)) - add an option to tune interned garbage collection ([#911](https://github.com/salsa-rs/salsa/pull/911)) - Use explicit discriminants for `QueryOriginKind` for better comparisons ([#913](https://github.com/salsa-rs/salsa/pull/913)) - Preserve attributes on interned/tracked struct fields ([#905](https://github.com/salsa-rs/salsa/pull/905)) - Use `Revision` and `Durability` directly in input `Value` ([#902](https://github.com/salsa-rs/salsa/pull/902)) - Allow lifetimes in arguments in tracked fns with >1 parameters ([#880](https://github.com/salsa-rs/salsa/pull/880)) - Replace loom with shuttle ([#876](https://github.com/salsa-rs/salsa/pull/876)) ## [0.22.0](https://github.com/salsa-rs/salsa/compare/salsa-macro-rules-v0.21.1...salsa-macro-rules-v0.22.0) - 2025-05-23 ### Other - Allow creation of tracked associated functions (without `self`) ([#859](https://github.com/salsa-rs/salsa/pull/859)) - Remove default `PartialOrd` and `Ord` derives for salsa-structs ([#868](https://github.com/salsa-rs/salsa/pull/868)) - Fix returns(deref | as_ref | as_deref) in tracked methods ([#857](https://github.com/salsa-rs/salsa/pull/857)) - Changed `return_ref` syntax to `returns(as_ref)` and `returns(cloned)` ([#772](https://github.com/salsa-rs/salsa/pull/772)) - Move salsa event system into `Zalsa` ([#849](https://github.com/salsa-rs/salsa/pull/849)) - Add loom support ([#842](https://github.com/salsa-rs/salsa/pull/842)) - Clean up some unsafety ([#830](https://github.com/salsa-rs/salsa/pull/830)) ## [0.21.1](https://github.com/salsa-rs/salsa/compare/salsa-macro-rules-v0.21.0...salsa-macro-rules-v0.21.1) - 2025-04-30 ### Other - better debug name for interned query arguments ([#837](https://github.com/salsa-rs/salsa/pull/837)) ## [0.21.0](https://github.com/salsa-rs/salsa/compare/salsa-macro-rules-v0.20.0...salsa-macro-rules-v0.21.0) - 2025-04-29 ### Fixed - correct debug output for tracked fields ([#826](https://github.com/salsa-rs/salsa/pull/826)) - allow unused lifetimes in tracked_struct expansion ([#824](https://github.com/salsa-rs/salsa/pull/824)) ### Other - Implement a query stack `Backtrace` analog ([#827](https://github.com/salsa-rs/salsa/pull/827)) - Simplify ID conversions ([#822](https://github.com/salsa-rs/salsa/pull/822)) - Remove unnecessary `Array` abstraction ([#821](https://github.com/salsa-rs/salsa/pull/821)) - Add a compile-fail test for a `'static` `!Update` struct ([#820](https://github.com/salsa-rs/salsa/pull/820)) - squelch most clippy warnings in generated code ([#809](https://github.com/salsa-rs/salsa/pull/809)) ## [0.20.0](https://github.com/salsa-rs/salsa/compare/salsa-macro-rules-v0.19.0...salsa-macro-rules-v0.20.0) - 2025-04-22 ### Added - Drop `Debug` requirements and flip implementation defaults ([#756](https://github.com/salsa-rs/salsa/pull/756)) ### Other - Reduce memory usage by deduplicating type information ([#803](https://github.com/salsa-rs/salsa/pull/803)) - Inline/Outline more cold and slow paths ([#805](https://github.com/salsa-rs/salsa/pull/805)) - rewrite cycle handling to support fixed-point iteration ([#603](https://github.com/salsa-rs/salsa/pull/603)) ## [0.19.0](https://github.com/salsa-rs/salsa/compare/salsa-macro-rules-v0.18.0...salsa-macro-rules-v0.19.0) - 2025-03-10 ### Other - Store view downcaster in function ingredients directly ([#720](https://github.com/salsa-rs/salsa/pull/720)) # Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] ## [0.26.2](https://github.com/salsa-rs/salsa/compare/salsa-macro-rules-v0.26.1...salsa-macro-rules-v0.26.2) - 2026-05-03 ### Other - Do not use `#[allow(non_local_definitions)]` ([#1090](https://github.com/salsa-rs/salsa/pull/1090)) - Detect overlapping supertype variants via leaf type IDs ([#1080](https://github.com/salsa-rs/salsa/pull/1080)) ## [0.26.0](https://github.com/salsa-rs/salsa/compare/salsa-macro-rules-v0.25.2...salsa-macro-rules-v0.26.0) - 2026-02-02 ### Added - Allow opt-ing out of LRU at compile time ([#1051](https://github.com/salsa-rs/salsa/pull/1051)) ### Fixed - Do not alias fields of `tracked_struct` `Value`s when updating ([#741](https://github.com/salsa-rs/salsa/pull/741)) ### Other - Remove unnecessary backdate field macros ([#1069](https://github.com/salsa-rs/salsa/pull/1069)) - Remove `ValueWithMetadata` ([#1057](https://github.com/salsa-rs/salsa/pull/1057)) - Implement `Lookup` and `HashEqLike` for `Cow` ([#1054](https://github.com/salsa-rs/salsa/pull/1054)) ## [0.25.0](https://github.com/salsa-rs/salsa/compare/salsa-macro-rules-v0.24.0...salsa-macro-rules-v0.25.0) - 2025-12-16 ### Other - Require interned structs' fields to be `Update` ([#1036](https://github.com/salsa-rs/salsa/pull/1036)) - Fully qualify std Result type ([#1025](https://github.com/salsa-rs/salsa/pull/1025)) - pass `Cycle` to the cycle recovery function ([#1028](https://github.com/salsa-rs/salsa/pull/1028)) - Call `cycle_fn` for every iteration ([#1021](https://github.com/salsa-rs/salsa/pull/1021)) - Expose the Input query Id with cycle_initial ([#1015](https://github.com/salsa-rs/salsa/pull/1015)) - Expose the query ID and the last provisional value to the cycle recovery function ([#1012](https://github.com/salsa-rs/salsa/pull/1012)) - Fix missing license files in published macros/macro-rules crates ([#1009](https://github.com/salsa-rs/salsa/pull/1009)) - Add benchmark for a fixpoint iteration with nested cycles ([#1001](https://github.com/salsa-rs/salsa/pull/1001)) ## [0.24.0](https://github.com/salsa-rs/salsa/compare/salsa-macro-rules-v0.23.0...salsa-macro-rules-v0.24.0) - 2025-09-30 ### Fixed - Do not unnecessarily require `Debug` on fields for interned structs ([#951](https://github.com/salsa-rs/salsa/pull/951)) - Fix phantom data usage in salsa structs affecting auto traits ([#932](https://github.com/salsa-rs/salsa/pull/932)) ### Other - refactor `entries` API ([#987](https://github.com/salsa-rs/salsa/pull/987)) - Flatten unserializable query dependencies ([#975](https://github.com/salsa-rs/salsa/pull/975)) - Initial persistent caching prototype ([#967](https://github.com/salsa-rs/salsa/pull/967)) - Add heap size support for salsa structs ([#943](https://github.com/salsa-rs/salsa/pull/943)) - Gate accumulator feature behind a feature flag ([#946](https://github.com/salsa-rs/salsa/pull/946)) - Do manual trait casting ([#922](https://github.com/salsa-rs/salsa/pull/922)) - remove bounds and type checks from `IngredientCache` ([#937](https://github.com/salsa-rs/salsa/pull/937)) - Avoid dynamic dispatch to access memo tables ([#941](https://github.com/salsa-rs/salsa/pull/941)) - Use `inventory` for static ingredient registration ([#934](https://github.com/salsa-rs/salsa/pull/934)) ## [0.23.0](https://github.com/salsa-rs/salsa/compare/salsa-macro-rules-v0.22.0...salsa-macro-rules-v0.23.0) - 2025-06-27 ### Added - `Update` derive field overwrite support ([#747](https://github.com/salsa-rs/salsa/pull/747)) ### Other - Emit self ty for query debug name of assoc function queries ([#927](https://github.com/salsa-rs/salsa/pull/927)) - Replace ingredient cache with faster ingredient map ([#921](https://github.com/salsa-rs/salsa/pull/921)) - add option to track heap memory usage of memos ([#925](https://github.com/salsa-rs/salsa/pull/925)) - Hide generated structs of tracked functions from docs via `#[doc(hidden)]` ([#917](https://github.com/salsa-rs/salsa/pull/917)) - add an option to tune interned garbage collection ([#911](https://github.com/salsa-rs/salsa/pull/911)) - Use explicit discriminants for `QueryOriginKind` for better comparisons ([#913](https://github.com/salsa-rs/salsa/pull/913)) - Preserve attributes on interned/tracked struct fields ([#905](https://github.com/salsa-rs/salsa/pull/905)) - Use `Revision` and `Durability` directly in input `Value` ([#902](https://github.com/salsa-rs/salsa/pull/902)) - Allow lifetimes in arguments in tracked fns with >1 parameters ([#880](https://github.com/salsa-rs/salsa/pull/880)) - Replace loom with shuttle ([#876](https://github.com/salsa-rs/salsa/pull/876)) ## [0.22.0](https://github.com/salsa-rs/salsa/compare/salsa-macro-rules-v0.21.1...salsa-macro-rules-v0.22.0) - 2025-05-23 ### Other - Allow creation of tracked associated functions (without `self`) ([#859](https://github.com/salsa-rs/salsa/pull/859)) - Remove default `PartialOrd` and `Ord` derives for salsa-structs ([#868](https://github.com/salsa-rs/salsa/pull/868)) - Fix returns(deref | as_ref | as_deref) in tracked methods ([#857](https://github.com/salsa-rs/salsa/pull/857)) - Changed `return_ref` syntax to `returns(as_ref)` and `returns(cloned)` ([#772](https://github.com/salsa-rs/salsa/pull/772)) - Move salsa event system into `Zalsa` ([#849](https://github.com/salsa-rs/salsa/pull/849)) - Add loom support ([#842](https://github.com/salsa-rs/salsa/pull/842)) - Clean up some unsafety ([#830](https://github.com/salsa-rs/salsa/pull/830)) ## [0.21.1](https://github.com/salsa-rs/salsa/compare/salsa-macro-rules-v0.21.0...salsa-macro-rules-v0.21.1) - 2025-04-30 ### Other - better debug name for interned query arguments ([#837](https://github.com/salsa-rs/salsa/pull/837)) ## [0.21.0](https://github.com/salsa-rs/salsa/compare/salsa-macro-rules-v0.20.0...salsa-macro-rules-v0.21.0) - 2025-04-29 ### Fixed - correct debug output for tracked fields ([#826](https://github.com/salsa-rs/salsa/pull/826)) - allow unused lifetimes in tracked_struct expansion ([#824](https://github.com/salsa-rs/salsa/pull/824)) ### Other - Implement a query stack `Backtrace` analog ([#827](https://github.com/salsa-rs/salsa/pull/827)) - Simplify ID conversions ([#822](https://github.com/salsa-rs/salsa/pull/822)) - Remove unnecessary `Array` abstraction ([#821](https://github.com/salsa-rs/salsa/pull/821)) - Add a compile-fail test for a `'static` `!Update` struct ([#820](https://github.com/salsa-rs/salsa/pull/820)) - squelch most clippy warnings in generated code ([#809](https://github.com/salsa-rs/salsa/pull/809)) ## [0.20.0](https://github.com/salsa-rs/salsa/compare/salsa-macro-rules-v0.19.0...salsa-macro-rules-v0.20.0) - 2025-04-22 ### Added - Drop `Debug` requirements and flip implementation defaults ([#756](https://github.com/salsa-rs/salsa/pull/756)) ### Other - Reduce memory usage by deduplicating type information ([#803](https://github.com/salsa-rs/salsa/pull/803)) - Inline/Outline more cold and slow paths ([#805](https://github.com/salsa-rs/salsa/pull/805)) - rewrite cycle handling to support fixed-point iteration ([#603](https://github.com/salsa-rs/salsa/pull/603)) ## [0.19.0](https://github.com/salsa-rs/salsa/compare/salsa-macro-rules-v0.18.0...salsa-macro-rules-v0.19.0) - 2025-03-10 ### Other - Store view downcaster in function ingredients directly ([#720](https://github.com/salsa-rs/salsa/pull/720)) # Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] ## [0.25.1](https://github.com/salsa-rs/salsa/compare/salsa-macros-v0.25.0...salsa-macros-v0.25.1) - 2025-12-16 ### Other - Fix a remainder that was forgotten in #1036 ([#1037](https://github.com/salsa-rs/salsa/pull/1037)) ## [0.25.0](https://github.com/salsa-rs/salsa/compare/salsa-macros-v0.24.0...salsa-macros-v0.25.0) - 2025-12-16 ### Other - Require interned structs' fields to be `Update` ([#1036](https://github.com/salsa-rs/salsa/pull/1036)) - Expose the query ID and the last provisional value to the cycle recovery function ([#1012](https://github.com/salsa-rs/salsa/pull/1012)) - Fix missing license files in published macros/macro-rules crates ([#1009](https://github.com/salsa-rs/salsa/pull/1009)) ## [0.24.0](https://github.com/salsa-rs/salsa/compare/salsa-macros-v0.23.0...salsa-macros-v0.24.0) - 2025-09-30 ### Other - Initial persistent caching prototype ([#967](https://github.com/salsa-rs/salsa/pull/967)) - Add heap size support for salsa structs ([#943](https://github.com/salsa-rs/salsa/pull/943)) - Upgrade dependencies ([#956](https://github.com/salsa-rs/salsa/pull/956)) - Do manual trait casting ([#922](https://github.com/salsa-rs/salsa/pull/922)) - Avoid dynamic dispatch to access memo tables ([#941](https://github.com/salsa-rs/salsa/pull/941)) - Use `inventory` for static ingredient registration ([#934](https://github.com/salsa-rs/salsa/pull/934)) - Fix `heap_size` option not being preserved in tracked impls ([#930](https://github.com/salsa-rs/salsa/pull/930)) ## [0.23.0](https://github.com/salsa-rs/salsa/compare/salsa-macros-v0.22.0...salsa-macros-v0.23.0) - 2025-06-27 ### Added - `Update` derive field overwrite support ([#747](https://github.com/salsa-rs/salsa/pull/747)) ### Other - Emit self ty for query debug name of assoc function queries ([#927](https://github.com/salsa-rs/salsa/pull/927)) - add option to track heap memory usage of memos ([#925](https://github.com/salsa-rs/salsa/pull/925)) - add an option to tune interned garbage collection ([#911](https://github.com/salsa-rs/salsa/pull/911)) - Preserve attributes on interned/tracked struct fields ([#905](https://github.com/salsa-rs/salsa/pull/905)) - Update dependencies, remove unused `heck` dependency ([#894](https://github.com/salsa-rs/salsa/pull/894)) - Allow lifetimes in arguments in tracked fns with >1 parameters ([#880](https://github.com/salsa-rs/salsa/pull/880)) ## [0.22.0](https://github.com/salsa-rs/salsa/compare/salsa-macros-v0.21.1...salsa-macros-v0.22.0) - 2025-05-23 ### Other - Allow creation of tracked associated functions (without `self`) ([#859](https://github.com/salsa-rs/salsa/pull/859)) - Implement an `!Update` bound escape hatch for tracked fn ([#867](https://github.com/salsa-rs/salsa/pull/867)) - Fix returns(deref | as_ref | as_deref) in tracked methods ([#857](https://github.com/salsa-rs/salsa/pull/857)) - Changed `return_ref` syntax to `returns(as_ref)` and `returns(cloned)` ([#772](https://github.com/salsa-rs/salsa/pull/772)) - Move salsa event system into `Zalsa` ([#849](https://github.com/salsa-rs/salsa/pull/849)) ## [0.21.0](https://github.com/salsa-rs/salsa/compare/salsa-macros-v0.20.0...salsa-macros-v0.21.0) - 2025-04-29 ### Fixed - allow unused lifetimes in tracked_struct expansion ([#824](https://github.com/salsa-rs/salsa/pull/824)) ### Other - Add a compile-fail test for a `'static` `!Update` struct ([#820](https://github.com/salsa-rs/salsa/pull/820)) - squelch most clippy warnings in generated code ([#809](https://github.com/salsa-rs/salsa/pull/809)) - Use `DatabaseKey` for interned events ([#813](https://github.com/salsa-rs/salsa/pull/813)) ## [0.20.0](https://github.com/salsa-rs/salsa/compare/salsa-macros-v0.19.0...salsa-macros-v0.20.0) - 2025-04-22 ### Added - Drop `Debug` requirements and flip implementation defaults ([#756](https://github.com/salsa-rs/salsa/pull/756)) ### Other - Add a third cycle mode, equivalent to old Salsa cycle behavior ([#801](https://github.com/salsa-rs/salsa/pull/801)) - Normalize imports style ([#779](https://github.com/salsa-rs/salsa/pull/779)) - Document most safety blocks ([#776](https://github.com/salsa-rs/salsa/pull/776)) - bug [salsa-macros]: Improve debug name of tracked methods ([#755](https://github.com/salsa-rs/salsa/pull/755)) - rewrite cycle handling to support fixed-point iteration ([#603](https://github.com/salsa-rs/salsa/pull/603)) ## [0.19.0](https://github.com/salsa-rs/salsa/compare/salsa-macros-v0.18.0...salsa-macros-v0.19.0) - 2025-03-10 ### Fixed - fix enums bug ### Other - Store view downcaster in function ingredients directly ([#720](https://github.com/salsa-rs/salsa/pull/720)) - :replace instead of std::mem::replace ([#746](https://github.com/salsa-rs/salsa/pull/746)) - Cleanup `Cargo.toml`s ([#745](https://github.com/salsa-rs/salsa/pull/745)) - address review comments - Skip memo ingredient index mapping for non enum tracked functions - Trade off a bit of memory for more speed in `MemoIngredientIndices` - Introduce Salsa enums - Track revisions for tracked fields only # Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] ## [0.26.2](https://github.com/salsa-rs/salsa/compare/salsa-macros-v0.26.1...salsa-macros-v0.26.2) - 2026-05-03 ### Fixed - fix tracked impl db lifetime for as_deref return mode ([#1084](https://github.com/salsa-rs/salsa/pull/1084)) ### Other - Detect overlapping supertype variants via leaf type IDs ([#1080](https://github.com/salsa-rs/salsa/pull/1080)) ## [0.26.1](https://github.com/salsa-rs/salsa/compare/salsa-macros-v0.26.0...salsa-macros-v0.26.1) - 2026-03-20 ### Other - Bump the edition to 2024 ([#1073](https://github.com/salsa-rs/salsa/pull/1073)) ## [0.26.0](https://github.com/salsa-rs/salsa/compare/salsa-macros-v0.25.2...salsa-macros-v0.26.0) - 2026-02-02 ### Added - Allow opt-ing out of LRU at compile time ([#1051](https://github.com/salsa-rs/salsa/pull/1051)) - Allow tracked function cycle attributes to take closures ([#1048](https://github.com/salsa-rs/salsa/pull/1048)) ### Other - Remove unnecessary backdate field macros ([#1069](https://github.com/salsa-rs/salsa/pull/1069)) - Add `salsa::Update` trait bounds to generics when deriving `salsa::Update` ([#1041](https://github.com/salsa-rs/salsa/pull/1041)) ## [0.25.1](https://github.com/salsa-rs/salsa/compare/salsa-macros-v0.25.0...salsa-macros-v0.25.1) - 2025-12-16 ### Other - Fix a remainder that was forgotten in #1036 ([#1037](https://github.com/salsa-rs/salsa/pull/1037)) ## [0.25.0](https://github.com/salsa-rs/salsa/compare/salsa-macros-v0.24.0...salsa-macros-v0.25.0) - 2025-12-16 ### Other - Require interned structs' fields to be `Update` ([#1036](https://github.com/salsa-rs/salsa/pull/1036)) - Expose the query ID and the last provisional value to the cycle recovery function ([#1012](https://github.com/salsa-rs/salsa/pull/1012)) - Fix missing license files in published macros/macro-rules crates ([#1009](https://github.com/salsa-rs/salsa/pull/1009)) ## [0.24.0](https://github.com/salsa-rs/salsa/compare/salsa-macros-v0.23.0...salsa-macros-v0.24.0) - 2025-09-30 ### Other - Initial persistent caching prototype ([#967](https://github.com/salsa-rs/salsa/pull/967)) - Add heap size support for salsa structs ([#943](https://github.com/salsa-rs/salsa/pull/943)) - Upgrade dependencies ([#956](https://github.com/salsa-rs/salsa/pull/956)) - Do manual trait casting ([#922](https://github.com/salsa-rs/salsa/pull/922)) - Avoid dynamic dispatch to access memo tables ([#941](https://github.com/salsa-rs/salsa/pull/941)) - Use `inventory` for static ingredient registration ([#934](https://github.com/salsa-rs/salsa/pull/934)) - Fix `heap_size` option not being preserved in tracked impls ([#930](https://github.com/salsa-rs/salsa/pull/930)) ## [0.23.0](https://github.com/salsa-rs/salsa/compare/salsa-macros-v0.22.0...salsa-macros-v0.23.0) - 2025-06-27 ### Added - `Update` derive field overwrite support ([#747](https://github.com/salsa-rs/salsa/pull/747)) ### Other - Emit self ty for query debug name of assoc function queries ([#927](https://github.com/salsa-rs/salsa/pull/927)) - add option to track heap memory usage of memos ([#925](https://github.com/salsa-rs/salsa/pull/925)) - add an option to tune interned garbage collection ([#911](https://github.com/salsa-rs/salsa/pull/911)) - Preserve attributes on interned/tracked struct fields ([#905](https://github.com/salsa-rs/salsa/pull/905)) - Update dependencies, remove unused `heck` dependency ([#894](https://github.com/salsa-rs/salsa/pull/894)) - Allow lifetimes in arguments in tracked fns with >1 parameters ([#880](https://github.com/salsa-rs/salsa/pull/880)) ## [0.22.0](https://github.com/salsa-rs/salsa/compare/salsa-macros-v0.21.1...salsa-macros-v0.22.0) - 2025-05-23 ### Other - Allow creation of tracked associated functions (without `self`) ([#859](https://github.com/salsa-rs/salsa/pull/859)) - Implement an `!Update` bound escape hatch for tracked fn ([#867](https://github.com/salsa-rs/salsa/pull/867)) - Fix returns(deref | as_ref | as_deref) in tracked methods ([#857](https://github.com/salsa-rs/salsa/pull/857)) - Changed `return_ref` syntax to `returns(as_ref)` and `returns(cloned)` ([#772](https://github.com/salsa-rs/salsa/pull/772)) - Move salsa event system into `Zalsa` ([#849](https://github.com/salsa-rs/salsa/pull/849)) ## [0.21.0](https://github.com/salsa-rs/salsa/compare/salsa-macros-v0.20.0...salsa-macros-v0.21.0) - 2025-04-29 ### Fixed - allow unused lifetimes in tracked_struct expansion ([#824](https://github.com/salsa-rs/salsa/pull/824)) ### Other - Add a compile-fail test for a `'static` `!Update` struct ([#820](https://github.com/salsa-rs/salsa/pull/820)) - squelch most clippy warnings in generated code ([#809](https://github.com/salsa-rs/salsa/pull/809)) - Use `DatabaseKey` for interned events ([#813](https://github.com/salsa-rs/salsa/pull/813)) ## [0.20.0](https://github.com/salsa-rs/salsa/compare/salsa-macros-v0.19.0...salsa-macros-v0.20.0) - 2025-04-22 ### Added - Drop `Debug` requirements and flip implementation defaults ([#756](https://github.com/salsa-rs/salsa/pull/756)) ### Other - Add a third cycle mode, equivalent to old Salsa cycle behavior ([#801](https://github.com/salsa-rs/salsa/pull/801)) - Normalize imports style ([#779](https://github.com/salsa-rs/salsa/pull/779)) - Document most safety blocks ([#776](https://github.com/salsa-rs/salsa/pull/776)) - bug [salsa-macros]: Improve debug name of tracked methods ([#755](https://github.com/salsa-rs/salsa/pull/755)) - rewrite cycle handling to support fixed-point iteration ([#603](https://github.com/salsa-rs/salsa/pull/603)) ## [0.19.0](https://github.com/salsa-rs/salsa/compare/salsa-macros-v0.18.0...salsa-macros-v0.19.0) - 2025-03-10 ### Fixed - fix enums bug ### Other - Store view downcaster in function ingredients directly ([#720](https://github.com/salsa-rs/salsa/pull/720)) - :replace instead of std::mem::replace ([#746](https://github.com/salsa-rs/salsa/pull/746)) - Cleanup `Cargo.toml`s ([#745](https://github.com/salsa-rs/salsa/pull/745)) - address review comments - Skip memo ingredient index mapping for non enum tracked functions - Trade off a bit of memory for more speed in `MemoIngredientIndices` - Introduce Salsa enums - Track revisions for tracked fields only # SPDX-FileCopyrightText: 2020 HH Partners # # SPDX-License-Identifier: MIT name: Release on: push: tags: - 'v*' jobs: Test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 name: Checkout - uses: Swatinem/rust-cache@v1 - uses: actions-rs/cargo@v1 name: Cargo build if: always() id: build with: command: test args: --no-run - uses: actions-rs/cargo@v1 name: Cargo test if: always() id: test with: command: test args: -- --include-ignored - uses: actions-rs/cargo@v1 name: Cargo clippy if: always() id: clippy with: command: clippy args: -- -D warnings - uses: actions-rs/cargo@v1 name: Cargo fmt if: always() id: format with: command: fmt args: --all -- --check Reuse: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: REUSE Compliance Check uses: fsfe/reuse-action@v1 Release: needs: ["Test", "Reuse"] runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: actions-rs/toolchain@v1 with: toolchain: stable override: true - uses: katyo/publish-crates@v1 with: registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }} # Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] ## [0.5.2] - 2022-04-13 ### Added - Implement `(de)serialize` for `SimpleExpression`. ## [0.5.1] - 2022-04-13 ### Added - Add function to `SimpleExpression` from a `&str`. ## [0.5.0] - 2022-04-12 ### Changed - Started keeping a changelog. [unreleased]: https://github.com/doubleopen-project/spdx-expression/compare/v0.5.2...HEAD [0.5.2]: https://github.com/doubleopen-project/spdx-expression/compare/v0.5.1...v0.5.2 [0.5.1]: https://github.com/doubleopen-project/spdx-expression/compare/v0.5.0...v0.5.1 # Changelog ## [0.5.5](https://github.com/doubleopen-project/spdx-rs/compare/v0.5.4...v0.5.5) (2023-09-19) ### Bug Fixes * follow enum literals from schema ([23d1519](https://github.com/doubleopen-project/spdx-rs/commit/23d1519b964062fe5fa72aed200c4a47ff5c6032)) ## [0.5.4](https://github.com/doubleopen-project/spdx-rs/compare/v0.5.3...v0.5.4) (2023-09-01) ### Features * allow to clone the document ([7d07772](https://github.com/doubleopen-project/spdx-rs/commit/7d077728326f22f8c3b11b30beb97640f17d540d)) ### Bug Fixes * accept complex license expression in 'LicenseInfoInFiles' ([ee8b6b9](https://github.com/doubleopen-project/spdx-rs/commit/ee8b6b9ae2e96b9a7fd7f1cb784c529e03708e5a)) ## [0.5.3](https://github.com/doubleopen-project/spdx-rs/compare/v0.5.2...v0.5.3) (2023-06-29) ### Features * add support for SPDX 2.3 documents ([10e67cb](https://github.com/doubleopen-project/spdx-rs/commit/10e67cb1f2af7bbfa04ecf1af254264b5f5c1cfa)) ## [0.5.2](https://github.com/doubleopen-project/spdx-rs/compare/v0.5.1...v0.5.2) (2022-12-01) ### Bug Fixes * disable default features of chrono to avoid security vuln ([370c25c](https://github.com/doubleopen-project/spdx-rs/commit/370c25c4580b6d7da915f0ce6c38b34c07565c6f)) * remove needless lifetimes ([151a7c7](https://github.com/doubleopen-project/spdx-rs/commit/151a7c76a12c8553f204adfb37a3e2e7fa281160)) * replace deprecated chrono usage ([dc29e99](https://github.com/doubleopen-project/spdx-rs/commit/dc29e99902df10d493cc42fb5f3887e7a99d3fce)) ## [0.5.1](https://github.com/doubleopen-project/spdx-rs/compare/v0.5.0...v0.5.1) (2022-07-05) ### Miscellaneous Chores * release 0.5.1 ([3cda72b](https://github.com/doubleopen-project/spdx-rs/commit/3cda72b8264d3ffd6576f80febdc1d0845ab2650)) ## [0.5.0] - 2022-04-13 ### Changed - **Breaking:** Change field `license_information_in_file` of `FileInformation` to be a `Vec` instead of a `Vec`. ## [0.4.1] - 2022-04-12 ### Added - Implement `PartialEq` for SPDX. ## [0.4.0] - 2022-04-12 ### Changed - **Breaking:** Change `SPDXExpression` to use the `spdx-expression` crate. Changes everything around the expression handling. ## [0.3.0] - 2021-10-21 ### Changed - **Breaking:** Refactor snippet byte range and line range. ### Removed - **Breaking:** Moved the functionality for getting the SPDX License List to a utility crate. See [spdx-toolkit](https://github.com/doubleopen-project/spdx-toolkit). - **Breaking:** Moved the functionality for for creating graphs from the relationships to a utility crate. See [spdx-toolkit](https://github.com/doubleopen-project/spdx-toolkit). ## [0.2.1] - 2021-10-14 ### Fixed - Accepts lowercase relationship types when parsing tag-value documents. ## [0.2.0] - 2021-10-13 ### Changed - Started following semantic versioning and keeping a changelog. [0.5.0]: https://github.com/doubleopen-project/spdx-rs/compare/v0.4.1...v0.5.0 [0.4.1]: https://github.com/doubleopen-project/spdx-rs/compare/v0.4.0...v0.4.1 [0.4.0]: https://github.com/doubleopen-project/spdx-rs/compare/v0.3.0...v0.4.0 [0.3.0]: https://github.com/doubleopen-project/spdx-rs/compare/v0.2.1...v0.3.0 [0.2.1]: https://github.com/doubleopen-project/spdx-rs/compare/v0.2.0...v0.2.1 [0.2.0]: https://github.com/doubleopen-project/spdx-rs/compare/v0.1.0...v0.2.0 # 0.38.4 * macOS: Unpin `objc2-*` crates version. * Linux: Fix computation of disk size. # 0.38.3 * macOS: Improve accuracy of `System::available_memory` and `System::used_memory`. * Documentation: add missing unit for `CPU::frequency` returned value. # 0.38.2 * Implement `Error` trait for `MacAddrFromStrError`, `IpNetworkFromStrError` and `KillError` types. # 0.38.1 * macOS: Put back support for versions below macOS 12. # 0.38.0 * Add NetBSD support. * Windows: Fix unsoundness for a function used in `Motherboard` and `Product`. * Linux: Improve CPU info parsing. * Fix `serde` serialization of `MacAddr` and of `Disk::file_system`. # 0.37.2 * Improve documentation of `System::refresh_cpu_all` and of `System::refresh_cpu_specifics`. * Android: Fix `System::uptime`. * Linux: Correctly handled modified/removed `Process::exe` paths. # 0.37.1 * Fix `serde` serialization on `Process::name`. * Linux: Fix `get_cpu_frequency` on `loongarch64`. * Windows: Correctly handle invalid UTF-8 string in `Motherboard`. # 0.37.0 * Update minimum supported Rust version to `1.88` (for 2024 edition and `if let chain` feature). * Added `Component::id` API. * Linux: Greatly improve partial processes retrieval. * Linux: Simplify internal components retrieval code. # 0.36.1 * Linux: Improve processor CPU usage computation. # 0.36.0 * Add new `Motherboard` type. * Add new `Product` type. * Linux/macOS: Fix CPU usage update. * Linux: Improve `Component::label` generated `String`. * macOS: Make `Components` implement `Send` and `Sync` traits. # 0.35.2 * Linux: Fix retrieval of processor frequency on loongarch64. * Linux/Android: Improve `Process::wait` by checking if the process is still alive before waiting. * Windows: Fix `Process::wait`. # 0.35.1 * Linux: Fix processor retrieval if some information is missing. * Windows: Increase range of `windows` crate up to `< 0.63`. # 0.35.0 * Update MSRV to 1.75. * Add `System::open_files_limit`. * Add `Process::kill_and_wait` and `Process::kill_with_and_wait` methods. * `Process::open_files*` methods return `usize`. * `set_open_files_limit` argument type is `usize`. * Code example was improved. * macOS: Fix M4 CPU frequency calculation. * Linux: Correctly handle when new CPUs are added. * Linux: Ignore `autofs` disks. * Linux (raspberry pi): Retrieve more thermal zones. * Android: Update documentation to mention that newer Android version don't allow to retrieve CPU information. * Windows: Improve `Process::wait` code. * Windows: Fix `Groups::refresh`. # 0.34.2 * FreeBSD: Fix segfault when refreshing processes. # 0.34.1 * macOS: Remove forgotten debug print. # 0.34.0 * `multithread` feature is disabled by default. * Add new `Process` methods: `accumulated_cpu_time`, `exists`, `open_files` and `open_files_limit`. * `Process::wait` method now returns `Option`. * Add new `System` methods: `distribution_id_like` and `kernel_long_version`. * Turn `System::physical_core_count` method into an associated function. * Make `System::refresh_all` and `System::refresh_specifics` methods remove dead processes. * Add new `ProcessRefreshKind` refresh: `tasks`. * Fix `Group` docs. * Implement `Deserialize` trait on `DiskKind`, `MacAddr`, `IpNetwork`, `ProcessStatus`, `Signal` and `ThreadKind`. * Implement `FromStr` trait on `IpNetwork` and `MacAddr`. * Implement `Hash` trait on `DiskKind`, `MacAddr`, `ProcessStatus` and `Signal`. * macOS: Removed processes are now correctly handled when refreshing processes. * macOS: Strengthen dist list refresh. * macOS: Fix internal `cfg` handling which triggered compilation failures in some specific cases. * Linux: max cgroups memory is more reliant in case of wrong input. * Linux: Fix processes tasks update. * Linux: Improve disks retrieval. * Windows: Fix antivirus considering programs using `sysinfo` as viruses by replacing uses of `NtQueryInformationProcess` with other "mainstream" Windows API. * Windows: Improve CPU usage computation efficiency. * FreeBSD: Improve `process_procs` when there is only one process to refresh. # 0.33.1 * Linux: Fix components retrieval. * Linux: Filter out more virtual file systems for `Disk` API. * Linux/Android: Improve `System::long_os_version()`. * Apple: Add missing CPU brands for iPhone and iPads. * macOS: Improve system name retrieval in `System::long_os_version()`. * Linux/macOS: Avoid trailing whitespace and consecutive whitespace in `System::long_os_version()`. * Windows: Fix `User::groups`. * Improve documentation for `System::name`, `System::kernel_version`, `System::os_version`, `System::long_os_version` and `System::distribution_id`. # 0.33.0 * Linux: Add more ARM vendor IDs. * Linux: Improve CPU computation when refreshing a single process CPU usage. * Windows: Fix CPU frequency not being refreshed. * Windows: Improved components retrieval. * Windows: Fix inconsistent `boot_time` information. * Windows: Fix `User::groups`. * macOS: Fix network data information being limited to 32 bits. * macOS: Add newer macOS version for `System::long_os_version`. * unix: Add support for network sub-interfaces. * Use `std::env::consts::ARCH` as fallback for `System::cpu_arch`. * Add disk I/O support provided through `Disk::usage`. * Add `NetworkData::mtu`. * Add `DiskRefreshKind` to have finer-grained disks refreshes. * `Component::temperature` and `Component::max` now returns `Option`. * `Users::refresh_list`, `Groups::refresh_list`, `Components::refresh_list`, `Networks::refresh_list` and `Disks::refresh_list` methods were renamed `refresh`. * `*RefreshKind::new` methods were renamed `nothing`. * Improve documentation for `DiskUsage::read_bytes`. * Improve documentation for `Process::kill`. # 0.32.1 * Fix compilation error due to `libc` update. # 0.32.0 * Add new `Disk::is_read_only` API. * Add new `remove_dead_processes` argument to `System::refresh_processes` and `System::refresh_processes_specifics`. * macOS: Fix memory leak in disk refresh. # 0.31.4 * macOS: Force memory cleanup in disk list retrieval. # 0.31.3 * Raspberry Pi: Fix temperature retrieval. # 0.31.2 * Remove `bstr` dependency (needed for rustc development). # 0.31.1 * Downgrade version of `memchr` (needed for rustc development). # 0.31.0 * Split crate in features to only enable what you need. * Remove `System::refresh_process`, `System::refresh_process_specifics` and `System::refresh_pids` methods. * Add new argument of type `ProcessesToUpdate` to `System::refresh_processes` and `System::refresh_processes_specifics` methods. * Add new `NetworkData::ip_networks` method. * Add new `System::refresh_cpu_list` method. * Global CPU now only contains CPU usage. * Rename `TermalSensorType` to `ThermalSensorType`. * Process names is now an `OsString`. * Remove `System::global_cpu_info`. * Add `System::global_cpu_usage`. * macOS: Fix invalid CPU computation when single processes are refreshed one after the other. * Windows: Fix virtual memory computation. * Windows: Fix WoW64 parent process refresh. * Linux: Retrieve RSS (Resident Set Size) memory for cgroups. # 0.30.13 * macOS: Fix segfault when calling `Components::refresh_list` multiple times. * Windows: Fix CPU arch retrieval. # 0.30.12 * FreeBSD: Fix network interfaces retrieval (one was always missing). # 0.30.11 * macOS: Fix some invalid utf8 conversions. # 0.30.10 * Linux: Fix components not being listed anymore. # 0.30.9 * Linux/Windows: Performance improvements. * Linux/macOS/FreeBSD: Parent process ID is updated if changed as expected. # 0.30.8 * Linux: Fix missing parallelization. * Linux: Add `cargo` feature flag `linux-tmpfs` to list `tmpfs` mounts. * macOS: Fix CPU usage returning `NaN`. * `Components::refresh` is now parallelized. # 0.30.7 * Linux: Fix cgroup memory computation. * FreeBSD: Fix documentation about disk usage. # 0.30.6 * macOS: Fix missing update of process run time. * Add new `Groups` API. * Improve documentation. # 0.30.5 * Windows: Correctly retrieve processes name on 32 bits platforms. * Windows: Fix swap memory computation. # 0.30.4 * Windows: Fix misaligned read. # 0.30.3 * Improve dependency stack by updating the `windows` dependency. # 0.30.2 * Add `ThreadKind` enum. * Add `Process::thread_kind` method. # 0.30.1 * Linux: Fix invalid memory information retrieval (virtual and resident set size were reversed). # 0.30.0 * Split `System` into subtypes: `Components`, `Disks`, `Networks` and `Users`. * `brand`, `vendor_id` and `frequency` information is not set anymore on the global CPU. * Unix: Fix endless loop in user groups retrieval. * Unix/Windows: Fix infinite loop when retrieving various information because of bad usage of `Vec::reserve`. * Unix: Fix invalid usage of NULL pointer when retrieving user group name. * Linux: Fix CPU name retrieval. * Linux: Remove cgroup usage from memory computation. * Linux: Add `linux-netdevs` feature to allow to retrieve network devices. * Linux: Improve system memory information retrieval (using `statm` file instead of `stat`). * Linux: Tasks are listed in processes. * macOS: Correctly retrieve process root directory. * Windows: Add warning that `System::load_average` is not working in documentation. * Windows: Fix invalid use of NULL pointer when retrieving users groups. * Windows: Correctly retrieve process root directory. * Create new `System::cgroup_limits` method. * Remove `System::refresh_system` method. * `Disk::file_system` and `Disk::name` now return an `Option<&OsStr>`. * Implement `Display` trait on `DiskKind`. * Move from `winapi` to `windows` crate. * Add `System::cpu_arch`. * Add `System::refresh_pids` and `System::refresh_pids_specifics`. * `System::boot_time`, `System::cpu_arch`, `System::distribution_id`, `System::host_name`, `System::kernel_version`, `System::load_average`, `System::long_os_version`, `System::name`, `System::os_version` and `System::uptime` are static methods. * `ProcessRefreshKind` has a lot more of possibilities for better control over updates. * Add new `UpdateKind` enum. * Add new `MemoryRefreshKind` struct. * Add new `System::refresh_memory_specifics` method. * `Process::exe`, `Process::cwd` and `Process::root` return an `Option<&Path>`. * `Process::tasks` method is available on all platforms. * `Process::tasks` method returns a `HashSet`. * Move `System::IS_SUPPORTED`, `System::SUPPORTED_SIGNALS` and `System::MINIMUM_CPU_UPDATE_INTERVAL` constants out of `System` directly at the crate top-level. * Rename `IS_SUPPORTED` into `IS_SUPPORTED_SYSTEM`. * Fix `serde` serialization. * Add `System::refresh_cpu_frequency` and `System::refresh_cpu_all`. * Fix `sysinfo.h` and C wrapper. * Add a migration guide. # 0.29.11 * macOS: Fix bug when a user group doesn't have a name. # 0.29.10 * Linux: Correctly handle max memory value for cgroups. # 0.29.9 * Linux: Fix memory usage retrieval for cgroups. # 0.29.8 * Linux: Fix overflow bug. # 0.29.7 * macOS: Fix CPU frequency retrieval for M1 and M2. * Linux: Add support for cgroups v1/v2 for memory. * Windows: Fix processes name encoding issues. # 0.29.6 * Update minimum rust version to 1.63. * Windows: Fix memory corruption when listing processes. * Windows: Fix name inconsistency between `refresh_processes` and `refresh_process`. * `Cargo.lock` is now included to prevent minimum rust version disruptions. # 0.29.5 * Windows: Remove some undefined behaviour when listing processes. * : Use `--generate-link-to-definition` option to have better source code pages. # 0.29.4 * Windows: Improve code to retrieve network interfaces. * Improve serde documentation example. * Fix some clippy lints. # 0.29.3 * Fix some documentation examples. # 0.29.2 * : Generate documentation for all supported platforms. # 0.29.1 * Update `libc` version to 0.2.144. * Linux/FreeBSD/macOS: Fix retrieval of users groups in multi-threaded context. # 0.29.0 * Add `ProcessExt::effective_user_id` and `ProcessExt::effective_group_id`. * Rename `DiskType` into `DiskKind`. * Rename `DiskExt::type_` into `DiskExt::kind`. * macOS: Correctly handle `ProcessStatus` and remove public `ThreadStatus` field. * Windows 11: Fix CPU core usage. # 0.28.4 * macOS: Improve CPU computation. * Strengthen a process test (needed for debian). # 0.28.3 * FreeBSD/Windows: Add missing frequency for global CPU. * macOS: Fix used memory computation. * macOS: Improve available memory computation. * Windows: Fix potential panic when getting process data. # 0.28.2 * Linux: Improve CPU usage computation. # 0.28.1 * macOS: Fix overflow when computing CPU usage. # 0.28.0 * Linux: Fix name and CPU usage for processes tasks. * unix: Keep all users, even "not real" accounts. * Windows: Use SID for Users ID. * Fix C API. * Disable default cdylib compilation. * Add `serde` feature to enable serialization. * Linux: Handle `Idle` state in `ProcessStatus`. * Linux: Add brand and name of ARM CPUs. # 0.27.8 * macOS: Fix overflow when computing CPU usage. # 0.27.7 * macOS: Fix process CPU usage computation * Linux: Improve ARM CPU `brand` and `name` information. * Windows: Fix resource leak. * Documentation improvements. # 0.27.6 * Make `MacAddr` public. # 0.27.5 * Linux: Improve compatibility with upcoming `libc` changes for musl targets. # 0.27.4 * Create `SystemExt::MINIMUM_CPU_UPDATE_INTERVAL` constant. * Fix consecutive processes updates CPU usage computation. # 0.27.3 * macOS: Fix free/available memory computation. * Fix processes_by_name* lifetimes # 0.27.2 * Linux: Fix consecutive process CPU usage updates. * Linux: Ignore NFS disks. # 0.27.1 * Unix systems: Fix network address segfault issue. # 0.27.0 * Add `NetworkExt::mac_address` method and `MacAddr` type. * Linux: Fix truncated environment retrieval. * Implement `TryFrom` and `FromStr` for `Gid` and `Uid`. * Implement `TryFrom` for `Pid`. * Fix documentation of `System::new` about CPU list not loaded by default. # 0.26.9 * (backport) Linux: Improve compatibility with upcoming `libc` changes for musl targets. # 0.26.8 * Add `ProcessExt::session_id` method. * Linux: Ignore NFS disks. # 0.26.7 * Apple: Greatly improve disk retrieval (I recommend reading the pull request first comment for more information here: ). * Remove build script. # 0.26.6 * Add `Process::wait`. * Add "Good practice" entry into the crate level documentation and in the README. * Linux: More precise used memory computation. # 0.26.5 * Windows: Fix disk information retrieval. * Linux: Improve `Process` document. * Linux: Fix a compilation error if the `apple-sandbox` feature is enabled. * Internal code improvements. # 0.26.4 * Add `SystemExt::distribution_id` method. * Update `ntapi` version to `0.4`. * Update minimum supported Rust version (MSRV) to `1.59` for `ntapi` 0.4. # 0.26.3 * Update minimum supported Rust version (MSRV) to `1.56` to follow `once_cell` minor update. # 0.26.2 * Linux: Fix process information retrieval. * Linux: Get more components temperature. * Linux: Fix disk name retrieval (which in turn fixed disk type retrieval). # 0.26.1 * macOS M1: Fix segmentation fault crash. # 0.26.0 * Switch memory unit from kilobytes to bytes. * Windows: Fix Windows version display on Windows 11. # 0.25.3 * Add macOS M1 CI checks. * macOS M1: Add temperature support. * macOS: Fix leak in disk retrieval. # 0.25.2 * Windows: Fix `Process::exe` information retrieval. * All supported platforms: Correctly handle a PID owner change (#809). # 0.25.1 * Linux: Fix potential problem on `ProcessExt::exe` in case `/proc//exe` cannot be read. * Add `SystemExt::sort_disks_by`. # 0.25.0 * Linux: CPU frequency is now retrieved on-demand as expected when `CpuRefreshKind::frequency` is `true`. * `System::refresh_cpu` behaviour changed: it only computes CPU usage and doesn't retrieve CPU frequency. # 0.24.7 * Windows: Fix boot time computation. * macOS: Fix available memory computation. * Some documentation fixes. # 0.24.6 * macOS: Don't compute CPU usage when elapsed time is 0. * macOS: Fix memory leak when retrieving disks. * C interface: Fix `char` cast when platform is using unsigned `char`s. # 0.24.5 * Implement `Hash` trait on `Uid` and `Gid` types. * Remove dependency `once_cell` for targets other than `linux`, `android` and `windows`. # 0.24.4 * Windows: Fix `System::refresh_process` when required higher privileges. # 0.24.3 * macOS: Fix `System::refresh_processes` badly handling updates. * FreeBSD: Improve performance of `System::refresh_processes`. # 0.24.2 * Windows: Fix CPU usage computation. * Windows: Enable extra feature on `winapi`. * macOS: Fix executable path retrieval. # 0.24.1 * Use `saturating_*` function for mathematical operations to prevent overflows/underflows. # 0.24.0 * Rename `Processor` into `Cpu` and `ProcessorExt` into `CpuExt`. * Retrieve information about a process' owner. * Add `SystemExt::get_user_by_id`. * Add `ProcessExt::user_id`. * Add `ProcessExt::group_id`. * Add `user`-related methods to `ProcessRefreshKind`. * Linux: Improve performance when creating new `Process` by improving retrieval of user ID and group ID. # 0.23.14 * Linux: Fix processes' virtual memory computation. # 0.23.13 * macOS/FreeBSD: Fix `System::refresh_process` and `System::refresh_process_specifics` returned value. * Linux: Small performance improvement when updating process list. # 0.23.12 * Linux: Improve `System::refresh_cpu` performance. * Fix clippy lints. # 0.23.11 * Add FreeBSD to the "supported OS" list * Remove useless benchmark results # 0.23.10 * Improve documentation of `SystemExt::refresh_cpu`. # 0.23.9 * macOS: Fix disk retrieval # 0.23.8 * Windows: Fix underflow for `Process` run_time computation # 0.23.7 * macOS: Ignore non-root drive partitions # 0.23.6 * Windows: Fix process name retrieval * Windows: Unify internal process creation methods * FreeBSD: Simplify code for process update # 0.23.5 * Windows: Fix a bug which prevent all disks to be listed. # 0.23.4 * Linux (raspberry): Fix physical core count. # 0.23.3 * Impl `From` for Pid inner type. * Code cleanup. # 0.23.2 * Fix unsafe "correctness". * Correctly handle `MaybeUninit::assume_init`. # 0.23.1 * Implement `Into` trait on `Pid` * Add `#[repr(transparent)]` on `Pid` * Clean up `refresh_process` and `refresh_processes`: only `refresh_processes` removes non-existing processes. # 0.23.0 * Linux: Fix process uptime. * Rename `process_by_name` into `processes_by_name`. * Rename `process_by_name_exact` into `processes_by_name_exact`. * Change returned type of `process_by_name` and of `process_by_name_exact` into an iterator. * Improved `Signal` documentation. * Turned `Pid` type alias into a newtype. # 0.22.5 * Linux: Improve documentation on how processes queries are handled. * FreeBSD: Fix type error for 32-bit (on i386, armv6, armv7, powerpc). * Improve Pid type documentation. * Add `SystemExt::process_by_exact_name` method. * Add `SUPPORTED_SIGNALS` constant on `SystemExt`. * Fix common type aliases. * Implement `Display` for `Signal`. # 0.22.4 * Windows: Correctly handle COM initialization/deinitialization. * Linux: Fix panic when changing the limit of open files. # 0.22.3 * FreeBSD: Take ZFS ARC value into account when computing used system memory. * Add some missing `#[must_use]`. # 0.22.2 * FreeBSD: Improve memory information retrieval. # 0.22.1 * Remove forgotten debug. # 0.22.0 * Add FreeBSD support. * Create `SystemExt::refresh_processes_specifics` and `SystemExt::refresh_process_specifics` methods. * Update `ProcessExt::kill` API and add `ProcessExt::kill_with`. * Add `ProcessExt::run_time`. # 0.21.2 * Unsupported targets: Fix build. * Linux: Exclude rootfs disk type as well. * Windows: Performance improvement by lazily creating queries. # 0.21.1 * Linux: Process CPU usage cannot go above maximum value (number of CPUs * 100) anymore. * Linux: Improve processors update. * Linux: Improve processes CPU usage computation speed. # 0.21.0 * Linux: Fix processes CPU computation (if `System::refresh_cpu` wasn't used). * Fix build for unsupported targets. * Make `ProcessStatus` enum unique for all platforms. * Unify documentation over all platforms. # 0.20.5 * Linux: Prevented overflow in disk size computation (bug in `davfs2`). * Fixed clippy lints # 0.20.4 * Update libc version, allowing to remove a lot of FFI bindings. # 0.20.3 * Windows: Reworked process information retrieval * Windows: Fixed issue on `c_void` size. * Improved documentation of `ProcessExt::environ`. # 0.20.2 * Windows: Added support for getting process' current working directory * Windows: Added support for getting process' environment variables * Removed more FFI bindings and replaced them with libc's. # 0.20.1 * macOS: Added better support for sandboxing. * macOS: Added support for getting process current working directory. * Added more explanations in crate level code example. * Updated rayon version to 1.5.1. # 0.20.0 * macOS: Improved code readability. * Windows: Prevented the `taskkill.exe` console window from appearing when using `kill`. * Fixed benchmarks compilation issue. * Upgraded minimum supported Rust version to 1.54. * Removed doc-comment dependency. * Merged README and crate documentation. # 0.19.2 * Windows: Fixed swap memory information computation. # 0.19.1 * Windows: Got swap memory information. * Linux: Fixed memory information gathering (bad parsing of `/proc/meminfo`). # 0.19.0 * Renamed functions/methods to follow [Rust API guidelines on naming](https://rust-lang.github.io/api-guidelines/naming.html#getter-names-follow-rust-convention-c-getter). * Linux: Set processes' executable path from command line if not found. * Linux: Added extra information about `ProcessExt::name()`. * macOS: Removed unneeded (re)import of CoreFoundation library at compile-time. * Reworked `DiskType` enum: there is no more `Removable` variant, it's now set into the `Disk` struct. `DiskExt::is_removable` was added. * Linux: Added support for removable disks. * Linux: Ensured there's a value in `global_processor` frequency. * Fixed tests to make them a bit less strict (which was problematic when run on VMs). * Linux: Fixed CPU usage subtraction overflow. # 0.18.2 * macOS: Brand and vendor ID information were reversed. * macOS: On Apple M1 processors, the vendor ID is empty, so instead we return "Apple". * Added tests to ensure that the processors are always set after `System::new()`. # 0.18.1 * Added `SystemExt::IS_SUPPORTED` constant to allow to easily query if a system is supported or not. * Used `SystemExt::IS_SUPPORTED` to fix tests on non-supported platforms and simplify others. # 0.18.0 * Improved documentation to make it more clear how to use the different information. * Turned the `Signal` enum into a full rust one by removing the `#[repr(C)]` attribute on it. Each platform now implements its own conversion. * Removed `Signal::Stklft` which wasn't used on any supported system. * Linux: Added support for paravirtualized disks. # 0.17.5 * Improved network code: network interfaces were handled a bit differently depending on the platform, it is now unified. # 0.17.4 * Linux: fixed invalid network interface cleanup when an interface was removed from the system in `refresh_networks_list`. * Added freebsd to CI runs. * Added `cargo test` command for freebsd on CI. * freebsd: Fixed build. # 0.17.3 * Removed manual FFI bindings in both Apple and Windows targets. * Fixed C-interface compilation. * Added information on how to add new platform. # 0.17.2 * Linux: fixed `System::refresh_process` return value. # 0.17.1 * Windows: fixed process CPU usage computation. * Linux: improved CPU usage values on first query by returning 0: it now waits the second cycle before computing it to avoid abherent values. * Linux: fixed process name retrieval by using `stat` information instead. * Apple: only list local users. # 0.17.0 * Linux: fixed OS version retrieval by adding a fallback to `/etc/lsb-release`. * iOS: fixed warnings. * Renamed `ProcessStatus::to_string` method to `as_str`. * macOS: fixed CPU usage computation. # 0.16.5 * Windows: Removed trailing NUL bytes in hostname. * Added user ID and group ID. # 0.16.4 * macOS: Removed trailing NUL bytes in various values returned by the `sysctl` calls. # 0.16.3 * Updated minimum libc version to 0.2.86. # 0.16.2 * Fixed network values computation: replaced the simple arithmetic with `saturating_sub` and `saturating_add`. * Converted values read in `/proc/meminfo` from KiB to KB (because contrary to what is said in the manual, they are in KiB, not in KB). * macOS: Rewrote `get_disks` function to remove the Objective-C dependency. * Added `SystemExt::get_long_os_version`. * Linux: Fixed sequences for disks. * Linux: Allowed `/run/media` as a mount path. * Windows: Fixed disk size computation. * Linux: Fixed virtual memory size computation. # 0.16.1 * Added support for Android. * Added flag to remove APIs prohibited in Apple store. # 0.16.0 * Windows: show removable drives on Windows. * Switched to Rust 2018 edition. * Split `SystemExt::get_version` into `SystemExt::get_kernel_version` and `SystemExt::get_os_version`. * Windows: added support for `get_kernel_version` and `get_os_version`. * Changed return type of `SystemExt::get_physical_core_count` from `usize` to `Option`. * Added `SystemExt::get_physical_core_numbers`. # 0.15.9 * iOS: Fixed build. * Fixed cross-compilation. # 0.15.8 * Apple: fixed Objective-C library imports. # 0.15.7 * Added `SystemExt::get_host_name`. # 0.15.6 * Upgraded `cfg-if` dependency version to `1.0`. # 0.15.5 * Added `SystemExt::get_name` and `SystemExt::get_version`. * Added `multithread` feature, making the `rayon` dependency optional. # 0.15.4 * Apple: gig source code cleanup. * Apple: improved disk handling. * Removed manual FFI code and used libc's instead. # 0.15.3 * Prevented CPU value to be NaN. # 0.15.2 * macOS: fixed disk space computation. # 0.15.1 * Improved documentation. * Extended example. # 0.15.0 * Added `SystemExt::get_available_memory`. # 0.14.15 * Linux: improved task source code. # 0.14.14 * macOS: renamed "CPU" into "CPU Die". * macOS: added "CPU proximity" information. # 0.14.13 * Linux: improved process name retrieval. # 0.14.12 * Linux: fixed infinite recursion when gathering disk information. # 0.14.11 * Added iOS support. # 0.14.10 * Simplified `DiskType` handling by removing `From` implementation. * Linux: fixed SSD/HDD detection. # 0.14.9 * Linux: fixed CPU usage computation. * Windows: fixed load average constants. # 0.14.8 * Linux: fixed network information retrieval by replacing `usize` with `u64` because it was too small on 32 bits systems. * Linux: get each core frequency. # 0.14.7 * Raspberry Pi: fixed temperature retrieval. # 0.14.6 * Linux: fixed infinite recursion when getting disk. # 0.14.5 * Strengthened cfg checks: use "linux" and "android" instead of "unix". # 0.14.4 * Linux: fixed memory usage computation. # 0.14.3 * Linux: fixed memory usage computation. # 0.14.2 * Windows: fixed CPU usage computation overflow. * macOS: fixed CPU usage computation overflow. * Windows: retrieved command line. # 0.14.1 * Removed empty disks. # 0.14.0 * Converted KiB to KB. # 0.13.4 * Code improvements. # 0.13.3 * Linux: fixed some issues on disks retrieval. * Linux: fixed out-of-bound access in `boot_time`. * Added benchmark on `Disk::refresh`. # 0.39.2 * Windows: Greatly improve performance of `System::refresh_cpu_specifics` when CPU usage is not requested. * iOS: Fix compilation error when `user` feature is enabled. * Linux: Correctly set thread information for processes. # 0.39.1 * Linux: Fix wrong network numbers computation. # 0.39.0 * Update minimum supported rust version to `1.95`. * Add new `NetworkData::operational_state` API. * Add new `Process::cgroup_limits` API (only returning data on Linux). * All supported systems other than Windows: Improve performance of `Networks::refresh*`. * All supported systems other than Windows: Fix soundness issue when retrieving users. * Linux: Take into account parent cgroup memory limits. * Linux: Fix panic when retrieving process information on `ESXi`. * FreeBSD: Use the name of dataset as `name` for zfs disks. # 0.38.4 * macOS: Unpin `objc2-*` crates version. * Linux: Fix computation of disk size. # 0.38.3 * macOS: Improve accuracy of `System::available_memory` and `System::used_memory`. * Documentation: add missing unit for `CPU::frequency` returned value. # 0.38.2 * Implement `Error` trait for `MacAddrFromStrError`, `IpNetworkFromStrError` and `KillError` types. # 0.38.1 * macOS: Put back support for versions below macOS 12. # 0.38.0 * Add NetBSD support. * Windows: Fix unsoundness for a function used in `Motherboard` and `Product`. * Linux: Improve CPU info parsing. * Fix `serde` serialization of `MacAddr` and of `Disk::file_system`. # 0.37.2 * Improve documentation of `System::refresh_cpu_all` and of `System::refresh_cpu_specifics`. * Android: Fix `System::uptime`. * Linux: Correctly handled modified/removed `Process::exe` paths. # 0.37.1 * Fix `serde` serialization on `Process::name`. * Linux: Fix `get_cpu_frequency` on `loongarch64`. * Windows: Correctly handle invalid UTF-8 string in `Motherboard`. # 0.37.0 * Update minimum supported Rust version to `1.88` (for 2024 edition and `if let chain` feature). * Added `Component::id` API. * Linux: Greatly improve partial processes retrieval. * Linux: Simplify internal components retrieval code. # 0.36.1 * Linux: Improve processor CPU usage computation. # 0.36.0 * Add new `Motherboard` type. * Add new `Product` type. * Linux/macOS: Fix CPU usage update. * Linux: Improve `Component::label` generated `String`. * macOS: Make `Components` implement `Send` and `Sync` traits. # 0.35.2 * Linux: Fix retrieval of processor frequency on loongarch64. * Linux/Android: Improve `Process::wait` by checking if the process is still alive before waiting. * Windows: Fix `Process::wait`. # 0.35.1 * Linux: Fix processor retrieval if some information is missing. * Windows: Increase range of `windows` crate up to `< 0.63`. # 0.35.0 * Update MSRV to 1.75. * Add `System::open_files_limit`. * Add `Process::kill_and_wait` and `Process::kill_with_and_wait` methods. * `Process::open_files*` methods return `usize`. * `set_open_files_limit` argument type is `usize`. * Code example was improved. * macOS: Fix M4 CPU frequency calculation. * Linux: Correctly handle when new CPUs are added. * Linux: Ignore `autofs` disks. * Linux (raspberry pi): Retrieve more thermal zones. * Android: Update documentation to mention that newer Android version don't allow to retrieve CPU information. * Windows: Improve `Process::wait` code. * Windows: Fix `Groups::refresh`. # 0.34.2 * FreeBSD: Fix segfault when refreshing processes. # 0.34.1 * macOS: Remove forgotten debug print. # 0.34.0 * `multithread` feature is disabled by default. * Add new `Process` methods: `accumulated_cpu_time`, `exists`, `open_files` and `open_files_limit`. * `Process::wait` method now returns `Option`. * Add new `System` methods: `distribution_id_like` and `kernel_long_version`. * Turn `System::physical_core_count` method into an associated function. * Make `System::refresh_all` and `System::refresh_specifics` methods remove dead processes. * Add new `ProcessRefreshKind` refresh: `tasks`. * Fix `Group` docs. * Implement `Deserialize` trait on `DiskKind`, `MacAddr`, `IpNetwork`, `ProcessStatus`, `Signal` and `ThreadKind`. * Implement `FromStr` trait on `IpNetwork` and `MacAddr`. * Implement `Hash` trait on `DiskKind`, `MacAddr`, `ProcessStatus` and `Signal`. * macOS: Removed processes are now correctly handled when refreshing processes. * macOS: Strengthen dist list refresh. * macOS: Fix internal `cfg` handling which triggered compilation failures in some specific cases. * Linux: max cgroups memory is more reliant in case of wrong input. * Linux: Fix processes tasks update. * Linux: Improve disks retrieval. * Windows: Fix antivirus considering programs using `sysinfo` as viruses by replacing uses of `NtQueryInformationProcess` with other "mainstream" Windows API. * Windows: Improve CPU usage computation efficiency. * FreeBSD: Improve `process_procs` when there is only one process to refresh. # 0.33.1 * Linux: Fix components retrieval. * Linux: Filter out more virtual file systems for `Disk` API. * Linux/Android: Improve `System::long_os_version()`. * Apple: Add missing CPU brands for iPhone and iPads. * macOS: Improve system name retrieval in `System::long_os_version()`. * Linux/macOS: Avoid trailing whitespace and consecutive whitespace in `System::long_os_version()`. * Windows: Fix `User::groups`. * Improve documentation for `System::name`, `System::kernel_version`, `System::os_version`, `System::long_os_version` and `System::distribution_id`. # 0.33.0 * Linux: Add more ARM vendor IDs. * Linux: Improve CPU computation when refreshing a single process CPU usage. * Windows: Fix CPU frequency not being refreshed. * Windows: Improved components retrieval. * Windows: Fix inconsistent `boot_time` information. * Windows: Fix `User::groups`. * macOS: Fix network data information being limited to 32 bits. * macOS: Add newer macOS version for `System::long_os_version`. * unix: Add support for network sub-interfaces. * Use `std::env::consts::ARCH` as fallback for `System::cpu_arch`. * Add disk I/O support provided through `Disk::usage`. * Add `NetworkData::mtu`. * Add `DiskRefreshKind` to have finer-grained disks refreshes. * `Component::temperature` and `Component::max` now returns `Option`. * `Users::refresh_list`, `Groups::refresh_list`, `Components::refresh_list`, `Networks::refresh_list` and `Disks::refresh_list` methods were renamed `refresh`. * `*RefreshKind::new` methods were renamed `nothing`. * Improve documentation for `DiskUsage::read_bytes`. * Improve documentation for `Process::kill`. # 0.32.1 * Fix compilation error due to `libc` update. # 0.32.0 * Add new `Disk::is_read_only` API. * Add new `remove_dead_processes` argument to `System::refresh_processes` and `System::refresh_processes_specifics`. * macOS: Fix memory leak in disk refresh. # 0.31.4 * macOS: Force memory cleanup in disk list retrieval. # 0.31.3 * Raspberry Pi: Fix temperature retrieval. # 0.31.2 * Remove `bstr` dependency (needed for rustc development). # 0.31.1 * Downgrade version of `memchr` (needed for rustc development). # 0.31.0 * Split crate in features to only enable what you need. * Remove `System::refresh_process`, `System::refresh_process_specifics` and `System::refresh_pids` methods. * Add new argument of type `ProcessesToUpdate` to `System::refresh_processes` and `System::refresh_processes_specifics` methods. * Add new `NetworkData::ip_networks` method. * Add new `System::refresh_cpu_list` method. * Global CPU now only contains CPU usage. * Rename `TermalSensorType` to `ThermalSensorType`. * Process names is now an `OsString`. * Remove `System::global_cpu_info`. * Add `System::global_cpu_usage`. * macOS: Fix invalid CPU computation when single processes are refreshed one after the other. * Windows: Fix virtual memory computation. * Windows: Fix WoW64 parent process refresh. * Linux: Retrieve RSS (Resident Set Size) memory for cgroups. # 0.30.13 * macOS: Fix segfault when calling `Components::refresh_list` multiple times. * Windows: Fix CPU arch retrieval. # 0.30.12 * FreeBSD: Fix network interfaces retrieval (one was always missing). # 0.30.11 * macOS: Fix some invalid utf8 conversions. # 0.30.10 * Linux: Fix components not being listed anymore. # 0.30.9 * Linux/Windows: Performance improvements. * Linux/macOS/FreeBSD: Parent process ID is updated if changed as expected. # 0.30.8 * Linux: Fix missing parallelization. * Linux: Add `cargo` feature flag `linux-tmpfs` to list `tmpfs` mounts. * macOS: Fix CPU usage returning `NaN`. * `Components::refresh` is now parallelized. # 0.30.7 * Linux: Fix cgroup memory computation. * FreeBSD: Fix documentation about disk usage. # 0.30.6 * macOS: Fix missing update of process run time. * Add new `Groups` API. * Improve documentation. # 0.30.5 * Windows: Correctly retrieve processes name on 32 bits platforms. * Windows: Fix swap memory computation. # 0.30.4 * Windows: Fix misaligned read. # 0.30.3 * Improve dependency stack by updating the `windows` dependency. # 0.30.2 * Add `ThreadKind` enum. * Add `Process::thread_kind` method. # 0.30.1 * Linux: Fix invalid memory information retrieval (virtual and resident set size were reversed). # 0.30.0 * Split `System` into subtypes: `Components`, `Disks`, `Networks` and `Users`. * `brand`, `vendor_id` and `frequency` information is not set anymore on the global CPU. * Unix: Fix endless loop in user groups retrieval. * Unix/Windows: Fix infinite loop when retrieving various information because of bad usage of `Vec::reserve`. * Unix: Fix invalid usage of NULL pointer when retrieving user group name. * Linux: Fix CPU name retrieval. * Linux: Remove cgroup usage from memory computation. * Linux: Add `linux-netdevs` feature to allow to retrieve network devices. * Linux: Improve system memory information retrieval (using `statm` file instead of `stat`). * Linux: Tasks are listed in processes. * macOS: Correctly retrieve process root directory. * Windows: Add warning that `System::load_average` is not working in documentation. * Windows: Fix invalid use of NULL pointer when retrieving users groups. * Windows: Correctly retrieve process root directory. * Create new `System::cgroup_limits` method. * Remove `System::refresh_system` method. * `Disk::file_system` and `Disk::name` now return an `Option<&OsStr>`. * Implement `Display` trait on `DiskKind`. * Move from `winapi` to `windows` crate. * Add `System::cpu_arch`. * Add `System::refresh_pids` and `System::refresh_pids_specifics`. * `System::boot_time`, `System::cpu_arch`, `System::distribution_id`, `System::host_name`, `System::kernel_version`, `System::load_average`, `System::long_os_version`, `System::name`, `System::os_version` and `System::uptime` are static methods. * `ProcessRefreshKind` has a lot more of possibilities for better control over updates. * Add new `UpdateKind` enum. * Add new `MemoryRefreshKind` struct. * Add new `System::refresh_memory_specifics` method. * `Process::exe`, `Process::cwd` and `Process::root` return an `Option<&Path>`. * `Process::tasks` method is available on all platforms. * `Process::tasks` method returns a `HashSet`. * Move `System::IS_SUPPORTED`, `System::SUPPORTED_SIGNALS` and `System::MINIMUM_CPU_UPDATE_INTERVAL` constants out of `System` directly at the crate top-level. * Rename `IS_SUPPORTED` into `IS_SUPPORTED_SYSTEM`. * Fix `serde` serialization. * Add `System::refresh_cpu_frequency` and `System::refresh_cpu_all`. * Fix `sysinfo.h` and C wrapper. * Add a migration guide. # 0.29.11 * macOS: Fix bug when a user group doesn't have a name. # 0.29.10 * Linux: Correctly handle max memory value for cgroups. # 0.29.9 * Linux: Fix memory usage retrieval for cgroups. # 0.29.8 * Linux: Fix overflow bug. # 0.29.7 * macOS: Fix CPU frequency retrieval for M1 and M2. * Linux: Add support for cgroups v1/v2 for memory. * Windows: Fix processes name encoding issues. # 0.29.6 * Update minimum rust version to 1.63. * Windows: Fix memory corruption when listing processes. * Windows: Fix name inconsistency between `refresh_processes` and `refresh_process`. * `Cargo.lock` is now included to prevent minimum rust version disruptions. # 0.29.5 * Windows: Remove some undefined behaviour when listing processes. * : Use `--generate-link-to-definition` option to have better source code pages. # 0.29.4 * Windows: Improve code to retrieve network interfaces. * Improve serde documentation example. * Fix some clippy lints. # 0.29.3 * Fix some documentation examples. # 0.29.2 * : Generate documentation for all supported platforms. # 0.29.1 * Update `libc` version to 0.2.144. * Linux/FreeBSD/macOS: Fix retrieval of users groups in multi-threaded context. # 0.29.0 * Add `ProcessExt::effective_user_id` and `ProcessExt::effective_group_id`. * Rename `DiskType` into `DiskKind`. * Rename `DiskExt::type_` into `DiskExt::kind`. * macOS: Correctly handle `ProcessStatus` and remove public `ThreadStatus` field. * Windows 11: Fix CPU core usage. # 0.28.4 * macOS: Improve CPU computation. * Strengthen a process test (needed for debian). # 0.28.3 * FreeBSD/Windows: Add missing frequency for global CPU. * macOS: Fix used memory computation. * macOS: Improve available memory computation. * Windows: Fix potential panic when getting process data. # 0.28.2 * Linux: Improve CPU usage computation. # 0.28.1 * macOS: Fix overflow when computing CPU usage. # 0.28.0 * Linux: Fix name and CPU usage for processes tasks. * unix: Keep all users, even "not real" accounts. * Windows: Use SID for Users ID. * Fix C API. * Disable default cdylib compilation. * Add `serde` feature to enable serialization. * Linux: Handle `Idle` state in `ProcessStatus`. * Linux: Add brand and name of ARM CPUs. # 0.27.8 * macOS: Fix overflow when computing CPU usage. # 0.27.7 * macOS: Fix process CPU usage computation * Linux: Improve ARM CPU `brand` and `name` information. * Windows: Fix resource leak. * Documentation improvements. # 0.27.6 * Make `MacAddr` public. # 0.27.5 * Linux: Improve compatibility with upcoming `libc` changes for musl targets. # 0.27.4 * Create `SystemExt::MINIMUM_CPU_UPDATE_INTERVAL` constant. * Fix consecutive processes updates CPU usage computation. # 0.27.3 * macOS: Fix free/available memory computation. * Fix processes_by_name* lifetimes # 0.27.2 * Linux: Fix consecutive process CPU usage updates. * Linux: Ignore NFS disks. # 0.27.1 * Unix systems: Fix network address segfault issue. # 0.27.0 * Add `NetworkExt::mac_address` method and `MacAddr` type. * Linux: Fix truncated environment retrieval. * Implement `TryFrom` and `FromStr` for `Gid` and `Uid`. * Implement `TryFrom` for `Pid`. * Fix documentation of `System::new` about CPU list not loaded by default. # 0.26.9 * (backport) Linux: Improve compatibility with upcoming `libc` changes for musl targets. # 0.26.8 * Add `ProcessExt::session_id` method. * Linux: Ignore NFS disks. # 0.26.7 * Apple: Greatly improve disk retrieval (I recommend reading the pull request first comment for more information here: ). * Remove build script. # 0.26.6 * Add `Process::wait`. * Add "Good practice" entry into the crate level documentation and in the README. * Linux: More precise used memory computation. # 0.26.5 * Windows: Fix disk information retrieval. * Linux: Improve `Process` document. * Linux: Fix a compilation error if the `apple-sandbox` feature is enabled. * Internal code improvements. # 0.26.4 * Add `SystemExt::distribution_id` method. * Update `ntapi` version to `0.4`. * Update minimum supported Rust version (MSRV) to `1.59` for `ntapi` 0.4. # 0.26.3 * Update minimum supported Rust version (MSRV) to `1.56` to follow `once_cell` minor update. # 0.26.2 * Linux: Fix process information retrieval. * Linux: Get more components temperature. * Linux: Fix disk name retrieval (which in turn fixed disk type retrieval). # 0.26.1 * macOS M1: Fix segmentation fault crash. # 0.26.0 * Switch memory unit from kilobytes to bytes. * Windows: Fix Windows version display on Windows 11. # 0.25.3 * Add macOS M1 CI checks. * macOS M1: Add temperature support. * macOS: Fix leak in disk retrieval. # 0.25.2 * Windows: Fix `Process::exe` information retrieval. * All supported platforms: Correctly handle a PID owner change (#809). # 0.25.1 * Linux: Fix potential problem on `ProcessExt::exe` in case `/proc//exe` cannot be read. * Add `SystemExt::sort_disks_by`. # 0.25.0 * Linux: CPU frequency is now retrieved on-demand as expected when `CpuRefreshKind::frequency` is `true`. * `System::refresh_cpu` behaviour changed: it only computes CPU usage and doesn't retrieve CPU frequency. # 0.24.7 * Windows: Fix boot time computation. * macOS: Fix available memory computation. * Some documentation fixes. # 0.24.6 * macOS: Don't compute CPU usage when elapsed time is 0. * macOS: Fix memory leak when retrieving disks. * C interface: Fix `char` cast when platform is using unsigned `char`s. # 0.24.5 * Implement `Hash` trait on `Uid` and `Gid` types. * Remove dependency `once_cell` for targets other than `linux`, `android` and `windows`. # 0.24.4 * Windows: Fix `System::refresh_process` when required higher privileges. # 0.24.3 * macOS: Fix `System::refresh_processes` badly handling updates. * FreeBSD: Improve performance of `System::refresh_processes`. # 0.24.2 * Windows: Fix CPU usage computation. * Windows: Enable extra feature on `winapi`. * macOS: Fix executable path retrieval. # 0.24.1 * Use `saturating_*` function for mathematical operations to prevent overflows/underflows. # 0.24.0 * Rename `Processor` into `Cpu` and `ProcessorExt` into `CpuExt`. * Retrieve information about a process' owner. * Add `SystemExt::get_user_by_id`. * Add `ProcessExt::user_id`. * Add `ProcessExt::group_id`. * Add `user`-related methods to `ProcessRefreshKind`. * Linux: Improve performance when creating new `Process` by improving retrieval of user ID and group ID. # 0.23.14 * Linux: Fix processes' virtual memory computation. # 0.23.13 * macOS/FreeBSD: Fix `System::refresh_process` and `System::refresh_process_specifics` returned value. * Linux: Small performance improvement when updating process list. # 0.23.12 * Linux: Improve `System::refresh_cpu` performance. * Fix clippy lints. # 0.23.11 * Add FreeBSD to the "supported OS" list * Remove useless benchmark results # 0.23.10 * Improve documentation of `SystemExt::refresh_cpu`. # 0.23.9 * macOS: Fix disk retrieval # 0.23.8 * Windows: Fix underflow for `Process` run_time computation # 0.23.7 * macOS: Ignore non-root drive partitions # 0.23.6 * Windows: Fix process name retrieval * Windows: Unify internal process creation methods * FreeBSD: Simplify code for process update # 0.23.5 * Windows: Fix a bug which prevent all disks to be listed. # 0.23.4 * Linux (raspberry): Fix physical core count. # 0.23.3 * Impl `From` for Pid inner type. * Code cleanup. # 0.23.2 * Fix unsafe "correctness". * Correctly handle `MaybeUninit::assume_init`. # 0.23.1 * Implement `Into` trait on `Pid` * Add `#[repr(transparent)]` on `Pid` * Clean up `refresh_process` and `refresh_processes`: only `refresh_processes` removes non-existing processes. # 0.23.0 * Linux: Fix process uptime. * Rename `process_by_name` into `processes_by_name`. * Rename `process_by_name_exact` into `processes_by_name_exact`. * Change returned type of `process_by_name` and of `process_by_name_exact` into an iterator. * Improved `Signal` documentation. * Turned `Pid` type alias into a newtype. # 0.22.5 * Linux: Improve documentation on how processes queries are handled. * FreeBSD: Fix type error for 32-bit (on i386, armv6, armv7, powerpc). * Improve Pid type documentation. * Add `SystemExt::process_by_exact_name` method. * Add `SUPPORTED_SIGNALS` constant on `SystemExt`. * Fix common type aliases. * Implement `Display` for `Signal`. # 0.22.4 * Windows: Correctly handle COM initialization/deinitialization. * Linux: Fix panic when changing the limit of open files. # 0.22.3 * FreeBSD: Take ZFS ARC value into account when computing used system memory. * Add some missing `#[must_use]`. # 0.22.2 * FreeBSD: Improve memory information retrieval. # 0.22.1 * Remove forgotten debug. # 0.22.0 * Add FreeBSD support. * Create `SystemExt::refresh_processes_specifics` and `SystemExt::refresh_process_specifics` methods. * Update `ProcessExt::kill` API and add `ProcessExt::kill_with`. * Add `ProcessExt::run_time`. # 0.21.2 * Unsupported targets: Fix build. * Linux: Exclude rootfs disk type as well. * Windows: Performance improvement by lazily creating queries. # 0.21.1 * Linux: Process CPU usage cannot go above maximum value (number of CPUs * 100) anymore. * Linux: Improve processors update. * Linux: Improve processes CPU usage computation speed. # 0.21.0 * Linux: Fix processes CPU computation (if `System::refresh_cpu` wasn't used). * Fix build for unsupported targets. * Make `ProcessStatus` enum unique for all platforms. * Unify documentation over all platforms. # 0.20.5 * Linux: Prevented overflow in disk size computation (bug in `davfs2`). * Fixed clippy lints # 0.20.4 * Update libc version, allowing to remove a lot of FFI bindings. # 0.20.3 * Windows: Reworked process information retrieval * Windows: Fixed issue on `c_void` size. * Improved documentation of `ProcessExt::environ`. # 0.20.2 * Windows: Added support for getting process' current working directory * Windows: Added support for getting process' environment variables * Removed more FFI bindings and replaced them with libc's. # 0.20.1 * macOS: Added better support for sandboxing. * macOS: Added support for getting process current working directory. * Added more explanations in crate level code example. * Updated rayon version to 1.5.1. # 0.20.0 * macOS: Improved code readability. * Windows: Prevented the `taskkill.exe` console window from appearing when using `kill`. * Fixed benchmarks compilation issue. * Upgraded minimum supported Rust version to 1.54. * Removed doc-comment dependency. * Merged README and crate documentation. # 0.19.2 * Windows: Fixed swap memory information computation. # 0.19.1 * Windows: Got swap memory information. * Linux: Fixed memory information gathering (bad parsing of `/proc/meminfo`). # 0.19.0 * Renamed functions/methods to follow [Rust API guidelines on naming](https://rust-lang.github.io/api-guidelines/naming.html#getter-names-follow-rust-convention-c-getter). * Linux: Set processes' executable path from command line if not found. * Linux: Added extra information about `ProcessExt::name()`. * macOS: Removed unneeded (re)import of CoreFoundation library at compile-time. * Reworked `DiskType` enum: there is no more `Removable` variant, it's now set into the `Disk` struct. `DiskExt::is_removable` was added. * Linux: Added support for removable disks. * Linux: Ensured there's a value in `global_processor` frequency. * Fixed tests to make them a bit less strict (which was problematic when run on VMs). * Linux: Fixed CPU usage subtraction overflow. # 0.18.2 * macOS: Brand and vendor ID information were reversed. * macOS: On Apple M1 processors, the vendor ID is empty, so instead we return "Apple". * Added tests to ensure that the processors are always set after `System::new()`. # 0.18.1 * Added `SystemExt::IS_SUPPORTED` constant to allow to easily query if a system is supported or not. * Used `SystemExt::IS_SUPPORTED` to fix tests on non-supported platforms and simplify others. # 0.18.0 * Improved documentation to make it more clear how to use the different information. * Turned the `Signal` enum into a full rust one by removing the `#[repr(C)]` attribute on it. Each platform now implements its own conversion. * Removed `Signal::Stklft` which wasn't used on any supported system. * Linux: Added support for paravirtualized disks. # 0.17.5 * Improved network code: network interfaces were handled a bit differently depending on the platform, it is now unified. # 0.17.4 * Linux: fixed invalid network interface cleanup when an interface was removed from the system in `refresh_networks_list`. * Added freebsd to CI runs. * Added `cargo test` command for freebsd on CI. * freebsd: Fixed build. # 0.17.3 * Removed manual FFI bindings in both Apple and Windows targets. * Fixed C-interface compilation. * Added information on how to add new platform. # 0.17.2 * Linux: fixed `System::refresh_process` return value. # 0.17.1 * Windows: fixed process CPU usage computation. * Linux: improved CPU usage values on first query by returning 0: it now waits the second cycle before computing it to avoid abherent values. * Linux: fixed process name retrieval by using `stat` information instead. * Apple: only list local users. # 0.17.0 * Linux: fixed OS version retrieval by adding a fallback to `/etc/lsb-release`. * iOS: fixed warnings. * Renamed `ProcessStatus::to_string` method to `as_str`. * macOS: fixed CPU usage computation. # 0.16.5 * Windows: Removed trailing NUL bytes in hostname. * Added user ID and group ID. # 0.16.4 * macOS: Removed trailing NUL bytes in various values returned by the `sysctl` calls. # 0.16.3 * Updated minimum libc version to 0.2.86. # 0.16.2 * Fixed network values computation: replaced the simple arithmetic with `saturating_sub` and `saturating_add`. * Converted values read in `/proc/meminfo` from KiB to KB (because contrary to what is said in the manual, they are in KiB, not in KB). * macOS: Rewrote `get_disks` function to remove the Objective-C dependency. * Added `SystemExt::get_long_os_version`. * Linux: Fixed sequences for disks. * Linux: Allowed `/run/media` as a mount path. * Windows: Fixed disk size computation. * Linux: Fixed virtual memory size computation. # 0.16.1 * Added support for Android. * Added flag to remove APIs prohibited in Apple store. # 0.16.0 * Windows: show removable drives on Windows. * Switched to Rust 2018 edition. * Split `SystemExt::get_version` into `SystemExt::get_kernel_version` and `SystemExt::get_os_version`. * Windows: added support for `get_kernel_version` and `get_os_version`. * Changed return type of `SystemExt::get_physical_core_count` from `usize` to `Option`. * Added `SystemExt::get_physical_core_numbers`. # 0.15.9 * iOS: Fixed build. * Fixed cross-compilation. # 0.15.8 * Apple: fixed Objective-C library imports. # 0.15.7 * Added `SystemExt::get_host_name`. # 0.15.6 * Upgraded `cfg-if` dependency version to `1.0`. # 0.15.5 * Added `SystemExt::get_name` and `SystemExt::get_version`. * Added `multithread` feature, making the `rayon` dependency optional. # 0.15.4 * Apple: gig source code cleanup. * Apple: improved disk handling. * Removed manual FFI code and used libc's instead. # 0.15.3 * Prevented CPU value to be NaN. # 0.15.2 * macOS: fixed disk space computation. # 0.15.1 * Improved documentation. * Extended example. # 0.15.0 * Added `SystemExt::get_available_memory`. # 0.14.15 * Linux: improved task source code. # 0.14.14 * macOS: renamed "CPU" into "CPU Die". * macOS: added "CPU proximity" information. # 0.14.13 * Linux: improved process name retrieval. # 0.14.12 * Linux: fixed infinite recursion when gathering disk information. # 0.14.11 * Added iOS support. # 0.14.10 * Simplified `DiskType` handling by removing `From` implementation. * Linux: fixed SSD/HDD detection. # 0.14.9 * Linux: fixed CPU usage computation. * Windows: fixed load average constants. # 0.14.8 * Linux: fixed network information retrieval by replacing `usize` with `u64` because it was too small on 32 bits systems. * Linux: get each core frequency. # 0.14.7 * Raspberry Pi: fixed temperature retrieval. # 0.14.6 * Linux: fixed infinite recursion when getting disk. # 0.14.5 * Strengthened cfg checks: use "linux" and "android" instead of "unix". # 0.14.4 * Linux: fixed memory usage computation. # 0.14.3 * Linux: fixed memory usage computation. # 0.14.2 * Windows: fixed CPU usage computation overflow. * macOS: fixed CPU usage computation overflow. * Windows: retrieved command line. # 0.14.1 * Removed empty disks. # 0.14.0 * Converted KiB to KB. # 0.13.4 * Code improvements. # 0.13.3 * Linux: fixed some issues on disks retrieval. * Linux: fixed out-of-bound access in `boot_time`. * Added benchmark on `Disk::refresh`. # Migration guide ## 0.34 to 0.35 ### Major changes `Process::open_files*` methods now return a `usize`. The `set_open_files_limit` function argument type is now `usize`. ### New APIs `System` has a new `open_files_limit` method. `Process` has two new methods: `kill_and_wait` and `kill_with_and_wait`. ## 0.33 to 0.34 ### Major changes The `multithread` feature is now disabled by default. It is to reduce the issues linked to the `rayon` crate usage. The `System::physical_core_count` method was turned into an associated function. No need to have a `System` instance to get this information anymore. The `System::refresh_all` and `System::refresh_specifics` methods now remove dead processes. If you don't want the dead processes to be removed, you will need to use `System::refresh_processes_specifics` directly instead. ### New APIs The `Process` type has new methods: `accumulated_cpu_time`, `exists`, `open_files` and `open_files_limit`. The `Process::wait` method now returns `Option` instead of `ExitStatus`. The `System` type has new methods: `distribution_id_like` and `kernel_long_version`. The `ProcessRefreshKind` type has a new "refresh kind": `tasks`. ## 0.32 to 0.33 ### Major changes `Users::refresh_list`, `Groups::refresh_list`, `Components::refresh_list`, `Networks::refresh_list` and `Disks::refresh_list` methods were renamed into `refresh`. All of them except for `Users::refresh` and `Groups::refresh` expect a boolean to tell whether or not `sysinfo` should keep removed items. `Component::temperature` and `Component::max` now returns `Option` instead of returning `f32::NaN` in case the information isn't available. `*RefreshKind::new` methods were renamed `nothing` to better the match the `*RefreshKind::everything` method. ### New APIs `Disks` now has a new `refresh_specifics` method expecting a `DiskRefreshKind` argument to allow you finer-grained refreshes. The `NetworkData` type now has a new `mtu` method to retrieve the Maximum Transfer Unit. ## 0.31 to 0.32 ### Major changes `System::refresh_process` and `System::refresh_process_specifics` methods now take an extra `remove_dead_processes` argument. When set to `true`, dead processes will be removed. ## 0.30 to 0.31 With this update, the minimum supported Rust version goes up to 1.74. ### Major changes `System::refresh_process`, `System::refresh_process_specifics` and `System::refresh_pids` methods were removed. The `System::refresh_processes` and `System::refresh_processes_specifics` methods take a new argument of type `ProcessesToUpdate`. The equivalent of `System::refresh_process`, `System::refresh_process_specifics` and `System::refresh_pids` looks like this: ```rust use sysinfo::{ProcessesToUpdate, System}; let pid = 1337; let mut s = System::new(); s.refresh_processes(ProcessesToUpdate::Some(&[pid.into()])); ``` The equivalent of `System::refresh_processes` and `System::refresh_processes_specifics` looks like this: ```rust use sysinfo::{ProcessesToUpdate, System}; let mut s = System::new(); s.refresh_processes(ProcessesToUpdate::All); ``` #### Global CPU usage `System::global_cpu_info` was replaced with `System::global_cpu_usage` which returns an `f32` representing the global CPU usage and no other information. #### Features You can now enable/disable parts of `sysinfo` API through its cargo features to have smaller build (size and time). If you're only interested by network information, then you'll import `sysinfo` like this: ```toml sysinfo = { version = "0.31", default-features = false, features = ["network"] } ``` #### Renaming The `TermalSensorType` type was renamed into `ThermalSensorType`. ## 0.29 to 0.30 With this update, the minimum supported Rust version goes up to 1.69. ### Major changes There are two major changes in this update. The first one was that all the traits were removed. It means that now, if you want to use methods on `System`, you don't need to import `SystemExt` anymore. So before you had: ```rust use sysinfo::{System, SystemExt}; // `SystemExt` is needed for both `new` and `refresh_processes`. let mut s = System::new(); s.refresh_processes(); ``` And now you have: ```rust use sysinfo::System; // No need for `SystemExt` anymore! let s = System::new(); s.refresh_processes(); ``` The second major change was that the `System` type has been split into smaller types: * `Components` * `Disks` * `Networks` * `Users` The `System` type itself still handles CPU, memory and processes. ### Finer control over what is refreshed The `*RefreshKind` types now have many more options allowing you to control exactly what is retrieved. In particular, the `ProcessRefreshKind` now allows you to refresh specifically: * `cmd` * `cpu` * `disk_usage` * `environ` * `exe` * `memory` * `root` * `user` In some cases, like `user`, you might want this information to be retrieved only if it hasn't been already. For them, a new `UpdateKind` enum was added. It contains three variants: * `Never` * `Always` * `OnlyIfNotSet` Like that, you get yet another extra level of control over what's updated and when. ### Constants in `System` have been moved to crate level `System::IS_SUPPORTED` is now `sysinfo::IS_SUPPORTED_SYSTEM`. `System::SUPPORTED_SIGNALS` is now `sysinfo::SUPPORTED_SIGNALS`. `System::MINIMUM_CPU_UPDATE_INTERVAL` is now `sysinfo::MINIMUM_CPU_UPDATE_INTERVAL`. ### `System` changes `System::refresh_pids` and `System::refresh_pids_specifics` methods have been added. They allow you to be able to refresh multiple PIDs while being able to have support for `sysinfo` multi-threading context (and much better performance in any case even if disabled). Some methods are now static methods: * `boot_time` * `cpu_arch` * `distribution_id` * `host_name` * `kernel_version` * `load_average` * `long_os_version` * `name` * `os_version` * `uptime` Meaning you can call them without having an instance of `System`: ```rust println!("host name: {}", System::host_name()); ``` A new `System::refresh_memory_specifics` method and a new `MemoryRefreshKind` type were added, allowing you to control whether you want both RAM and SWAP memories to be updated or only one of the two. This change was needed because getting SWAP information on Windows is very slow. `System::tasks` method is now available on all OSes even if it only returns something on Linux. Its return type is now a `Option>` instead of `HashMap`. The tasks are listed in `processes`. ### `Disk` changes `Disk::name` and `Disk::file_system` now returns `&OsStr`. ### cgroups handling Before, `sysinfo` was handling cgroups internally and the users had no control over it. Now there is a `System::cgroup_limits` method which allows you to query this information if you need it. ### `Process` changes `Process::cwd`, `Process::exe` and `Process::root` now return an `Option<&Path>`. ### Removal of `sort_by` methods If you want to sort `Disks`, `Users` or `Components`, you can do it by calling `sort` (or equivalents) on the value returned by the `list_mut` methods. ### New `linux-netdevs` feature By default, `sysinfo` excludes network devices because they can make the retrieval hangs indefinitely. If you still want to get network devices knowing this risk, you can enable this feature. ### `Cpu` changes Information like `Cpu::brand`, `Cpu::vendor_id` or `Cpu::frequency` are not set on the "global" CPU. ## CHANGELOG If you want the full list of changes, take a look at the [CHANGELOG](https://github.com/GuillaumeGomez/sysinfo/blob/master/CHANGELOG.md). # Changelog ## 3.21.0 - Updated `windows-sys` requirement to allow version 0.60.x ## 3.20.0 This release mostly unifies the behavior/capabilities around "keeping" temporary files: - Rename `Builder::keep(bool)` (via deprecation) to `Builder::disable_cleanup(bool)` to make it clear that behaves differently from `NamedTempFile::keep()`. The former disables automatic cleanup while the latter _consumes_ the `NamedTempFile` object entirely and unsets the "temporary file" attribute (on Windows). - Rename `TempDir::into_path` (via deprecation) to `TempDir::keep` to mirror `NamedTempFile::keep`. - Add `TempDir::disable_cleanup`, `NamedTempFile::disable_cleanup`, and `TempPath::disable_cleanup` making it possible to disable automatic cleanup in-place _after_ creating a temporary file/directory (equivalent to calling `Builder::disable_cleanup` before creating the file/directory). Additionally, it adds a few spooled temporary file features: - Add `SpooledTempFile::into_file` for turning a `SpooledTempFile` into a regular unnamed temporary file, writing it to the backing storage ("rolling" it) if it was still stored in-memory. - Add `spooled_tempfile_in` and `SpooledTempFile::new_in` methods for creating spooled temporary files in a specific directory. This makes it possible to choose the backing device for your spooled temporary file which is rather important on Linux where the default temporary directory is likely backed by memory (defeating the entire point of having a spooled temporary file). Finally, this release improves documentation, especially the top-level documentation explaining which temporary file type to use. **BREAKING** for those with `deny(warnings)`: - `Builder::keep` deprecated in favor of `Builder::disable_cleanup`. - `TempDir::into_path` is deprecated in favor of `TempDir::keep`. **BREAKING**: ## 3.19.1 - Don't unlink temporary files immediately on Windows (fixes #339). Unfortunately, this seemed to corrupt the file object (possibly a Windows kernel bug) in rare cases and isn't strictly speaking necessary. ## 3.19.0 - Remove direct dependency on `cfg-if`. It's still in the tree, but we didn't really need to use it in this crate. - Add an unstable feature (`unstable-windows-keep-open-tempfile`) to test a potential fix to #339. ## 3.18.0 - Update `rustix` to 1.0.0. - Make `NamedTempFile::persist_noclobber` atomic on Apple operating systems. It's now atomic on MacOS, Windows, and Linux (depending on the OS version and filesystem used). ## 3.17.1 - Fix build with `windows-sys` 0.52. Unfortunately, we have no CI for older `windows-sys` versions at the moment... ## 3.17.0 - Make sure to use absolute paths in when creating unnamed temporary files (avoids a small race in the "immediate unlink" logic) and in `Builder::make_in` (when creating temporary files of arbitrary types). - Prevent a theoretical crash that could (maybe) happen when a temporary file is created from a drop function run in a TLS destructor. Nobody has actually reported a case of this happening in practice and I have been unable to create this scenario in a test. - When reseeding with `getrandom`, use platform (e.g., CPU) specific randomness sources where possible. - Clarify some documentation. - Unlink unnamed temporary files on windows _immediately_ when possible instead of waiting for the handle to be closed. We open files with "Unix" semantics, so this is generally possible. ## 3.16.0 - Update `getrandom` to `0.3.0` (thanks to @paolobarbolini). - Allow `windows-sys` versions `0.59.x` in addition to `0.59.0` (thanks @ErichDonGubler). - Improved security documentation (thanks to @n0toose for collaborating with me on this). ## 3.15.0 Re-seed the per-thread RNG from system randomness when we repeatedly fail to create temporary files (#314). This resolves a potential DoS vector (#178) while avoiding `getrandom` in the common case where it's necessary. The feature is optional but enabled by default via the `getrandom` feature. For libc-free builds, you'll either need to disable this feature or opt-in to a different [`getrandom` backend](https://github.com/rust-random/getrandom?tab=readme-ov-file#opt-in-backends). ## 3.14.0 - Make the wasip2 target work (requires tempfile's "nightly" feature to be enabled). [#305](https://github.com/Stebalien/tempfile/pull/305). - Allow older windows-sys versions [#304](https://github.com/Stebalien/tempfile/pull/304). ## 3.13.0 - Add `with_suffix` constructors for easily creating new temporary files with a specific suffix (e.g., a specific file extension). Thanks to @Borgerr. - Update dependencies (fastrand & rustix). ## 3.12.0 - Add a `keep(keep: bool)` function to builder that suppresses delete-on-drop behavior (thanks to @RalfJung). - Update `windows-sys` from 0.52 to 0.59. ## 3.11.0 - Add the ability to override the default temporary directory. This API shouldn't be used in general, but there are some cases where it's unavoidable. ## 3.10.1 - Handle potential integer overflows in 32-bit systems when seeking/truncating "spooled" temporary files past 4GiB (2³²). - Handle a theoretical 32-bit overflow when generating a temporary file name larger than 4GiB. Now it'll panic (on allocation failure) rather than silently succeeding due to wraparound. Thanks to @stoeckmann for finding and fixing both of these issues. ## 3.10.0 - Drop `redox_syscall` dependency, we now use `rustix` for Redox. - Add `Builder::permissions` for setting the permissions on temporary files and directories (thanks to @Byron). - Update rustix to 0.38.31. - Update fastrand to 2.0.1. ## 3.9.0 - Updates windows-sys to 0.52 - Updates minimum rustix version to 0.38.25 ## 3.8.1 - Update rustix to fix a potential panic on `persist_noclobber` on android. - Update redox_syscall to 0.4 (on redox). - Fix some docs typos. ## 3.8.0 - Added `with_prefix` and `with_prefix_in` to `TempDir` and `NamedTempFile` to make it easier to create temporary files/directories with nice prefixes. - Misc cleanups. ## 3.7.1 - Tempfile builds on haiku again. - Under the hood, we've switched from the unlinkat/linkat syscalls to the regular unlink/link syscalls where possible. ## 3.7.0 BREAKING: This release updates the MSRV to 1.63. This isn't an API-breaking change (so no major release) but it's still a breaking change for some users. - Update fastrand from 1.6 to 2.0 - Update rustix to 0.38 - Updates the MSRV to 1.63. - Provide AsFd/AsRawFd on wasi. ## 3.6.0 - Update windows-sys to 0.48. - Update rustix min version to 0.37.11 - Forward some `NamedTempFile` and `SpooledTempFile` methods to the underlying `File` object for better performance (especially vectorized writes, etc.). - Implement `AsFd` and `AsHandle`. - Misc documentation fixes and code cleanups. ## 3.5.0 - Update rustix from 0.36 to 0.37.1. This makes wasi work on rust stable - Update `windows-sys`, `redox_syscall` - BREAKING: Remove the implementation of `Write for &NamedTempFile where &F: Write`. Unfortunately, this can cause compile issues in unrelated code (https://github.com/Stebalien/tempfile/issues/224). ## 3.4.0 SECURITY: Prior `tempfile` releases depended on `remove_dir_all` version 0.5.0 which was vulnerable to a [TOCTOU race](https://github.com/XAMPPRocky/remove_dir_all/security/advisories/GHSA-mc8h-8q98-g5hr). This same race is present in rust versions prior to 1.58.1. Features: - Generalized temporary files: `NamedTempFile` can now abstract over different kinds of files (e.g., unix domain sockets, pipes, etc.): - Add `Builder::make` and `Builder::make_in` for generalized temp file creation. - Add `NamedTempFile::from_parts` to complement `NamedTempFile::into_parts`. - Add generic parameter to `NamedTempFile` to support wrapping non-File types. Bug Fixes/Improvements: - Don't try to create a temporary file multiple times if the file path has been fully specified by the user (no random characters). - `NamedTempFile::persist_noclobber` is now always atomic on linux when `renameat_with` is supported. Previously, it would first link the new path, then unlink the previous path. - Fix compiler warnings on windows. Trivia: - Switch from `libc` to `rustix` on wasi/unix. This now makes direct syscalls instead of calling through libc. - Remove `remove_dir_all` dependency. The rust standard library has optimized their internal version significantly. - Switch to official windows-sys windows bindings. Breaking: - The minimum rust version is now `1.48.0`. - Mark most functions as `must_use`. - Uses direct syscalls on linux by default, instead of libc. - The new type parameter in `NamedTempFile` may lead to type inference issues in some cases. ## 3.3.0 Features: - Replace rand with fastrand for a significantly smaller dependency tree. Cryptographic randomness isn't necessary for temporary file names, and isn't all that helpful either. - Add limited WASI support. - Add a function to extract the inner data from a `SpooledTempFile`. Bug Fixes: - Make it possible to persist unnamed temporary files on linux by removing the `O_EXCL` flag. - Fix redox minimum crate version. ## 3.2.0 Features: - Bump rand dependency to `0.8`. - Bump cfg-if dependency to `1.0` Other than that, this release mostly includes small cleanups and simplifications. Breaking: The minimum rust version is now `1.40.0`. ## 3.1.0 Features: - Bump rand dependency to `0.7`. Breaking: The minimum rust version is now `1.32.0`. ## 3.0.9 Documentation: - Add an example for reopening a named temporary file. - Flesh out the security documentation. Features: - Introduce an `append` option to the builder. - Errors: - No longer implement the soft-deprecated `description`. - Implement `source` instead of `cause`. Breaking: The minimum rust version is now 1.30. ## 3.0.8 This is a bugfix release. Fixes: - Export `PathPersistError`. - Fix a bug where flushing a `SpooledTempFile` to disk could fail to write part of the file in some rare, yet-to-reproduced cases. ## 3.0.7 Breaking: - `Builder::prefix` and `Builder::suffix` now accept a generic `&AsRef`. This could affect type inference. - Temporary files (except unnamed temporary files on Windows and Linux >= 3.11) now use absolute path names. This will break programs that create temporary files relative to their current working directory when they don't have the search permission (x) on some ancestor directory. This is only likely to affect programs with strange chroot-less filesystem sandboxes. If you believe you're affected by this issue, please comment on #40. Features: - Accept anything implementing `&AsRef` in the builder: &OsStr, &OsString, &Path, etc. Fixes: - Fix LFS support. - Use absolute paths for named temporary files to guard against changes in the current directory. - Use absolute paths when creating unnamed temporary files on platforms that can't create unlinked or auto-deleted temporary files. This fixes a very unlikely race where the current directory could change while the temporary file is being created. Misc: - Use modern stdlib features to avoid custom unsafe code. This reduces the number of unsafe blocks from 12 to 4. ## 3.0.6 - Don't hide temporary files on windows, fixing #66 and #69. ## 3.0.5 Features: - Added a spooled temporary file implementation. This temporary file variant starts out as an in-memory temporary file but "rolls-over" onto disk when it grows over a specified size (#68). - Errors are now annotated with paths to make debugging easier (#73). Misc: - The rand version has been bumped to 0.6 (#74). Bugs: - Tempfile compiles again on Redox (#75). ## 3.0.4 - Now compiles on unsupported platforms. ## 3.0.3 - update rand to 0.5 ## 3.0.2 - Actually *delete* temporary files on non-Linux unix systems (thanks to @oliverhenshaw for the fix and a test case). ## 3.0.1 - Restore NamedTempFile::new_in ## 3.0.0 - Adds temporary directory support (@KodrAus) - Allow closing named temporary files without deleting them (@jasonwhite) ## 2.2.0 - Redox Support ## 2.1.6 - Remove build script and bump minimum rustc version to 1.9.0 ## 2.1.5 - Don't build platform-specific dependencies on all platforms. - Cleanup some documentation. ## 2.1.4 - Fix crates.io tags. No interesting changes. ## 2.1.3 Export `PersistError`. ## 2.1.2 Add `Read`/`Write`/`Seek` impls on `&NamedTempFile`. This mirrors the implementations on `&File`. One can currently just deref to a `&File` but these implementations are more discoverable. ## 2.1.1 Add LFS Support. ## 2.1.0 - Implement `AsRef` for `NamedTempFile` allowing named temporary files to be borrowed as `File`s. - Add a method to convert a `NamedTempFile` to an unnamed temporary `File`. ## 2.0.1 - Arm bugfix ## 2.0.0 This release replaces `TempFile` with a `tempfile()` function that returns `std::fs::File` objects. These are significantly more useful because most rust libraries expect normal `File` objects. To continue supporting shared temporary files, this new version adds a `reopen()` method to `NamedTempFile`. # Version 0.2.14 (2025-02-19) * Add "malloc_size_of" feature for heap size measurement support # Version 0.2.13 (2023-12-02) * add default-on "std" feature for no_std support * added has_capacity method for checking if something is the empty singleton * marked more things as `#[inline]` * added license files * appeased clippy # Previous Versions *shrug* # Version 0.2.15 (2025-02-19) * Support AutoTArrays created from rust in Gecko FFI mode. * Add extract_if. * Add const new() support behind feature flag. * Fix `thin_vec` macro not being hygienic when recursing * Improve extend() performance. # Version 0.2.14 (2025-02-19) * Add "malloc_size_of" feature for heap size measurement support # Version 0.2.13 (2023-12-02) * add default-on "std" feature for no_std support * added has_capacity method for checking if something is the empty singleton * marked more things as `#[inline]` * added license files * appeased clippy # Previous Versions *shrug* # Version 0.2.16 (2026-04-14) * Fix reserve() on auto arrays in gecko-ffi mode. * Fix two double-drop issues with ThinVec::clear() and ThinVec::into_iter() when the Drop implementation of the item panics. # Version 0.2.15 (2026-04-08) * Support AutoTArrays created from Rust in Gecko FFI mode. * Add extract_if. * Add const new() support behind feature flag. * Fix `thin_vec` macro not being hygienic when recursing * Improve extend() performance. # Version 0.2.14 (2025-03-23) * Add "malloc_size_of" feature for heap size measurement support # Version 0.2.13 (2023-12-02) * add default-on "std" feature for no_std support * added has_capacity method for checking if something is the empty singleton * marked more things as `#[inline]` * added license files * appeased Clippy # Previous Versions *shrug* # 1.50.0 (Mar 3rd, 2026) ### Added - net: add `TcpStream::set_zero_linger` ([#7837]) - rt: add `is_rt_shutdown_err` ([#7771]) ### Changed - io: add optimizer hint that `memchr` returns in-bounds pointer ([#7792]) - io: implement vectored writes for `write_buf` ([#7871]) - runtime: panic when `event_interval` is set to 0 ([#7838]) - runtime: shorten default thread name to fit in Linux limit ([#7880]) - signal: remember the result of `SetConsoleCtrlHandler` ([#7833]) - signal: specialize windows `Registry` ([#7885]) ### Fixed - io: always cleanup `AsyncFd` registration list on deregister ([#7773]) - macros: remove (most) local `use` declarations in `tokio::select!` ([#7929]) - net: fix `GET_BUF_SIZE` constant for `target_os = "android"` ([#7889]) - runtime: avoid redundant unpark in current_thread scheduler ([#7834]) - runtime: don't park in `current_thread` if `before_park` defers waker ([#7835]) - io: fix write readiness on ESP32 on short writes ([#7872]) - runtime: wake deferred tasks before entering `block_in_place` ([#7879]) - sync: drop rx waker when oneshot receiver is dropped ([#7886]) - runtime: fix double increment of `num_idle_threads` on shutdown ([#7910], [#7918], [#7922]) ### Unstable - fs: check for io-uring opcode support ([#7815]) - runtime: avoid lock acquisition after uring init ([#7850]) ### Documented - docs: update outdated unstable features section ([#7839]) - io: clarify the behavior of `AsyncWriteExt::shutdown()` ([#7908]) - io: explain how to flush stdout/stderr ([#7904]) - io: fix incorrect and confusing `AsyncWrite` documentation ([#7875]) - rt: clarify the documentation of `Runtime::spawn` ([#7803]) - rt: fix missing quotation in docs ([#7925]) - runtime: correct the default thread name in docs ([#7896]) - runtime: fix `event_interval` doc ([#7932]) - sync: clarify RwLock fairness documentation ([#7919]) - sync: clarify that `recv` returns `None` once closed and no more messages ([#7920]) - task: clarify when to use `spawn_blocking` vs dedicated threads ([#7923]) - task: doc that task drops before `JoinHandle` completion ([#7825]) - signal: guarantee that listeners never return `None` ([#7869]) - task: fix task module feature flags in docs ([#7891]) - task: fix two typos ([#7913]) - task: improve the docs of `Builder::spawn_local` ([#7828]) - time: add docs about auto-advance and when to use sleep ([#7858]) - util: fix typo in docs ([#7926]) [#7771]: https://github.com/tokio-rs/tokio/pull/7771 [#7773]: https://github.com/tokio-rs/tokio/pull/7773 [#7792]: https://github.com/tokio-rs/tokio/pull/7792 [#7803]: https://github.com/tokio-rs/tokio/pull/7803 [#7815]: https://github.com/tokio-rs/tokio/pull/7815 [#7825]: https://github.com/tokio-rs/tokio/pull/7825 [#7828]: https://github.com/tokio-rs/tokio/pull/7828 [#7833]: https://github.com/tokio-rs/tokio/pull/7833 [#7834]: https://github.com/tokio-rs/tokio/pull/7834 [#7835]: https://github.com/tokio-rs/tokio/pull/7835 [#7837]: https://github.com/tokio-rs/tokio/pull/7837 [#7838]: https://github.com/tokio-rs/tokio/pull/7838 [#7839]: https://github.com/tokio-rs/tokio/pull/7839 [#7850]: https://github.com/tokio-rs/tokio/pull/7850 [#7858]: https://github.com/tokio-rs/tokio/pull/7858 [#7869]: https://github.com/tokio-rs/tokio/pull/7869 [#7871]: https://github.com/tokio-rs/tokio/pull/7871 [#7872]: https://github.com/tokio-rs/tokio/pull/7872 [#7875]: https://github.com/tokio-rs/tokio/pull/7875 [#7879]: https://github.com/tokio-rs/tokio/pull/7879 [#7880]: https://github.com/tokio-rs/tokio/pull/7880 [#7885]: https://github.com/tokio-rs/tokio/pull/7885 [#7886]: https://github.com/tokio-rs/tokio/pull/7886 [#7889]: https://github.com/tokio-rs/tokio/pull/7889 [#7891]: https://github.com/tokio-rs/tokio/pull/7891 [#7896]: https://github.com/tokio-rs/tokio/pull/7896 [#7904]: https://github.com/tokio-rs/tokio/pull/7904 [#7908]: https://github.com/tokio-rs/tokio/pull/7908 [#7910]: https://github.com/tokio-rs/tokio/pull/7910 [#7913]: https://github.com/tokio-rs/tokio/pull/7913 [#7918]: https://github.com/tokio-rs/tokio/pull/7918 [#7919]: https://github.com/tokio-rs/tokio/pull/7919 [#7920]: https://github.com/tokio-rs/tokio/pull/7920 [#7922]: https://github.com/tokio-rs/tokio/pull/7922 [#7923]: https://github.com/tokio-rs/tokio/pull/7923 [#7925]: https://github.com/tokio-rs/tokio/pull/7925 [#7926]: https://github.com/tokio-rs/tokio/pull/7926 [#7929]: https://github.com/tokio-rs/tokio/pull/7929 [#7932]: https://github.com/tokio-rs/tokio/pull/7932 # 1.49.0 (January 3rd, 2026) ### Added * net: add support for `TCLASS` option on IPv6 ([#7781]) * runtime: stabilize `runtime::id::Id` ([#7125]) * task: implement `Extend` for `JoinSet` ([#7195]) * task: stabilize the `LocalSet::id()` ([#7776]) ### Changed * net: deprecate `{TcpStream,TcpSocket}::set_linger` ([#7752]) ### Fixed * macros: fix the hygiene issue of `join!` and `try_join!` ([#7766]) * runtime: revert "replace manual vtable definitions with Wake" ([#7699]) * sync: return `TryRecvError::Disconnected` from `Receiver::try_recv` after `Receiver::close` ([#7686]) * task: remove unnecessary trait bounds on the `Debug` implementation ([#7720]) ### Unstable * fs: handle `EINTR` in `fs::write` for io-uring ([#7786]) * fs: support io-uring with `tokio::fs::read` ([#7696]) * runtime: disable io-uring on `EPERM` ([#7724]) * time: add alternative timer for better multicore scalability ([#7467]) ### Documented * docs: fix a typos in `bounded.rs` and `park.rs` ([#7817]) * io: add `SyncIoBridge` cross-references to `copy` and `copy_buf` ([#7798]) * io: doc that `AsyncWrite` does not inherit from `std::io::Write` ([#7705]) * metrics: clarify that `num_alive_tasks` is not strongly consistent ([#7614]) * net: clarify the cancellation safety of the `TcpStream::peek` ([#7305]) * net: clarify the drop behavior of `unix::OwnedWriteHalf` ([#7742]) * net: clarify the platform-dependent backlog in `TcpSocket` docs ([#7738]) * runtime: mention `LocalRuntime` in `new_current_thread` docs ([#7820]) * sync: add missing period to `mpsc::Sender::try_send` docs ([#7721]) * sync: clarify the cancellation safety of `oneshot::Receiver` ([#7780]) * sync: improve the docs for the `errors` of mpsc ([#7722]) * task: add example for `spawn_local` usage on local runtime ([#7689]) [#7125]: https://github.com/tokio-rs/tokio/pull/7125 [#7195]: https://github.com/tokio-rs/tokio/pull/7195 [#7305]: https://github.com/tokio-rs/tokio/pull/7305 [#7467]: https://github.com/tokio-rs/tokio/pull/7467 [#7614]: https://github.com/tokio-rs/tokio/pull/7614 [#7686]: https://github.com/tokio-rs/tokio/pull/7686 [#7689]: https://github.com/tokio-rs/tokio/pull/7689 [#7696]: https://github.com/tokio-rs/tokio/pull/7696 [#7699]: https://github.com/tokio-rs/tokio/pull/7699 [#7705]: https://github.com/tokio-rs/tokio/pull/7705 [#7720]: https://github.com/tokio-rs/tokio/pull/7720 [#7721]: https://github.com/tokio-rs/tokio/pull/7721 [#7722]: https://github.com/tokio-rs/tokio/pull/7722 [#7724]: https://github.com/tokio-rs/tokio/pull/7724 [#7738]: https://github.com/tokio-rs/tokio/pull/7738 [#7742]: https://github.com/tokio-rs/tokio/pull/7742 [#7752]: https://github.com/tokio-rs/tokio/pull/7752 [#7766]: https://github.com/tokio-rs/tokio/pull/7766 [#7776]: https://github.com/tokio-rs/tokio/pull/7776 [#7780]: https://github.com/tokio-rs/tokio/pull/7780 [#7781]: https://github.com/tokio-rs/tokio/pull/7781 [#7786]: https://github.com/tokio-rs/tokio/pull/7786 [#7798]: https://github.com/tokio-rs/tokio/pull/7798 [#7817]: https://github.com/tokio-rs/tokio/pull/7817 [#7820]: https://github.com/tokio-rs/tokio/pull/7820 # 1.48.0 (October 14th, 2025) The MSRV is increased to 1.71. ### Added - fs: add `File::max_buf_size` ([#7594]) - io: export `Chain` of `AsyncReadExt::chain` ([#7599]) - net: add `SocketAddr::as_abstract_name` ([#7491]) - net: add `TcpStream::quickack` and `TcpStream::set_quickack` ([#7490]) - net: implement `AsRef` for `TcpStream` and `UnixStream` ([#7573]) - task: add `LocalKey::try_get` ([#7666]) - task: implement `Ord` for `task::Id` ([#7530]) ### Changed - deps: bump windows-sys to version 0.61 ([#7645]) - fs: preserve `max_buf_size` when cloning a `File` ([#7593]) - macros: suppress `clippy::unwrap_in_result` in `#[tokio::main]` ([#7651]) - net: remove `PollEvented` noise from Debug formats ([#7675]) - process: upgrade `Command::spawn_with` to use `FnOnce` ([#7511]) - sync: remove inner mutex in `SetOnce` ([#7554]) - sync: use `UnsafeCell::get_mut` in `Mutex::get_mut` and `RwLock::get_mut` ([#7569]) - time: reduce the generated code size of `Timeout::poll` ([#7535]) ### Fixed - macros: fix hygiene issue in `join!` and `try_join!` ([#7638]) - net: fix copy/paste errors in udp peek methods ([#7604]) - process: fix error when runtime is shut down on nightly-2025-10-12 ([#7672]) - runtime: use release ordering in `wake_by_ref()` even if already woken ([#7622]) - sync: close the `broadcast::Sender` in `broadcast::Sender::new()` ([#7629]) - sync: fix implementation of unused `RwLock::try_*` methods ([#7587]) ### Unstable - tokio: use cargo features instead of `--cfg` flags for `taskdump` and `io_uring` ([#7655], [#7621]) - fs: support `io_uring` in `fs::write` ([#7567]) - fs: support `io_uring` with `File::open()` ([#7617]) - fs: support `io_uring` with `OpenOptions` ([#7321]) - macros: add `local` runtime flavor ([#7375], [#7597]) ### Documented - io: clarify the zero capacity case of `AsyncRead::poll_read` ([#7580]) - io: fix typos in the docs of `AsyncFd` readiness guards ([#7583]) - net: clarify socket gets closed on drop ([#7526]) - net: clarify the behavior of `UCred::pid()` on Cygwin ([#7611]) - net: clarify the supported platform of `set_reuseport()` and `reuseport()` ([#7628]) - net: qualify that `SO_REUSEADDR` is only set on Unix ([#7533]) - runtime: add guide for choosing between runtime types ([#7635]) - runtime: clarify the behavior of `Handle::block_on` ([#7665]) - runtime: clarify the edge case of `Builder::global_queue_interval()` ([#7605]) - sync: clarify bounded channel panic behavior ([#7641]) - sync: clarify the behavior of `tokio::sync::watch::Receiver` ([#7584]) - sync: document cancel safety on `SetOnce::wait` ([#7506]) - sync: fix the docs of `parking_lot` feature flag ([#7663]) - sync: improve the docs of `UnboundedSender::send` ([#7661]) - sync: improve the docs of `sync::watch` ([#7601]) - sync: reword allocation failure paragraph in broadcast docs ([#7595]) - task: clarify the behavior of several `spawn_local` methods ([#7669]) - task: clarify the task ID reuse guarantees ([#7577]) - task: improve the example of `poll_proceed` ([#7586]) [#7321]: https://github.com/tokio-rs/tokio/pull/7321 [#7375]: https://github.com/tokio-rs/tokio/pull/7375 [#7490]: https://github.com/tokio-rs/tokio/pull/7490 [#7491]: https://github.com/tokio-rs/tokio/pull/7491 [#7494]: https://github.com/tokio-rs/tokio/pull/7494 [#7506]: https://github.com/tokio-rs/tokio/pull/7506 [#7511]: https://github.com/tokio-rs/tokio/pull/7511 [#7526]: https://github.com/tokio-rs/tokio/pull/7526 [#7530]: https://github.com/tokio-rs/tokio/pull/7530 [#7533]: https://github.com/tokio-rs/tokio/pull/7533 [#7535]: https://github.com/tokio-rs/tokio/pull/7535 [#7554]: https://github.com/tokio-rs/tokio/pull/7554 [#7567]: https://github.com/tokio-rs/tokio/pull/7567 [#7569]: https://github.com/tokio-rs/tokio/pull/7569 [#7573]: https://github.com/tokio-rs/tokio/pull/7573 [#7577]: https://github.com/tokio-rs/tokio/pull/7577 [#7580]: https://github.com/tokio-rs/tokio/pull/7580 [#7583]: https://github.com/tokio-rs/tokio/pull/7583 [#7584]: https://github.com/tokio-rs/tokio/pull/7584 [#7586]: https://github.com/tokio-rs/tokio/pull/7586 [#7587]: https://github.com/tokio-rs/tokio/pull/7587 [#7593]: https://github.com/tokio-rs/tokio/pull/7593 [#7594]: https://github.com/tokio-rs/tokio/pull/7594 [#7595]: https://github.com/tokio-rs/tokio/pull/7595 [#7597]: https://github.com/tokio-rs/tokio/pull/7597 [#7599]: https://github.com/tokio-rs/tokio/pull/7599 [#7601]: https://github.com/tokio-rs/tokio/pull/7601 [#7604]: https://github.com/tokio-rs/tokio/pull/7604 [#7605]: https://github.com/tokio-rs/tokio/pull/7605 [#7611]: https://github.com/tokio-rs/tokio/pull/7611 [#7617]: https://github.com/tokio-rs/tokio/pull/7617 [#7621]: https://github.com/tokio-rs/tokio/pull/7621 [#7622]: https://github.com/tokio-rs/tokio/pull/7622 [#7628]: https://github.com/tokio-rs/tokio/pull/7628 [#7629]: https://github.com/tokio-rs/tokio/pull/7629 [#7635]: https://github.com/tokio-rs/tokio/pull/7635 [#7638]: https://github.com/tokio-rs/tokio/pull/7638 [#7641]: https://github.com/tokio-rs/tokio/pull/7641 [#7645]: https://github.com/tokio-rs/tokio/pull/7645 [#7651]: https://github.com/tokio-rs/tokio/pull/7651 [#7655]: https://github.com/tokio-rs/tokio/pull/7655 [#7661]: https://github.com/tokio-rs/tokio/pull/7661 [#7663]: https://github.com/tokio-rs/tokio/pull/7663 [#7665]: https://github.com/tokio-rs/tokio/pull/7665 [#7666]: https://github.com/tokio-rs/tokio/pull/7666 [#7669]: https://github.com/tokio-rs/tokio/pull/7669 [#7672]: https://github.com/tokio-rs/tokio/pull/7672 [#7675]: https://github.com/tokio-rs/tokio/pull/7675 # 1.47.3 (Januar 3rd, 2026) ### Fixed * sync: return `TryRecvError::Disconnected` from `Receiver::try_recv` after `Receiver::close` ([#7686]) # 1.47.2 (October 14th, 2025) ### Fixed - runtime: use release ordering in `wake_by_ref()` even if already woken ([#7622]) - sync: close the `broadcast::Sender` in `broadcast::Sender::new()` ([#7629]) - macros: fix hygiene issue in `join!` and `try_join!` ([#7638]) - process: fix error when runtime is shut down on nightly-2025-10-12 ([#7672]) [#7622]: https://github.com/tokio-rs/tokio/pull/7622 [#7629]: https://github.com/tokio-rs/tokio/pull/7629 [#7638]: https://github.com/tokio-rs/tokio/pull/7638 [#7672]: https://github.com/tokio-rs/tokio/pull/7672 # 1.47.1 (August 1st, 2025) ### Fixed - process: fix panic from spurious pidfd wakeup ([#7494]) - sync: fix broken link of Python `asyncio.Event` in `SetOnce` docs ([#7485]) [#7485]: https://github.com/tokio-rs/tokio/pull/7485 # 1.47.0 (July 25th, 2025) This release adds `poll_proceed` and `cooperative` to the `coop` module for cooperative scheduling, adds `SetOnce` to the `sync` module which provides similar functionality to [`std::sync::OnceLock`], and adds a new method `sync::Notify::notified_owned()` which returns an `OwnedNotified` without a lifetime parameter. ## Added - coop: add `cooperative` and `poll_proceed` ([#7405]) - sync: add `SetOnce` ([#7418]) - sync: add `sync::Notify::notified_owned()` ([#7465]) ## Changed - deps: upgrade windows-sys 0.52 → 0.59 ([#7117]) - deps: update to socket2 v0.6 ([#7443]) - sync: improve `AtomicWaker::wake` performance ([#7450]) ## Documented - metrics: fix listed feature requirements for some metrics ([#7449]) - runtime: improve safety comments of `Readiness<'_>` ([#7415]) [#7117]: https://github.com/tokio-rs/tokio/pull/7117 [#7405]: https://github.com/tokio-rs/tokio/pull/7405 [#7415]: https://github.com/tokio-rs/tokio/pull/7415 [#7418]: https://github.com/tokio-rs/tokio/pull/7418 [#7443]: https://github.com/tokio-rs/tokio/pull/7443 [#7449]: https://github.com/tokio-rs/tokio/pull/7449 [#7450]: https://github.com/tokio-rs/tokio/pull/7450 [#7465]: https://github.com/tokio-rs/tokio/pull/7465 # 1.46.1 (July 4th, 2025) This release fixes incorrect spawn locations in runtime task hooks for tasks spawned using `tokio::spawn` rather than `Runtime::spawn`. This issue only affected the spawn location in `TaskMeta::spawned_at`, and did not affect task locations in Tracing events. ## Unstable - runtime: add `TaskMeta::spawned_at` tracking where a task was spawned ([#7440]) [#7440]: https://github.com/tokio-rs/tokio/pull/7440 # 1.46.0 (July 2nd, 2025) ## Fixed - net: fixed `TcpStream::shutdown` incorrectly returning an error on macOS ([#7290]) ## Added - sync: `mpsc::OwnedPermit::{same_channel, same_channel_as_sender}` methods ([#7389]) - macros: `biased` option for `join!` and `try_join!`, similar to `select!` ([#7307]) - net: support for cygwin ([#7393]) - net: support `pipe::OpenOptions::read_write` on Android ([#7426]) - net: add `Clone` implementation for `net::unix::SocketAddr` ([#7422]) ## Changed - runtime: eliminate unnecessary lfence while operating on `queue::Local` ([#7340]) - task: disallow blocking in `LocalSet::{poll,drop}` ([#7372]) ## Unstable - runtime: add `TaskMeta::spawn_location` tracking where a task was spawned ([#7417]) - runtime: removed borrow from `LocalOptions` parameter to `runtime::Builder::build_local` ([#7346]) ## Documented - io: clarify behavior of seeking when `start_seek` is not used ([#7366]) - io: document cancellation safety of `AsyncWriteExt::flush` ([#7364]) - net: fix docs for `recv_buffer_size` method ([#7336]) - net: fix broken link of `RawFd` in `TcpSocket` docs ([#7416]) - net: update `AsRawFd` doc link to current Rust stdlib location ([#7429]) - readme: fix double period in reactor description ([#7363]) - runtime: add doc note that `on_*_task_poll` is unstable ([#7311]) - sync: update broadcast docs on allocation failure ([#7352]) - time: add a missing panic scenario of `time::advance` ([#7394]) [#7290]: https://github.com/tokio-rs/tokio/pull/7290 [#7307]: https://github.com/tokio-rs/tokio/pull/7307 [#7311]: https://github.com/tokio-rs/tokio/pull/7311 [#7336]: https://github.com/tokio-rs/tokio/pull/7336 [#7340]: https://github.com/tokio-rs/tokio/pull/7340 [#7346]: https://github.com/tokio-rs/tokio/pull/7346 [#7352]: https://github.com/tokio-rs/tokio/pull/7352 [#7363]: https://github.com/tokio-rs/tokio/pull/7363 [#7364]: https://github.com/tokio-rs/tokio/pull/7364 [#7366]: https://github.com/tokio-rs/tokio/pull/7366 [#7372]: https://github.com/tokio-rs/tokio/pull/7372 [#7389]: https://github.com/tokio-rs/tokio/pull/7389 [#7393]: https://github.com/tokio-rs/tokio/pull/7393 [#7394]: https://github.com/tokio-rs/tokio/pull/7394 [#7416]: https://github.com/tokio-rs/tokio/pull/7416 [#7422]: https://github.com/tokio-rs/tokio/pull/7422 [#7426]: https://github.com/tokio-rs/tokio/pull/7426 [#7429]: https://github.com/tokio-rs/tokio/pull/7429 [#7417]: https://github.com/tokio-rs/tokio/pull/7417 # 1.45.1 (May 24th, 2025) This fixes a regression on the wasm32-unknown-unknown target, where code that previously did not panic due to calls to `Instant::now()` started failing. This is due to the stabilization of the first time-based metric. ### Fixed - Disable time-based metrics on wasm32-unknown-unknown ([#7322]) [#7322]: https://github.com/tokio-rs/tokio/pull/7322 # 1.45.0 (May 5th, 2025) ### Added - metrics: stabilize `worker_total_busy_duration`, `worker_park_count`, and `worker_unpark_count` ([#6899], [#7276]) - process: add `Command::spawn_with` ([#7249]) ### Changed - io: do not require `Unpin` for some trait impls ([#7204]) - rt: mark `runtime::Handle` as unwind safe ([#7230]) - time: revert internal sharding implementation ([#7226]) ### Unstable - rt: remove alt multi-threaded runtime ([#7275]) [#6899]: https://github.com/tokio-rs/tokio/pull/6899 [#7276]: https://github.com/tokio-rs/tokio/pull/7276 [#7249]: https://github.com/tokio-rs/tokio/pull/7249 [#7204]: https://github.com/tokio-rs/tokio/pull/7204 [#7230]: https://github.com/tokio-rs/tokio/pull/7230 [#7226]: https://github.com/tokio-rs/tokio/pull/7226 [#7275]: https://github.com/tokio-rs/tokio/pull/7275 # 1.44.2 (April 5th, 2025) This release fixes a soundness issue in the broadcast channel. The channel accepts values that are `Send` but `!Sync`. Previously, the channel called `clone()` on these values without synchronizing. This release fixes the channel by synchronizing calls to `.clone()` (Thanks Austin Bonander for finding and reporting the issue). ### Fixed - sync: synchronize `clone()` call in broadcast channel ([#7232]) [#7232]: https://github.com/tokio-rs/tokio/pull/7232 # 1.44.1 (March 13th, 2025) ### Fixed - rt: skip defer queue in `block_in_place` context ([#7216]) [#7216]: https://github.com/tokio-rs/tokio/pull/7216 # 1.44.0 (March 7th, 2025) This release changes the `from_std` method on sockets to panic if a blocking socket is provided. We determined this change is not a breaking change as Tokio is not intended to operate using blocking sockets. Doing so results in runtime hangs and should be considered a bug. Accidentally passing a blocking socket to Tokio is one of the most common user mistakes. If this change causes an issue for you, please comment on [#7172]. ### Added - coop: add `task::coop` module ([#7116]) - process: add `Command::get_kill_on_drop()` ([#7086]) - sync: add `broadcast::Sender::closed` ([#6685], [#7090]) - sync: add `broadcast::WeakSender` ([#7100]) - sync: add `oneshot::Receiver::is_empty()` ([#7153]) - sync: add `oneshot::Receiver::is_terminated()` ([#7152]) ### Fixed - fs: empty reads on `File` should not start a background read ([#7139]) - process: calling `start_kill` on exited child should not fail ([#7160]) - signal: fix `CTRL_CLOSE`, `CTRL_LOGOFF`, `CTRL_SHUTDOWN` on windows ([#7122]) - sync: properly handle panic during mpsc drop ([#7094]) ### Changes - runtime: clean up magic number in registration set ([#7112]) - coop: make coop yield using waker defer strategy ([#7185]) - macros: make `select!` budget-aware ([#7164]) - net: panic when passing a blocking socket to `from_std` ([#7166]) - io: clean up buffer casts ([#7142]) ### Changes to unstable APIs - rt: add before and after task poll callbacks ([#7120]) - tracing: make the task tracing API unstable public ([#6972]) ### Documented - docs: fix nesting of sections in top-level docs ([#7159]) - fs: rename symlink and hardlink parameter names ([#7143]) - io: swap reader/writer in simplex doc test ([#7176]) - macros: docs about `select!` alternatives ([#7110]) - net: rename the argument for `send_to` ([#7146]) - process: add example for reading `Child` stdout ([#7141]) - process: clarify `Child::kill` behavior ([#7162]) - process: fix grammar of the `ChildStdin` struct doc comment ([#7192]) - runtime: consistently use `worker_threads` instead of `core_threads` ([#7186]) [#6685]: https://github.com/tokio-rs/tokio/pull/6685 [#6972]: https://github.com/tokio-rs/tokio/pull/6972 [#7086]: https://github.com/tokio-rs/tokio/pull/7086 [#7090]: https://github.com/tokio-rs/tokio/pull/7090 [#7094]: https://github.com/tokio-rs/tokio/pull/7094 [#7100]: https://github.com/tokio-rs/tokio/pull/7100 [#7110]: https://github.com/tokio-rs/tokio/pull/7110 [#7112]: https://github.com/tokio-rs/tokio/pull/7112 [#7116]: https://github.com/tokio-rs/tokio/pull/7116 [#7120]: https://github.com/tokio-rs/tokio/pull/7120 [#7122]: https://github.com/tokio-rs/tokio/pull/7122 [#7139]: https://github.com/tokio-rs/tokio/pull/7139 [#7141]: https://github.com/tokio-rs/tokio/pull/7141 [#7142]: https://github.com/tokio-rs/tokio/pull/7142 [#7143]: https://github.com/tokio-rs/tokio/pull/7143 [#7146]: https://github.com/tokio-rs/tokio/pull/7146 [#7152]: https://github.com/tokio-rs/tokio/pull/7152 [#7153]: https://github.com/tokio-rs/tokio/pull/7153 [#7159]: https://github.com/tokio-rs/tokio/pull/7159 [#7160]: https://github.com/tokio-rs/tokio/pull/7160 [#7162]: https://github.com/tokio-rs/tokio/pull/7162 [#7164]: https://github.com/tokio-rs/tokio/pull/7164 [#7166]: https://github.com/tokio-rs/tokio/pull/7166 [#7172]: https://github.com/tokio-rs/tokio/pull/7172 [#7176]: https://github.com/tokio-rs/tokio/pull/7176 [#7185]: https://github.com/tokio-rs/tokio/pull/7185 [#7186]: https://github.com/tokio-rs/tokio/pull/7186 [#7192]: https://github.com/tokio-rs/tokio/pull/7192 # 1.43.4 (January 3rd, 2026) ### Fixed * sync: return `TryRecvError::Disconnected` from `Receiver::try_recv` after `Receiver::close` ([#7686]) [#7686]: https://github.com/tokio-rs/tokio/pull/7686 # 1.43.3 (October 14th, 2025) ### Fixed - runtime: use release ordering in `wake_by_ref()` even if already woken ([#7622]) - sync: close the `broadcast::Sender` in `broadcast::Sender::new()` ([#7629]) - process: fix error when runtime is shut down on nightly-2025-10-12 ([#7672]) [#7622]: https://github.com/tokio-rs/tokio/pull/7622 [#7629]: https://github.com/tokio-rs/tokio/pull/7629 [#7672]: https://github.com/tokio-rs/tokio/pull/7672 # 1.43.2 (August 1st, 2025) ### Fixed - process: fix panic from spurious pidfd wakeup ([#7494]) [#7494]: https://github.com/tokio-rs/tokio/pull/7494 # 1.43.1 (April 5th, 2025) This release fixes a soundness issue in the broadcast channel. The channel accepts values that are `Send` but `!Sync`. Previously, the channel called `clone()` on these values without synchronizing. This release fixes the channel by synchronizing calls to `.clone()` (Thanks Austin Bonander for finding and reporting the issue). ### Fixed - sync: synchronize `clone()` call in broadcast channel ([#7232]) [#7232]: https://github.com/tokio-rs/tokio/pull/7232 # 1.43.0 (Jan 8th, 2025) ### Added - net: add `UdpSocket::peek` methods ([#7068]) - net: add support for Haiku OS ([#7042]) - process: add `Command::into_std()` ([#7014]) - signal: add `SignalKind::info` on illumos ([#6995]) - signal: add support for realtime signals on illumos ([#7029]) ### Fixed - io: don't call `set_len` before initializing vector in `Blocking` ([#7054]) - macros: suppress `clippy::needless_return` in `#[tokio::main]` ([#6874]) - runtime: fix thread parking on WebAssembly ([#7041]) ### Changes - chore: use unsync loads for `unsync_load` ([#7073]) - io: use `Buf::put_bytes` in `Repeat` read impl ([#7055]) - task: drop the join waker of a task eagerly ([#6986]) ### Changes to unstable APIs - metrics: improve flexibility of H2Histogram Configuration ([#6963]) - taskdump: add accessor methods for backtrace ([#6975]) ### Documented - io: clarify `ReadBuf::uninit` allows initialized buffers as well ([#7053]) - net: fix ambiguity in `TcpStream::try_write_vectored` docs ([#7067]) - runtime: fix `LocalRuntime` doc links ([#7074]) - sync: extend documentation for `watch::Receiver::wait_for` ([#7038]) - sync: fix typos in `OnceCell` docs ([#7047]) [#6874]: https://github.com/tokio-rs/tokio/pull/6874 [#6963]: https://github.com/tokio-rs/tokio/pull/6963 [#6975]: https://github.com/tokio-rs/tokio/pull/6975 [#6986]: https://github.com/tokio-rs/tokio/pull/6986 [#6995]: https://github.com/tokio-rs/tokio/pull/6995 [#7014]: https://github.com/tokio-rs/tokio/pull/7014 [#7029]: https://github.com/tokio-rs/tokio/pull/7029 [#7038]: https://github.com/tokio-rs/tokio/pull/7038 [#7041]: https://github.com/tokio-rs/tokio/pull/7041 [#7042]: https://github.com/tokio-rs/tokio/pull/7042 [#7047]: https://github.com/tokio-rs/tokio/pull/7047 [#7053]: https://github.com/tokio-rs/tokio/pull/7053 [#7054]: https://github.com/tokio-rs/tokio/pull/7054 [#7055]: https://github.com/tokio-rs/tokio/pull/7055 [#7067]: https://github.com/tokio-rs/tokio/pull/7067 [#7068]: https://github.com/tokio-rs/tokio/pull/7068 [#7073]: https://github.com/tokio-rs/tokio/pull/7073 [#7074]: https://github.com/tokio-rs/tokio/pull/7074 # 1.42.1 (April 8th, 2025) This release fixes a soundness issue in the broadcast channel. The channel accepts values that are `Send` but `!Sync`. Previously, the channel called `clone()` on these values without synchronizing. This release fixes the channel by synchronizing calls to `.clone()` (Thanks Austin Bonander for finding and reporting the issue). ### Fixed - sync: synchronize `clone()` call in broadcast channel ([#7232]) [#7232]: https://github.com/tokio-rs/tokio/pull/7232 # 1.42.0 (Dec 3rd, 2024) ### Added - io: add `AsyncFd::{try_io, try_io_mut}` ([#6967]) ### Fixed - io: avoid `ptr->ref->ptr` roundtrip in RegistrationSet ([#6929]) - runtime: do not defer `yield_now` inside `block_in_place` ([#6999]) ### Changes - io: simplify io readiness logic ([#6966]) ### Documented - net: fix docs for `tokio::net::unix::{pid_t, gid_t, uid_t}` ([#6791]) - time: fix a typo in `Instant` docs ([#6982]) [#6791]: https://github.com/tokio-rs/tokio/pull/6791 [#6929]: https://github.com/tokio-rs/tokio/pull/6929 [#6966]: https://github.com/tokio-rs/tokio/pull/6966 [#6967]: https://github.com/tokio-rs/tokio/pull/6967 [#6982]: https://github.com/tokio-rs/tokio/pull/6982 [#6999]: https://github.com/tokio-rs/tokio/pull/6999 # 1.41.1 (Nov 7th, 2024) ### Fixed - metrics: fix bug with wrong number of buckets for the histogram ([#6957]) - net: display `net` requirement for `net::UdpSocket` in docs ([#6938]) - net: fix typo in `TcpStream` internal comment ([#6944]) [#6957]: https://github.com/tokio-rs/tokio/pull/6957 [#6938]: https://github.com/tokio-rs/tokio/pull/6938 [#6944]: https://github.com/tokio-rs/tokio/pull/6944 # 1.41.0 (Oct 22nd, 2024) ### Added - metrics: stabilize `global_queue_depth` ([#6854], [#6918]) - net: add conversions for unix `SocketAddr` ([#6868]) - sync: add `watch::Sender::sender_count` ([#6836]) - sync: add `mpsc::Receiver::blocking_recv_many` ([#6867]) - task: stabilize `Id` apis ([#6793], [#6891]) ### Added (unstable) - metrics: add H2 Histogram option to improve histogram granularity ([#6897]) - metrics: rename some histogram apis ([#6924]) - runtime: add `LocalRuntime` ([#6808]) ### Changed - runtime: box futures larger than 16k on release mode ([#6826]) - sync: add `#[must_use]` to `Notified` ([#6828]) - sync: make `watch` cooperative ([#6846]) - sync: make `broadcast::Receiver` cooperative ([#6870]) - task: add task size to tracing instrumentation ([#6881]) - wasm: enable `cfg_fs` for `wasi` target ([#6822]) ### Fixed - net: fix regression of abstract socket path in unix socket ([#6838]) ### Documented - io: recommend `OwnedFd` with `AsyncFd` ([#6821]) - io: document cancel safety of `AsyncFd` methods ([#6890]) - macros: render more comprehensible documentation for `join` and `try_join` ([#6814], [#6841]) - net: fix swapped examples for `TcpSocket::set_nodelay` and `TcpSocket::nodelay` ([#6840]) - sync: document runtime compatibility ([#6833]) [#6793]: https://github.com/tokio-rs/tokio/pull/6793 [#6808]: https://github.com/tokio-rs/tokio/pull/6808 [#6810]: https://github.com/tokio-rs/tokio/pull/6810 [#6814]: https://github.com/tokio-rs/tokio/pull/6814 [#6821]: https://github.com/tokio-rs/tokio/pull/6821 [#6822]: https://github.com/tokio-rs/tokio/pull/6822 [#6826]: https://github.com/tokio-rs/tokio/pull/6826 [#6828]: https://github.com/tokio-rs/tokio/pull/6828 [#6833]: https://github.com/tokio-rs/tokio/pull/6833 [#6836]: https://github.com/tokio-rs/tokio/pull/6836 [#6838]: https://github.com/tokio-rs/tokio/pull/6838 [#6840]: https://github.com/tokio-rs/tokio/pull/6840 [#6841]: https://github.com/tokio-rs/tokio/pull/6841 [#6846]: https://github.com/tokio-rs/tokio/pull/6846 [#6854]: https://github.com/tokio-rs/tokio/pull/6854 [#6867]: https://github.com/tokio-rs/tokio/pull/6867 [#6868]: https://github.com/tokio-rs/tokio/pull/6868 [#6870]: https://github.com/tokio-rs/tokio/pull/6870 [#6881]: https://github.com/tokio-rs/tokio/pull/6881 [#6890]: https://github.com/tokio-rs/tokio/pull/6890 [#6891]: https://github.com/tokio-rs/tokio/pull/6891 [#6897]: https://github.com/tokio-rs/tokio/pull/6897 [#6918]: https://github.com/tokio-rs/tokio/pull/6918 [#6924]: https://github.com/tokio-rs/tokio/pull/6924 # 1.40.0 (August 30th, 2024) ### Added - io: add `util::SimplexStream` ([#6589]) - process: stabilize `Command::process_group` ([#6731]) - sync: add `{TrySendError,SendTimeoutError}::into_inner` ([#6755]) - task: add `JoinSet::join_all` ([#6784]) ### Added (unstable) - runtime: add `Builder::{on_task_spawn, on_task_terminate}` ([#6742]) ### Changed - io: use vectored io for `write_all_buf` when possible ([#6724]) - runtime: prevent niche-optimization to avoid triggering miri ([#6744]) - sync: mark mpsc types as `UnwindSafe` ([#6783]) - sync,time: make `Sleep` and `BatchSemaphore` instrumentation explicit roots ([#6727]) - task: use `NonZeroU64` for `task::Id` ([#6733]) - task: include panic message when printing `JoinError` ([#6753]) - task: add `#[must_use]` to `JoinHandle::abort_handle` ([#6762]) - time: eliminate timer wheel allocations ([#6779]) ### Documented - docs: clarify that `[build]` section doesn't go in Cargo.toml ([#6728]) - io: clarify zero remaining capacity case ([#6790]) - macros: improve documentation for `select!` ([#6774]) - sync: document mpsc channel allocation behavior ([#6773]) [#6589]: https://github.com/tokio-rs/tokio/pull/6589 [#6724]: https://github.com/tokio-rs/tokio/pull/6724 [#6727]: https://github.com/tokio-rs/tokio/pull/6727 [#6728]: https://github.com/tokio-rs/tokio/pull/6728 [#6731]: https://github.com/tokio-rs/tokio/pull/6731 [#6733]: https://github.com/tokio-rs/tokio/pull/6733 [#6742]: https://github.com/tokio-rs/tokio/pull/6742 [#6744]: https://github.com/tokio-rs/tokio/pull/6744 [#6753]: https://github.com/tokio-rs/tokio/pull/6753 [#6755]: https://github.com/tokio-rs/tokio/pull/6755 [#6762]: https://github.com/tokio-rs/tokio/pull/6762 [#6773]: https://github.com/tokio-rs/tokio/pull/6773 [#6774]: https://github.com/tokio-rs/tokio/pull/6774 [#6779]: https://github.com/tokio-rs/tokio/pull/6779 [#6783]: https://github.com/tokio-rs/tokio/pull/6783 [#6784]: https://github.com/tokio-rs/tokio/pull/6784 [#6790]: https://github.com/tokio-rs/tokio/pull/6790 # 1.39.3 (August 17th, 2024) This release fixes a regression where the unix socket api stopped accepting the abstract socket namespace. ([#6772]) [#6772]: https://github.com/tokio-rs/tokio/pull/6772 # 1.39.2 (July 27th, 2024) This release fixes a regression where the `select!` macro stopped accepting expressions that make use of temporary lifetime extension. ([#6722]) [#6722]: https://github.com/tokio-rs/tokio/pull/6722 # 1.39.1 (July 23rd, 2024) This release reverts "time: avoid traversing entries in the time wheel twice" because it contains a bug. ([#6715]) [#6715]: https://github.com/tokio-rs/tokio/pull/6715 # 1.39.0 (July 23rd, 2024) Yanked. Please use 1.39.1 instead. - This release bumps the MSRV to 1.70. ([#6645]) - This release upgrades to mio v1. ([#6635]) - This release upgrades to windows-sys v0.52 ([#6154]) ### Added - io: implement `AsyncSeek` for `Empty` ([#6663]) - metrics: stabilize `num_alive_tasks` ([#6619], [#6667]) - process: add `Command::as_std_mut` ([#6608]) - sync: add `watch::Sender::same_channel` ([#6637]) - sync: add `{Receiver,UnboundedReceiver}::{sender_strong_count,sender_weak_count}` ([#6661]) - sync: implement `Default` for `watch::Sender` ([#6626]) - task: implement `Clone` for `AbortHandle` ([#6621]) - task: stabilize `consume_budget` ([#6622]) ### Changed - io: improve panic message of `ReadBuf::put_slice()` ([#6629]) - io: read during write in `copy_bidirectional` and `copy` ([#6532]) - runtime: replace `num_cpus` with `available_parallelism` ([#6709]) - task: avoid stack overflow when passing large future to `block_on` ([#6692]) - time: avoid traversing entries in the time wheel twice ([#6584]) - time: support `IntoFuture` with `timeout` ([#6666]) - macros: support `IntoFuture` with `join!` and `select!` ([#6710]) ### Fixed - docs: fix docsrs builds with the fs feature enabled ([#6585]) - io: only use short-read optimization on known-to-be-compatible platforms ([#6668]) - time: fix overflow panic when using large durations with `Interval` ([#6612]) ### Added (unstable) - macros: allow `unhandled_panic` behavior for `#[tokio::main]` and `#[tokio::test]` ([#6593]) - metrics: add `spawned_tasks_count` ([#6114]) - metrics: add `worker_park_unpark_count` ([#6696]) - metrics: add worker thread id ([#6695]) ### Documented - io: update `tokio::io::stdout` documentation ([#6674]) - macros: typo fix in `join.rs` and `try_join.rs` ([#6641]) - runtime: fix typo in `unhandled_panic` ([#6660]) - task: document behavior of `JoinSet::try_join_next` when all tasks are running ([#6671]) [#6114]: https://github.com/tokio-rs/tokio/pull/6114 [#6154]: https://github.com/tokio-rs/tokio/pull/6154 [#6532]: https://github.com/tokio-rs/tokio/pull/6532 [#6584]: https://github.com/tokio-rs/tokio/pull/6584 [#6585]: https://github.com/tokio-rs/tokio/pull/6585 [#6593]: https://github.com/tokio-rs/tokio/pull/6593 [#6608]: https://github.com/tokio-rs/tokio/pull/6608 [#6612]: https://github.com/tokio-rs/tokio/pull/6612 [#6619]: https://github.com/tokio-rs/tokio/pull/6619 [#6621]: https://github.com/tokio-rs/tokio/pull/6621 [#6622]: https://github.com/tokio-rs/tokio/pull/6622 [#6626]: https://github.com/tokio-rs/tokio/pull/6626 [#6629]: https://github.com/tokio-rs/tokio/pull/6629 [#6635]: https://github.com/tokio-rs/tokio/pull/6635 [#6637]: https://github.com/tokio-rs/tokio/pull/6637 [#6641]: https://github.com/tokio-rs/tokio/pull/6641 [#6645]: https://github.com/tokio-rs/tokio/pull/6645 [#6660]: https://github.com/tokio-rs/tokio/pull/6660 [#6661]: https://github.com/tokio-rs/tokio/pull/6661 [#6663]: https://github.com/tokio-rs/tokio/pull/6663 [#6666]: https://github.com/tokio-rs/tokio/pull/6666 [#6667]: https://github.com/tokio-rs/tokio/pull/6667 [#6668]: https://github.com/tokio-rs/tokio/pull/6668 [#6671]: https://github.com/tokio-rs/tokio/pull/6671 [#6674]: https://github.com/tokio-rs/tokio/pull/6674 [#6692]: https://github.com/tokio-rs/tokio/pull/6692 [#6695]: https://github.com/tokio-rs/tokio/pull/6695 [#6696]: https://github.com/tokio-rs/tokio/pull/6696 [#6709]: https://github.com/tokio-rs/tokio/pull/6709 [#6710]: https://github.com/tokio-rs/tokio/pull/6710 # 1.38.2 (April 2nd, 2025) This release fixes a soundness issue in the broadcast channel. The channel accepts values that are `Send` but `!Sync`. Previously, the channel called `clone()` on these values without synchronizing. This release fixes the channel by synchronizing calls to `.clone()` (Thanks Austin Bonander for finding and reporting the issue). ### Fixed - sync: synchronize `clone()` call in broadcast channel ([#7232]) [#7232]: https://github.com/tokio-rs/tokio/pull/7232 # 1.38.1 (July 16th, 2024) This release fixes the bug identified as ([#6682]), which caused timers not to fire when they should. ### Fixed - time: update `wake_up` while holding all the locks of sharded time wheels ([#6683]) [#6682]: https://github.com/tokio-rs/tokio/pull/6682 [#6683]: https://github.com/tokio-rs/tokio/pull/6683 # 1.38.0 (May 30th, 2024) This release marks the beginning of stabilization for runtime metrics. It stabilizes `RuntimeMetrics::worker_count`. Future releases will continue to stabilize more metrics. ### Added - fs: add `File::create_new` ([#6573]) - io: add `copy_bidirectional_with_sizes` ([#6500]) - io: implement `AsyncBufRead` for `Join` ([#6449]) - net: add Apple visionOS support ([#6465]) - net: implement `Clone` for `NamedPipeInfo` ([#6586]) - net: support QNX OS ([#6421]) - sync: add `Notify::notify_last` ([#6520]) - sync: add `mpsc::Receiver::{capacity,max_capacity}` ([#6511]) - sync: add `split` method to the semaphore permit ([#6472], [#6478]) - task: add `tokio::task::join_set::Builder::spawn_blocking` ([#6578]) - wasm: support rt-multi-thread with wasm32-wasi-preview1-threads ([#6510]) ### Changed - macros: make `#[tokio::test]` append `#[test]` at the end of the attribute list ([#6497]) - metrics: fix `blocking_threads` count ([#6551]) - metrics: stabilize `RuntimeMetrics::worker_count` ([#6556]) - runtime: move task out of the `lifo_slot` in `block_in_place` ([#6596]) - runtime: panic if `global_queue_interval` is zero ([#6445]) - sync: always drop message in destructor for oneshot receiver ([#6558]) - sync: instrument `Semaphore` for task dumps ([#6499]) - sync: use FIFO ordering when waking batches of wakers ([#6521]) - task: make `LocalKey::get` work with Clone types ([#6433]) - tests: update nix and mio-aio dev-dependencies ([#6552]) - time: clean up implementation ([#6517]) - time: lazily init timers on first poll ([#6512]) - time: remove the `true_when` field in `TimerShared` ([#6563]) - time: use sharding for timer implementation ([#6534]) ### Fixed - taskdump: allow building taskdump docs on non-unix machines ([#6564]) - time: check for overflow in `Interval::poll_tick` ([#6487]) - sync: fix incorrect `is_empty` on mpsc block boundaries ([#6603]) ### Documented - fs: rewrite file system docs ([#6467]) - io: fix `stdin` documentation ([#6581]) - io: fix obsolete reference in `ReadHalf::unsplit()` documentation ([#6498]) - macros: render more comprehensible documentation for `select!` ([#6468]) - net: add missing types to module docs ([#6482]) - net: fix misleading `NamedPipeServer` example ([#6590]) - sync: add examples for `SemaphorePermit`, `OwnedSemaphorePermit` ([#6477]) - sync: document that `Barrier::wait` is not cancel safe ([#6494]) - sync: explain relation between `watch::Sender::{subscribe,closed}` ([#6490]) - task: clarify that you can't abort `spawn_blocking` tasks ([#6571]) - task: fix a typo in doc of `LocalSet::run_until` ([#6599]) - time: fix test-util requirement for pause and resume in docs ([#6503]) [#6421]: https://github.com/tokio-rs/tokio/pull/6421 [#6433]: https://github.com/tokio-rs/tokio/pull/6433 [#6445]: https://github.com/tokio-rs/tokio/pull/6445 [#6449]: https://github.com/tokio-rs/tokio/pull/6449 [#6465]: https://github.com/tokio-rs/tokio/pull/6465 [#6467]: https://github.com/tokio-rs/tokio/pull/6467 [#6468]: https://github.com/tokio-rs/tokio/pull/6468 [#6472]: https://github.com/tokio-rs/tokio/pull/6472 [#6477]: https://github.com/tokio-rs/tokio/pull/6477 [#6478]: https://github.com/tokio-rs/tokio/pull/6478 [#6482]: https://github.com/tokio-rs/tokio/pull/6482 [#6487]: https://github.com/tokio-rs/tokio/pull/6487 [#6490]: https://github.com/tokio-rs/tokio/pull/6490 [#6494]: https://github.com/tokio-rs/tokio/pull/6494 [#6497]: https://github.com/tokio-rs/tokio/pull/6497 [#6498]: https://github.com/tokio-rs/tokio/pull/6498 [#6499]: https://github.com/tokio-rs/tokio/pull/6499 [#6500]: https://github.com/tokio-rs/tokio/pull/6500 [#6503]: https://github.com/tokio-rs/tokio/pull/6503 [#6510]: https://github.com/tokio-rs/tokio/pull/6510 [#6511]: https://github.com/tokio-rs/tokio/pull/6511 [#6512]: https://github.com/tokio-rs/tokio/pull/6512 [#6517]: https://github.com/tokio-rs/tokio/pull/6517 [#6520]: https://github.com/tokio-rs/tokio/pull/6520 [#6521]: https://github.com/tokio-rs/tokio/pull/6521 [#6534]: https://github.com/tokio-rs/tokio/pull/6534 [#6551]: https://github.com/tokio-rs/tokio/pull/6551 [#6552]: https://github.com/tokio-rs/tokio/pull/6552 [#6556]: https://github.com/tokio-rs/tokio/pull/6556 [#6558]: https://github.com/tokio-rs/tokio/pull/6558 [#6563]: https://github.com/tokio-rs/tokio/pull/6563 [#6564]: https://github.com/tokio-rs/tokio/pull/6564 [#6571]: https://github.com/tokio-rs/tokio/pull/6571 [#6573]: https://github.com/tokio-rs/tokio/pull/6573 [#6578]: https://github.com/tokio-rs/tokio/pull/6578 [#6581]: https://github.com/tokio-rs/tokio/pull/6581 [#6586]: https://github.com/tokio-rs/tokio/pull/6586 [#6590]: https://github.com/tokio-rs/tokio/pull/6590 [#6596]: https://github.com/tokio-rs/tokio/pull/6596 [#6599]: https://github.com/tokio-rs/tokio/pull/6599 [#6603]: https://github.com/tokio-rs/tokio/pull/6603 # 1.37.0 (March 28th, 2024) ### Added - fs: add `set_max_buf_size` to `tokio::fs::File` ([#6411]) - io: add `try_new` and `try_with_interest` to `AsyncFd` ([#6345]) - sync: add `forget_permits` method to semaphore ([#6331]) - sync: add `is_closed`, `is_empty`, and `len` to mpsc receivers ([#6348]) - sync: add a `rwlock()` method to owned `RwLock` guards ([#6418]) - sync: expose strong and weak counts of mpsc sender handles ([#6405]) - sync: implement `Clone` for `watch::Sender` ([#6388]) - task: add `TaskLocalFuture::take_value` ([#6340]) - task: implement `FromIterator` for `JoinSet` ([#6300]) ### Changed - io: make `io::split` use a mutex instead of a spinlock ([#6403]) ### Fixed - docs: fix docsrs build without net feature ([#6360]) - macros: allow select with only else branch ([#6339]) - runtime: fix leaking registration entries when os registration fails ([#6329]) ### Documented - io: document cancel safety of `AsyncBufReadExt::fill_buf` ([#6431]) - io: document cancel safety of `AsyncReadExt`'s primitive read functions ([#6337]) - runtime: add doc link from `Runtime` to `#[tokio::main]` ([#6366]) - runtime: make the `enter` example deterministic ([#6351]) - sync: add Semaphore example for limiting the number of outgoing requests ([#6419]) - sync: fix missing period in broadcast docs ([#6377]) - sync: mark `mpsc::Sender::downgrade` with `#[must_use]` ([#6326]) - sync: reorder `const_new` before `new_with` ([#6392]) - sync: update watch channel docs ([#6395]) - task: fix documentation links ([#6336]) ### Changed (unstable) - runtime: include task `Id` in taskdumps ([#6328]) - runtime: panic if `unhandled_panic` is enabled when not supported ([#6410]) [#6300]: https://github.com/tokio-rs/tokio/pull/6300 [#6326]: https://github.com/tokio-rs/tokio/pull/6326 [#6328]: https://github.com/tokio-rs/tokio/pull/6328 [#6329]: https://github.com/tokio-rs/tokio/pull/6329 [#6331]: https://github.com/tokio-rs/tokio/pull/6331 [#6336]: https://github.com/tokio-rs/tokio/pull/6336 [#6337]: https://github.com/tokio-rs/tokio/pull/6337 [#6339]: https://github.com/tokio-rs/tokio/pull/6339 [#6340]: https://github.com/tokio-rs/tokio/pull/6340 [#6345]: https://github.com/tokio-rs/tokio/pull/6345 [#6348]: https://github.com/tokio-rs/tokio/pull/6348 [#6351]: https://github.com/tokio-rs/tokio/pull/6351 [#6360]: https://github.com/tokio-rs/tokio/pull/6360 [#6366]: https://github.com/tokio-rs/tokio/pull/6366 [#6377]: https://github.com/tokio-rs/tokio/pull/6377 [#6388]: https://github.com/tokio-rs/tokio/pull/6388 [#6392]: https://github.com/tokio-rs/tokio/pull/6392 [#6395]: https://github.com/tokio-rs/tokio/pull/6395 [#6403]: https://github.com/tokio-rs/tokio/pull/6403 [#6405]: https://github.com/tokio-rs/tokio/pull/6405 [#6410]: https://github.com/tokio-rs/tokio/pull/6410 [#6411]: https://github.com/tokio-rs/tokio/pull/6411 [#6418]: https://github.com/tokio-rs/tokio/pull/6418 [#6419]: https://github.com/tokio-rs/tokio/pull/6419 [#6431]: https://github.com/tokio-rs/tokio/pull/6431 # 1.36.0 (February 2nd, 2024) ### Added - io: add `tokio::io::Join` ([#6220]) - io: implement `AsyncWrite` for `Empty` ([#6235]) - net: add support for anonymous unix pipes ([#6127]) - net: add `UnixSocket` ([#6290]) - net: expose keepalive option on `TcpSocket` ([#6311]) - sync: add `{Receiver,UnboundedReceiver}::poll_recv_many` ([#6236]) - sync: add `Sender::{try_,}reserve_many` ([#6205]) - sync: add `watch::Receiver::mark_unchanged` ([#6252]) - task: add `JoinSet::try_join_next` ([#6280]) ### Changed - io: make `copy` cooperative ([#6265]) - io: make `repeat` and `sink` cooperative ([#6254]) - io: simplify check for empty slice ([#6293]) - process: use pidfd on Linux when available ([#6152]) - sync: use AtomicBool in broadcast channel future ([#6298]) ### Documented - io: clarify `clear_ready` docs ([#6304]) - net: document that `*Fd` traits on `TcpSocket` are unix-only ([#6294]) - sync: document FIFO behavior of `tokio::sync::Mutex` ([#6279]) - chore: typographic improvements ([#6262]) - runtime: remove obsolete comment ([#6303]) - task: fix typo ([#6261]) [#6220]: https://github.com/tokio-rs/tokio/pull/6220 [#6235]: https://github.com/tokio-rs/tokio/pull/6235 [#6127]: https://github.com/tokio-rs/tokio/pull/6127 [#6290]: https://github.com/tokio-rs/tokio/pull/6290 [#6311]: https://github.com/tokio-rs/tokio/pull/6311 [#6236]: https://github.com/tokio-rs/tokio/pull/6236 [#6205]: https://github.com/tokio-rs/tokio/pull/6205 [#6252]: https://github.com/tokio-rs/tokio/pull/6252 [#6280]: https://github.com/tokio-rs/tokio/pull/6280 [#6265]: https://github.com/tokio-rs/tokio/pull/6265 [#6254]: https://github.com/tokio-rs/tokio/pull/6254 [#6293]: https://github.com/tokio-rs/tokio/pull/6293 [#6238]: https://github.com/tokio-rs/tokio/pull/6238 [#6152]: https://github.com/tokio-rs/tokio/pull/6152 [#6298]: https://github.com/tokio-rs/tokio/pull/6298 [#6262]: https://github.com/tokio-rs/tokio/pull/6262 [#6303]: https://github.com/tokio-rs/tokio/pull/6303 [#6261]: https://github.com/tokio-rs/tokio/pull/6261 [#6304]: https://github.com/tokio-rs/tokio/pull/6304 [#6294]: https://github.com/tokio-rs/tokio/pull/6294 [#6279]: https://github.com/tokio-rs/tokio/pull/6279 # 1.35.1 (December 19, 2023) This is a forward part of a change that was backported to 1.25.3. ### Fixed - io: add budgeting to `tokio::runtime::io::registration::async_io` ([#6221]) [#6221]: https://github.com/tokio-rs/tokio/pull/6221 # 1.35.0 (December 8th, 2023) ### Added - net: add Apple watchOS support ([#6176]) ### Changed - io: drop the `Sized` requirements from `AsyncReadExt.read_buf` ([#6169]) - runtime: make `Runtime` unwind safe ([#6189]) - runtime: reduce the lock contention in task spawn ([#6001]) - tokio: update nix dependency to 0.27.1 ([#6190]) ### Fixed - chore: make `--cfg docsrs` work without net feature ([#6166]) - chore: use relaxed load for `unsync_load` on miri ([#6179]) - runtime: handle missing context on wake ([#6148]) - taskdump: fix taskdump cargo config example ([#6150]) - taskdump: skip notified tasks during taskdumps ([#6194]) - tracing: avoid creating resource spans with current parent, use a None parent instead ([#6107]) - tracing: make task span explicit root ([#6158]) ### Documented - io: flush in `AsyncWriteExt` examples ([#6149]) - runtime: document fairness guarantees and current behavior ([#6145]) - task: document cancel safety of `LocalSet::run_until` ([#6147]) [#6001]: https://github.com/tokio-rs/tokio/pull/6001 [#6107]: https://github.com/tokio-rs/tokio/pull/6107 [#6144]: https://github.com/tokio-rs/tokio/pull/6144 [#6145]: https://github.com/tokio-rs/tokio/pull/6145 [#6147]: https://github.com/tokio-rs/tokio/pull/6147 [#6148]: https://github.com/tokio-rs/tokio/pull/6148 [#6149]: https://github.com/tokio-rs/tokio/pull/6149 [#6150]: https://github.com/tokio-rs/tokio/pull/6150 [#6158]: https://github.com/tokio-rs/tokio/pull/6158 [#6166]: https://github.com/tokio-rs/tokio/pull/6166 [#6169]: https://github.com/tokio-rs/tokio/pull/6169 [#6176]: https://github.com/tokio-rs/tokio/pull/6176 [#6179]: https://github.com/tokio-rs/tokio/pull/6179 [#6189]: https://github.com/tokio-rs/tokio/pull/6189 [#6190]: https://github.com/tokio-rs/tokio/pull/6190 [#6194]: https://github.com/tokio-rs/tokio/pull/6194 # 1.34.0 (November 19th, 2023) ### Fixed - io: allow `clear_readiness` after io driver shutdown ([#6067]) - io: fix integer overflow in `take` ([#6080]) - io: fix I/O resource hang ([#6134]) - sync: fix `broadcast::channel` link ([#6100]) ### Changed - macros: use `::core` qualified imports instead of `::std` inside `tokio::test` macro ([#5973]) ### Added - fs: update cfg attr in `fs::read_dir` to include `aix` ([#6075]) - sync: add `mpsc::Receiver::recv_many` ([#6010]) - tokio: added vita target support ([#6094]) [#5973]: https://github.com/tokio-rs/tokio/pull/5973 [#6067]: https://github.com/tokio-rs/tokio/pull/6067 [#6080]: https://github.com/tokio-rs/tokio/pull/6080 [#6134]: https://github.com/tokio-rs/tokio/pull/6134 [#6100]: https://github.com/tokio-rs/tokio/pull/6100 [#6075]: https://github.com/tokio-rs/tokio/pull/6075 [#6010]: https://github.com/tokio-rs/tokio/pull/6010 [#6094]: https://github.com/tokio-rs/tokio/pull/6094 # 1.33.0 (October 9, 2023) ### Fixed - io: mark `Interest::add` with `#[must_use]` ([#6037]) - runtime: fix cache line size for RISC-V ([#5994]) - sync: prevent lock poisoning in `watch::Receiver::wait_for` ([#6021]) - task: fix `spawn_local` source location ([#5984]) ### Changed - sync: use Acquire/Release orderings instead of SeqCst in `watch` ([#6018]) ### Added - fs: add vectored writes to `tokio::fs::File` ([#5958]) - io: add `Interest::remove` method ([#5906]) - io: add vectored writes to `DuplexStream` ([#5985]) - net: add Apple tvOS support ([#6045]) - sync: add `?Sized` bound to `{MutexGuard,OwnedMutexGuard}::map` ([#5997]) - sync: add `watch::Receiver::mark_unseen` ([#5962], [#6014], [#6017]) - sync: add `watch::Sender::new` ([#5998]) - sync: add const fn `OnceCell::from_value` ([#5903]) ### Removed - remove unused `stats` feature ([#5952]) ### Documented - add missing backticks in code examples ([#5938], [#6056]) - fix typos ([#5988], [#6030]) - process: document that `Child::wait` is cancel safe ([#5977]) - sync: add examples for `Semaphore` ([#5939], [#5956], [#5978], [#6031], [#6032], [#6050]) - sync: document that `broadcast` capacity is a lower bound ([#6042]) - sync: document that `const_new` is not instrumented ([#6002]) - sync: improve cancel-safety documentation for `mpsc::Sender::send` ([#5947]) - sync: improve docs for `watch` channel ([#5954]) - taskdump: render taskdump documentation on docs.rs ([#5972]) ### Unstable - taskdump: fix potential deadlock ([#6036]) [#5903]: https://github.com/tokio-rs/tokio/pull/5903 [#5906]: https://github.com/tokio-rs/tokio/pull/5906 [#5938]: https://github.com/tokio-rs/tokio/pull/5938 [#5939]: https://github.com/tokio-rs/tokio/pull/5939 [#5947]: https://github.com/tokio-rs/tokio/pull/5947 [#5952]: https://github.com/tokio-rs/tokio/pull/5952 [#5954]: https://github.com/tokio-rs/tokio/pull/5954 [#5956]: https://github.com/tokio-rs/tokio/pull/5956 [#5958]: https://github.com/tokio-rs/tokio/pull/5958 [#5960]: https://github.com/tokio-rs/tokio/pull/5960 [#5962]: https://github.com/tokio-rs/tokio/pull/5962 [#5971]: https://github.com/tokio-rs/tokio/pull/5971 [#5972]: https://github.com/tokio-rs/tokio/pull/5972 [#5977]: https://github.com/tokio-rs/tokio/pull/5977 [#5978]: https://github.com/tokio-rs/tokio/pull/5978 [#5984]: https://github.com/tokio-rs/tokio/pull/5984 [#5985]: https://github.com/tokio-rs/tokio/pull/5985 [#5988]: https://github.com/tokio-rs/tokio/pull/5988 [#5994]: https://github.com/tokio-rs/tokio/pull/5994 [#5997]: https://github.com/tokio-rs/tokio/pull/5997 [#5998]: https://github.com/tokio-rs/tokio/pull/5998 [#6002]: https://github.com/tokio-rs/tokio/pull/6002 [#6014]: https://github.com/tokio-rs/tokio/pull/6014 [#6017]: https://github.com/tokio-rs/tokio/pull/6017 [#6018]: https://github.com/tokio-rs/tokio/pull/6018 [#6021]: https://github.com/tokio-rs/tokio/pull/6021 [#6030]: https://github.com/tokio-rs/tokio/pull/6030 [#6031]: https://github.com/tokio-rs/tokio/pull/6031 [#6032]: https://github.com/tokio-rs/tokio/pull/6032 [#6036]: https://github.com/tokio-rs/tokio/pull/6036 [#6037]: https://github.com/tokio-rs/tokio/pull/6037 [#6042]: https://github.com/tokio-rs/tokio/pull/6042 [#6045]: https://github.com/tokio-rs/tokio/pull/6045 [#6050]: https://github.com/tokio-rs/tokio/pull/6050 [#6056]: https://github.com/tokio-rs/tokio/pull/6056 [#6058]: https://github.com/tokio-rs/tokio/pull/6058 # 1.32.1 (December 19, 2023) This is a forward part of a change that was backported to 1.25.3. ### Fixed - io: add budgeting to `tokio::runtime::io::registration::async_io` ([#6221]) [#6221]: https://github.com/tokio-rs/tokio/pull/6221 # 1.32.0 (August 16, 2023) ### Fixed - sync: fix potential quadratic behavior in `broadcast::Receiver` ([#5925]) ### Added - process: stabilize `Command::raw_arg` ([#5930]) - io: enable awaiting error readiness ([#5781]) ### Unstable - rt(alt): improve scalability of alt runtime as the number of cores grows ([#5935]) [#5925]: https://github.com/tokio-rs/tokio/pull/5925 [#5930]: https://github.com/tokio-rs/tokio/pull/5930 [#5781]: https://github.com/tokio-rs/tokio/pull/5781 [#5935]: https://github.com/tokio-rs/tokio/pull/5935 # 1.31.0 (August 10, 2023) ### Fixed * io: delegate `WriteHalf::poll_write_vectored` ([#5914]) ### Unstable * rt(alt): fix memory leak in unstable next-gen scheduler prototype ([#5911]) * rt: expose mean task poll time metric ([#5927]) [#5914]: https://github.com/tokio-rs/tokio/pull/5914 [#5911]: https://github.com/tokio-rs/tokio/pull/5911 [#5927]: https://github.com/tokio-rs/tokio/pull/5927 # 1.30.0 (August 9, 2023) This release bumps the MSRV of Tokio to 1.63. ([#5887]) ### Changed - tokio: reduce LLVM code generation ([#5859]) - io: support `--cfg mio_unsupported_force_poll_poll` flag ([#5881]) - sync: make `const_new` methods always available ([#5885]) - sync: avoid false sharing in mpsc channel ([#5829]) - rt: pop at least one task from inject queue ([#5908]) ### Added - sync: add `broadcast::Sender::new` ([#5824]) - net: implement `UCred` for espidf ([#5868]) - fs: add `File::options()` ([#5869]) - time: implement extra reset variants for `Interval` ([#5878]) - process: add `{ChildStd*}::into_owned_{fd, handle}` ([#5899]) ### Removed - tokio: removed unused `tokio_*` cfgs ([#5890]) - remove build script to speed up compilation ([#5887]) ### Documented - sync: mention lagging in docs for `broadcast::send` ([#5820]) - runtime: expand on sharing runtime docs ([#5858]) - io: use vec in example for `AsyncReadExt::read_exact` ([#5863]) - time: mark `Sleep` as `!Unpin` in docs ([#5916]) - process: fix `raw_arg` not showing up in docs ([#5865]) ### Unstable - rt: add runtime ID ([#5864]) - rt: initial implementation of new threaded runtime ([#5823]) [#5820]: https://github.com/tokio-rs/tokio/pull/5820 [#5823]: https://github.com/tokio-rs/tokio/pull/5823 [#5824]: https://github.com/tokio-rs/tokio/pull/5824 [#5829]: https://github.com/tokio-rs/tokio/pull/5829 [#5858]: https://github.com/tokio-rs/tokio/pull/5858 [#5859]: https://github.com/tokio-rs/tokio/pull/5859 [#5863]: https://github.com/tokio-rs/tokio/pull/5863 [#5864]: https://github.com/tokio-rs/tokio/pull/5864 [#5865]: https://github.com/tokio-rs/tokio/pull/5865 [#5868]: https://github.com/tokio-rs/tokio/pull/5868 [#5869]: https://github.com/tokio-rs/tokio/pull/5869 [#5878]: https://github.com/tokio-rs/tokio/pull/5878 [#5881]: https://github.com/tokio-rs/tokio/pull/5881 [#5885]: https://github.com/tokio-rs/tokio/pull/5885 [#5887]: https://github.com/tokio-rs/tokio/pull/5887 [#5890]: https://github.com/tokio-rs/tokio/pull/5890 [#5899]: https://github.com/tokio-rs/tokio/pull/5899 [#5908]: https://github.com/tokio-rs/tokio/pull/5908 [#5916]: https://github.com/tokio-rs/tokio/pull/5916 # 1.29.1 (June 29, 2023) ### Fixed - rt: fix nesting two `block_in_place` with a `block_on` between ([#5837]) [#5837]: https://github.com/tokio-rs/tokio/pull/5837 # 1.29.0 (June 27, 2023) Technically a breaking change, the `Send` implementation is removed from `runtime::EnterGuard`. This change fixes a bug and should not impact most users. ### Breaking - rt: `EnterGuard` should not be `Send` ([#5766]) ### Fixed - fs: reduce blocking ops in `fs::read_dir` ([#5653]) - rt: fix possible starvation ([#5686], [#5712]) - rt: fix stacked borrows issue in `JoinSet` ([#5693]) - rt: panic if `EnterGuard` dropped incorrect order ([#5772]) - time: do not overflow to signal value ([#5710]) - fs: wait for in-flight ops before cloning `File` ([#5803]) ### Changed - rt: reduce time to poll tasks scheduled from outside the runtime ([#5705], [#5720]) ### Added - net: add uds doc alias for unix sockets ([#5659]) - rt: add metric for number of tasks ([#5628]) - sync: implement more traits for channel errors ([#5666]) - net: add nodelay methods on TcpSocket ([#5672]) - sync: add `broadcast::Receiver::blocking_recv` ([#5690]) - process: add `raw_arg` method to `Command` ([#5704]) - io: support PRIORITY epoll events ([#5566]) - task: add `JoinSet::poll_join_next` ([#5721]) - net: add support for Redox OS ([#5790]) ### Unstable - rt: add the ability to dump task backtraces ([#5608], [#5676], [#5708], [#5717]) - rt: instrument task poll times with a histogram ([#5685]) [#5766]: https://github.com/tokio-rs/tokio/pull/5766 [#5653]: https://github.com/tokio-rs/tokio/pull/5653 [#5686]: https://github.com/tokio-rs/tokio/pull/5686 [#5712]: https://github.com/tokio-rs/tokio/pull/5712 [#5693]: https://github.com/tokio-rs/tokio/pull/5693 [#5772]: https://github.com/tokio-rs/tokio/pull/5772 [#5710]: https://github.com/tokio-rs/tokio/pull/5710 [#5803]: https://github.com/tokio-rs/tokio/pull/5803 [#5705]: https://github.com/tokio-rs/tokio/pull/5705 [#5720]: https://github.com/tokio-rs/tokio/pull/5720 [#5659]: https://github.com/tokio-rs/tokio/pull/5659 [#5628]: https://github.com/tokio-rs/tokio/pull/5628 [#5666]: https://github.com/tokio-rs/tokio/pull/5666 [#5672]: https://github.com/tokio-rs/tokio/pull/5672 [#5690]: https://github.com/tokio-rs/tokio/pull/5690 [#5704]: https://github.com/tokio-rs/tokio/pull/5704 [#5566]: https://github.com/tokio-rs/tokio/pull/5566 [#5721]: https://github.com/tokio-rs/tokio/pull/5721 [#5790]: https://github.com/tokio-rs/tokio/pull/5790 [#5608]: https://github.com/tokio-rs/tokio/pull/5608 [#5676]: https://github.com/tokio-rs/tokio/pull/5676 [#5708]: https://github.com/tokio-rs/tokio/pull/5708 [#5717]: https://github.com/tokio-rs/tokio/pull/5717 [#5685]: https://github.com/tokio-rs/tokio/pull/5685 # 1.28.2 (May 28, 2023) Forward ports 1.18.6 changes. ### Fixed - deps: disable default features for mio ([#5728]) [#5728]: https://github.com/tokio-rs/tokio/pull/5728 # 1.28.1 (May 10th, 2023) This release fixes a mistake in the build script that makes `AsFd` implementations unavailable on Rust 1.63. ([#5677]) [#5677]: https://github.com/tokio-rs/tokio/pull/5677 # 1.28.0 (April 25th, 2023) ### Added - io: add `AsyncFd::async_io` ([#5542]) - io: impl BufMut for ReadBuf ([#5590]) - net: add `recv_buf` for `UdpSocket` and `UnixDatagram` ([#5583]) - sync: add `OwnedSemaphorePermit::semaphore` ([#5618]) - sync: add `same_channel` to broadcast channel ([#5607]) - sync: add `watch::Receiver::wait_for` ([#5611]) - task: add `JoinSet::spawn_blocking` and `JoinSet::spawn_blocking_on` ([#5612]) ### Changed - deps: update windows-sys to 0.48 ([#5591]) - io: make `read_to_end` not grow unnecessarily ([#5610]) - macros: make entrypoints more efficient ([#5621]) - sync: improve Debug impl for `RwLock` ([#5647]) - sync: reduce contention in `Notify` ([#5503]) ### Fixed - net: support `get_peer_cred` on AIX ([#5065]) - sync: avoid deadlocks in `broadcast` with custom wakers ([#5578]) ### Documented - sync: fix typo in `Semaphore::MAX_PERMITS` ([#5645]) - sync: fix typo in `tokio::sync::watch::Sender` docs ([#5587]) [#5065]: https://github.com/tokio-rs/tokio/pull/5065 [#5503]: https://github.com/tokio-rs/tokio/pull/5503 [#5542]: https://github.com/tokio-rs/tokio/pull/5542 [#5578]: https://github.com/tokio-rs/tokio/pull/5578 [#5583]: https://github.com/tokio-rs/tokio/pull/5583 [#5587]: https://github.com/tokio-rs/tokio/pull/5587 [#5590]: https://github.com/tokio-rs/tokio/pull/5590 [#5591]: https://github.com/tokio-rs/tokio/pull/5591 [#5607]: https://github.com/tokio-rs/tokio/pull/5607 [#5610]: https://github.com/tokio-rs/tokio/pull/5610 [#5611]: https://github.com/tokio-rs/tokio/pull/5611 [#5612]: https://github.com/tokio-rs/tokio/pull/5612 [#5618]: https://github.com/tokio-rs/tokio/pull/5618 [#5621]: https://github.com/tokio-rs/tokio/pull/5621 [#5645]: https://github.com/tokio-rs/tokio/pull/5645 [#5647]: https://github.com/tokio-rs/tokio/pull/5647 # 1.27.0 (March 27th, 2023) This release bumps the MSRV of Tokio to 1.56. ([#5559]) ### Added - io: add `async_io` helper method to sockets ([#5512]) - io: add implementations of `AsFd`/`AsHandle`/`AsSocket` ([#5514], [#5540]) - net: add `UdpSocket::peek_sender()` ([#5520]) - sync: add `RwLockWriteGuard::{downgrade_map, try_downgrade_map}` ([#5527]) - task: add `JoinHandle::abort_handle` ([#5543]) ### Changed - io: use `memchr` from `libc` ([#5558]) - macros: accept path as crate rename in `#[tokio::main]` ([#5557]) - macros: update to syn 2.0.0 ([#5572]) - time: don't register for a wakeup when `Interval` returns `Ready` ([#5553]) ### Fixed - fs: fuse std iterator in `ReadDir` ([#5555]) - tracing: fix `spawn_blocking` location fields ([#5573]) - time: clean up redundant check in `Wheel::poll()` ([#5574]) ### Documented - macros: define cancellation safety ([#5525]) - io: add details to docs of `tokio::io::copy[_buf]` ([#5575]) - io: refer to `ReaderStream` and `StreamReader` in module docs ([#5576]) [#5512]: https://github.com/tokio-rs/tokio/pull/5512 [#5514]: https://github.com/tokio-rs/tokio/pull/5514 [#5520]: https://github.com/tokio-rs/tokio/pull/5520 [#5525]: https://github.com/tokio-rs/tokio/pull/5525 [#5527]: https://github.com/tokio-rs/tokio/pull/5527 [#5540]: https://github.com/tokio-rs/tokio/pull/5540 [#5543]: https://github.com/tokio-rs/tokio/pull/5543 [#5553]: https://github.com/tokio-rs/tokio/pull/5553 [#5555]: https://github.com/tokio-rs/tokio/pull/5555 [#5557]: https://github.com/tokio-rs/tokio/pull/5557 [#5558]: https://github.com/tokio-rs/tokio/pull/5558 [#5559]: https://github.com/tokio-rs/tokio/pull/5559 [#5572]: https://github.com/tokio-rs/tokio/pull/5572 [#5573]: https://github.com/tokio-rs/tokio/pull/5573 [#5574]: https://github.com/tokio-rs/tokio/pull/5574 [#5575]: https://github.com/tokio-rs/tokio/pull/5575 [#5576]: https://github.com/tokio-rs/tokio/pull/5576 # 1.26.0 (March 1st, 2023) ### Fixed - macros: fix empty `join!` and `try_join!` ([#5504]) - sync: don't leak tracing spans in mutex guards ([#5469]) - sync: drop wakers after unlocking the mutex in Notify ([#5471]) - sync: drop wakers outside lock in semaphore ([#5475]) ### Added - fs: add `fs::try_exists` ([#4299]) - net: add types for named unix pipes ([#5351]) - sync: add `MappedOwnedMutexGuard` ([#5474]) ### Changed - chore: update windows-sys to 0.45 ([#5386]) - net: use Message Read Mode for named pipes ([#5350]) - sync: mark lock guards with `#[clippy::has_significant_drop]` ([#5422]) - sync: reduce contention in watch channel ([#5464]) - time: remove cache padding in timer entries ([#5468]) - time: Improve `Instant::now()` perf with test-util ([#5513]) ### Internal Changes - io: use `poll_fn` in `copy_bidirectional` ([#5486]) - net: refactor named pipe builders to not use bitfields ([#5477]) - rt: remove Arc from Clock ([#5434]) - sync: make `notify_waiters` calls atomic ([#5458]) - time: don't store deadline twice in sleep entries ([#5410]) ### Unstable - metrics: add a new metric for budget exhaustion yields ([#5517]) ### Documented - io: improve AsyncFd example ([#5481]) - runtime: document the nature of the main future ([#5494]) - runtime: remove extra period in docs ([#5511]) - signal: updated Documentation for Signals ([#5459]) - sync: add doc aliases for `blocking_*` methods ([#5448]) - sync: fix docs for Send/Sync bounds in broadcast ([#5480]) - sync: document drop behavior for channels ([#5497]) - task: clarify what happens to spawned work during runtime shutdown ([#5394]) - task: clarify `process::Command` docs ([#5413]) - task: fix wording with 'unsend' ([#5452]) - time: document immediate completion guarantee for timeouts ([#5509]) - tokio: document supported platforms ([#5483]) [#4299]: https://github.com/tokio-rs/tokio/pull/4299 [#5350]: https://github.com/tokio-rs/tokio/pull/5350 [#5351]: https://github.com/tokio-rs/tokio/pull/5351 [#5386]: https://github.com/tokio-rs/tokio/pull/5386 [#5394]: https://github.com/tokio-rs/tokio/pull/5394 [#5410]: https://github.com/tokio-rs/tokio/pull/5410 [#5413]: https://github.com/tokio-rs/tokio/pull/5413 [#5422]: https://github.com/tokio-rs/tokio/pull/5422 [#5434]: https://github.com/tokio-rs/tokio/pull/5434 [#5448]: https://github.com/tokio-rs/tokio/pull/5448 [#5452]: https://github.com/tokio-rs/tokio/pull/5452 [#5458]: https://github.com/tokio-rs/tokio/pull/5458 [#5459]: https://github.com/tokio-rs/tokio/pull/5459 [#5464]: https://github.com/tokio-rs/tokio/pull/5464 [#5468]: https://github.com/tokio-rs/tokio/pull/5468 [#5469]: https://github.com/tokio-rs/tokio/pull/5469 [#5471]: https://github.com/tokio-rs/tokio/pull/5471 [#5474]: https://github.com/tokio-rs/tokio/pull/5474 [#5475]: https://github.com/tokio-rs/tokio/pull/5475 [#5477]: https://github.com/tokio-rs/tokio/pull/5477 [#5480]: https://github.com/tokio-rs/tokio/pull/5480 [#5481]: https://github.com/tokio-rs/tokio/pull/5481 [#5483]: https://github.com/tokio-rs/tokio/pull/5483 [#5486]: https://github.com/tokio-rs/tokio/pull/5486 [#5494]: https://github.com/tokio-rs/tokio/pull/5494 [#5497]: https://github.com/tokio-rs/tokio/pull/5497 [#5504]: https://github.com/tokio-rs/tokio/pull/5504 [#5509]: https://github.com/tokio-rs/tokio/pull/5509 [#5511]: https://github.com/tokio-rs/tokio/pull/5511 [#5513]: https://github.com/tokio-rs/tokio/pull/5513 [#5517]: https://github.com/tokio-rs/tokio/pull/5517 # 1.25.3 (December 17th, 2023) ### Fixed - io: add budgeting to `tokio::runtime::io::registration::async_io` ([#6221]) [#6221]: https://github.com/tokio-rs/tokio/pull/6221 # 1.25.2 (September 22, 2023) Forward ports 1.20.6 changes. ### Changed - io: use `memchr` from `libc` ([#5960]) [#5960]: https://github.com/tokio-rs/tokio/pull/5960 # 1.25.1 (May 28, 2023) Forward ports 1.18.6 changes. ### Fixed - deps: disable default features for mio ([#5728]) [#5728]: https://github.com/tokio-rs/tokio/pull/5728 # 1.25.0 (January 28, 2023) ### Fixed - rt: fix runtime metrics reporting ([#5330]) ### Added - sync: add `broadcast::Sender::len` ([#5343]) ### Changed - fs: increase maximum read buffer size to 2MiB ([#5397]) [#5330]: https://github.com/tokio-rs/tokio/pull/5330 [#5343]: https://github.com/tokio-rs/tokio/pull/5343 [#5397]: https://github.com/tokio-rs/tokio/pull/5397 # 1.24.2 (January 17, 2023) Forward ports 1.18.5 changes. ### Fixed - io: fix unsoundness in `ReadHalf::unsplit` ([#5375]) [#5375]: https://github.com/tokio-rs/tokio/pull/5375 # 1.24.1 (January 6, 2022) This release fixes a compilation failure on targets without `AtomicU64` when using rustc older than 1.63. ([#5356]) [#5356]: https://github.com/tokio-rs/tokio/pull/5356 # 1.24.0 (January 5, 2022) ### Fixed - rt: improve native `AtomicU64` support detection ([#5284]) ### Added - rt: add configuration option for max number of I/O events polled from the OS per tick ([#5186]) - rt: add an environment variable for configuring the default number of worker threads per runtime instance ([#4250]) ### Changed - sync: reduce MPSC channel stack usage ([#5294]) - io: reduce lock contention in I/O operations ([#5300]) - fs: speed up `read_dir()` by chunking operations ([#5309]) - rt: use internal `ThreadId` implementation ([#5329]) - test: don't auto-advance time when a `spawn_blocking` task is running ([#5115]) [#5186]: https://github.com/tokio-rs/tokio/pull/5186 [#5294]: https://github.com/tokio-rs/tokio/pull/5294 [#5284]: https://github.com/tokio-rs/tokio/pull/5284 [#4250]: https://github.com/tokio-rs/tokio/pull/4250 [#5300]: https://github.com/tokio-rs/tokio/pull/5300 [#5329]: https://github.com/tokio-rs/tokio/pull/5329 [#5115]: https://github.com/tokio-rs/tokio/pull/5115 [#5309]: https://github.com/tokio-rs/tokio/pull/5309 # 1.23.1 (January 4, 2022) This release forward ports changes from 1.18.4. ### Fixed - net: fix Windows named pipe server builder to maintain option when toggling pipe mode ([#5336]). [#5336]: https://github.com/tokio-rs/tokio/pull/5336 # 1.23.0 (December 5, 2022) ### Fixed - net: fix Windows named pipe connect ([#5208]) - io: support vectored writes for `ChildStdin` ([#5216]) - io: fix `async fn ready()` false positive for OS-specific events ([#5231]) ### Changed - runtime: `yield_now` defers task until after driver poll ([#5223]) - runtime: reduce amount of codegen needed per spawned task ([#5213]) - windows: replace `winapi` dependency with `windows-sys` ([#5204]) [#5208]: https://github.com/tokio-rs/tokio/pull/5208 [#5216]: https://github.com/tokio-rs/tokio/pull/5216 [#5213]: https://github.com/tokio-rs/tokio/pull/5213 [#5204]: https://github.com/tokio-rs/tokio/pull/5204 [#5223]: https://github.com/tokio-rs/tokio/pull/5223 [#5231]: https://github.com/tokio-rs/tokio/pull/5231 # 1.22.0 (November 17, 2022) ### Added - runtime: add `Handle::runtime_flavor` ([#5138]) - sync: add `Mutex::blocking_lock_owned` ([#5130]) - sync: add `Semaphore::MAX_PERMITS` ([#5144]) - sync: add `merge()` to semaphore permits ([#4948]) - sync: add `mpsc::WeakUnboundedSender` ([#5189]) ### Added (unstable) - process: add `Command::process_group` ([#5114]) - runtime: export metrics about the blocking thread pool ([#5161]) - task: add `task::id()` and `task::try_id()` ([#5171]) ### Fixed - macros: don't take ownership of futures in macros ([#5087]) - runtime: fix Stacked Borrows violation in `LocalOwnedTasks` ([#5099]) - runtime: mitigate ABA with 32-bit queue indices when possible ([#5042]) - task: wake local tasks to the local queue when woken by the same thread ([#5095]) - time: panic in release mode when `mark_pending` called illegally ([#5093]) - runtime: fix typo in expect message ([#5169]) - runtime: fix `unsync_load` on atomic types ([#5175]) - task: elaborate safety comments in task deallocation ([#5172]) - runtime: fix `LocalSet` drop in thread local ([#5179]) - net: remove libc type leakage in a public API ([#5191]) - runtime: update the alignment of `CachePadded` ([#5106]) ### Changed - io: make `tokio::io::copy` continue filling the buffer when writer stalls ([#5066]) - runtime: remove `coop::budget` from `LocalSet::run_until` ([#5155]) - sync: make `Notify` panic safe ([#5154]) ### Documented - io: fix doc for `write_i8` to use signed integers ([#5040]) - net: fix doc typos for TCP and UDP `set_tos` methods ([#5073]) - net: fix function name in `UdpSocket::recv` documentation ([#5150]) - sync: typo in `TryLockError` for `RwLock::try_write` ([#5160]) - task: document that spawned tasks execute immediately ([#5117]) - time: document return type of `timeout` ([#5118]) - time: document that `timeout` checks only before poll ([#5126]) - sync: specify return type of `oneshot::Receiver` in docs ([#5198]) ### Internal changes - runtime: use const `Mutex::new` for globals ([#5061]) - runtime: remove `Option` around `mio::Events` in io driver ([#5078]) - runtime: remove a conditional compilation clause ([#5104]) - runtime: remove a reference to internal time handle ([#5107]) - runtime: misc time driver cleanup ([#5120]) - runtime: move signal driver to runtime module ([#5121]) - runtime: signal driver now uses I/O driver directly ([#5125]) - runtime: start decoupling I/O driver and I/O handle ([#5127]) - runtime: switch `io::handle` refs with scheduler:Handle ([#5128]) - runtime: remove Arc from I/O driver ([#5134]) - runtime: use signal driver handle via `scheduler::Handle` ([#5135]) - runtime: move internal clock fns out of context ([#5139]) - runtime: remove `runtime::context` module ([#5140]) - runtime: keep driver cfgs in `driver.rs` ([#5141]) - runtime: add `runtime::context` to unify thread-locals ([#5143]) - runtime: rename some confusing internal variables/fns ([#5151]) - runtime: move `coop` mod into `runtime` ([#5152]) - runtime: move budget state to context thread-local ([#5157]) - runtime: move park logic into runtime module ([#5158]) - runtime: move `Runtime` into its own file ([#5159]) - runtime: unify entering a runtime with `Handle::enter` ([#5163]) - runtime: remove handle reference from each scheduler ([#5166]) - runtime: move `enter` into `context` ([#5167]) - runtime: combine context and entered thread-locals ([#5168]) - runtime: fix accidental unsetting of current handle ([#5178]) - runtime: move `CoreStage` methods to `Core` ([#5182]) - sync: name mpsc semaphore types ([#5146]) [#4948]: https://github.com/tokio-rs/tokio/pull/4948 [#5040]: https://github.com/tokio-rs/tokio/pull/5040 [#5042]: https://github.com/tokio-rs/tokio/pull/5042 [#5061]: https://github.com/tokio-rs/tokio/pull/5061 [#5066]: https://github.com/tokio-rs/tokio/pull/5066 [#5073]: https://github.com/tokio-rs/tokio/pull/5073 [#5078]: https://github.com/tokio-rs/tokio/pull/5078 [#5087]: https://github.com/tokio-rs/tokio/pull/5087 [#5093]: https://github.com/tokio-rs/tokio/pull/5093 [#5095]: https://github.com/tokio-rs/tokio/pull/5095 [#5099]: https://github.com/tokio-rs/tokio/pull/5099 [#5104]: https://github.com/tokio-rs/tokio/pull/5104 [#5106]: https://github.com/tokio-rs/tokio/pull/5106 [#5107]: https://github.com/tokio-rs/tokio/pull/5107 [#5114]: https://github.com/tokio-rs/tokio/pull/5114 [#5117]: https://github.com/tokio-rs/tokio/pull/5117 [#5118]: https://github.com/tokio-rs/tokio/pull/5118 [#5120]: https://github.com/tokio-rs/tokio/pull/5120 [#5121]: https://github.com/tokio-rs/tokio/pull/5121 [#5125]: https://github.com/tokio-rs/tokio/pull/5125 [#5126]: https://github.com/tokio-rs/tokio/pull/5126 [#5127]: https://github.com/tokio-rs/tokio/pull/5127 [#5128]: https://github.com/tokio-rs/tokio/pull/5128 [#5130]: https://github.com/tokio-rs/tokio/pull/5130 [#5134]: https://github.com/tokio-rs/tokio/pull/5134 [#5135]: https://github.com/tokio-rs/tokio/pull/5135 [#5138]: https://github.com/tokio-rs/tokio/pull/5138 [#5138]: https://github.com/tokio-rs/tokio/pull/5138 [#5139]: https://github.com/tokio-rs/tokio/pull/5139 [#5140]: https://github.com/tokio-rs/tokio/pull/5140 [#5141]: https://github.com/tokio-rs/tokio/pull/5141 [#5143]: https://github.com/tokio-rs/tokio/pull/5143 [#5144]: https://github.com/tokio-rs/tokio/pull/5144 [#5144]: https://github.com/tokio-rs/tokio/pull/5144 [#5146]: https://github.com/tokio-rs/tokio/pull/5146 [#5150]: https://github.com/tokio-rs/tokio/pull/5150 [#5151]: https://github.com/tokio-rs/tokio/pull/5151 [#5152]: https://github.com/tokio-rs/tokio/pull/5152 [#5154]: https://github.com/tokio-rs/tokio/pull/5154 [#5155]: https://github.com/tokio-rs/tokio/pull/5155 [#5157]: https://github.com/tokio-rs/tokio/pull/5157 [#5158]: https://github.com/tokio-rs/tokio/pull/5158 [#5159]: https://github.com/tokio-rs/tokio/pull/5159 [#5160]: https://github.com/tokio-rs/tokio/pull/5160 [#5161]: https://github.com/tokio-rs/tokio/pull/5161 [#5163]: https://github.com/tokio-rs/tokio/pull/5163 [#5166]: https://github.com/tokio-rs/tokio/pull/5166 [#5167]: https://github.com/tokio-rs/tokio/pull/5167 [#5168]: https://github.com/tokio-rs/tokio/pull/5168 [#5169]: https://github.com/tokio-rs/tokio/pull/5169 [#5171]: https://github.com/tokio-rs/tokio/pull/5171 [#5172]: https://github.com/tokio-rs/tokio/pull/5172 [#5175]: https://github.com/tokio-rs/tokio/pull/5175 [#5178]: https://github.com/tokio-rs/tokio/pull/5178 [#5179]: https://github.com/tokio-rs/tokio/pull/5179 [#5182]: https://github.com/tokio-rs/tokio/pull/5182 [#5189]: https://github.com/tokio-rs/tokio/pull/5189 [#5191]: https://github.com/tokio-rs/tokio/pull/5191 [#5198]: https://github.com/tokio-rs/tokio/pull/5198 # 1.21.2 (September 27, 2022) This release removes the dependency on the `once_cell` crate to restore the MSRV of 1.21.x, which is the latest minor version at the time of release. ([#5048]) [#5048]: https://github.com/tokio-rs/tokio/pull/5048 # 1.21.1 (September 13, 2022) ### Fixed - net: fix dependency resolution for socket2 ([#5000]) - task: ignore failure to set TLS in `LocalSet` Drop ([#4976]) [#4976]: https://github.com/tokio-rs/tokio/pull/4976 [#5000]: https://github.com/tokio-rs/tokio/pull/5000 # 1.21.0 (September 2, 2022) This release is the first release of Tokio to intentionally support WASM. The `sync,macros,io-util,rt,time` features are stabilized on WASM. Additionally the wasm32-wasi target is given unstable support for the `net` feature. ### Added - net: add `device` and `bind_device` methods to TCP/UDP sockets ([#4882]) - net: add `tos` and `set_tos` methods to TCP and UDP sockets ([#4877]) - net: add security flags to named pipe `ServerOptions` ([#4845]) - signal: add more windows signal handlers ([#4924]) - sync: add `mpsc::Sender::max_capacity` method ([#4904]) - sync: implement Weak version of `mpsc::Sender` ([#4595]) - task: add `LocalSet::enter` ([#4765]) - task: stabilize `JoinSet` and `AbortHandle` ([#4920]) - tokio: add `track_caller` to public APIs ([#4805], [#4848], [#4852]) - wasm: initial support for `wasm32-wasi` target ([#4716]) ### Fixed - miri: improve miri compatibility by avoiding temporary references in `linked_list::Link` impls ([#4841]) - signal: don't register write interest on signal pipe ([#4898]) - sync: add `#[must_use]` to lock guards ([#4886]) - sync: fix hang when calling `recv` on closed and reopened broadcast channel ([#4867]) - task: propagate attributes on task-locals ([#4837]) ### Changed - fs: change panic to error in `File::start_seek` ([#4897]) - io: reduce syscalls in `poll_read` ([#4840]) - process: use blocking threadpool for child stdio I/O ([#4824]) - signal: make `SignalKind` methods const ([#4956]) ### Internal changes - rt: extract `basic_scheduler::Config` ([#4935]) - rt: move I/O driver into `runtime` module ([#4942]) - rt: rename internal scheduler types ([#4945]) ### Documented - chore: fix typos and grammar ([#4858], [#4894], [#4928]) - io: fix typo in `AsyncSeekExt::rewind` docs ([#4893]) - net: add documentation to `try_read()` for zero-length buffers ([#4937]) - runtime: remove incorrect panic section for `Builder::worker_threads` ([#4849]) - sync: doc of `watch::Sender::send` improved ([#4959]) - task: add cancel safety docs to `JoinHandle` ([#4901]) - task: expand on cancellation of `spawn_blocking` ([#4811]) - time: clarify that the first tick of `Interval::tick` happens immediately ([#4951]) ### Unstable - rt: add unstable option to disable the LIFO slot ([#4936]) - task: fix incorrect signature in `Builder::spawn_on` ([#4953]) - task: make `task::Builder::spawn*` methods fallible ([#4823]) [#4595]: https://github.com/tokio-rs/tokio/pull/4595 [#4716]: https://github.com/tokio-rs/tokio/pull/4716 [#4765]: https://github.com/tokio-rs/tokio/pull/4765 [#4805]: https://github.com/tokio-rs/tokio/pull/4805 [#4811]: https://github.com/tokio-rs/tokio/pull/4811 [#4823]: https://github.com/tokio-rs/tokio/pull/4823 [#4824]: https://github.com/tokio-rs/tokio/pull/4824 [#4837]: https://github.com/tokio-rs/tokio/pull/4837 [#4840]: https://github.com/tokio-rs/tokio/pull/4840 [#4841]: https://github.com/tokio-rs/tokio/pull/4841 [#4845]: https://github.com/tokio-rs/tokio/pull/4845 [#4848]: https://github.com/tokio-rs/tokio/pull/4848 [#4849]: https://github.com/tokio-rs/tokio/pull/4849 [#4852]: https://github.com/tokio-rs/tokio/pull/4852 [#4858]: https://github.com/tokio-rs/tokio/pull/4858 [#4867]: https://github.com/tokio-rs/tokio/pull/4867 [#4877]: https://github.com/tokio-rs/tokio/pull/4877 [#4882]: https://github.com/tokio-rs/tokio/pull/4882 [#4886]: https://github.com/tokio-rs/tokio/pull/4886 [#4893]: https://github.com/tokio-rs/tokio/pull/4893 [#4894]: https://github.com/tokio-rs/tokio/pull/4894 [#4897]: https://github.com/tokio-rs/tokio/pull/4897 [#4898]: https://github.com/tokio-rs/tokio/pull/4898 [#4901]: https://github.com/tokio-rs/tokio/pull/4901 [#4904]: https://github.com/tokio-rs/tokio/pull/4904 [#4920]: https://github.com/tokio-rs/tokio/pull/4920 [#4924]: https://github.com/tokio-rs/tokio/pull/4924 [#4928]: https://github.com/tokio-rs/tokio/pull/4928 [#4935]: https://github.com/tokio-rs/tokio/pull/4935 [#4936]: https://github.com/tokio-rs/tokio/pull/4936 [#4937]: https://github.com/tokio-rs/tokio/pull/4937 [#4942]: https://github.com/tokio-rs/tokio/pull/4942 [#4945]: https://github.com/tokio-rs/tokio/pull/4945 [#4951]: https://github.com/tokio-rs/tokio/pull/4951 [#4953]: https://github.com/tokio-rs/tokio/pull/4953 [#4956]: https://github.com/tokio-rs/tokio/pull/4956 [#4959]: https://github.com/tokio-rs/tokio/pull/4959 # 1.20.6 (September 22, 2023) This is a backport of a change from 1.27.0. ### Changed - io: use `memchr` from `libc` ([#5960]) [#5960]: https://github.com/tokio-rs/tokio/pull/5960 # 1.20.5 (May 28, 2023) Forward ports 1.18.6 changes. ### Fixed - deps: disable default features for mio ([#5728]) [#5728]: https://github.com/tokio-rs/tokio/pull/5728 # 1.20.4 (January 17, 2023) Forward ports 1.18.5 changes. ### Fixed - io: fix unsoundness in `ReadHalf::unsplit` ([#5375]) [#5375]: https://github.com/tokio-rs/tokio/pull/5375 # 1.20.3 (January 3, 2022) This release forward ports changes from 1.18.4. ### Fixed - net: fix Windows named pipe server builder to maintain option when toggling pipe mode ([#5336]). [#5336]: https://github.com/tokio-rs/tokio/pull/5336 # 1.20.2 (September 27, 2022) This release removes the dependency on the `once_cell` crate to restore the MSRV of the 1.20.x LTS release. ([#5048]) [#5048]: https://github.com/tokio-rs/tokio/pull/5048 # 1.20.1 (July 25, 2022) ### Fixed - chore: fix version detection in build script ([#4860]) [#4860]: https://github.com/tokio-rs/tokio/pull/4860 # 1.20.0 (July 12, 2022) ### Added - tokio: add `track_caller` to public APIs ([#4772], [#4791], [#4793], [#4806], [#4808]) - sync: Add `has_changed` method to `watch::Ref` ([#4758]) ### Changed - time: remove `src/time/driver/wheel/stack.rs` ([#4766]) - rt: clean up arguments passed to basic scheduler ([#4767]) - net: be more specific about winapi features ([#4764]) - tokio: use const initialized thread locals where possible ([#4677]) - task: various small improvements to LocalKey ([#4795]) ### Documented - fs: warn about performance pitfall ([#4762]) - chore: fix spelling ([#4769]) - sync: document spurious failures in oneshot ([#4777]) - sync: add warning for watch in non-Send futures ([#4741]) - chore: fix typo ([#4798]) ### Unstable - joinset: rename `join_one` to `join_next` ([#4755]) - rt: unhandled panic config for current thread rt ([#4770]) [#4677]: https://github.com/tokio-rs/tokio/pull/4677 [#4741]: https://github.com/tokio-rs/tokio/pull/4741 [#4755]: https://github.com/tokio-rs/tokio/pull/4755 [#4758]: https://github.com/tokio-rs/tokio/pull/4758 [#4762]: https://github.com/tokio-rs/tokio/pull/4762 [#4764]: https://github.com/tokio-rs/tokio/pull/4764 [#4766]: https://github.com/tokio-rs/tokio/pull/4766 [#4767]: https://github.com/tokio-rs/tokio/pull/4767 [#4769]: https://github.com/tokio-rs/tokio/pull/4769 [#4770]: https://github.com/tokio-rs/tokio/pull/4770 [#4772]: https://github.com/tokio-rs/tokio/pull/4772 [#4777]: https://github.com/tokio-rs/tokio/pull/4777 [#4791]: https://github.com/tokio-rs/tokio/pull/4791 [#4793]: https://github.com/tokio-rs/tokio/pull/4793 [#4795]: https://github.com/tokio-rs/tokio/pull/4795 [#4798]: https://github.com/tokio-rs/tokio/pull/4798 [#4806]: https://github.com/tokio-rs/tokio/pull/4806 [#4808]: https://github.com/tokio-rs/tokio/pull/4808 # 1.19.2 (June 6, 2022) This release fixes another bug in `Notified::enable`. ([#4751]) [#4751]: https://github.com/tokio-rs/tokio/pull/4751 # 1.19.1 (June 5, 2022) This release fixes a bug in `Notified::enable`. ([#4747]) [#4747]: https://github.com/tokio-rs/tokio/pull/4747 # 1.19.0 (June 3, 2022) ### Added - runtime: add `is_finished` method for `JoinHandle` and `AbortHandle` ([#4709]) - runtime: make global queue and event polling intervals configurable ([#4671]) - sync: add `Notified::enable` ([#4705]) - sync: add `watch::Sender::send_if_modified` ([#4591]) - sync: add resubscribe method to broadcast::Receiver ([#4607]) - net: add `take_error` to `TcpSocket` and `TcpStream` ([#4739]) ### Changed - io: refactor out usage of Weak in the io handle ([#4656]) ### Fixed - macros: avoid starvation in `join!` and `try_join!` ([#4624]) ### Documented - runtime: clarify semantics of tasks outliving `block_on` ([#4729]) - time: fix example for `MissedTickBehavior::Burst` ([#4713]) ### Unstable - metrics: correctly update atomics in `IoDriverMetrics` ([#4725]) - metrics: fix compilation with unstable, process, and rt, but without net ([#4682]) - task: add `#[track_caller]` to `JoinSet`/`JoinMap` ([#4697]) - task: add `Builder::{spawn_on, spawn_local_on, spawn_blocking_on}` ([#4683]) - task: add `consume_budget` for cooperative scheduling ([#4498]) - task: add `join_set::Builder` for configuring `JoinSet` tasks ([#4687]) - task: update return value of `JoinSet::join_one` ([#4726]) [#4498]: https://github.com/tokio-rs/tokio/pull/4498 [#4591]: https://github.com/tokio-rs/tokio/pull/4591 [#4607]: https://github.com/tokio-rs/tokio/pull/4607 [#4624]: https://github.com/tokio-rs/tokio/pull/4624 [#4656]: https://github.com/tokio-rs/tokio/pull/4656 [#4671]: https://github.com/tokio-rs/tokio/pull/4671 [#4682]: https://github.com/tokio-rs/tokio/pull/4682 [#4683]: https://github.com/tokio-rs/tokio/pull/4683 [#4687]: https://github.com/tokio-rs/tokio/pull/4687 [#4697]: https://github.com/tokio-rs/tokio/pull/4697 [#4705]: https://github.com/tokio-rs/tokio/pull/4705 [#4709]: https://github.com/tokio-rs/tokio/pull/4709 [#4713]: https://github.com/tokio-rs/tokio/pull/4713 [#4725]: https://github.com/tokio-rs/tokio/pull/4725 [#4726]: https://github.com/tokio-rs/tokio/pull/4726 [#4729]: https://github.com/tokio-rs/tokio/pull/4729 [#4739]: https://github.com/tokio-rs/tokio/pull/4739 # 1.18.6 (May 28, 2023) ### Fixed - deps: disable default features for mio ([#5728]) [#5728]: https://github.com/tokio-rs/tokio/pull/5728 # 1.18.5 (January 17, 2023) ### Fixed - io: fix unsoundness in `ReadHalf::unsplit` ([#5375]) [#5375]: https://github.com/tokio-rs/tokio/pull/5375 # 1.18.4 (January 3, 2022) ### Fixed - net: fix Windows named pipe server builder to maintain option when toggling pipe mode ([#5336]). [#5336]: https://github.com/tokio-rs/tokio/pull/5336 # 1.18.3 (September 27, 2022) This release removes the dependency on the `once_cell` crate to restore the MSRV of the 1.18.x LTS release. ([#5048]) [#5048]: https://github.com/tokio-rs/tokio/pull/5048 # 1.18.2 (May 5, 2022) Add missing features for the `winapi` dependency. ([#4663]) [#4663]: https://github.com/tokio-rs/tokio/pull/4663 # 1.18.1 (May 2, 2022) The 1.18.0 release broke the build for targets without 64-bit atomics when building with `tokio_unstable`. This release fixes that. ([#4649]) [#4649]: https://github.com/tokio-rs/tokio/pull/4649 # 1.18.0 (April 27, 2022) This release adds a number of new APIs in `tokio::net`, `tokio::signal`, and `tokio::sync`. In addition, it adds new unstable APIs to `tokio::task` (`Id`s for uniquely identifying a task, and `AbortHandle` for remotely cancelling a task), as well as a number of bugfixes. ### Fixed - blocking: add missing `#[track_caller]` for `spawn_blocking` ([#4616]) - macros: fix `select` macro to process 64 branches ([#4519]) - net: fix `try_io` methods not calling Mio's `try_io` internally ([#4582]) - runtime: recover when OS fails to spawn a new thread ([#4485]) ### Added - net: add `UdpSocket::peer_addr` ([#4611]) - net: add `try_read_buf` method for named pipes ([#4626]) - signal: add `SignalKind` `Hash`/`Eq` impls and `c_int` conversion ([#4540]) - signal: add support for signals up to `SIGRTMAX` ([#4555]) - sync: add `watch::Sender::send_modify` method ([#4310]) - sync: add `broadcast::Receiver::len` method ([#4542]) - sync: add `watch::Receiver::same_channel` method ([#4581]) - sync: implement `Clone` for `RecvError` types ([#4560]) ### Changed - update `mio` to 0.8.1 ([#4582]) - macros: rename `tokio::select!`'s internal `util` module ([#4543]) - runtime: use `Vec::with_capacity` when building runtime ([#4553]) ### Documented - improve docs for `tokio_unstable` ([#4524]) - runtime: include more documentation for thread_pool/worker ([#4511]) - runtime: update `Handle::current`'s docs to mention `EnterGuard` ([#4567]) - time: clarify platform specific timer resolution ([#4474]) - signal: document that `Signal::recv` is cancel-safe ([#4634]) - sync: `UnboundedReceiver` close docs ([#4548]) ### Unstable The following changes only apply when building with `--cfg tokio_unstable`: - task: add `task::Id` type ([#4630]) - task: add `AbortHandle` type for cancelling tasks in a `JoinSet` ([#4530], [#4640]) - task: fix missing `doc(cfg(...))` attributes for `JoinSet` ([#4531]) - task: fix broken link in `AbortHandle` RustDoc ([#4545]) - metrics: add initial IO driver metrics ([#4507]) [#4616]: https://github.com/tokio-rs/tokio/pull/4616 [#4519]: https://github.com/tokio-rs/tokio/pull/4519 [#4582]: https://github.com/tokio-rs/tokio/pull/4582 [#4485]: https://github.com/tokio-rs/tokio/pull/4485 [#4613]: https://github.com/tokio-rs/tokio/pull/4613 [#4611]: https://github.com/tokio-rs/tokio/pull/4611 [#4626]: https://github.com/tokio-rs/tokio/pull/4626 [#4540]: https://github.com/tokio-rs/tokio/pull/4540 [#4555]: https://github.com/tokio-rs/tokio/pull/4555 [#4310]: https://github.com/tokio-rs/tokio/pull/4310 [#4542]: https://github.com/tokio-rs/tokio/pull/4542 [#4581]: https://github.com/tokio-rs/tokio/pull/4581 [#4560]: https://github.com/tokio-rs/tokio/pull/4560 [#4631]: https://github.com/tokio-rs/tokio/pull/4631 [#4582]: https://github.com/tokio-rs/tokio/pull/4582 [#4543]: https://github.com/tokio-rs/tokio/pull/4543 [#4553]: https://github.com/tokio-rs/tokio/pull/4553 [#4524]: https://github.com/tokio-rs/tokio/pull/4524 [#4511]: https://github.com/tokio-rs/tokio/pull/4511 [#4567]: https://github.com/tokio-rs/tokio/pull/4567 [#4474]: https://github.com/tokio-rs/tokio/pull/4474 [#4634]: https://github.com/tokio-rs/tokio/pull/4634 [#4548]: https://github.com/tokio-rs/tokio/pull/4548 [#4630]: https://github.com/tokio-rs/tokio/pull/4630 [#4530]: https://github.com/tokio-rs/tokio/pull/4530 [#4640]: https://github.com/tokio-rs/tokio/pull/4640 [#4531]: https://github.com/tokio-rs/tokio/pull/4531 [#4545]: https://github.com/tokio-rs/tokio/pull/4545 [#4507]: https://github.com/tokio-rs/tokio/pull/4507 # 1.17.0 (February 16, 2022) This release updates the minimum supported Rust version (MSRV) to 1.49, the `mio` dependency to v0.8, and the (optional) `parking_lot` dependency to v0.12. Additionally, it contains several bug fixes, as well as internal refactoring and performance improvements. ### Fixed - time: prevent panicking in `sleep` with large durations ([#4495]) - time: eliminate potential panics in `Instant` arithmetic on platforms where `Instant::now` is not monotonic ([#4461]) - io: fix `DuplexStream` not participating in cooperative yielding ([#4478]) - rt: fix potential double panic when dropping a `JoinHandle` ([#4430]) ### Changed - update minimum supported Rust version to 1.49 ([#4457]) - update `parking_lot` dependency to v0.12.0 ([#4459]) - update `mio` dependency to v0.8 ([#4449]) - rt: remove an unnecessary lock in the blocking pool ([#4436]) - rt: remove an unnecessary enum in the basic scheduler ([#4462]) - time: use bit manipulation instead of modulo to improve performance ([#4480]) - net: use `std::future::Ready` instead of our own `Ready` future ([#4271]) - replace deprecated `atomic::spin_loop_hint` with `hint::spin_loop` ([#4491]) - fix miri failures in intrusive linked lists ([#4397]) ### Documented - io: add an example for `tokio::process::ChildStdin` ([#4479]) ### Unstable The following changes only apply when building with `--cfg tokio_unstable`: - task: fix missing location information in `tracing` spans generated by `spawn_local` ([#4483]) - task: add `JoinSet` for managing sets of tasks ([#4335]) - metrics: fix compilation error on MIPS ([#4475]) - metrics: fix compilation error on arm32v7 ([#4453]) [#4495]: https://github.com/tokio-rs/tokio/pull/4495 [#4461]: https://github.com/tokio-rs/tokio/pull/4461 [#4478]: https://github.com/tokio-rs/tokio/pull/4478 [#4430]: https://github.com/tokio-rs/tokio/pull/4430 [#4457]: https://github.com/tokio-rs/tokio/pull/4457 [#4459]: https://github.com/tokio-rs/tokio/pull/4459 [#4449]: https://github.com/tokio-rs/tokio/pull/4449 [#4462]: https://github.com/tokio-rs/tokio/pull/4462 [#4436]: https://github.com/tokio-rs/tokio/pull/4436 [#4480]: https://github.com/tokio-rs/tokio/pull/4480 [#4271]: https://github.com/tokio-rs/tokio/pull/4271 [#4491]: https://github.com/tokio-rs/tokio/pull/4491 [#4397]: https://github.com/tokio-rs/tokio/pull/4397 [#4479]: https://github.com/tokio-rs/tokio/pull/4479 [#4483]: https://github.com/tokio-rs/tokio/pull/4483 [#4335]: https://github.com/tokio-rs/tokio/pull/4335 [#4475]: https://github.com/tokio-rs/tokio/pull/4475 [#4453]: https://github.com/tokio-rs/tokio/pull/4453 # 1.16.1 (January 28, 2022) This release fixes a bug in [#4428] with the change [#4437]. [#4428]: https://github.com/tokio-rs/tokio/pull/4428 [#4437]: https://github.com/tokio-rs/tokio/pull/4437 # 1.16.0 (January 27, 2022) Fixes a soundness bug in `io::Take` ([#4428]). The unsoundness is exposed when leaking memory in the given `AsyncRead` implementation and then overwriting the supplied buffer: ```rust impl AsyncRead for Buggy { fn poll_read( self: Pin<&mut Self>, cx: &mut Context<'_>, buf: &mut ReadBuf<'_> ) -> Poll> { let new_buf = vec![0; 5].leak(); *buf = ReadBuf::new(new_buf); buf.put_slice(b"hello"); Poll::Ready(Ok(())) } } ``` Also, this release includes improvements to the multi-threaded scheduler that can increase throughput by up to 20% in some cases ([#4383]). ### Fixed - io: **soundness** don't expose uninitialized memory when using `io::Take` in edge case ([#4428]) - fs: ensure `File::write` results in a `write` syscall when the runtime shuts down ([#4316]) - process: drop pipe after child exits in `wait_with_output` ([#4315]) - rt: improve error message when spawning a thread fails ([#4398]) - rt: reduce false-positive thread wakups in the multi-threaded scheduler ([#4383]) - sync: don't inherit `Send` from `parking_lot::*Guard` ([#4359]) ### Added - net: `TcpSocket::linger()` and `set_linger()` ([#4324]) - net: impl `UnwindSafe` for socket types ([#4384]) - rt: impl `UnwindSafe` for `JoinHandle` ([#4418]) - sync: `watch::Receiver::has_changed()` ([#4342]) - sync: `oneshot::Receiver::blocking_recv()` ([#4334]) - sync: `RwLock` blocking operations ([#4425]) ### Unstable The following changes only apply when building with `--cfg tokio_unstable` - rt: **breaking change** overhaul runtime metrics API ([#4373]) [#4428]: https://github.com/tokio-rs/tokio/pull/4428 [#4316]: https://github.com/tokio-rs/tokio/pull/4316 [#4315]: https://github.com/tokio-rs/tokio/pull/4315 [#4398]: https://github.com/tokio-rs/tokio/pull/4398 [#4383]: https://github.com/tokio-rs/tokio/pull/4383 [#4359]: https://github.com/tokio-rs/tokio/pull/4359 [#4324]: https://github.com/tokio-rs/tokio/pull/4324 [#4384]: https://github.com/tokio-rs/tokio/pull/4384 [#4418]: https://github.com/tokio-rs/tokio/pull/4418 [#4342]: https://github.com/tokio-rs/tokio/pull/4342 [#4334]: https://github.com/tokio-rs/tokio/pull/4334 [#4425]: https://github.com/tokio-rs/tokio/pull/4425 [#4373]: https://github.com/tokio-rs/tokio/pull/4373 # 1.15.0 (December 15, 2021) ### Fixed - io: add cooperative yielding support to `io::empty()` ([#4300]) - time: make timeout robust against budget-depleting tasks ([#4314]) ### Changed - update minimum supported Rust version to 1.46. ### Added - time: add `Interval::reset()` ([#4248]) - io: add explicit lifetimes to `AsyncFdReadyGuard` ([#4267]) - process: add `Command::as_std()` ([#4295]) ### Added (unstable) - tracing: instrument `tokio::sync` types ([#4302]) [#4302]: https://github.com/tokio-rs/tokio/pull/4302 [#4300]: https://github.com/tokio-rs/tokio/pull/4300 [#4295]: https://github.com/tokio-rs/tokio/pull/4295 [#4267]: https://github.com/tokio-rs/tokio/pull/4267 [#4248]: https://github.com/tokio-rs/tokio/pull/4248 [#4314]: https://github.com/tokio-rs/tokio/pull/4314 # 1.14.0 (November 15, 2021) ### Fixed - macros: fix compiler errors when using `mut` patterns in `select!` ([#4211]) - sync: fix a data race between `oneshot::Sender::send` and awaiting a `oneshot::Receiver` when the oneshot has been closed ([#4226]) - sync: make `AtomicWaker` panic safe ([#3689]) - runtime: fix basic scheduler dropping tasks outside a runtime context ([#4213]) ### Added - stats: add `RuntimeStats::busy_duration_total` ([#4179], [#4223]) ### Changed - io: updated `copy` buffer size to match `std::io::copy` ([#4209]) ### Documented - io: rename buffer to file in doc-test ([#4230]) - sync: fix Notify example ([#4212]) [#4211]: https://github.com/tokio-rs/tokio/pull/4211 [#4226]: https://github.com/tokio-rs/tokio/pull/4226 [#3689]: https://github.com/tokio-rs/tokio/pull/3689 [#4213]: https://github.com/tokio-rs/tokio/pull/4213 [#4179]: https://github.com/tokio-rs/tokio/pull/4179 [#4223]: https://github.com/tokio-rs/tokio/pull/4223 [#4209]: https://github.com/tokio-rs/tokio/pull/4209 [#4230]: https://github.com/tokio-rs/tokio/pull/4230 [#4212]: https://github.com/tokio-rs/tokio/pull/4212 # 1.13.1 (November 15, 2021) ### Fixed - sync: fix a data race between `oneshot::Sender::send` and awaiting a `oneshot::Receiver` when the oneshot has been closed ([#4226]) [#4226]: https://github.com/tokio-rs/tokio/pull/4226 # 1.13.0 (October 29, 2021) ### Fixed - sync: fix `Notify` to clone the waker before locking its waiter list ([#4129]) - tokio: add riscv32 to non atomic64 architectures ([#4185]) ### Added - net: add `poll_{recv,send}_ready` methods to `udp` and `uds_datagram` ([#4131]) - net: add `try_*`, `readable`, `writable`, `ready`, and `peer_addr` methods to split halves ([#4120]) - sync: add `blocking_lock` to `Mutex` ([#4130]) - sync: add `watch::Sender::send_replace` ([#3962], [#4195]) - sync: expand `Debug` for `Mutex` impl to unsized `T` ([#4134]) - tracing: instrument time::Sleep ([#4072]) - tracing: use structured location fields for spawned tasks ([#4128]) ### Changed - io: add assert in `copy_bidirectional` that `poll_write` is sensible ([#4125]) - macros: use qualified syntax when polling in `select!` ([#4192]) - runtime: handle `block_on` wakeups better ([#4157]) - task: allocate callback on heap immediately in debug mode ([#4203]) - tokio: assert platform-minimum requirements at build time ([#3797]) ### Documented - docs: conversion of doc comments to indicative mood ([#4174]) - docs: add returning on the first error example for `try_join!` ([#4133]) - docs: fixing broken links in `tokio/src/lib.rs` ([#4132]) - signal: add example with background listener ([#4171]) - sync: add more oneshot examples ([#4153]) - time: document `Interval::tick` cancel safety ([#4152]) [#3797]: https://github.com/tokio-rs/tokio/pull/3797 [#3962]: https://github.com/tokio-rs/tokio/pull/3962 [#4072]: https://github.com/tokio-rs/tokio/pull/4072 [#4120]: https://github.com/tokio-rs/tokio/pull/4120 [#4125]: https://github.com/tokio-rs/tokio/pull/4125 [#4128]: https://github.com/tokio-rs/tokio/pull/4128 [#4129]: https://github.com/tokio-rs/tokio/pull/4129 [#4130]: https://github.com/tokio-rs/tokio/pull/4130 [#4131]: https://github.com/tokio-rs/tokio/pull/4131 [#4132]: https://github.com/tokio-rs/tokio/pull/4132 [#4133]: https://github.com/tokio-rs/tokio/pull/4133 [#4134]: https://github.com/tokio-rs/tokio/pull/4134 [#4152]: https://github.com/tokio-rs/tokio/pull/4152 [#4153]: https://github.com/tokio-rs/tokio/pull/4153 [#4157]: https://github.com/tokio-rs/tokio/pull/4157 [#4171]: https://github.com/tokio-rs/tokio/pull/4171 [#4174]: https://github.com/tokio-rs/tokio/pull/4174 [#4185]: https://github.com/tokio-rs/tokio/pull/4185 [#4192]: https://github.com/tokio-rs/tokio/pull/4192 [#4195]: https://github.com/tokio-rs/tokio/pull/4195 [#4203]: https://github.com/tokio-rs/tokio/pull/4203 # 1.12.0 (September 21, 2021) ### Fixed - mpsc: ensure `try_reserve` error is consistent with `try_send` ([#4119]) - mpsc: use `spin_loop_hint` instead of `yield_now` ([#4115]) - sync: make `SendError` field public ([#4097]) ### Added - io: add POSIX AIO on FreeBSD ([#4054]) - io: add convenience method `AsyncSeekExt::rewind` ([#4107]) - runtime: add tracing span for `block_on` futures ([#4094]) - runtime: callback when a worker parks and unparks ([#4070]) - sync: implement `try_recv` for mpsc channels ([#4113]) ### Documented - docs: clarify CPU-bound tasks on Tokio ([#4105]) - mpsc: document spurious failures on `poll_recv` ([#4117]) - mpsc: document that `PollSender` impls `Sink` ([#4110]) - task: document non-guarantees of `yield_now` ([#4091]) - time: document paused time details better ([#4061], [#4103]) [#4027]: https://github.com/tokio-rs/tokio/pull/4027 [#4054]: https://github.com/tokio-rs/tokio/pull/4054 [#4061]: https://github.com/tokio-rs/tokio/pull/4061 [#4070]: https://github.com/tokio-rs/tokio/pull/4070 [#4091]: https://github.com/tokio-rs/tokio/pull/4091 [#4094]: https://github.com/tokio-rs/tokio/pull/4094 [#4097]: https://github.com/tokio-rs/tokio/pull/4097 [#4103]: https://github.com/tokio-rs/tokio/pull/4103 [#4105]: https://github.com/tokio-rs/tokio/pull/4105 [#4107]: https://github.com/tokio-rs/tokio/pull/4107 [#4110]: https://github.com/tokio-rs/tokio/pull/4110 [#4113]: https://github.com/tokio-rs/tokio/pull/4113 [#4115]: https://github.com/tokio-rs/tokio/pull/4115 [#4117]: https://github.com/tokio-rs/tokio/pull/4117 [#4119]: https://github.com/tokio-rs/tokio/pull/4119 # 1.11.0 (August 31, 2021) ### Fixed - time: don't panic when Instant is not monotonic ([#4044]) - io: fix panic in `fill_buf` by not calling `poll_fill_buf` twice ([#4084]) ### Added - watch: add `watch::Sender::subscribe` ([#3800]) - process: add `from_std` to `ChildStd*` ([#4045]) - stats: initial work on runtime stats ([#4043]) ### Changed - tracing: change span naming to new console convention ([#4042]) - io: speed-up waking by using uninitialized array ([#4055], [#4071], [#4075]) ### Documented - time: make Sleep examples easier to find ([#4040]) [#3800]: https://github.com/tokio-rs/tokio/pull/3800 [#4040]: https://github.com/tokio-rs/tokio/pull/4040 [#4042]: https://github.com/tokio-rs/tokio/pull/4042 [#4043]: https://github.com/tokio-rs/tokio/pull/4043 [#4044]: https://github.com/tokio-rs/tokio/pull/4044 [#4045]: https://github.com/tokio-rs/tokio/pull/4045 [#4055]: https://github.com/tokio-rs/tokio/pull/4055 [#4071]: https://github.com/tokio-rs/tokio/pull/4071 [#4075]: https://github.com/tokio-rs/tokio/pull/4075 [#4084]: https://github.com/tokio-rs/tokio/pull/4084 # 1.10.1 (August 24, 2021) ### Fixed - runtime: fix leak in UnownedTask ([#4063]) [#4063]: https://github.com/tokio-rs/tokio/pull/4063 # 1.10.0 (August 12, 2021) ### Added - io: add `(read|write)_f(32|64)[_le]` methods ([#4022]) - io: add `fill_buf` and `consume` to `AsyncBufReadExt` ([#3991]) - process: add `Child::raw_handle()` on windows ([#3998]) ### Fixed - doc: fix non-doc builds with `--cfg docsrs` ([#4020]) - io: flush eagerly in `io::copy` ([#4001]) - runtime: a debug assert was sometimes triggered during shutdown ([#4005]) - sync: use `spin_loop_hint` instead of `yield_now` in mpsc ([#4037]) - tokio: the test-util feature depends on rt, sync, and time ([#4036]) ### Changes - runtime: reorganize parts of the runtime ([#3979], [#4005]) - signal: make windows docs for signal module show up on unix builds ([#3770]) - task: quickly send task to heap on debug mode ([#4009]) ### Documented - io: document cancellation safety of `AsyncBufReadExt` ([#3997]) - sync: document when `watch::send` fails ([#4021]) [#3770]: https://github.com/tokio-rs/tokio/pull/3770 [#3979]: https://github.com/tokio-rs/tokio/pull/3979 [#3991]: https://github.com/tokio-rs/tokio/pull/3991 [#3997]: https://github.com/tokio-rs/tokio/pull/3997 [#3998]: https://github.com/tokio-rs/tokio/pull/3998 [#4001]: https://github.com/tokio-rs/tokio/pull/4001 [#4005]: https://github.com/tokio-rs/tokio/pull/4005 [#4009]: https://github.com/tokio-rs/tokio/pull/4009 [#4020]: https://github.com/tokio-rs/tokio/pull/4020 [#4021]: https://github.com/tokio-rs/tokio/pull/4021 [#4022]: https://github.com/tokio-rs/tokio/pull/4022 [#4036]: https://github.com/tokio-rs/tokio/pull/4036 [#4037]: https://github.com/tokio-rs/tokio/pull/4037 # 1.9.0 (July 22, 2021) ### Added - net: allow customized I/O operations for `TcpStream` ([#3888]) - sync: add getter for the mutex from a guard ([#3928]) - task: expose nameable future for `TaskLocal::scope` ([#3273]) ### Fixed - Fix leak if output of future panics on drop ([#3967]) - Fix leak in `LocalSet` ([#3978]) ### Changes - runtime: reorganize parts of the runtime ([#3909], [#3939], [#3950], [#3955], [#3980]) - sync: clean up `OnceCell` ([#3945]) - task: remove mutex in `JoinError` ([#3959]) [#3273]: https://github.com/tokio-rs/tokio/pull/3273 [#3888]: https://github.com/tokio-rs/tokio/pull/3888 [#3909]: https://github.com/tokio-rs/tokio/pull/3909 [#3928]: https://github.com/tokio-rs/tokio/pull/3928 [#3934]: https://github.com/tokio-rs/tokio/pull/3934 [#3939]: https://github.com/tokio-rs/tokio/pull/3939 [#3945]: https://github.com/tokio-rs/tokio/pull/3945 [#3950]: https://github.com/tokio-rs/tokio/pull/3950 [#3955]: https://github.com/tokio-rs/tokio/pull/3955 [#3959]: https://github.com/tokio-rs/tokio/pull/3959 [#3967]: https://github.com/tokio-rs/tokio/pull/3967 [#3978]: https://github.com/tokio-rs/tokio/pull/3978 [#3980]: https://github.com/tokio-rs/tokio/pull/3980 # 1.8.3 (July 26, 2021) This release backports two fixes from 1.9.0 ### Fixed - Fix leak if output of future panics on drop ([#3967]) - Fix leak in `LocalSet` ([#3978]) [#3967]: https://github.com/tokio-rs/tokio/pull/3967 [#3978]: https://github.com/tokio-rs/tokio/pull/3978 # 1.8.2 (July 19, 2021) Fixes a missed edge case from 1.8.1. ### Fixed - runtime: drop canceled future on next poll ([#3965]) [#3965]: https://github.com/tokio-rs/tokio/pull/3965 # 1.8.1 (July 6, 2021) Forward ports 1.5.1 fixes. ### Fixed - runtime: remotely abort tasks on `JoinHandle::abort` ([#3934]) [#3934]: https://github.com/tokio-rs/tokio/pull/3934 # 1.8.0 (July 2, 2021) ### Added - io: add `get_{ref,mut}` methods to `AsyncFdReadyGuard` and `AsyncFdReadyMutGuard` ([#3807]) - io: efficient implementation of vectored writes for `BufWriter` ([#3163]) - net: add ready/try methods to `NamedPipe{Client,Server}` ([#3866], [#3899]) - sync: add `watch::Receiver::borrow_and_update` ([#3813]) - sync: implement `From` for `OnceCell` ([#3877]) - time: allow users to specify Interval behavior when delayed ([#3721]) ### Added (unstable) - rt: add `tokio::task::Builder` ([#3881]) ### Fixed - net: handle HUP event with `UnixStream` ([#3898]) ### Documented - doc: document cancellation safety ([#3900]) - time: add wait alias to sleep ([#3897]) - time: document auto-advancing behavior of runtime ([#3763]) [#3163]: https://github.com/tokio-rs/tokio/pull/3163 [#3721]: https://github.com/tokio-rs/tokio/pull/3721 [#3763]: https://github.com/tokio-rs/tokio/pull/3763 [#3807]: https://github.com/tokio-rs/tokio/pull/3807 [#3813]: https://github.com/tokio-rs/tokio/pull/3813 [#3866]: https://github.com/tokio-rs/tokio/pull/3866 [#3877]: https://github.com/tokio-rs/tokio/pull/3877 [#3881]: https://github.com/tokio-rs/tokio/pull/3881 [#3897]: https://github.com/tokio-rs/tokio/pull/3897 [#3898]: https://github.com/tokio-rs/tokio/pull/3898 [#3899]: https://github.com/tokio-rs/tokio/pull/3899 [#3900]: https://github.com/tokio-rs/tokio/pull/3900 # 1.7.2 (July 6, 2021) Forward ports 1.5.1 fixes. ### Fixed - runtime: remotely abort tasks on `JoinHandle::abort` ([#3934]) [#3934]: https://github.com/tokio-rs/tokio/pull/3934 # 1.7.1 (June 18, 2021) ### Fixed - runtime: fix early task shutdown during runtime shutdown ([#3870]) [#3870]: https://github.com/tokio-rs/tokio/pull/3870 # 1.7.0 (June 15, 2021) ### Added - net: add named pipes on windows ([#3760]) - net: add `TcpSocket` from `std::net::TcpStream` conversion ([#3838]) - sync: add `receiver_count` to `watch::Sender` ([#3729]) - sync: export `sync::notify::Notified` future publicly ([#3840]) - tracing: instrument task wakers ([#3836]) ### Fixed - macros: suppress `clippy::default_numeric_fallback` lint in generated code ([#3831]) - runtime: immediately drop new tasks when runtime is shut down ([#3752]) - sync: deprecate unused `mpsc::RecvError` type ([#3833]) ### Documented - io: clarify EOF condition for `AsyncReadExt::read_buf` ([#3850]) - io: clarify limits on return values of `AsyncWrite::poll_write` ([#3820]) - sync: add examples to Semaphore ([#3808]) [#3729]: https://github.com/tokio-rs/tokio/pull/3729 [#3752]: https://github.com/tokio-rs/tokio/pull/3752 [#3760]: https://github.com/tokio-rs/tokio/pull/3760 [#3808]: https://github.com/tokio-rs/tokio/pull/3808 [#3820]: https://github.com/tokio-rs/tokio/pull/3820 [#3831]: https://github.com/tokio-rs/tokio/pull/3831 [#3833]: https://github.com/tokio-rs/tokio/pull/3833 [#3836]: https://github.com/tokio-rs/tokio/pull/3836 [#3838]: https://github.com/tokio-rs/tokio/pull/3838 [#3840]: https://github.com/tokio-rs/tokio/pull/3840 [#3850]: https://github.com/tokio-rs/tokio/pull/3850 # 1.6.3 (July 6, 2021) Forward ports 1.5.1 fixes. ### Fixed - runtime: remotely abort tasks on `JoinHandle::abort` ([#3934]) [#3934]: https://github.com/tokio-rs/tokio/pull/3934 # 1.6.2 (June 14, 2021) ### Fixes - test: sub-ms `time:advance` regression introduced in 1.6 ([#3852]) [#3852]: https://github.com/tokio-rs/tokio/pull/3852 # 1.6.1 (May 28, 2021) This release reverts [#3518] because it doesn't work on some kernels due to a kernel bug. ([#3803]) [#3518]: https://github.com/tokio-rs/tokio/issues/3518 [#3803]: https://github.com/tokio-rs/tokio/issues/3803 # 1.6.0 (May 14, 2021) ### Added - fs: try doing a non-blocking read before punting to the threadpool ([#3518]) - io: add `write_all_buf` to `AsyncWriteExt` ([#3737]) - io: implement `AsyncSeek` for `BufReader`, `BufWriter`, and `BufStream` ([#3491]) - net: support non-blocking vectored I/O ([#3761]) - sync: add `mpsc::Sender::{reserve_owned, try_reserve_owned}` ([#3704]) - sync: add a `MutexGuard::map` method that returns a `MappedMutexGuard` ([#2472]) - time: add getter for Interval's period ([#3705]) ### Fixed - io: wake pending writers on `DuplexStream` close ([#3756]) - process: avoid redundant effort to reap orphan processes ([#3743]) - signal: use `std::os::raw::c_int` instead of `libc::c_int` on public API ([#3774]) - sync: preserve permit state in `notify_waiters` ([#3660]) - task: update `JoinHandle` panic message ([#3727]) - time: prevent `time::advance` from going too far ([#3712]) ### Documented - net: hide `net::unix::datagram` module from docs ([#3775]) - process: updated example ([#3748]) - sync: `Barrier` doc should use task, not thread ([#3780]) - task: update documentation on `block_in_place` ([#3753]) [#2472]: https://github.com/tokio-rs/tokio/pull/2472 [#3491]: https://github.com/tokio-rs/tokio/pull/3491 [#3518]: https://github.com/tokio-rs/tokio/pull/3518 [#3660]: https://github.com/tokio-rs/tokio/pull/3660 [#3704]: https://github.com/tokio-rs/tokio/pull/3704 [#3705]: https://github.com/tokio-rs/tokio/pull/3705 [#3712]: https://github.com/tokio-rs/tokio/pull/3712 [#3727]: https://github.com/tokio-rs/tokio/pull/3727 [#3737]: https://github.com/tokio-rs/tokio/pull/3737 [#3743]: https://github.com/tokio-rs/tokio/pull/3743 [#3748]: https://github.com/tokio-rs/tokio/pull/3748 [#3753]: https://github.com/tokio-rs/tokio/pull/3753 [#3756]: https://github.com/tokio-rs/tokio/pull/3756 [#3761]: https://github.com/tokio-rs/tokio/pull/3761 [#3774]: https://github.com/tokio-rs/tokio/pull/3774 [#3775]: https://github.com/tokio-rs/tokio/pull/3775 [#3780]: https://github.com/tokio-rs/tokio/pull/3780 # 1.5.1 (July 6, 2021) ### Fixed - runtime: remotely abort tasks on `JoinHandle::abort` ([#3934]) [#3934]: https://github.com/tokio-rs/tokio/pull/3934 # 1.5.0 (April 12, 2021) ### Added - io: add `AsyncSeekExt::stream_position` ([#3650]) - io: add `AsyncWriteExt::write_vectored` ([#3678]) - io: add a `copy_bidirectional` utility ([#3572]) - net: implement `IntoRawFd` for `TcpSocket` ([#3684]) - sync: add `OnceCell` ([#3591]) - sync: add `OwnedRwLockReadGuard` and `OwnedRwLockWriteGuard` ([#3340]) - sync: add `Semaphore::is_closed` ([#3673]) - sync: add `mpsc::Sender::capacity` ([#3690]) - sync: allow configuring `RwLock` max reads ([#3644]) - task: add `sync_scope` for `LocalKey` ([#3612]) ### Fixed - chore: try to avoid `noalias` attributes on intrusive linked list ([#3654]) - rt: fix panic in `JoinHandle::abort()` when called from other threads ([#3672]) - sync: don't panic in `oneshot::try_recv` ([#3674]) - sync: fix notifications getting dropped on receiver drop ([#3652]) - sync: fix `Semaphore` permit overflow calculation ([#3644]) ### Documented - io: clarify requirements of `AsyncFd` ([#3635]) - runtime: fix unclear docs for `{Handle,Runtime}::block_on` ([#3628]) - sync: document that `Semaphore` is fair ([#3693]) - sync: improve doc on blocking mutex ([#3645]) [#3340]: https://github.com/tokio-rs/tokio/pull/3340 [#3572]: https://github.com/tokio-rs/tokio/pull/3572 [#3591]: https://github.com/tokio-rs/tokio/pull/3591 [#3612]: https://github.com/tokio-rs/tokio/pull/3612 [#3628]: https://github.com/tokio-rs/tokio/pull/3628 [#3635]: https://github.com/tokio-rs/tokio/pull/3635 [#3644]: https://github.com/tokio-rs/tokio/pull/3644 [#3645]: https://github.com/tokio-rs/tokio/pull/3645 [#3650]: https://github.com/tokio-rs/tokio/pull/3650 [#3652]: https://github.com/tokio-rs/tokio/pull/3652 [#3654]: https://github.com/tokio-rs/tokio/pull/3654 [#3672]: https://github.com/tokio-rs/tokio/pull/3672 [#3673]: https://github.com/tokio-rs/tokio/pull/3673 [#3674]: https://github.com/tokio-rs/tokio/pull/3674 [#3678]: https://github.com/tokio-rs/tokio/pull/3678 [#3684]: https://github.com/tokio-rs/tokio/pull/3684 [#3690]: https://github.com/tokio-rs/tokio/pull/3690 [#3693]: https://github.com/tokio-rs/tokio/pull/3693 # 1.4.0 (March 20, 2021) ### Added - macros: introduce biased argument for `select!` ([#3603]) - runtime: add `Handle::block_on` ([#3569]) ### Fixed - runtime: avoid unnecessary polling of `block_on` future ([#3582]) - runtime: fix memory leak/growth when creating many runtimes ([#3564]) - runtime: mark `EnterGuard` with `must_use` ([#3609]) ### Documented - chore: mention fix for building docs in contributing guide ([#3618]) - doc: add link to `PollSender` ([#3613]) - doc: alias sleep to delay ([#3604]) - sync: improve `Mutex` FIFO explanation ([#3615]) - timer: fix double newline in module docs ([#3617]) [#3564]: https://github.com/tokio-rs/tokio/pull/3564 [#3613]: https://github.com/tokio-rs/tokio/pull/3613 [#3618]: https://github.com/tokio-rs/tokio/pull/3618 [#3617]: https://github.com/tokio-rs/tokio/pull/3617 [#3582]: https://github.com/tokio-rs/tokio/pull/3582 [#3615]: https://github.com/tokio-rs/tokio/pull/3615 [#3603]: https://github.com/tokio-rs/tokio/pull/3603 [#3609]: https://github.com/tokio-rs/tokio/pull/3609 [#3604]: https://github.com/tokio-rs/tokio/pull/3604 [#3569]: https://github.com/tokio-rs/tokio/pull/3569 # 1.3.0 (March 9, 2021) ### Added - coop: expose an `unconstrained()` opt-out ([#3547]) - net: add `into_std` for net types without it ([#3509]) - sync: add `same_channel` method to `mpsc::Sender` ([#3532]) - sync: add `{try_,}acquire_many_owned` to `Semaphore` ([#3535]) - sync: add back `RwLockWriteGuard::map` and `RwLockWriteGuard::try_map` ([#3348]) ### Fixed - sync: allow `oneshot::Receiver::close` after successful `try_recv` ([#3552]) - time: do not panic on `timeout(Duration::MAX)` ([#3551]) ### Documented - doc: doc aliases for pre-1.0 function names ([#3523]) - io: fix typos ([#3541]) - io: note the EOF behavior of `read_until` ([#3536]) - io: update `AsyncRead::poll_read` doc ([#3557]) - net: update `UdpSocket` splitting doc ([#3517]) - runtime: add link to `LocalSet` on `new_current_thread` ([#3508]) - runtime: update documentation of thread limits ([#3527]) - sync: do not recommend `join_all` for `Barrier` ([#3514]) - sync: documentation for `oneshot` ([#3592]) - sync: rename `notify` to `notify_one` ([#3526]) - time: fix typo in `Sleep` doc ([#3515]) - time: sync `interval.rs` and `time/mod.rs` docs ([#3533]) [#3348]: https://github.com/tokio-rs/tokio/pull/3348 [#3508]: https://github.com/tokio-rs/tokio/pull/3508 [#3509]: https://github.com/tokio-rs/tokio/pull/3509 [#3514]: https://github.com/tokio-rs/tokio/pull/3514 [#3515]: https://github.com/tokio-rs/tokio/pull/3515 [#3517]: https://github.com/tokio-rs/tokio/pull/3517 [#3523]: https://github.com/tokio-rs/tokio/pull/3523 [#3526]: https://github.com/tokio-rs/tokio/pull/3526 [#3527]: https://github.com/tokio-rs/tokio/pull/3527 [#3532]: https://github.com/tokio-rs/tokio/pull/3532 [#3533]: https://github.com/tokio-rs/tokio/pull/3533 [#3535]: https://github.com/tokio-rs/tokio/pull/3535 [#3536]: https://github.com/tokio-rs/tokio/pull/3536 [#3541]: https://github.com/tokio-rs/tokio/pull/3541 [#3547]: https://github.com/tokio-rs/tokio/pull/3547 [#3551]: https://github.com/tokio-rs/tokio/pull/3551 [#3552]: https://github.com/tokio-rs/tokio/pull/3552 [#3557]: https://github.com/tokio-rs/tokio/pull/3557 [#3592]: https://github.com/tokio-rs/tokio/pull/3592 # 1.2.0 (February 5, 2021) ### Added - signal: make `Signal::poll_recv` method public ([#3383]) ### Fixed - time: make `test-util` paused time fully deterministic ([#3492]) ### Documented - sync: link to new broadcast and watch wrappers ([#3504]) [#3383]: https://github.com/tokio-rs/tokio/pull/3383 [#3492]: https://github.com/tokio-rs/tokio/pull/3492 [#3504]: https://github.com/tokio-rs/tokio/pull/3504 # 1.1.1 (January 29, 2021) Forward ports 1.0.3 fix. ### Fixed - io: memory leak during shutdown ([#3477]). # 1.1.0 (January 22, 2021) ### Added - net: add `try_read_buf` and `try_recv_buf` ([#3351]) - mpsc: Add `Sender::try_reserve` function ([#3418]) - sync: add `RwLock` `try_read` and `try_write` methods ([#3400]) - io: add `ReadBuf::inner_mut` ([#3443]) ### Changed - macros: improve `select!` error message ([#3352]) - io: keep track of initialized bytes in `read_to_end` ([#3426]) - runtime: consolidate errors for context missing ([#3441]) ### Fixed - task: wake `LocalSet` on `spawn_local` ([#3369]) - sync: fix panic in broadcast::Receiver drop ([#3434]) ### Documented - stream: link to new `Stream` wrappers in `tokio-stream` ([#3343]) - docs: mention that `test-util` feature is not enabled with full ([#3397]) - process: add documentation to process::Child fields ([#3437]) - io: clarify `AsyncFd` docs about changes of the inner fd ([#3430]) - net: update datagram docs on splitting ([#3448]) - time: document that `Sleep` is not `Unpin` ([#3457]) - sync: add link to `PollSemaphore` ([#3456]) - task: add `LocalSet` example ([#3438]) - sync: improve bounded `mpsc` documentation ([#3458]) [#3343]: https://github.com/tokio-rs/tokio/pull/3343 [#3351]: https://github.com/tokio-rs/tokio/pull/3351 [#3352]: https://github.com/tokio-rs/tokio/pull/3352 [#3369]: https://github.com/tokio-rs/tokio/pull/3369 [#3397]: https://github.com/tokio-rs/tokio/pull/3397 [#3400]: https://github.com/tokio-rs/tokio/pull/3400 [#3418]: https://github.com/tokio-rs/tokio/pull/3418 [#3426]: https://github.com/tokio-rs/tokio/pull/3426 [#3430]: https://github.com/tokio-rs/tokio/pull/3430 [#3434]: https://github.com/tokio-rs/tokio/pull/3434 [#3437]: https://github.com/tokio-rs/tokio/pull/3437 [#3438]: https://github.com/tokio-rs/tokio/pull/3438 [#3441]: https://github.com/tokio-rs/tokio/pull/3441 [#3443]: https://github.com/tokio-rs/tokio/pull/3443 [#3448]: https://github.com/tokio-rs/tokio/pull/3448 [#3456]: https://github.com/tokio-rs/tokio/pull/3456 [#3457]: https://github.com/tokio-rs/tokio/pull/3457 [#3458]: https://github.com/tokio-rs/tokio/pull/3458 # 1.0.3 (January 28, 2021) ### Fixed - io: memory leak during shutdown ([#3477]). [#3477]: https://github.com/tokio-rs/tokio/pull/3477 # 1.0.2 (January 14, 2021) ### Fixed - io: soundness in `read_to_end` ([#3428]). [#3428]: https://github.com/tokio-rs/tokio/pull/3428 # 1.0.1 (December 25, 2020) This release fixes a soundness hole caused by the combination of `RwLockWriteGuard::map` and `RwLockWriteGuard::downgrade` by removing the `map` function. This is a breaking change, but breaking changes are allowed under our semver policy when they are required to fix a soundness hole. (See [this RFC][semver] for more.) Note that we have chosen not to do a deprecation cycle or similar because Tokio 1.0.0 was released two days ago, and therefore the impact should be minimal. Due to the soundness hole, we have also yanked Tokio version 1.0.0. ### Removed - sync: remove `RwLockWriteGuard::map` and `RwLockWriteGuard::try_map` ([#3345]) ### Fixed - docs: remove stream feature from docs ([#3335]) [semver]: https://github.com/rust-lang/rfcs/blob/master/text/1122-language-semver.md#soundness-changes [#3335]: https://github.com/tokio-rs/tokio/pull/3335 [#3345]: https://github.com/tokio-rs/tokio/pull/3345 # 1.0.0 (December 23, 2020) Commit to the API and long-term support. ### Fixed - sync: spurious wakeup in `watch` ([#3234]). ### Changed - io: rename `AsyncFd::with_io()` to `try_io()` ([#3306]) - fs: avoid OS specific `*Ext` traits in favor of conditionally defining the fn ([#3264]). - fs: `Sleep` is `!Unpin` ([#3278]). - net: pass `SocketAddr` by value ([#3125]). - net: `TcpStream::poll_peek` takes `ReadBuf` ([#3259]). - rt: rename `runtime::Builder::max_threads()` to `max_blocking_threads()` ([#3287]). - time: require `current_thread` runtime when calling `time::pause()` ([#3289]). ### Removed - remove `tokio::prelude` ([#3299]). - io: remove `AsyncFd::with_poll()` ([#3306]). - net: remove `{Tcp,Unix}Stream::shutdown()` in favor of `AsyncWrite::shutdown()` ([#3298]). - stream: move all stream utilities to `tokio-stream` until `Stream` is added to `std` ([#3277]). - sync: mpsc `try_recv()` due to unexpected behavior ([#3263]). - tracing: make unstable as `tracing-core` is not 1.0 yet ([#3266]). ### Added - fs: `poll_*` fns to `DirEntry` ([#3308]). - io: `poll_*` fns to `io::Lines`, `io::Split` ([#3308]). - io: `_mut` method variants to `AsyncFd` ([#3304]). - net: `poll_*` fns to `UnixDatagram` ([#3223]). - net: `UnixStream` readiness and non-blocking ops ([#3246]). - sync: `UnboundedReceiver::blocking_recv()` ([#3262]). - sync: `watch::Sender::borrow()` ([#3269]). - sync: `Semaphore::close()` ([#3065]). - sync: `poll_recv` fns to `mpsc::Receiver`, `mpsc::UnboundedReceiver` ([#3308]). - time: `poll_tick` fn to `time::Interval` ([#3316]). [#3065]: https://github.com/tokio-rs/tokio/pull/3065 [#3125]: https://github.com/tokio-rs/tokio/pull/3125 [#3223]: https://github.com/tokio-rs/tokio/pull/3223 [#3234]: https://github.com/tokio-rs/tokio/pull/3234 [#3246]: https://github.com/tokio-rs/tokio/pull/3246 [#3259]: https://github.com/tokio-rs/tokio/pull/3259 [#3262]: https://github.com/tokio-rs/tokio/pull/3262 [#3263]: https://github.com/tokio-rs/tokio/pull/3263 [#3264]: https://github.com/tokio-rs/tokio/pull/3264 [#3266]: https://github.com/tokio-rs/tokio/pull/3266 [#3269]: https://github.com/tokio-rs/tokio/pull/3269 [#3277]: https://github.com/tokio-rs/tokio/pull/3277 [#3278]: https://github.com/tokio-rs/tokio/pull/3278 [#3287]: https://github.com/tokio-rs/tokio/pull/3287 [#3289]: https://github.com/tokio-rs/tokio/pull/3289 [#3298]: https://github.com/tokio-rs/tokio/pull/3298 [#3299]: https://github.com/tokio-rs/tokio/pull/3299 [#3304]: https://github.com/tokio-rs/tokio/pull/3304 [#3306]: https://github.com/tokio-rs/tokio/pull/3306 [#3308]: https://github.com/tokio-rs/tokio/pull/3308 [#3316]: https://github.com/tokio-rs/tokio/pull/3316 # 0.3.6 (December 14, 2020) ### Fixed - rt: fix deadlock in shutdown ([#3228]) - rt: fix panic in task abort when off rt ([#3159]) - sync: make `add_permits` panic with usize::MAX >> 3 permits ([#3188]) - time: Fix race condition in timer drop ([#3229]) - watch: fix spurious wakeup ([#3244]) ### Added - example: add back udp-codec example ([#3205]) - net: add `TcpStream::into_std` ([#3189]) [#3159]: https://github.com/tokio-rs/tokio/pull/3159 [#3188]: https://github.com/tokio-rs/tokio/pull/3188 [#3189]: https://github.com/tokio-rs/tokio/pull/3189 [#3205]: https://github.com/tokio-rs/tokio/pull/3205 [#3228]: https://github.com/tokio-rs/tokio/pull/3228 [#3229]: https://github.com/tokio-rs/tokio/pull/3229 [#3244]: https://github.com/tokio-rs/tokio/pull/3244 # 0.3.5 (November 30, 2020) ### Fixed - rt: fix `shutdown_timeout(0)` ([#3196]). - time: fixed race condition with small sleeps ([#3069]). ### Added - io: `AsyncFd::with_interest()` ([#3167]). - signal: `CtrlC` stream on windows ([#3186]). [#3069]: https://github.com/tokio-rs/tokio/pull/3069 [#3167]: https://github.com/tokio-rs/tokio/pull/3167 [#3186]: https://github.com/tokio-rs/tokio/pull/3186 [#3196]: https://github.com/tokio-rs/tokio/pull/3196 # 0.3.4 (November 18, 2020) ### Fixed - stream: `StreamMap` `Default` impl bound ([#3093]). - io: `AsyncFd::into_inner()` should deregister the FD ([#3104]). ### Changed - meta: `parking_lot` feature enabled with `full` ([#3119]). ### Added - io: `AsyncWrite` vectored writes ([#3149]). - net: TCP/UDP readiness and non-blocking ops ([#3130], [#2743], [#3138]). - net: TCP socket option (linger, send/recv buf size) ([#3145], [#3143]). - net: PID field in `UCred` with solaris/illumos ([#3085]). - rt: `runtime::Handle` allows spawning onto a runtime ([#3079]). - sync: `Notify::notify_waiters()` ([#3098]). - sync: `acquire_many()`, `try_acquire_many()` to `Semaphore` ([#3067]). [#2743]: https://github.com/tokio-rs/tokio/pull/2743 [#3067]: https://github.com/tokio-rs/tokio/pull/3067 [#3079]: https://github.com/tokio-rs/tokio/pull/3079 [#3085]: https://github.com/tokio-rs/tokio/pull/3085 [#3093]: https://github.com/tokio-rs/tokio/pull/3093 [#3098]: https://github.com/tokio-rs/tokio/pull/3098 [#3104]: https://github.com/tokio-rs/tokio/pull/3104 [#3119]: https://github.com/tokio-rs/tokio/pull/3119 [#3130]: https://github.com/tokio-rs/tokio/pull/3130 [#3138]: https://github.com/tokio-rs/tokio/pull/3138 [#3143]: https://github.com/tokio-rs/tokio/pull/3143 [#3145]: https://github.com/tokio-rs/tokio/pull/3145 [#3149]: https://github.com/tokio-rs/tokio/pull/3149 # 0.3.3 (November 2, 2020) Fixes a soundness hole by adding a missing `Send` bound to `Runtime::spawn_blocking()`. ### Fixed - rt: include missing `Send`, fixing soundness hole ([#3089]). - tracing: avoid huge trace span names ([#3074]). ### Added - net: `TcpSocket::reuseport()`, `TcpSocket::set_reuseport()` ([#3083]). - net: `TcpSocket::reuseaddr()` ([#3093]). - net: `TcpSocket::local_addr()` ([#3093]). - net: add pid to `UCred` ([#2633]). [#2633]: https://github.com/tokio-rs/tokio/pull/2633 [#3074]: https://github.com/tokio-rs/tokio/pull/3074 [#3083]: https://github.com/tokio-rs/tokio/pull/3083 [#3089]: https://github.com/tokio-rs/tokio/pull/3089 [#3093]: https://github.com/tokio-rs/tokio/pull/3093 # 0.3.2 (October 27, 2020) Adds `AsyncFd` as a replacement for v0.2's `PollEvented`. ### Fixed - io: fix a potential deadlock when shutting down the I/O driver ([#2903]). - sync: `RwLockWriteGuard::downgrade()` bug ([#2957]). ### Added - io: `AsyncFd` for receiving readiness events on raw FDs ([#2903]). - net: `poll_*` function on `UdpSocket` ([#2981]). - net: `UdpSocket::take_error()` ([#3051]). - sync: `oneshot::Sender::poll_closed()` ([#3032]). [#2903]: https://github.com/tokio-rs/tokio/pull/2903 [#2957]: https://github.com/tokio-rs/tokio/pull/2957 [#2981]: https://github.com/tokio-rs/tokio/pull/2981 [#3032]: https://github.com/tokio-rs/tokio/pull/3032 [#3051]: https://github.com/tokio-rs/tokio/pull/3051 # 0.3.1 (October 21, 2020) This release fixes an use-after-free in the IO driver. Additionally, the `read_buf` and `write_buf` methods have been added back to the IO traits, as the bytes crate is now on track to reach version 1.0 together with Tokio. ### Fixed - net: fix use-after-free ([#3019]). - fs: ensure buffered data is written on shutdown ([#3009]). ### Added - io: `copy_buf()` ([#2884]). - io: `AsyncReadExt::read_buf()`, `AsyncReadExt::write_buf()` for working with `Buf`/`BufMut` ([#3003]). - rt: `Runtime::spawn_blocking()` ([#2980]). - sync: `watch::Sender::is_closed()` ([#2991]). [#2884]: https://github.com/tokio-rs/tokio/pull/2884 [#2980]: https://github.com/tokio-rs/tokio/pull/2980 [#2991]: https://github.com/tokio-rs/tokio/pull/2991 [#3003]: https://github.com/tokio-rs/tokio/pull/3003 [#3009]: https://github.com/tokio-rs/tokio/pull/3009 [#3019]: https://github.com/tokio-rs/tokio/pull/3019 # 0.3.0 (October 15, 2020) This represents a 1.0 beta release. APIs are polished and future-proofed. APIs not included for 1.0 stabilization have been removed. Biggest changes are: - I/O driver internal rewrite. The windows implementation includes significant changes. - Runtime API is polished, especially with how it interacts with feature flag combinations. - Feature flags are simplified - `rt-core` and `rt-util` are combined to `rt` - `rt-threaded` is renamed to `rt-multi-thread` to match builder API - `tcp`, `udp`, `uds`, `dns` are combined to `net`. - `parking_lot` is included with `full` ### Changes - meta: Minimum supported Rust version is now 1.45. - io: `AsyncRead` trait now takes `ReadBuf` in order to safely handle reading into uninitialized memory ([#2758]). - io: Internal I/O driver storage is now able to compact ([#2757]). - rt: `Runtime::block_on` now takes `&self` ([#2782]). - sync: `watch` reworked to decouple receiving a change notification from receiving the value ([#2814], [#2806]). - sync: `Notify::notify` is renamed to `notify_one` ([#2822]). - process: `Child::kill` is now an `async fn` that cleans zombies ([#2823]). - sync: use `const fn` constructors as possible ([#2833], [#2790]) - signal: reduce cross-thread notification ([#2835]). - net: tcp,udp,uds types support operations with `&self` ([#2828], [#2919], [#2934]). - sync: blocking `mpsc` channel supports `send` with `&self` ([#2861]). - time: rename `delay_for` and `delay_until` to `sleep` and `sleep_until` ([#2826]). - io: upgrade to `mio` 0.7 ([#2893]). - io: `AsyncSeek` trait is tweaked ([#2885]). - fs: `File` operations take `&self` ([#2930]). - rt: runtime API, and `#[tokio::main]` macro polish ([#2876]) - rt: `Runtime::enter` uses an RAII guard instead of a closure ([#2954]). - net: the `from_std` function on all sockets no longer sets socket into non-blocking mode ([#2893]) ### Added - sync: `map` function to lock guards ([#2445]). - sync: `blocking_recv` and `blocking_send` fns to `mpsc` for use outside of Tokio ([#2685]). - rt: `Builder::thread_name_fn` for configuring thread names ([#1921]). - fs: impl `FromRawFd` and `FromRawHandle` for `File` ([#2792]). - process: `Child::wait` and `Child::try_wait` ([#2796]). - rt: support configuring thread keep-alive duration ([#2809]). - rt: `task::JoinHandle::abort` forcibly cancels a spawned task ([#2474]). - sync: `RwLock` write guard to read guard downgrading ([#2733]). - net: add `poll_*` functions that take `&self` to all net types ([#2845]) - sync: `get_mut()` for `Mutex`, `RwLock` ([#2856]). - sync: `mpsc::Sender::closed()` waits for `Receiver` half to close ([#2840]). - sync: `mpsc::Sender::is_closed()` returns true if `Receiver` half is closed ([#2726]). - stream: `iter` and `iter_mut` to `StreamMap` ([#2890]). - net: implement `AsRawSocket` on windows ([#2911]). - net: `TcpSocket` creates a socket without binding or listening ([#2920]). ### Removed - io: vectored ops are removed from `AsyncRead`, `AsyncWrite` traits ([#2882]). - io: `mio` is removed from the public API. `PollEvented` and` Registration` are removed ([#2893]). - io: remove `bytes` from public API. `Buf` and `BufMut` implementation are removed ([#2908]). - time: `DelayQueue` is moved to `tokio-util` ([#2897]). ### Fixed - io: `stdout` and `stderr` buffering on windows ([#2734]). [#1921]: https://github.com/tokio-rs/tokio/pull/1921 [#2445]: https://github.com/tokio-rs/tokio/pull/2445 [#2474]: https://github.com/tokio-rs/tokio/pull/2474 [#2685]: https://github.com/tokio-rs/tokio/pull/2685 [#2726]: https://github.com/tokio-rs/tokio/pull/2726 [#2733]: https://github.com/tokio-rs/tokio/pull/2733 [#2734]: https://github.com/tokio-rs/tokio/pull/2734 [#2757]: https://github.com/tokio-rs/tokio/pull/2757 [#2758]: https://github.com/tokio-rs/tokio/pull/2758 [#2782]: https://github.com/tokio-rs/tokio/pull/2782 [#2790]: https://github.com/tokio-rs/tokio/pull/2790 [#2792]: https://github.com/tokio-rs/tokio/pull/2792 [#2796]: https://github.com/tokio-rs/tokio/pull/2796 [#2806]: https://github.com/tokio-rs/tokio/pull/2806 [#2809]: https://github.com/tokio-rs/tokio/pull/2809 [#2814]: https://github.com/tokio-rs/tokio/pull/2814 [#2822]: https://github.com/tokio-rs/tokio/pull/2822 [#2823]: https://github.com/tokio-rs/tokio/pull/2823 [#2826]: https://github.com/tokio-rs/tokio/pull/2826 [#2828]: https://github.com/tokio-rs/tokio/pull/2828 [#2833]: https://github.com/tokio-rs/tokio/pull/2833 [#2835]: https://github.com/tokio-rs/tokio/pull/2835 [#2840]: https://github.com/tokio-rs/tokio/pull/2840 [#2845]: https://github.com/tokio-rs/tokio/pull/2845 [#2856]: https://github.com/tokio-rs/tokio/pull/2856 [#2861]: https://github.com/tokio-rs/tokio/pull/2861 [#2876]: https://github.com/tokio-rs/tokio/pull/2876 [#2882]: https://github.com/tokio-rs/tokio/pull/2882 [#2885]: https://github.com/tokio-rs/tokio/pull/2885 [#2890]: https://github.com/tokio-rs/tokio/pull/2890 [#2893]: https://github.com/tokio-rs/tokio/pull/2893 [#2897]: https://github.com/tokio-rs/tokio/pull/2897 [#2908]: https://github.com/tokio-rs/tokio/pull/2908 [#2911]: https://github.com/tokio-rs/tokio/pull/2911 [#2919]: https://github.com/tokio-rs/tokio/pull/2919 [#2920]: https://github.com/tokio-rs/tokio/pull/2920 [#2930]: https://github.com/tokio-rs/tokio/pull/2930 [#2934]: https://github.com/tokio-rs/tokio/pull/2934 [#2954]: https://github.com/tokio-rs/tokio/pull/2954 # 0.2.22 (July 21, 2020) ### Fixes - docs: misc improvements ([#2572], [#2658], [#2663], [#2656], [#2647], [#2630], [#2487], [#2621], [#2624], [#2600], [#2623], [#2622], [#2577], [#2569], [#2589], [#2575], [#2540], [#2564], [#2567], [#2520], [#2521], [#2493]) - rt: allow calls to `block_on` inside calls to `block_in_place` that are themselves inside `block_on` ([#2645]) - net: fix non-portable behavior when dropping `TcpStream` `OwnedWriteHalf` ([#2597]) - io: improve stack usage by allocating large buffers on directly on the heap ([#2634]) - io: fix unsound pin projection in `AsyncReadExt::read_buf` and `AsyncWriteExt::write_buf` ([#2612]) - io: fix unnecessary zeroing for `AsyncRead` implementors ([#2525]) - io: Fix `BufReader` not correctly forwarding `poll_write_buf` ([#2654]) - io: fix panic in `AsyncReadExt::read_line` ([#2541]) ### Changes - coop: returning `Poll::Pending` no longer decrements the task budget ([#2549]) ### Added - io: little-endian variants of `AsyncReadExt` and `AsyncWriteExt` methods ([#1915]) - task: add [`tracing`] instrumentation to spawned tasks ([#2655]) - sync: allow unsized types in `Mutex` and `RwLock` (via `default` constructors) ([#2615]) - net: add `ToSocketAddrs` implementation for `&[SocketAddr]` ([#2604]) - fs: add `OpenOptionsExt` for `OpenOptions` ([#2515]) - fs: add `DirBuilder` ([#2524]) [`tracing`]: https://crates.io/crates/tracing [#1915]: https://github.com/tokio-rs/tokio/pull/1915 [#2487]: https://github.com/tokio-rs/tokio/pull/2487 [#2493]: https://github.com/tokio-rs/tokio/pull/2493 [#2515]: https://github.com/tokio-rs/tokio/pull/2515 [#2520]: https://github.com/tokio-rs/tokio/pull/2520 [#2521]: https://github.com/tokio-rs/tokio/pull/2521 [#2524]: https://github.com/tokio-rs/tokio/pull/2524 [#2525]: https://github.com/tokio-rs/tokio/pull/2525 [#2540]: https://github.com/tokio-rs/tokio/pull/2540 [#2541]: https://github.com/tokio-rs/tokio/pull/2541 [#2549]: https://github.com/tokio-rs/tokio/pull/2549 [#2564]: https://github.com/tokio-rs/tokio/pull/2564 [#2567]: https://github.com/tokio-rs/tokio/pull/2567 [#2569]: https://github.com/tokio-rs/tokio/pull/2569 [#2572]: https://github.com/tokio-rs/tokio/pull/2572 [#2575]: https://github.com/tokio-rs/tokio/pull/2575 [#2577]: https://github.com/tokio-rs/tokio/pull/2577 [#2589]: https://github.com/tokio-rs/tokio/pull/2589 [#2597]: https://github.com/tokio-rs/tokio/pull/2597 [#2600]: https://github.com/tokio-rs/tokio/pull/2600 [#2604]: https://github.com/tokio-rs/tokio/pull/2604 [#2612]: https://github.com/tokio-rs/tokio/pull/2612 [#2615]: https://github.com/tokio-rs/tokio/pull/2615 [#2621]: https://github.com/tokio-rs/tokio/pull/2621 [#2622]: https://github.com/tokio-rs/tokio/pull/2622 [#2623]: https://github.com/tokio-rs/tokio/pull/2623 [#2624]: https://github.com/tokio-rs/tokio/pull/2624 [#2630]: https://github.com/tokio-rs/tokio/pull/2630 [#2634]: https://github.com/tokio-rs/tokio/pull/2634 [#2645]: https://github.com/tokio-rs/tokio/pull/2645 [#2647]: https://github.com/tokio-rs/tokio/pull/2647 [#2654]: https://github.com/tokio-rs/tokio/pull/2654 [#2655]: https://github.com/tokio-rs/tokio/pull/2655 [#2656]: https://github.com/tokio-rs/tokio/pull/2656 [#2658]: https://github.com/tokio-rs/tokio/pull/2658 [#2663]: https://github.com/tokio-rs/tokio/pull/2663 # 0.2.21 (May 13, 2020) ### Fixes - macros: disambiguate built-in `#[test]` attribute in macro expansion ([#2503]) - rt: `LocalSet` and task budgeting ([#2462]). - rt: task budgeting with `block_in_place` ([#2502]). - sync: release `broadcast` channel memory without sending a value ([#2509]). - time: notify when resetting a `Delay` to a time in the past ([#2290]) ### Added - io: `get_mut`, `get_ref`, and `into_inner` to `Lines` ([#2450]). - io: `mio::Ready` argument to `PollEvented` ([#2419]). - os: illumos support ([#2486]). - rt: `Handle::spawn_blocking` ([#2501]). - sync: `OwnedMutexGuard` for `Arc>` ([#2455]). [#2290]: https://github.com/tokio-rs/tokio/pull/2290 [#2419]: https://github.com/tokio-rs/tokio/pull/2419 [#2450]: https://github.com/tokio-rs/tokio/pull/2450 [#2455]: https://github.com/tokio-rs/tokio/pull/2455 [#2462]: https://github.com/tokio-rs/tokio/pull/2462 [#2486]: https://github.com/tokio-rs/tokio/pull/2486 [#2501]: https://github.com/tokio-rs/tokio/pull/2501 [#2502]: https://github.com/tokio-rs/tokio/pull/2502 [#2503]: https://github.com/tokio-rs/tokio/pull/2503 [#2509]: https://github.com/tokio-rs/tokio/pull/2509 # 0.2.20 (April 28, 2020) ### Fixes - sync: `broadcast` closing the channel no longer requires capacity ([#2448]). - rt: regression when configuring runtime with `max_threads` less than number of CPUs ([#2457]). [#2448]: https://github.com/tokio-rs/tokio/pull/2448 [#2457]: https://github.com/tokio-rs/tokio/pull/2457 # 0.2.19 (April 24, 2020) ### Fixes - docs: misc improvements ([#2400], [#2405], [#2414], [#2420], [#2423], [#2426], [#2427], [#2434], [#2436], [#2440]). - rt: support `block_in_place` in more contexts ([#2409], [#2410]). - stream: no panic in `merge()` and `chain()` when using `size_hint()` ([#2430]). - task: include visibility modifier when defining a task-local ([#2416]). ### Added - rt: `runtime::Handle::block_on` ([#2437]). - sync: owned `Semaphore` permit ([#2421]). - tcp: owned split ([#2270]). [#2270]: https://github.com/tokio-rs/tokio/pull/2270 [#2400]: https://github.com/tokio-rs/tokio/pull/2400 [#2405]: https://github.com/tokio-rs/tokio/pull/2405 [#2409]: https://github.com/tokio-rs/tokio/pull/2409 [#2410]: https://github.com/tokio-rs/tokio/pull/2410 [#2414]: https://github.com/tokio-rs/tokio/pull/2414 [#2416]: https://github.com/tokio-rs/tokio/pull/2416 [#2420]: https://github.com/tokio-rs/tokio/pull/2420 [#2421]: https://github.com/tokio-rs/tokio/pull/2421 [#2423]: https://github.com/tokio-rs/tokio/pull/2423 [#2426]: https://github.com/tokio-rs/tokio/pull/2426 [#2427]: https://github.com/tokio-rs/tokio/pull/2427 [#2430]: https://github.com/tokio-rs/tokio/pull/2430 [#2434]: https://github.com/tokio-rs/tokio/pull/2434 [#2436]: https://github.com/tokio-rs/tokio/pull/2436 [#2437]: https://github.com/tokio-rs/tokio/pull/2437 [#2440]: https://github.com/tokio-rs/tokio/pull/2440 # 0.2.18 (April 12, 2020) ### Fixes - task: `LocalSet` was incorrectly marked as `Send` ([#2398]) - io: correctly report `WriteZero` failure in `write_int` ([#2334]) [#2334]: https://github.com/tokio-rs/tokio/pull/2334 [#2398]: https://github.com/tokio-rs/tokio/pull/2398 # 0.2.17 (April 9, 2020) ### Fixes - rt: bug in work-stealing queue ([#2387]) ### Changes - rt: threadpool uses logical CPU count instead of physical by default ([#2391]) [#2387]: https://github.com/tokio-rs/tokio/pull/2387 [#2391]: https://github.com/tokio-rs/tokio/pull/2391 # 0.2.16 (April 3, 2020) ### Fixes - sync: fix a regression where `Mutex`, `Semaphore`, and `RwLock` futures no longer implement `Sync` ([#2375]) - fs: fix `fs::copy` not copying file permissions ([#2354]) ### Added - time: added `deadline` method to `delay_queue::Expired` ([#2300]) - io: added `StreamReader` ([#2052]) [#2052]: https://github.com/tokio-rs/tokio/pull/2052 [#2300]: https://github.com/tokio-rs/tokio/pull/2300 [#2354]: https://github.com/tokio-rs/tokio/pull/2354 [#2375]: https://github.com/tokio-rs/tokio/pull/2375 # 0.2.15 (April 2, 2020) ### Fixes - rt: fix queue regression ([#2362]). ### Added - sync: Add disarm to `mpsc::Sender` ([#2358]). [#2358]: https://github.com/tokio-rs/tokio/pull/2358 [#2362]: https://github.com/tokio-rs/tokio/pull/2362 # 0.2.14 (April 1, 2020) ### Fixes - rt: concurrency bug in scheduler ([#2273]). - rt: concurrency bug with shell runtime ([#2333]). - test-util: correct pause/resume of time ([#2253]). - time: `DelayQueue` correct wakeup after `insert` ([#2285]). ### Added - io: impl `RawFd`, `AsRawHandle` for std io types ([#2335]). - rt: automatic cooperative task yielding ([#2160], [#2343], [#2349]). - sync: `RwLock::into_inner` ([#2321]). ### Changed - sync: semaphore, mutex internals rewritten to avoid allocations ([#2325]). [#2160]: https://github.com/tokio-rs/tokio/pull/2160 [#2253]: https://github.com/tokio-rs/tokio/pull/2253 [#2273]: https://github.com/tokio-rs/tokio/pull/2273 [#2285]: https://github.com/tokio-rs/tokio/pull/2285 [#2321]: https://github.com/tokio-rs/tokio/pull/2321 [#2325]: https://github.com/tokio-rs/tokio/pull/2325 [#2333]: https://github.com/tokio-rs/tokio/pull/2333 [#2335]: https://github.com/tokio-rs/tokio/pull/2335 [#2343]: https://github.com/tokio-rs/tokio/pull/2343 [#2349]: https://github.com/tokio-rs/tokio/pull/2349 # 0.2.13 (February 28, 2020) ### Fixes - macros: unresolved import in `pin!` ([#2281]). [#2281]: https://github.com/tokio-rs/tokio/pull/2281 # 0.2.12 (February 27, 2020) ### Fixes - net: `UnixStream::poll_shutdown` should call `shutdown(Write)` ([#2245]). - process: Wake up read and write on `EPOLLERR` ([#2218]). - rt: potential deadlock when using `block_in_place` and shutting down the runtime ([#2119]). - rt: only detect number of CPUs if `core_threads` not specified ([#2238]). - sync: reduce `watch::Receiver` struct size ([#2191]). - time: succeed when setting delay of `$MAX-1` ([#2184]). - time: avoid having to poll `DelayQueue` after inserting new delay ([#2217]). ### Added - macros: `pin!` variant that assigns to identifier and pins ([#2274]). - net: impl `Stream` for `Listener` types ([#2275]). - rt: `Runtime::shutdown_timeout` waits for runtime to shutdown for specified duration ([#2186]). - stream: `StreamMap` merges streams and can insert / remove streams at runtime ([#2185]). - stream: `StreamExt::skip()` skips a fixed number of items ([#2204]). - stream: `StreamExt::skip_while()` skips items based on a predicate ([#2205]). - sync: `Notify` provides basic `async` / `await` task notification ([#2210]). - sync: `Mutex::into_inner` retrieves guarded data ([#2250]). - sync: `mpsc::Sender::send_timeout` sends, waiting for up to specified duration for channel capacity ([#2227]). - time: impl `Ord` and `Hash` for `Instant` ([#2239]). [#2119]: https://github.com/tokio-rs/tokio/pull/2119 [#2184]: https://github.com/tokio-rs/tokio/pull/2184 [#2185]: https://github.com/tokio-rs/tokio/pull/2185 [#2186]: https://github.com/tokio-rs/tokio/pull/2186 [#2191]: https://github.com/tokio-rs/tokio/pull/2191 [#2204]: https://github.com/tokio-rs/tokio/pull/2204 [#2205]: https://github.com/tokio-rs/tokio/pull/2205 [#2210]: https://github.com/tokio-rs/tokio/pull/2210 [#2217]: https://github.com/tokio-rs/tokio/pull/2217 [#2218]: https://github.com/tokio-rs/tokio/pull/2218 [#2227]: https://github.com/tokio-rs/tokio/pull/2227 [#2238]: https://github.com/tokio-rs/tokio/pull/2238 [#2239]: https://github.com/tokio-rs/tokio/pull/2239 [#2245]: https://github.com/tokio-rs/tokio/pull/2245 [#2250]: https://github.com/tokio-rs/tokio/pull/2250 [#2274]: https://github.com/tokio-rs/tokio/pull/2274 [#2275]: https://github.com/tokio-rs/tokio/pull/2275 # 0.2.11 (January 27, 2020) ### Fixes - docs: misc fixes and tweaks ([#2155], [#2103], [#2027], [#2167], [#2175]). - macros: handle generics in `#[tokio::main]` method ([#2177]). - sync: `broadcast` potential lost notifications ([#2135]). - rt: improve "no runtime" panic messages ([#2145]). ### Added - optional support for using `parking_lot` internally ([#2164]). - fs: `fs::copy`, an async version of `std::fs::copy` ([#2079]). - macros: `select!` waits for the first branch to complete ([#2152]). - macros: `join!` waits for all branches to complete ([#2158]). - macros: `try_join!` waits for all branches to complete or the first error ([#2169]). - macros: `pin!` pins a value to the stack ([#2163]). - net: `ReadHalf::poll()` and `ReadHalf::poll_peak` ([#2151]) - stream: `StreamExt::timeout()` sets a per-item max duration ([#2149]). - stream: `StreamExt::fold()` applies a function, producing a single value. ([#2122]). - sync: impl `Eq`, `PartialEq` for `oneshot::RecvError` ([#2168]). - task: methods for inspecting the `JoinError` cause ([#2051]). [#2027]: https://github.com/tokio-rs/tokio/pull/2027 [#2051]: https://github.com/tokio-rs/tokio/pull/2051 [#2079]: https://github.com/tokio-rs/tokio/pull/2079 [#2103]: https://github.com/tokio-rs/tokio/pull/2103 [#2122]: https://github.com/tokio-rs/tokio/pull/2122 [#2135]: https://github.com/tokio-rs/tokio/pull/2135 [#2145]: https://github.com/tokio-rs/tokio/pull/2145 [#2149]: https://github.com/tokio-rs/tokio/pull/2149 [#2151]: https://github.com/tokio-rs/tokio/pull/2151 [#2152]: https://github.com/tokio-rs/tokio/pull/2152 [#2155]: https://github.com/tokio-rs/tokio/pull/2155 [#2158]: https://github.com/tokio-rs/tokio/pull/2158 [#2163]: https://github.com/tokio-rs/tokio/pull/2163 [#2164]: https://github.com/tokio-rs/tokio/pull/2164 [#2167]: https://github.com/tokio-rs/tokio/pull/2167 [#2168]: https://github.com/tokio-rs/tokio/pull/2168 [#2169]: https://github.com/tokio-rs/tokio/pull/2169 [#2175]: https://github.com/tokio-rs/tokio/pull/2175 [#2177]: https://github.com/tokio-rs/tokio/pull/2177 # 0.2.10 (January 21, 2020) ### Fixes - `#[tokio::main]` when `rt-core` feature flag is not enabled ([#2139]). - remove `AsyncBufRead` from `BufStream` impl block ([#2108]). - potential undefined behavior when implementing `AsyncRead` incorrectly ([#2030]). ### Added - `BufStream::with_capacity` ([#2125]). - impl `From` and `Default` for `RwLock` ([#2089]). - `io::ReadHalf::is_pair_of` checks if provided `WriteHalf` is for the same underlying object ([#1762], [#2144]). - `runtime::Handle::try_current()` returns a handle to the current runtime ([#2118]). - `stream::empty()` returns an immediately ready empty stream ([#2092]). - `stream::once(val)` returns a stream that yields a single value: `val` ([#2094]). - `stream::pending()` returns a stream that never becomes ready ([#2092]). - `StreamExt::chain()` sequences a second stream after the first completes ([#2093]). - `StreamExt::collect()` transform a stream into a collection ([#2109]). - `StreamExt::fuse` ends the stream after the first `None` ([#2085]). - `StreamExt::merge` combines two streams, yielding values as they become ready ([#2091]). - Task-local storage ([#2126]). [#1762]: https://github.com/tokio-rs/tokio/pull/1762 [#2030]: https://github.com/tokio-rs/tokio/pull/2030 [#2085]: https://github.com/tokio-rs/tokio/pull/2085 [#2089]: https://github.com/tokio-rs/tokio/pull/2089 [#2091]: https://github.com/tokio-rs/tokio/pull/2091 [#2092]: https://github.com/tokio-rs/tokio/pull/2092 [#2093]: https://github.com/tokio-rs/tokio/pull/2093 [#2094]: https://github.com/tokio-rs/tokio/pull/2094 [#2108]: https://github.com/tokio-rs/tokio/pull/2108 [#2109]: https://github.com/tokio-rs/tokio/pull/2109 [#2118]: https://github.com/tokio-rs/tokio/pull/2118 [#2125]: https://github.com/tokio-rs/tokio/pull/2125 [#2126]: https://github.com/tokio-rs/tokio/pull/2126 [#2139]: https://github.com/tokio-rs/tokio/pull/2139 [#2144]: https://github.com/tokio-rs/tokio/pull/2144 # 0.2.9 (January 9, 2020) ### Fixes - `AsyncSeek` impl for `File` ([#1986]). - rt: shutdown deadlock in `threaded_scheduler` ([#2074], [#2082]). - rt: memory ordering when dropping `JoinHandle` ([#2044]). - docs: misc API documentation fixes and improvements. [#1986]: https://github.com/tokio-rs/tokio/pull/1986 [#2044]: https://github.com/tokio-rs/tokio/pull/2044 [#2074]: https://github.com/tokio-rs/tokio/pull/2074 [#2082]: https://github.com/tokio-rs/tokio/pull/2082 # 0.2.8 (January 7, 2020) ### Fixes - depend on new version of `tokio-macros`. # 0.2.7 (January 7, 2020) ### Fixes - potential deadlock when dropping `basic_scheduler` Runtime. - calling `spawn_blocking` from within a `spawn_blocking` ([#2006]). - storing a `Runtime` instance in a thread-local ([#2011]). - miscellaneous documentation fixes. - rt: fix `Waker::will_wake` to return true when tasks match ([#2045]). - test-util: `time::advance` runs pending tasks before changing the time ([#2059]). ### Added - `net::lookup_host` maps a `T: ToSocketAddrs` to a stream of `SocketAddrs` ([#1870]). - `process::Child` fields are made public to match `std` ([#2014]). - impl `Stream` for `sync::broadcast::Receiver` ([#2012]). - `sync::RwLock` provides an asynchronous read-write lock ([#1699]). - `runtime::Handle::current` returns the handle for the current runtime ([#2040]). - `StreamExt::filter` filters stream values according to a predicate ([#2001]). - `StreamExt::filter_map` simultaneously filter and map stream values ([#2001]). - `StreamExt::try_next` convenience for streams of `Result` ([#2005]). - `StreamExt::take` limits a stream to a specified number of values ([#2025]). - `StreamExt::take_while` limits a stream based on a predicate ([#2029]). - `StreamExt::all` tests if every element of the stream matches a predicate ([#2035]). - `StreamExt::any` tests if any element of the stream matches a predicate ([#2034]). - `task::LocalSet.await` runs spawned tasks until the set is idle ([#1971]). - `time::DelayQueue::len` returns the number entries in the queue ([#1755]). - expose runtime options from the `#[tokio::main]` and `#[tokio::test]` ([#2022]). [#1699]: https://github.com/tokio-rs/tokio/pull/1699 [#1755]: https://github.com/tokio-rs/tokio/pull/1755 [#1870]: https://github.com/tokio-rs/tokio/pull/1870 [#1971]: https://github.com/tokio-rs/tokio/pull/1971 [#2001]: https://github.com/tokio-rs/tokio/pull/2001 [#2005]: https://github.com/tokio-rs/tokio/pull/2005 [#2006]: https://github.com/tokio-rs/tokio/pull/2006 [#2011]: https://github.com/tokio-rs/tokio/pull/2011 [#2012]: https://github.com/tokio-rs/tokio/pull/2012 [#2014]: https://github.com/tokio-rs/tokio/pull/2014 [#2022]: https://github.com/tokio-rs/tokio/pull/2022 [#2025]: https://github.com/tokio-rs/tokio/pull/2025 [#2029]: https://github.com/tokio-rs/tokio/pull/2029 [#2034]: https://github.com/tokio-rs/tokio/pull/2034 [#2035]: https://github.com/tokio-rs/tokio/pull/2035 [#2040]: https://github.com/tokio-rs/tokio/pull/2040 [#2045]: https://github.com/tokio-rs/tokio/pull/2045 [#2059]: https://github.com/tokio-rs/tokio/pull/2059 # 0.2.6 (December 19, 2019) ### Fixes - `fs::File::seek` API regression ([#1991]). [#1991]: https://github.com/tokio-rs/tokio/pull/1991 # 0.2.5 (December 18, 2019) ### Added - `io::AsyncSeek` trait ([#1924]). - `Mutex::try_lock` ([#1939]) - `mpsc::Receiver::try_recv` and `mpsc::UnboundedReceiver::try_recv` ([#1939]). - `writev` support for `TcpStream` ([#1956]). - `time::throttle` for throttling streams ([#1949]). - implement `Stream` for `time::DelayQueue` ([#1975]). - `sync::broadcast` provides a fan-out channel ([#1943]). - `sync::Semaphore` provides an async semaphore ([#1973]). - `stream::StreamExt` provides stream utilities ([#1962]). ### Fixes - deadlock risk while shutting down the runtime ([#1972]). - panic while shutting down the runtime ([#1978]). - `sync::MutexGuard` debug output ([#1961]). - misc doc improvements ([#1933], [#1934], [#1940], [#1942]). ### Changes - runtime threads are configured with `runtime::Builder::core_threads` and `runtime::Builder::max_threads`. `runtime::Builder::num_threads` is deprecated ([#1977]). [#1924]: https://github.com/tokio-rs/tokio/pull/1924 [#1933]: https://github.com/tokio-rs/tokio/pull/1933 [#1934]: https://github.com/tokio-rs/tokio/pull/1934 [#1939]: https://github.com/tokio-rs/tokio/pull/1939 [#1940]: https://github.com/tokio-rs/tokio/pull/1940 [#1942]: https://github.com/tokio-rs/tokio/pull/1942 [#1943]: https://github.com/tokio-rs/tokio/pull/1943 [#1949]: https://github.com/tokio-rs/tokio/pull/1949 [#1956]: https://github.com/tokio-rs/tokio/pull/1956 [#1961]: https://github.com/tokio-rs/tokio/pull/1961 [#1962]: https://github.com/tokio-rs/tokio/pull/1962 [#1972]: https://github.com/tokio-rs/tokio/pull/1972 [#1973]: https://github.com/tokio-rs/tokio/pull/1973 [#1975]: https://github.com/tokio-rs/tokio/pull/1975 [#1977]: https://github.com/tokio-rs/tokio/pull/1977 [#1978]: https://github.com/tokio-rs/tokio/pull/1978 # 0.2.4 (December 6, 2019) ### Fixes - `sync::Mutex` deadlock when `lock()` future is dropped early ([#1898]). [#1898]: https://github.com/tokio-rs/tokio/pull/1898 # 0.2.3 (December 6, 2019) ### Added - read / write integers using `AsyncReadExt` and `AsyncWriteExt` ([#1863]). - `read_buf` / `write_buf` for reading / writing `Buf` / `BufMut` ([#1881]). - `TcpStream::poll_peek` - pollable API for performing TCP peek ([#1864]). - `sync::oneshot::error::TryRecvError` provides variants to detect the error kind ([#1874]). - `LocalSet::block_on` accepts `!'static` task ([#1882]). - `task::JoinError` is now `Sync` ([#1888]). - impl conversions between `tokio::time::Instant` and `std::time::Instant` ([#1904]). ### Fixes - calling `spawn_blocking` after runtime shutdown ([#1875]). - `LocalSet` drop infinite loop ([#1892]). - `LocalSet` hang under load ([#1905]). - improved documentation ([#1865], [#1866], [#1868], [#1874], [#1876], [#1911]). [#1863]: https://github.com/tokio-rs/tokio/pull/1863 [#1864]: https://github.com/tokio-rs/tokio/pull/1864 [#1865]: https://github.com/tokio-rs/tokio/pull/1865 [#1866]: https://github.com/tokio-rs/tokio/pull/1866 [#1868]: https://github.com/tokio-rs/tokio/pull/1868 [#1874]: https://github.com/tokio-rs/tokio/pull/1874 [#1875]: https://github.com/tokio-rs/tokio/pull/1875 [#1876]: https://github.com/tokio-rs/tokio/pull/1876 [#1881]: https://github.com/tokio-rs/tokio/pull/1881 [#1882]: https://github.com/tokio-rs/tokio/pull/1882 [#1888]: https://github.com/tokio-rs/tokio/pull/1888 [#1892]: https://github.com/tokio-rs/tokio/pull/1892 [#1904]: https://github.com/tokio-rs/tokio/pull/1904 [#1905]: https://github.com/tokio-rs/tokio/pull/1905 [#1911]: https://github.com/tokio-rs/tokio/pull/1911 # 0.2.2 (November 29, 2019) ### Fixes - scheduling with `basic_scheduler` ([#1861]). - update `spawn` panic message to specify that a task scheduler is required ([#1839]). - API docs example for `runtime::Builder` to include a task scheduler ([#1841]). - general documentation ([#1834]). - building on illumos/solaris ([#1772]). - panic when dropping `LocalSet` ([#1843]). - API docs mention the required Cargo features for `Builder::{basic, threaded}_scheduler` ([#1858]). ### Added - impl `Stream` for `signal::unix::Signal` ([#1849]). - API docs for platform specific behavior of `signal::ctrl_c` and `signal::unix::Signal` ([#1854]). - API docs for `signal::unix::Signal::{recv, poll_recv}` and `signal::windows::CtrlBreak::{recv, poll_recv}` ([#1854]). - `File::into_std` and `File::try_into_std` methods ([#1856]). [#1772]: https://github.com/tokio-rs/tokio/pull/1772 [#1834]: https://github.com/tokio-rs/tokio/pull/1834 [#1839]: https://github.com/tokio-rs/tokio/pull/1839 [#1841]: https://github.com/tokio-rs/tokio/pull/1841 [#1843]: https://github.com/tokio-rs/tokio/pull/1843 [#1849]: https://github.com/tokio-rs/tokio/pull/1849 [#1854]: https://github.com/tokio-rs/tokio/pull/1854 [#1856]: https://github.com/tokio-rs/tokio/pull/1856 [#1858]: https://github.com/tokio-rs/tokio/pull/1858 [#1861]: https://github.com/tokio-rs/tokio/pull/1861 # 0.2.1 (November 26, 2019) ### Fixes - API docs for `TcpListener::incoming`, `UnixListener::incoming` ([#1831]). ### Added - `tokio::task::LocalSet` provides a strategy for spawning `!Send` tasks ([#1733]). - export `tokio::time::Elapsed` ([#1826]). - impl `AsRawFd`, `AsRawHandle` for `tokio::fs::File` ([#1827]). [#1733]: https://github.com/tokio-rs/tokio/pull/1733 [#1826]: https://github.com/tokio-rs/tokio/pull/1826 [#1827]: https://github.com/tokio-rs/tokio/pull/1827 [#1831]: https://github.com/tokio-rs/tokio/pull/1831 # 0.2.0 (November 26, 2019) A major breaking change. Most implementation and APIs have changed one way or another. This changelog entry contains a highlight ### Changed - APIs are updated to use `async / await`. - most `tokio-*` crates are collapsed into this crate. - Scheduler is rewritten. - `tokio::spawn` returns a `JoinHandle`. - A single I/O / timer is used per runtime. - I/O driver uses a concurrent slab for allocating state. - components are made available via feature flag. - Use `bytes` 0.5 - `tokio::codec` is moved to `tokio-util`. ### Removed - Standalone `timer` and `net` drivers are removed, use `Runtime` instead - `current_thread` runtime is removed, use `tokio::runtime::Runtime` with `basic_scheduler` instead. # 0.1.21 (May 30, 2019) ### Changed - Bump `tokio-trace-core` version to 0.2 ([#1111]). [#1111]: https://github.com/tokio-rs/tokio/pull/1111 # 0.1.20 (May 14, 2019) ### Added - `tokio::runtime::Builder::panic_handler` allows configuring handling panics on the runtime ([#1055]). [#1055]: https://github.com/tokio-rs/tokio/pull/1055 # 0.1.19 (April 22, 2019) ### Added - Re-export `tokio::sync::Mutex` primitive ([#964]). [#964]: https://github.com/tokio-rs/tokio/pull/964 # 0.1.18 (March 22, 2019) ### Added - `TypedExecutor` re-export and implementations ([#993]). [#993]: https://github.com/tokio-rs/tokio/pull/993 # 0.1.17 (March 13, 2019) ### Added - Propagate trace subscriber in the runtime ([#966]). [#966]: https://github.com/tokio-rs/tokio/pull/966 # 0.1.16 (March 1, 2019) ### Fixed - async-await: track latest nightly changes ([#940]). ### Added - `sync::Watch`, a single value broadcast channel ([#922]). - Async equivalent of read / write file helpers being added to `std` ([#896]). [#896]: https://github.com/tokio-rs/tokio/pull/896 [#922]: https://github.com/tokio-rs/tokio/pull/922 [#940]: https://github.com/tokio-rs/tokio/pull/940 # 0.1.15 (January 24, 2019) ### Added - Re-export tokio-sync APIs ([#839]). - Stream enumerate combinator ([#832]). [#832]: https://github.com/tokio-rs/tokio/pull/832 [#839]: https://github.com/tokio-rs/tokio/pull/839 # 0.1.14 (January 6, 2019) - Use feature flags to break up the crate, allowing users to pick & choose components ([#808]). - Export `UnixDatagram` and `UnixDatagramFramed` ([#772]). [#772]: https://github.com/tokio-rs/tokio/pull/772 [#808]: https://github.com/tokio-rs/tokio/pull/808 # 0.1.13 (November 21, 2018) - Fix `Runtime::reactor()` when no tasks are spawned ([#721]). - `runtime::Builder` no longer uses deprecated methods ([#749]). - Provide `after_start` and `before_stop` configuration settings for `Runtime` ([#756]). - Implement throttle stream combinator ([#736]). [#721]: https://github.com/tokio-rs/tokio/pull/721 [#736]: https://github.com/tokio-rs/tokio/pull/736 [#749]: https://github.com/tokio-rs/tokio/pull/749 [#756]: https://github.com/tokio-rs/tokio/pull/756 # 0.1.12 (October 23, 2018) - runtime: expose `keep_alive` on runtime builder ([#676]). - runtime: create a reactor per worker thread ([#660]). - codec: fix panic in `LengthDelimitedCodec` ([#682]). - io: re-export `tokio_io::io::read` function ([#689]). - runtime: check for executor re-entry in more places ([#708]). [#660]: https://github.com/tokio-rs/tokio/pull/660 [#676]: https://github.com/tokio-rs/tokio/pull/676 [#682]: https://github.com/tokio-rs/tokio/pull/682 [#689]: https://github.com/tokio-rs/tokio/pull/689 [#708]: https://github.com/tokio-rs/tokio/pull/708 # 0.1.11 (September 28, 2018) - Fix `tokio-async-await` dependency ([#675]). [#675]: https://github.com/tokio-rs/tokio/pull/675 # 0.1.10 (September 27, 2018) - Fix minimal versions # 0.1.9 (September 27, 2018) - Experimental async/await improvements ([#661]). - Re-export `TaskExecutor` from `tokio-current-thread` ([#652]). - Improve `Runtime` builder API ([#645]). - `tokio::run` panics when called from the context of an executor ([#646]). - Introduce `StreamExt` with a `timeout` helper ([#573]). - Move `length_delimited` into `tokio` ([#575]). - Re-organize `tokio::net` module ([#548]). - Re-export `tokio-current-thread::spawn` in current_thread runtime ([#579]). [#548]: https://github.com/tokio-rs/tokio/pull/548 [#573]: https://github.com/tokio-rs/tokio/pull/573 [#575]: https://github.com/tokio-rs/tokio/pull/575 [#579]: https://github.com/tokio-rs/tokio/pull/579 [#645]: https://github.com/tokio-rs/tokio/pull/645 [#646]: https://github.com/tokio-rs/tokio/pull/646 [#652]: https://github.com/tokio-rs/tokio/pull/652 [#661]: https://github.com/tokio-rs/tokio/pull/661 # 0.1.8 (August 23, 2018) - Extract tokio::executor::current_thread to a sub crate ([#370]) - Add `Runtime::block_on` ([#398]) - Add `runtime::current_thread::block_on_all` ([#477]) - Misc documentation improvements ([#450]) - Implement `std::error::Error` for error types ([#501]) [#370]: https://github.com/tokio-rs/tokio/pull/370 [#398]: https://github.com/tokio-rs/tokio/pull/398 [#450]: https://github.com/tokio-rs/tokio/pull/450 [#477]: https://github.com/tokio-rs/tokio/pull/477 [#501]: https://github.com/tokio-rs/tokio/pull/501 # 0.1.7 (June 6, 2018) - Add `Runtime::block_on` for concurrent runtime ([#391]). - Provide handle to `current_thread::Runtime` that allows spawning tasks from other threads ([#340]). - Provide `clock::now()`, a configurable source of time ([#381]). [#340]: https://github.com/tokio-rs/tokio/pull/340 [#381]: https://github.com/tokio-rs/tokio/pull/381 [#391]: https://github.com/tokio-rs/tokio/pull/391 # 0.1.6 (May 2, 2018) - Add asynchronous filesystem APIs ([#323]). - Add "current thread" runtime variant ([#308]). - `CurrentThread`: Expose inner `Park` instance. - Improve fairness of `CurrentThread` executor ([#313]). [#308]: https://github.com/tokio-rs/tokio/pull/308 [#313]: https://github.com/tokio-rs/tokio/pull/313 [#323]: https://github.com/tokio-rs/tokio/pull/323 # 0.1.5 (March 30, 2018) - Provide timer API ([#266]) [#266]: https://github.com/tokio-rs/tokio/pull/266 # 0.1.4 (March 22, 2018) - Fix build on FreeBSD ([#218]) - Shutdown the Runtime when the handle is dropped ([#214]) - Set Runtime thread name prefix for worker threads ([#232]) - Add builder for Runtime ([#234]) - Extract TCP and UDP types into separate crates ([#224]) - Optionally support futures 0.2. [#214]: https://github.com/tokio-rs/tokio/pull/214 [#218]: https://github.com/tokio-rs/tokio/pull/218 [#224]: https://github.com/tokio-rs/tokio/pull/224 [#232]: https://github.com/tokio-rs/tokio/pull/232 [#234]: https://github.com/tokio-rs/tokio/pull/234 # 0.1.3 (March 09, 2018) - Fix `CurrentThread::turn` to block on idle ([#212]). [#212]: https://github.com/tokio-rs/tokio/pull/212 # 0.1.2 (March 09, 2018) - Introduce Tokio Runtime ([#141]) - Provide `CurrentThread` for more flexible usage of current thread executor ([#141]). - Add Lio for platforms that support it ([#142]). - I/O resources now lazily bind to the reactor ([#160]). - Extract Reactor to dedicated crate ([#169]) - Add facade to sub crates and add prelude ([#166]). - Switch TCP/UDP fns to poll\_ -> Poll<...> style ([#175]) [#141]: https://github.com/tokio-rs/tokio/pull/141 [#142]: https://github.com/tokio-rs/tokio/pull/142 [#160]: https://github.com/tokio-rs/tokio/pull/160 [#166]: https://github.com/tokio-rs/tokio/pull/166 [#169]: https://github.com/tokio-rs/tokio/pull/169 [#175]: https://github.com/tokio-rs/tokio/pull/175 # 0.1.1 (February 09, 2018) - Doc fixes # 0.1.0 (February 07, 2018) - Initial crate released based on [RFC](https://github.com/tokio-rs/tokio-rfcs/pull/3). # 1.52.1 (April 16th, 2026) ## Fixed - runtime: revert [#7757] to fix [a regression][#8056] that causes `spawn_blocking` to hang ([#8057]) [#7757]: https://github.com/tokio-rs/tokio/pull/7757 [#8056]: https://github.com/tokio-rs/tokio/pull/8056 [#8057]: https://github.com/tokio-rs/tokio/pull/8057 # 1.52.0 (April 14th, 2026) ## Added - io: `AioSource::register_borrowed` for I/O safety support ([#7992]) - net: add `try_io` function to `unix::pipe` sender and receiver types ([#8030]) ## Added (unstable) - runtime: `Builder::enable_eager_driver_handoff` setting enable eager hand off of the I/O and time drivers before polling tasks ([#8010]) - taskdump: add `trace_with()` for customized task dumps ([#8025]) - taskdump: allow `impl FnMut()` in `trace_with` instead of just `fn()` ([#8040]) - fs: support `io_uring` in `AsyncRead` for `File` ([#7907]) ## Changed - runtime: improve `spawn_blocking` scalability with sharded queue ([#7757]) - runtime: use `compare_exchange_weak()` in worker queue ([#8028]) ## Fixed - runtime: overflow second half of tasks when local queue is filled instead of first half ([#8029]) ## Documented - docs: fix typo in `oneshot::Sender::send` docs ([#8026]) - docs: hide #[tokio::main] attribute in the docs of `sync::watch` ([#8035]) - net: add docs on `ConnectionRefused` errors with UDP sockets ([#7870]) [#7757]: https://github.com/tokio-rs/tokio/pull/7757 [#7870]: https://github.com/tokio-rs/tokio/pull/7870 [#7907]: https://github.com/tokio-rs/tokio/pull/7907 [#7992]: https://github.com/tokio-rs/tokio/pull/7992 [#8010]: https://github.com/tokio-rs/tokio/pull/8010 [#8025]: https://github.com/tokio-rs/tokio/pull/8025 [#8026]: https://github.com/tokio-rs/tokio/pull/8026 [#8028]: https://github.com/tokio-rs/tokio/pull/8028 [#8029]: https://github.com/tokio-rs/tokio/pull/8029 [#8030]: https://github.com/tokio-rs/tokio/pull/8030 [#8035]: https://github.com/tokio-rs/tokio/pull/8035 [#8040]: https://github.com/tokio-rs/tokio/pull/8040 # 1.51.1 (April 8th, 2026) ### Fixed - sync: fix semaphore reopens after forget ([#8021]) - net: surface errors from `SO_ERROR` on `recv` for UDP sockets on Linux ([#8001]) ### Fixed (unstable) - metrics: fix `worker_local_schedule_count` test ([#8008]) - rt: do not leak fd when cancelling io\_uring open operation ([#7983]) [#7983]: https://github.com/tokio-rs/tokio/pull/7983 [#8001]: https://github.com/tokio-rs/tokio/pull/8001 [#8008]: https://github.com/tokio-rs/tokio/pull/8008 [#8021]: https://github.com/tokio-rs/tokio/pull/8021 # 1.51.0 (April 3rd, 2026) ### Added - net: implement `get_peer_cred` on Hurd ([#7989]) - runtime: add `tokio::runtime::worker_index()` ([#7921]) - runtime: add runtime name ([#7924]) - runtime: stabilize `LocalRuntime` ([#7557]) - wasm: add wasm32-wasip2 networking support ([#7933]) ### Changed - runtime: steal tasks from the LIFO slot ([#7431]) ### Fixed - docs: do not show "Available on non-loom only." doc label ([#7977]) - macros: improve overall macro hygiene ([#7997]) - sync: fix `notify_waiters` priority in `Notify` ([#7996]) - sync: fix panic in `Chan::recv_many` when called with non-empty vector on closed channel ([#7991]) [#7431]: https://github.com/tokio-rs/tokio/pull/7431 [#7557]: https://github.com/tokio-rs/tokio/pull/7557 [#7921]: https://github.com/tokio-rs/tokio/pull/7921 [#7924]: https://github.com/tokio-rs/tokio/pull/7924 [#7933]: https://github.com/tokio-rs/tokio/pull/7933 [#7977]: https://github.com/tokio-rs/tokio/pull/7977 [#7989]: https://github.com/tokio-rs/tokio/pull/7989 [#7991]: https://github.com/tokio-rs/tokio/pull/7991 [#7996]: https://github.com/tokio-rs/tokio/pull/7996 [#7997]: https://github.com/tokio-rs/tokio/pull/7997 # 1.50.0 (Mar 3rd, 2026) ### Added - net: add `TcpStream::set_zero_linger` ([#7837]) - rt: add `is_rt_shutdown_err` ([#7771]) ### Changed - io: add optimizer hint that `memchr` returns in-bounds pointer ([#7792]) - io: implement vectored writes for `write_buf` ([#7871]) - runtime: panic when `event_interval` is set to 0 ([#7838]) - runtime: shorten default thread name to fit in Linux limit ([#7880]) - signal: remember the result of `SetConsoleCtrlHandler` ([#7833]) - signal: specialize windows `Registry` ([#7885]) ### Fixed - io: always cleanup `AsyncFd` registration list on deregister ([#7773]) - macros: remove (most) local `use` declarations in `tokio::select!` ([#7929]) - net: fix `GET_BUF_SIZE` constant for `target_os = "android"` ([#7889]) - runtime: avoid redundant unpark in current_thread scheduler ([#7834]) - runtime: don't park in `current_thread` if `before_park` defers waker ([#7835]) - io: fix write readiness on ESP32 on short writes ([#7872]) - runtime: wake deferred tasks before entering `block_in_place` ([#7879]) - sync: drop rx waker when oneshot receiver is dropped ([#7886]) - runtime: fix double increment of `num_idle_threads` on shutdown ([#7910], [#7918], [#7922]) ### Unstable - fs: check for io-uring opcode support ([#7815]) - runtime: avoid lock acquisition after uring init ([#7850]) ### Documented - docs: update outdated unstable features section ([#7839]) - io: clarify the behavior of `AsyncWriteExt::shutdown()` ([#7908]) - io: explain how to flush stdout/stderr ([#7904]) - io: fix incorrect and confusing `AsyncWrite` documentation ([#7875]) - rt: clarify the documentation of `Runtime::spawn` ([#7803]) - rt: fix missing quotation in docs ([#7925]) - runtime: correct the default thread name in docs ([#7896]) - runtime: fix `event_interval` doc ([#7932]) - sync: clarify RwLock fairness documentation ([#7919]) - sync: clarify that `recv` returns `None` once closed and no more messages ([#7920]) - task: clarify when to use `spawn_blocking` vs dedicated threads ([#7923]) - task: doc that task drops before `JoinHandle` completion ([#7825]) - signal: guarantee that listeners never return `None` ([#7869]) - task: fix task module feature flags in docs ([#7891]) - task: fix two typos ([#7913]) - task: improve the docs of `Builder::spawn_local` ([#7828]) - time: add docs about auto-advance and when to use sleep ([#7858]) - util: fix typo in docs ([#7926]) [#7771]: https://github.com/tokio-rs/tokio/pull/7771 [#7773]: https://github.com/tokio-rs/tokio/pull/7773 [#7792]: https://github.com/tokio-rs/tokio/pull/7792 [#7803]: https://github.com/tokio-rs/tokio/pull/7803 [#7815]: https://github.com/tokio-rs/tokio/pull/7815 [#7825]: https://github.com/tokio-rs/tokio/pull/7825 [#7828]: https://github.com/tokio-rs/tokio/pull/7828 [#7833]: https://github.com/tokio-rs/tokio/pull/7833 [#7834]: https://github.com/tokio-rs/tokio/pull/7834 [#7835]: https://github.com/tokio-rs/tokio/pull/7835 [#7837]: https://github.com/tokio-rs/tokio/pull/7837 [#7838]: https://github.com/tokio-rs/tokio/pull/7838 [#7839]: https://github.com/tokio-rs/tokio/pull/7839 [#7850]: https://github.com/tokio-rs/tokio/pull/7850 [#7858]: https://github.com/tokio-rs/tokio/pull/7858 [#7869]: https://github.com/tokio-rs/tokio/pull/7869 [#7871]: https://github.com/tokio-rs/tokio/pull/7871 [#7872]: https://github.com/tokio-rs/tokio/pull/7872 [#7875]: https://github.com/tokio-rs/tokio/pull/7875 [#7879]: https://github.com/tokio-rs/tokio/pull/7879 [#7880]: https://github.com/tokio-rs/tokio/pull/7880 [#7885]: https://github.com/tokio-rs/tokio/pull/7885 [#7886]: https://github.com/tokio-rs/tokio/pull/7886 [#7889]: https://github.com/tokio-rs/tokio/pull/7889 [#7891]: https://github.com/tokio-rs/tokio/pull/7891 [#7896]: https://github.com/tokio-rs/tokio/pull/7896 [#7904]: https://github.com/tokio-rs/tokio/pull/7904 [#7908]: https://github.com/tokio-rs/tokio/pull/7908 [#7910]: https://github.com/tokio-rs/tokio/pull/7910 [#7913]: https://github.com/tokio-rs/tokio/pull/7913 [#7918]: https://github.com/tokio-rs/tokio/pull/7918 [#7919]: https://github.com/tokio-rs/tokio/pull/7919 [#7920]: https://github.com/tokio-rs/tokio/pull/7920 [#7922]: https://github.com/tokio-rs/tokio/pull/7922 [#7923]: https://github.com/tokio-rs/tokio/pull/7923 [#7925]: https://github.com/tokio-rs/tokio/pull/7925 [#7926]: https://github.com/tokio-rs/tokio/pull/7926 [#7929]: https://github.com/tokio-rs/tokio/pull/7929 [#7932]: https://github.com/tokio-rs/tokio/pull/7932 # 1.49.0 (January 3rd, 2026) ### Added * net: add support for `TCLASS` option on IPv6 ([#7781]) * runtime: stabilize `runtime::id::Id` ([#7125]) * task: implement `Extend` for `JoinSet` ([#7195]) * task: stabilize the `LocalSet::id()` ([#7776]) ### Changed * net: deprecate `{TcpStream,TcpSocket}::set_linger` ([#7752]) ### Fixed * macros: fix the hygiene issue of `join!` and `try_join!` ([#7766]) * runtime: revert "replace manual vtable definitions with Wake" ([#7699]) * sync: return `TryRecvError::Disconnected` from `Receiver::try_recv` after `Receiver::close` ([#7686]) * task: remove unnecessary trait bounds on the `Debug` implementation ([#7720]) ### Unstable * fs: handle `EINTR` in `fs::write` for io-uring ([#7786]) * fs: support io-uring with `tokio::fs::read` ([#7696]) * runtime: disable io-uring on `EPERM` ([#7724]) * time: add alternative timer for better multicore scalability ([#7467]) ### Documented * docs: fix a typos in `bounded.rs` and `park.rs` ([#7817]) * io: add `SyncIoBridge` cross-references to `copy` and `copy_buf` ([#7798]) * io: doc that `AsyncWrite` does not inherit from `std::io::Write` ([#7705]) * metrics: clarify that `num_alive_tasks` is not strongly consistent ([#7614]) * net: clarify the cancellation safety of the `TcpStream::peek` ([#7305]) * net: clarify the drop behavior of `unix::OwnedWriteHalf` ([#7742]) * net: clarify the platform-dependent backlog in `TcpSocket` docs ([#7738]) * runtime: mention `LocalRuntime` in `new_current_thread` docs ([#7820]) * sync: add missing period to `mpsc::Sender::try_send` docs ([#7721]) * sync: clarify the cancellation safety of `oneshot::Receiver` ([#7780]) * sync: improve the docs for the `errors` of mpsc ([#7722]) * task: add example for `spawn_local` usage on local runtime ([#7689]) [#7125]: https://github.com/tokio-rs/tokio/pull/7125 [#7195]: https://github.com/tokio-rs/tokio/pull/7195 [#7305]: https://github.com/tokio-rs/tokio/pull/7305 [#7467]: https://github.com/tokio-rs/tokio/pull/7467 [#7614]: https://github.com/tokio-rs/tokio/pull/7614 [#7686]: https://github.com/tokio-rs/tokio/pull/7686 [#7689]: https://github.com/tokio-rs/tokio/pull/7689 [#7696]: https://github.com/tokio-rs/tokio/pull/7696 [#7699]: https://github.com/tokio-rs/tokio/pull/7699 [#7705]: https://github.com/tokio-rs/tokio/pull/7705 [#7720]: https://github.com/tokio-rs/tokio/pull/7720 [#7721]: https://github.com/tokio-rs/tokio/pull/7721 [#7722]: https://github.com/tokio-rs/tokio/pull/7722 [#7724]: https://github.com/tokio-rs/tokio/pull/7724 [#7738]: https://github.com/tokio-rs/tokio/pull/7738 [#7742]: https://github.com/tokio-rs/tokio/pull/7742 [#7752]: https://github.com/tokio-rs/tokio/pull/7752 [#7766]: https://github.com/tokio-rs/tokio/pull/7766 [#7776]: https://github.com/tokio-rs/tokio/pull/7776 [#7780]: https://github.com/tokio-rs/tokio/pull/7780 [#7781]: https://github.com/tokio-rs/tokio/pull/7781 [#7786]: https://github.com/tokio-rs/tokio/pull/7786 [#7798]: https://github.com/tokio-rs/tokio/pull/7798 [#7817]: https://github.com/tokio-rs/tokio/pull/7817 [#7820]: https://github.com/tokio-rs/tokio/pull/7820 # 1.48.0 (October 14th, 2025) The MSRV is increased to 1.71. ### Added - fs: add `File::max_buf_size` ([#7594]) - io: export `Chain` of `AsyncReadExt::chain` ([#7599]) - net: add `SocketAddr::as_abstract_name` ([#7491]) - net: add `TcpStream::quickack` and `TcpStream::set_quickack` ([#7490]) - net: implement `AsRef` for `TcpStream` and `UnixStream` ([#7573]) - task: add `LocalKey::try_get` ([#7666]) - task: implement `Ord` for `task::Id` ([#7530]) ### Changed - deps: bump windows-sys to version 0.61 ([#7645]) - fs: preserve `max_buf_size` when cloning a `File` ([#7593]) - macros: suppress `clippy::unwrap_in_result` in `#[tokio::main]` ([#7651]) - net: remove `PollEvented` noise from Debug formats ([#7675]) - process: upgrade `Command::spawn_with` to use `FnOnce` ([#7511]) - sync: remove inner mutex in `SetOnce` ([#7554]) - sync: use `UnsafeCell::get_mut` in `Mutex::get_mut` and `RwLock::get_mut` ([#7569]) - time: reduce the generated code size of `Timeout::poll` ([#7535]) ### Fixed - macros: fix hygiene issue in `join!` and `try_join!` ([#7638]) - net: fix copy/paste errors in udp peek methods ([#7604]) - process: fix error when runtime is shut down on nightly-2025-10-12 ([#7672]) - runtime: use release ordering in `wake_by_ref()` even if already woken ([#7622]) - sync: close the `broadcast::Sender` in `broadcast::Sender::new()` ([#7629]) - sync: fix implementation of unused `RwLock::try_*` methods ([#7587]) ### Unstable - tokio: use cargo features instead of `--cfg` flags for `taskdump` and `io_uring` ([#7655], [#7621]) - fs: support `io_uring` in `fs::write` ([#7567]) - fs: support `io_uring` with `File::open()` ([#7617]) - fs: support `io_uring` with `OpenOptions` ([#7321]) - macros: add `local` runtime flavor ([#7375], [#7597]) ### Documented - io: clarify the zero capacity case of `AsyncRead::poll_read` ([#7580]) - io: fix typos in the docs of `AsyncFd` readiness guards ([#7583]) - net: clarify socket gets closed on drop ([#7526]) - net: clarify the behavior of `UCred::pid()` on Cygwin ([#7611]) - net: clarify the supported platform of `set_reuseport()` and `reuseport()` ([#7628]) - net: qualify that `SO_REUSEADDR` is only set on Unix ([#7533]) - runtime: add guide for choosing between runtime types ([#7635]) - runtime: clarify the behavior of `Handle::block_on` ([#7665]) - runtime: clarify the edge case of `Builder::global_queue_interval()` ([#7605]) - sync: clarify bounded channel panic behavior ([#7641]) - sync: clarify the behavior of `tokio::sync::watch::Receiver` ([#7584]) - sync: document cancel safety on `SetOnce::wait` ([#7506]) - sync: fix the docs of `parking_lot` feature flag ([#7663]) - sync: improve the docs of `UnboundedSender::send` ([#7661]) - sync: improve the docs of `sync::watch` ([#7601]) - sync: reword allocation failure paragraph in broadcast docs ([#7595]) - task: clarify the behavior of several `spawn_local` methods ([#7669]) - task: clarify the task ID reuse guarantees ([#7577]) - task: improve the example of `poll_proceed` ([#7586]) [#7321]: https://github.com/tokio-rs/tokio/pull/7321 [#7375]: https://github.com/tokio-rs/tokio/pull/7375 [#7490]: https://github.com/tokio-rs/tokio/pull/7490 [#7491]: https://github.com/tokio-rs/tokio/pull/7491 [#7494]: https://github.com/tokio-rs/tokio/pull/7494 [#7506]: https://github.com/tokio-rs/tokio/pull/7506 [#7511]: https://github.com/tokio-rs/tokio/pull/7511 [#7526]: https://github.com/tokio-rs/tokio/pull/7526 [#7530]: https://github.com/tokio-rs/tokio/pull/7530 [#7533]: https://github.com/tokio-rs/tokio/pull/7533 [#7535]: https://github.com/tokio-rs/tokio/pull/7535 [#7554]: https://github.com/tokio-rs/tokio/pull/7554 [#7567]: https://github.com/tokio-rs/tokio/pull/7567 [#7569]: https://github.com/tokio-rs/tokio/pull/7569 [#7573]: https://github.com/tokio-rs/tokio/pull/7573 [#7577]: https://github.com/tokio-rs/tokio/pull/7577 [#7580]: https://github.com/tokio-rs/tokio/pull/7580 [#7583]: https://github.com/tokio-rs/tokio/pull/7583 [#7584]: https://github.com/tokio-rs/tokio/pull/7584 [#7586]: https://github.com/tokio-rs/tokio/pull/7586 [#7587]: https://github.com/tokio-rs/tokio/pull/7587 [#7593]: https://github.com/tokio-rs/tokio/pull/7593 [#7594]: https://github.com/tokio-rs/tokio/pull/7594 [#7595]: https://github.com/tokio-rs/tokio/pull/7595 [#7597]: https://github.com/tokio-rs/tokio/pull/7597 [#7599]: https://github.com/tokio-rs/tokio/pull/7599 [#7601]: https://github.com/tokio-rs/tokio/pull/7601 [#7604]: https://github.com/tokio-rs/tokio/pull/7604 [#7605]: https://github.com/tokio-rs/tokio/pull/7605 [#7611]: https://github.com/tokio-rs/tokio/pull/7611 [#7617]: https://github.com/tokio-rs/tokio/pull/7617 [#7621]: https://github.com/tokio-rs/tokio/pull/7621 [#7622]: https://github.com/tokio-rs/tokio/pull/7622 [#7628]: https://github.com/tokio-rs/tokio/pull/7628 [#7629]: https://github.com/tokio-rs/tokio/pull/7629 [#7635]: https://github.com/tokio-rs/tokio/pull/7635 [#7638]: https://github.com/tokio-rs/tokio/pull/7638 [#7641]: https://github.com/tokio-rs/tokio/pull/7641 [#7645]: https://github.com/tokio-rs/tokio/pull/7645 [#7651]: https://github.com/tokio-rs/tokio/pull/7651 [#7655]: https://github.com/tokio-rs/tokio/pull/7655 [#7661]: https://github.com/tokio-rs/tokio/pull/7661 [#7663]: https://github.com/tokio-rs/tokio/pull/7663 [#7665]: https://github.com/tokio-rs/tokio/pull/7665 [#7666]: https://github.com/tokio-rs/tokio/pull/7666 [#7669]: https://github.com/tokio-rs/tokio/pull/7669 [#7672]: https://github.com/tokio-rs/tokio/pull/7672 [#7675]: https://github.com/tokio-rs/tokio/pull/7675 # 1.47.4 (April 2nd, 2026) ### Fixed * sync: fix panic in `Chan::recv_many` when called with non-empty vector on closed channel ([#7991]) [#7991]: https://github.com/tokio-rs/tokio/pull/7991 # 1.47.3 (January 3rd, 2026) ### Fixed * sync: return `TryRecvError::Disconnected` from `Receiver::try_recv` after `Receiver::close` ([#7686]) # 1.47.2 (October 14th, 2025) ### Fixed - runtime: use release ordering in `wake_by_ref()` even if already woken ([#7622]) - sync: close the `broadcast::Sender` in `broadcast::Sender::new()` ([#7629]) - macros: fix hygiene issue in `join!` and `try_join!` ([#7638]) - process: fix error when runtime is shut down on nightly-2025-10-12 ([#7672]) [#7622]: https://github.com/tokio-rs/tokio/pull/7622 [#7629]: https://github.com/tokio-rs/tokio/pull/7629 [#7638]: https://github.com/tokio-rs/tokio/pull/7638 [#7672]: https://github.com/tokio-rs/tokio/pull/7672 # 1.47.1 (August 1st, 2025) ### Fixed - process: fix panic from spurious pidfd wakeup ([#7494]) - sync: fix broken link of Python `asyncio.Event` in `SetOnce` docs ([#7485]) [#7485]: https://github.com/tokio-rs/tokio/pull/7485 # 1.47.0 (July 25th, 2025) This release adds `poll_proceed` and `cooperative` to the `coop` module for cooperative scheduling, adds `SetOnce` to the `sync` module which provides similar functionality to [`std::sync::OnceLock`], and adds a new method `sync::Notify::notified_owned()` which returns an `OwnedNotified` without a lifetime parameter. ## Added - coop: add `cooperative` and `poll_proceed` ([#7405]) - sync: add `SetOnce` ([#7418]) - sync: add `sync::Notify::notified_owned()` ([#7465]) ## Changed - deps: upgrade windows-sys 0.52 → 0.59 ([#7117]) - deps: update to socket2 v0.6 ([#7443]) - sync: improve `AtomicWaker::wake` performance ([#7450]) ## Documented - metrics: fix listed feature requirements for some metrics ([#7449]) - runtime: improve safety comments of `Readiness<'_>` ([#7415]) [#7117]: https://github.com/tokio-rs/tokio/pull/7117 [#7405]: https://github.com/tokio-rs/tokio/pull/7405 [#7415]: https://github.com/tokio-rs/tokio/pull/7415 [#7418]: https://github.com/tokio-rs/tokio/pull/7418 [#7443]: https://github.com/tokio-rs/tokio/pull/7443 [#7449]: https://github.com/tokio-rs/tokio/pull/7449 [#7450]: https://github.com/tokio-rs/tokio/pull/7450 [#7465]: https://github.com/tokio-rs/tokio/pull/7465 # 1.46.1 (July 4th, 2025) This release fixes incorrect spawn locations in runtime task hooks for tasks spawned using `tokio::spawn` rather than `Runtime::spawn`. This issue only affected the spawn location in `TaskMeta::spawned_at`, and did not affect task locations in Tracing events. ## Unstable - runtime: add `TaskMeta::spawned_at` tracking where a task was spawned ([#7440]) [#7440]: https://github.com/tokio-rs/tokio/pull/7440 # 1.46.0 (July 2nd, 2025) ## Fixed - net: fixed `TcpStream::shutdown` incorrectly returning an error on macOS ([#7290]) ## Added - sync: `mpsc::OwnedPermit::{same_channel, same_channel_as_sender}` methods ([#7389]) - macros: `biased` option for `join!` and `try_join!`, similar to `select!` ([#7307]) - net: support for cygwin ([#7393]) - net: support `pipe::OpenOptions::read_write` on Android ([#7426]) - net: add `Clone` implementation for `net::unix::SocketAddr` ([#7422]) ## Changed - runtime: eliminate unnecessary lfence while operating on `queue::Local` ([#7340]) - task: disallow blocking in `LocalSet::{poll,drop}` ([#7372]) ## Unstable - runtime: add `TaskMeta::spawn_location` tracking where a task was spawned ([#7417]) - runtime: removed borrow from `LocalOptions` parameter to `runtime::Builder::build_local` ([#7346]) ## Documented - io: clarify behavior of seeking when `start_seek` is not used ([#7366]) - io: document cancellation safety of `AsyncWriteExt::flush` ([#7364]) - net: fix docs for `recv_buffer_size` method ([#7336]) - net: fix broken link of `RawFd` in `TcpSocket` docs ([#7416]) - net: update `AsRawFd` doc link to current Rust stdlib location ([#7429]) - readme: fix double period in reactor description ([#7363]) - runtime: add doc note that `on_*_task_poll` is unstable ([#7311]) - sync: update broadcast docs on allocation failure ([#7352]) - time: add a missing panic scenario of `time::advance` ([#7394]) [#7290]: https://github.com/tokio-rs/tokio/pull/7290 [#7307]: https://github.com/tokio-rs/tokio/pull/7307 [#7311]: https://github.com/tokio-rs/tokio/pull/7311 [#7336]: https://github.com/tokio-rs/tokio/pull/7336 [#7340]: https://github.com/tokio-rs/tokio/pull/7340 [#7346]: https://github.com/tokio-rs/tokio/pull/7346 [#7352]: https://github.com/tokio-rs/tokio/pull/7352 [#7363]: https://github.com/tokio-rs/tokio/pull/7363 [#7364]: https://github.com/tokio-rs/tokio/pull/7364 [#7366]: https://github.com/tokio-rs/tokio/pull/7366 [#7372]: https://github.com/tokio-rs/tokio/pull/7372 [#7389]: https://github.com/tokio-rs/tokio/pull/7389 [#7393]: https://github.com/tokio-rs/tokio/pull/7393 [#7394]: https://github.com/tokio-rs/tokio/pull/7394 [#7416]: https://github.com/tokio-rs/tokio/pull/7416 [#7422]: https://github.com/tokio-rs/tokio/pull/7422 [#7426]: https://github.com/tokio-rs/tokio/pull/7426 [#7429]: https://github.com/tokio-rs/tokio/pull/7429 [#7417]: https://github.com/tokio-rs/tokio/pull/7417 # 1.45.1 (May 24th, 2025) This fixes a regression on the wasm32-unknown-unknown target, where code that previously did not panic due to calls to `Instant::now()` started failing. This is due to the stabilization of the first time-based metric. ### Fixed - Disable time-based metrics on wasm32-unknown-unknown ([#7322]) [#7322]: https://github.com/tokio-rs/tokio/pull/7322 # 1.45.0 (May 5th, 2025) ### Added - metrics: stabilize `worker_total_busy_duration`, `worker_park_count`, and `worker_unpark_count` ([#6899], [#7276]) - process: add `Command::spawn_with` ([#7249]) ### Changed - io: do not require `Unpin` for some trait impls ([#7204]) - rt: mark `runtime::Handle` as unwind safe ([#7230]) - time: revert internal sharding implementation ([#7226]) ### Unstable - rt: remove alt multi-threaded runtime ([#7275]) [#6899]: https://github.com/tokio-rs/tokio/pull/6899 [#7276]: https://github.com/tokio-rs/tokio/pull/7276 [#7249]: https://github.com/tokio-rs/tokio/pull/7249 [#7204]: https://github.com/tokio-rs/tokio/pull/7204 [#7230]: https://github.com/tokio-rs/tokio/pull/7230 [#7226]: https://github.com/tokio-rs/tokio/pull/7226 [#7275]: https://github.com/tokio-rs/tokio/pull/7275 # 1.44.2 (April 5th, 2025) This release fixes a soundness issue in the broadcast channel. The channel accepts values that are `Send` but `!Sync`. Previously, the channel called `clone()` on these values without synchronizing. This release fixes the channel by synchronizing calls to `.clone()` (Thanks Austin Bonander for finding and reporting the issue). ### Fixed - sync: synchronize `clone()` call in broadcast channel ([#7232]) [#7232]: https://github.com/tokio-rs/tokio/pull/7232 # 1.44.1 (March 13th, 2025) ### Fixed - rt: skip defer queue in `block_in_place` context ([#7216]) [#7216]: https://github.com/tokio-rs/tokio/pull/7216 # 1.44.0 (March 7th, 2025) This release changes the `from_std` method on sockets to panic if a blocking socket is provided. We determined this change is not a breaking change as Tokio is not intended to operate using blocking sockets. Doing so results in runtime hangs and should be considered a bug. Accidentally passing a blocking socket to Tokio is one of the most common user mistakes. If this change causes an issue for you, please comment on [#7172]. ### Added - coop: add `task::coop` module ([#7116]) - process: add `Command::get_kill_on_drop()` ([#7086]) - sync: add `broadcast::Sender::closed` ([#6685], [#7090]) - sync: add `broadcast::WeakSender` ([#7100]) - sync: add `oneshot::Receiver::is_empty()` ([#7153]) - sync: add `oneshot::Receiver::is_terminated()` ([#7152]) ### Fixed - fs: empty reads on `File` should not start a background read ([#7139]) - process: calling `start_kill` on exited child should not fail ([#7160]) - signal: fix `CTRL_CLOSE`, `CTRL_LOGOFF`, `CTRL_SHUTDOWN` on windows ([#7122]) - sync: properly handle panic during mpsc drop ([#7094]) ### Changes - runtime: clean up magic number in registration set ([#7112]) - coop: make coop yield using waker defer strategy ([#7185]) - macros: make `select!` budget-aware ([#7164]) - net: panic when passing a blocking socket to `from_std` ([#7166]) - io: clean up buffer casts ([#7142]) ### Changes to unstable APIs - rt: add before and after task poll callbacks ([#7120]) - tracing: make the task tracing API unstable public ([#6972]) ### Documented - docs: fix nesting of sections in top-level docs ([#7159]) - fs: rename symlink and hardlink parameter names ([#7143]) - io: swap reader/writer in simplex doc test ([#7176]) - macros: docs about `select!` alternatives ([#7110]) - net: rename the argument for `send_to` ([#7146]) - process: add example for reading `Child` stdout ([#7141]) - process: clarify `Child::kill` behavior ([#7162]) - process: fix grammar of the `ChildStdin` struct doc comment ([#7192]) - runtime: consistently use `worker_threads` instead of `core_threads` ([#7186]) [#6685]: https://github.com/tokio-rs/tokio/pull/6685 [#6972]: https://github.com/tokio-rs/tokio/pull/6972 [#7086]: https://github.com/tokio-rs/tokio/pull/7086 [#7090]: https://github.com/tokio-rs/tokio/pull/7090 [#7094]: https://github.com/tokio-rs/tokio/pull/7094 [#7100]: https://github.com/tokio-rs/tokio/pull/7100 [#7110]: https://github.com/tokio-rs/tokio/pull/7110 [#7112]: https://github.com/tokio-rs/tokio/pull/7112 [#7116]: https://github.com/tokio-rs/tokio/pull/7116 [#7120]: https://github.com/tokio-rs/tokio/pull/7120 [#7122]: https://github.com/tokio-rs/tokio/pull/7122 [#7139]: https://github.com/tokio-rs/tokio/pull/7139 [#7141]: https://github.com/tokio-rs/tokio/pull/7141 [#7142]: https://github.com/tokio-rs/tokio/pull/7142 [#7143]: https://github.com/tokio-rs/tokio/pull/7143 [#7146]: https://github.com/tokio-rs/tokio/pull/7146 [#7152]: https://github.com/tokio-rs/tokio/pull/7152 [#7153]: https://github.com/tokio-rs/tokio/pull/7153 [#7159]: https://github.com/tokio-rs/tokio/pull/7159 [#7160]: https://github.com/tokio-rs/tokio/pull/7160 [#7162]: https://github.com/tokio-rs/tokio/pull/7162 [#7164]: https://github.com/tokio-rs/tokio/pull/7164 [#7166]: https://github.com/tokio-rs/tokio/pull/7166 [#7172]: https://github.com/tokio-rs/tokio/pull/7172 [#7176]: https://github.com/tokio-rs/tokio/pull/7176 [#7185]: https://github.com/tokio-rs/tokio/pull/7185 [#7186]: https://github.com/tokio-rs/tokio/pull/7186 [#7192]: https://github.com/tokio-rs/tokio/pull/7192 # 1.43.4 (January 3rd, 2026) ### Fixed * sync: return `TryRecvError::Disconnected` from `Receiver::try_recv` after `Receiver::close` ([#7686]) [#7686]: https://github.com/tokio-rs/tokio/pull/7686 # 1.43.3 (October 14th, 2025) ### Fixed - runtime: use release ordering in `wake_by_ref()` even if already woken ([#7622]) - sync: close the `broadcast::Sender` in `broadcast::Sender::new()` ([#7629]) - process: fix error when runtime is shut down on nightly-2025-10-12 ([#7672]) [#7622]: https://github.com/tokio-rs/tokio/pull/7622 [#7629]: https://github.com/tokio-rs/tokio/pull/7629 [#7672]: https://github.com/tokio-rs/tokio/pull/7672 # 1.43.2 (August 1st, 2025) ### Fixed - process: fix panic from spurious pidfd wakeup ([#7494]) [#7494]: https://github.com/tokio-rs/tokio/pull/7494 # 1.43.1 (April 5th, 2025) This release fixes a soundness issue in the broadcast channel. The channel accepts values that are `Send` but `!Sync`. Previously, the channel called `clone()` on these values without synchronizing. This release fixes the channel by synchronizing calls to `.clone()` (Thanks Austin Bonander for finding and reporting the issue). ### Fixed - sync: synchronize `clone()` call in broadcast channel ([#7232]) [#7232]: https://github.com/tokio-rs/tokio/pull/7232 # 1.43.0 (Jan 8th, 2025) ### Added - net: add `UdpSocket::peek` methods ([#7068]) - net: add support for Haiku OS ([#7042]) - process: add `Command::into_std()` ([#7014]) - signal: add `SignalKind::info` on illumos ([#6995]) - signal: add support for realtime signals on illumos ([#7029]) ### Fixed - io: don't call `set_len` before initializing vector in `Blocking` ([#7054]) - macros: suppress `clippy::needless_return` in `#[tokio::main]` ([#6874]) - runtime: fix thread parking on WebAssembly ([#7041]) ### Changes - chore: use unsync loads for `unsync_load` ([#7073]) - io: use `Buf::put_bytes` in `Repeat` read impl ([#7055]) - task: drop the join waker of a task eagerly ([#6986]) ### Changes to unstable APIs - metrics: improve flexibility of H2Histogram Configuration ([#6963]) - taskdump: add accessor methods for backtrace ([#6975]) ### Documented - io: clarify `ReadBuf::uninit` allows initialized buffers as well ([#7053]) - net: fix ambiguity in `TcpStream::try_write_vectored` docs ([#7067]) - runtime: fix `LocalRuntime` doc links ([#7074]) - sync: extend documentation for `watch::Receiver::wait_for` ([#7038]) - sync: fix typos in `OnceCell` docs ([#7047]) [#6874]: https://github.com/tokio-rs/tokio/pull/6874 [#6963]: https://github.com/tokio-rs/tokio/pull/6963 [#6975]: https://github.com/tokio-rs/tokio/pull/6975 [#6986]: https://github.com/tokio-rs/tokio/pull/6986 [#6995]: https://github.com/tokio-rs/tokio/pull/6995 [#7014]: https://github.com/tokio-rs/tokio/pull/7014 [#7029]: https://github.com/tokio-rs/tokio/pull/7029 [#7038]: https://github.com/tokio-rs/tokio/pull/7038 [#7041]: https://github.com/tokio-rs/tokio/pull/7041 [#7042]: https://github.com/tokio-rs/tokio/pull/7042 [#7047]: https://github.com/tokio-rs/tokio/pull/7047 [#7053]: https://github.com/tokio-rs/tokio/pull/7053 [#7054]: https://github.com/tokio-rs/tokio/pull/7054 [#7055]: https://github.com/tokio-rs/tokio/pull/7055 [#7067]: https://github.com/tokio-rs/tokio/pull/7067 [#7068]: https://github.com/tokio-rs/tokio/pull/7068 [#7073]: https://github.com/tokio-rs/tokio/pull/7073 [#7074]: https://github.com/tokio-rs/tokio/pull/7074 # 1.42.1 (April 8th, 2025) This release fixes a soundness issue in the broadcast channel. The channel accepts values that are `Send` but `!Sync`. Previously, the channel called `clone()` on these values without synchronizing. This release fixes the channel by synchronizing calls to `.clone()` (Thanks Austin Bonander for finding and reporting the issue). ### Fixed - sync: synchronize `clone()` call in broadcast channel ([#7232]) [#7232]: https://github.com/tokio-rs/tokio/pull/7232 # 1.42.0 (Dec 3rd, 2024) ### Added - io: add `AsyncFd::{try_io, try_io_mut}` ([#6967]) ### Fixed - io: avoid `ptr->ref->ptr` roundtrip in RegistrationSet ([#6929]) - runtime: do not defer `yield_now` inside `block_in_place` ([#6999]) ### Changes - io: simplify io readiness logic ([#6966]) ### Documented - net: fix docs for `tokio::net::unix::{pid_t, gid_t, uid_t}` ([#6791]) - time: fix a typo in `Instant` docs ([#6982]) [#6791]: https://github.com/tokio-rs/tokio/pull/6791 [#6929]: https://github.com/tokio-rs/tokio/pull/6929 [#6966]: https://github.com/tokio-rs/tokio/pull/6966 [#6967]: https://github.com/tokio-rs/tokio/pull/6967 [#6982]: https://github.com/tokio-rs/tokio/pull/6982 [#6999]: https://github.com/tokio-rs/tokio/pull/6999 # 1.41.1 (Nov 7th, 2024) ### Fixed - metrics: fix bug with wrong number of buckets for the histogram ([#6957]) - net: display `net` requirement for `net::UdpSocket` in docs ([#6938]) - net: fix typo in `TcpStream` internal comment ([#6944]) [#6957]: https://github.com/tokio-rs/tokio/pull/6957 [#6938]: https://github.com/tokio-rs/tokio/pull/6938 [#6944]: https://github.com/tokio-rs/tokio/pull/6944 # 1.41.0 (Oct 22nd, 2024) ### Added - metrics: stabilize `global_queue_depth` ([#6854], [#6918]) - net: add conversions for unix `SocketAddr` ([#6868]) - sync: add `watch::Sender::sender_count` ([#6836]) - sync: add `mpsc::Receiver::blocking_recv_many` ([#6867]) - task: stabilize `Id` apis ([#6793], [#6891]) ### Added (unstable) - metrics: add H2 Histogram option to improve histogram granularity ([#6897]) - metrics: rename some histogram apis ([#6924]) - runtime: add `LocalRuntime` ([#6808]) ### Changed - runtime: box futures larger than 16k on release mode ([#6826]) - sync: add `#[must_use]` to `Notified` ([#6828]) - sync: make `watch` cooperative ([#6846]) - sync: make `broadcast::Receiver` cooperative ([#6870]) - task: add task size to tracing instrumentation ([#6881]) - wasm: enable `cfg_fs` for `wasi` target ([#6822]) ### Fixed - net: fix regression of abstract socket path in unix socket ([#6838]) ### Documented - io: recommend `OwnedFd` with `AsyncFd` ([#6821]) - io: document cancel safety of `AsyncFd` methods ([#6890]) - macros: render more comprehensible documentation for `join` and `try_join` ([#6814], [#6841]) - net: fix swapped examples for `TcpSocket::set_nodelay` and `TcpSocket::nodelay` ([#6840]) - sync: document runtime compatibility ([#6833]) [#6793]: https://github.com/tokio-rs/tokio/pull/6793 [#6808]: https://github.com/tokio-rs/tokio/pull/6808 [#6810]: https://github.com/tokio-rs/tokio/pull/6810 [#6814]: https://github.com/tokio-rs/tokio/pull/6814 [#6821]: https://github.com/tokio-rs/tokio/pull/6821 [#6822]: https://github.com/tokio-rs/tokio/pull/6822 [#6826]: https://github.com/tokio-rs/tokio/pull/6826 [#6828]: https://github.com/tokio-rs/tokio/pull/6828 [#6833]: https://github.com/tokio-rs/tokio/pull/6833 [#6836]: https://github.com/tokio-rs/tokio/pull/6836 [#6838]: https://github.com/tokio-rs/tokio/pull/6838 [#6840]: https://github.com/tokio-rs/tokio/pull/6840 [#6841]: https://github.com/tokio-rs/tokio/pull/6841 [#6846]: https://github.com/tokio-rs/tokio/pull/6846 [#6854]: https://github.com/tokio-rs/tokio/pull/6854 [#6867]: https://github.com/tokio-rs/tokio/pull/6867 [#6868]: https://github.com/tokio-rs/tokio/pull/6868 [#6870]: https://github.com/tokio-rs/tokio/pull/6870 [#6881]: https://github.com/tokio-rs/tokio/pull/6881 [#6890]: https://github.com/tokio-rs/tokio/pull/6890 [#6891]: https://github.com/tokio-rs/tokio/pull/6891 [#6897]: https://github.com/tokio-rs/tokio/pull/6897 [#6918]: https://github.com/tokio-rs/tokio/pull/6918 [#6924]: https://github.com/tokio-rs/tokio/pull/6924 # 1.40.0 (August 30th, 2024) ### Added - io: add `util::SimplexStream` ([#6589]) - process: stabilize `Command::process_group` ([#6731]) - sync: add `{TrySendError,SendTimeoutError}::into_inner` ([#6755]) - task: add `JoinSet::join_all` ([#6784]) ### Added (unstable) - runtime: add `Builder::{on_task_spawn, on_task_terminate}` ([#6742]) ### Changed - io: use vectored io for `write_all_buf` when possible ([#6724]) - runtime: prevent niche-optimization to avoid triggering miri ([#6744]) - sync: mark mpsc types as `UnwindSafe` ([#6783]) - sync,time: make `Sleep` and `BatchSemaphore` instrumentation explicit roots ([#6727]) - task: use `NonZeroU64` for `task::Id` ([#6733]) - task: include panic message when printing `JoinError` ([#6753]) - task: add `#[must_use]` to `JoinHandle::abort_handle` ([#6762]) - time: eliminate timer wheel allocations ([#6779]) ### Documented - docs: clarify that `[build]` section doesn't go in Cargo.toml ([#6728]) - io: clarify zero remaining capacity case ([#6790]) - macros: improve documentation for `select!` ([#6774]) - sync: document mpsc channel allocation behavior ([#6773]) [#6589]: https://github.com/tokio-rs/tokio/pull/6589 [#6724]: https://github.com/tokio-rs/tokio/pull/6724 [#6727]: https://github.com/tokio-rs/tokio/pull/6727 [#6728]: https://github.com/tokio-rs/tokio/pull/6728 [#6731]: https://github.com/tokio-rs/tokio/pull/6731 [#6733]: https://github.com/tokio-rs/tokio/pull/6733 [#6742]: https://github.com/tokio-rs/tokio/pull/6742 [#6744]: https://github.com/tokio-rs/tokio/pull/6744 [#6753]: https://github.com/tokio-rs/tokio/pull/6753 [#6755]: https://github.com/tokio-rs/tokio/pull/6755 [#6762]: https://github.com/tokio-rs/tokio/pull/6762 [#6773]: https://github.com/tokio-rs/tokio/pull/6773 [#6774]: https://github.com/tokio-rs/tokio/pull/6774 [#6779]: https://github.com/tokio-rs/tokio/pull/6779 [#6783]: https://github.com/tokio-rs/tokio/pull/6783 [#6784]: https://github.com/tokio-rs/tokio/pull/6784 [#6790]: https://github.com/tokio-rs/tokio/pull/6790 # 1.39.3 (August 17th, 2024) This release fixes a regression where the unix socket api stopped accepting the abstract socket namespace. ([#6772]) [#6772]: https://github.com/tokio-rs/tokio/pull/6772 # 1.39.2 (July 27th, 2024) This release fixes a regression where the `select!` macro stopped accepting expressions that make use of temporary lifetime extension. ([#6722]) [#6722]: https://github.com/tokio-rs/tokio/pull/6722 # 1.39.1 (July 23rd, 2024) This release reverts "time: avoid traversing entries in the time wheel twice" because it contains a bug. ([#6715]) [#6715]: https://github.com/tokio-rs/tokio/pull/6715 # 1.39.0 (July 23rd, 2024) Yanked. Please use 1.39.1 instead. - This release bumps the MSRV to 1.70. ([#6645]) - This release upgrades to mio v1. ([#6635]) - This release upgrades to windows-sys v0.52 ([#6154]) ### Added - io: implement `AsyncSeek` for `Empty` ([#6663]) - metrics: stabilize `num_alive_tasks` ([#6619], [#6667]) - process: add `Command::as_std_mut` ([#6608]) - sync: add `watch::Sender::same_channel` ([#6637]) - sync: add `{Receiver,UnboundedReceiver}::{sender_strong_count,sender_weak_count}` ([#6661]) - sync: implement `Default` for `watch::Sender` ([#6626]) - task: implement `Clone` for `AbortHandle` ([#6621]) - task: stabilize `consume_budget` ([#6622]) ### Changed - io: improve panic message of `ReadBuf::put_slice()` ([#6629]) - io: read during write in `copy_bidirectional` and `copy` ([#6532]) - runtime: replace `num_cpus` with `available_parallelism` ([#6709]) - task: avoid stack overflow when passing large future to `block_on` ([#6692]) - time: avoid traversing entries in the time wheel twice ([#6584]) - time: support `IntoFuture` with `timeout` ([#6666]) - macros: support `IntoFuture` with `join!` and `select!` ([#6710]) ### Fixed - docs: fix docsrs builds with the fs feature enabled ([#6585]) - io: only use short-read optimization on known-to-be-compatible platforms ([#6668]) - time: fix overflow panic when using large durations with `Interval` ([#6612]) ### Added (unstable) - macros: allow `unhandled_panic` behavior for `#[tokio::main]` and `#[tokio::test]` ([#6593]) - metrics: add `spawned_tasks_count` ([#6114]) - metrics: add `worker_park_unpark_count` ([#6696]) - metrics: add worker thread id ([#6695]) ### Documented - io: update `tokio::io::stdout` documentation ([#6674]) - macros: typo fix in `join.rs` and `try_join.rs` ([#6641]) - runtime: fix typo in `unhandled_panic` ([#6660]) - task: document behavior of `JoinSet::try_join_next` when all tasks are running ([#6671]) [#6114]: https://github.com/tokio-rs/tokio/pull/6114 [#6154]: https://github.com/tokio-rs/tokio/pull/6154 [#6532]: https://github.com/tokio-rs/tokio/pull/6532 [#6584]: https://github.com/tokio-rs/tokio/pull/6584 [#6585]: https://github.com/tokio-rs/tokio/pull/6585 [#6593]: https://github.com/tokio-rs/tokio/pull/6593 [#6608]: https://github.com/tokio-rs/tokio/pull/6608 [#6612]: https://github.com/tokio-rs/tokio/pull/6612 [#6619]: https://github.com/tokio-rs/tokio/pull/6619 [#6621]: https://github.com/tokio-rs/tokio/pull/6621 [#6622]: https://github.com/tokio-rs/tokio/pull/6622 [#6626]: https://github.com/tokio-rs/tokio/pull/6626 [#6629]: https://github.com/tokio-rs/tokio/pull/6629 [#6635]: https://github.com/tokio-rs/tokio/pull/6635 [#6637]: https://github.com/tokio-rs/tokio/pull/6637 [#6641]: https://github.com/tokio-rs/tokio/pull/6641 [#6645]: https://github.com/tokio-rs/tokio/pull/6645 [#6660]: https://github.com/tokio-rs/tokio/pull/6660 [#6661]: https://github.com/tokio-rs/tokio/pull/6661 [#6663]: https://github.com/tokio-rs/tokio/pull/6663 [#6666]: https://github.com/tokio-rs/tokio/pull/6666 [#6667]: https://github.com/tokio-rs/tokio/pull/6667 [#6668]: https://github.com/tokio-rs/tokio/pull/6668 [#6671]: https://github.com/tokio-rs/tokio/pull/6671 [#6674]: https://github.com/tokio-rs/tokio/pull/6674 [#6692]: https://github.com/tokio-rs/tokio/pull/6692 [#6695]: https://github.com/tokio-rs/tokio/pull/6695 [#6696]: https://github.com/tokio-rs/tokio/pull/6696 [#6709]: https://github.com/tokio-rs/tokio/pull/6709 [#6710]: https://github.com/tokio-rs/tokio/pull/6710 # 1.38.2 (April 2nd, 2025) This release fixes a soundness issue in the broadcast channel. The channel accepts values that are `Send` but `!Sync`. Previously, the channel called `clone()` on these values without synchronizing. This release fixes the channel by synchronizing calls to `.clone()` (Thanks Austin Bonander for finding and reporting the issue). ### Fixed - sync: synchronize `clone()` call in broadcast channel ([#7232]) [#7232]: https://github.com/tokio-rs/tokio/pull/7232 # 1.38.1 (July 16th, 2024) This release fixes the bug identified as ([#6682]), which caused timers not to fire when they should. ### Fixed - time: update `wake_up` while holding all the locks of sharded time wheels ([#6683]) [#6682]: https://github.com/tokio-rs/tokio/pull/6682 [#6683]: https://github.com/tokio-rs/tokio/pull/6683 # 1.38.0 (May 30th, 2024) This release marks the beginning of stabilization for runtime metrics. It stabilizes `RuntimeMetrics::worker_count`. Future releases will continue to stabilize more metrics. ### Added - fs: add `File::create_new` ([#6573]) - io: add `copy_bidirectional_with_sizes` ([#6500]) - io: implement `AsyncBufRead` for `Join` ([#6449]) - net: add Apple visionOS support ([#6465]) - net: implement `Clone` for `NamedPipeInfo` ([#6586]) - net: support QNX OS ([#6421]) - sync: add `Notify::notify_last` ([#6520]) - sync: add `mpsc::Receiver::{capacity,max_capacity}` ([#6511]) - sync: add `split` method to the semaphore permit ([#6472], [#6478]) - task: add `tokio::task::join_set::Builder::spawn_blocking` ([#6578]) - wasm: support rt-multi-thread with wasm32-wasi-preview1-threads ([#6510]) ### Changed - macros: make `#[tokio::test]` append `#[test]` at the end of the attribute list ([#6497]) - metrics: fix `blocking_threads` count ([#6551]) - metrics: stabilize `RuntimeMetrics::worker_count` ([#6556]) - runtime: move task out of the `lifo_slot` in `block_in_place` ([#6596]) - runtime: panic if `global_queue_interval` is zero ([#6445]) - sync: always drop message in destructor for oneshot receiver ([#6558]) - sync: instrument `Semaphore` for task dumps ([#6499]) - sync: use FIFO ordering when waking batches of wakers ([#6521]) - task: make `LocalKey::get` work with Clone types ([#6433]) - tests: update nix and mio-aio dev-dependencies ([#6552]) - time: clean up implementation ([#6517]) - time: lazily init timers on first poll ([#6512]) - time: remove the `true_when` field in `TimerShared` ([#6563]) - time: use sharding for timer implementation ([#6534]) ### Fixed - taskdump: allow building taskdump docs on non-unix machines ([#6564]) - time: check for overflow in `Interval::poll_tick` ([#6487]) - sync: fix incorrect `is_empty` on mpsc block boundaries ([#6603]) ### Documented - fs: rewrite file system docs ([#6467]) - io: fix `stdin` documentation ([#6581]) - io: fix obsolete reference in `ReadHalf::unsplit()` documentation ([#6498]) - macros: render more comprehensible documentation for `select!` ([#6468]) - net: add missing types to module docs ([#6482]) - net: fix misleading `NamedPipeServer` example ([#6590]) - sync: add examples for `SemaphorePermit`, `OwnedSemaphorePermit` ([#6477]) - sync: document that `Barrier::wait` is not cancel safe ([#6494]) - sync: explain relation between `watch::Sender::{subscribe,closed}` ([#6490]) - task: clarify that you can't abort `spawn_blocking` tasks ([#6571]) - task: fix a typo in doc of `LocalSet::run_until` ([#6599]) - time: fix test-util requirement for pause and resume in docs ([#6503]) [#6421]: https://github.com/tokio-rs/tokio/pull/6421 [#6433]: https://github.com/tokio-rs/tokio/pull/6433 [#6445]: https://github.com/tokio-rs/tokio/pull/6445 [#6449]: https://github.com/tokio-rs/tokio/pull/6449 [#6465]: https://github.com/tokio-rs/tokio/pull/6465 [#6467]: https://github.com/tokio-rs/tokio/pull/6467 [#6468]: https://github.com/tokio-rs/tokio/pull/6468 [#6472]: https://github.com/tokio-rs/tokio/pull/6472 [#6477]: https://github.com/tokio-rs/tokio/pull/6477 [#6478]: https://github.com/tokio-rs/tokio/pull/6478 [#6482]: https://github.com/tokio-rs/tokio/pull/6482 [#6487]: https://github.com/tokio-rs/tokio/pull/6487 [#6490]: https://github.com/tokio-rs/tokio/pull/6490 [#6494]: https://github.com/tokio-rs/tokio/pull/6494 [#6497]: https://github.com/tokio-rs/tokio/pull/6497 [#6498]: https://github.com/tokio-rs/tokio/pull/6498 [#6499]: https://github.com/tokio-rs/tokio/pull/6499 [#6500]: https://github.com/tokio-rs/tokio/pull/6500 [#6503]: https://github.com/tokio-rs/tokio/pull/6503 [#6510]: https://github.com/tokio-rs/tokio/pull/6510 [#6511]: https://github.com/tokio-rs/tokio/pull/6511 [#6512]: https://github.com/tokio-rs/tokio/pull/6512 [#6517]: https://github.com/tokio-rs/tokio/pull/6517 [#6520]: https://github.com/tokio-rs/tokio/pull/6520 [#6521]: https://github.com/tokio-rs/tokio/pull/6521 [#6534]: https://github.com/tokio-rs/tokio/pull/6534 [#6551]: https://github.com/tokio-rs/tokio/pull/6551 [#6552]: https://github.com/tokio-rs/tokio/pull/6552 [#6556]: https://github.com/tokio-rs/tokio/pull/6556 [#6558]: https://github.com/tokio-rs/tokio/pull/6558 [#6563]: https://github.com/tokio-rs/tokio/pull/6563 [#6564]: https://github.com/tokio-rs/tokio/pull/6564 [#6571]: https://github.com/tokio-rs/tokio/pull/6571 [#6573]: https://github.com/tokio-rs/tokio/pull/6573 [#6578]: https://github.com/tokio-rs/tokio/pull/6578 [#6581]: https://github.com/tokio-rs/tokio/pull/6581 [#6586]: https://github.com/tokio-rs/tokio/pull/6586 [#6590]: https://github.com/tokio-rs/tokio/pull/6590 [#6596]: https://github.com/tokio-rs/tokio/pull/6596 [#6599]: https://github.com/tokio-rs/tokio/pull/6599 [#6603]: https://github.com/tokio-rs/tokio/pull/6603 # 1.37.0 (March 28th, 2024) ### Added - fs: add `set_max_buf_size` to `tokio::fs::File` ([#6411]) - io: add `try_new` and `try_with_interest` to `AsyncFd` ([#6345]) - sync: add `forget_permits` method to semaphore ([#6331]) - sync: add `is_closed`, `is_empty`, and `len` to mpsc receivers ([#6348]) - sync: add a `rwlock()` method to owned `RwLock` guards ([#6418]) - sync: expose strong and weak counts of mpsc sender handles ([#6405]) - sync: implement `Clone` for `watch::Sender` ([#6388]) - task: add `TaskLocalFuture::take_value` ([#6340]) - task: implement `FromIterator` for `JoinSet` ([#6300]) ### Changed - io: make `io::split` use a mutex instead of a spinlock ([#6403]) ### Fixed - docs: fix docsrs build without net feature ([#6360]) - macros: allow select with only else branch ([#6339]) - runtime: fix leaking registration entries when os registration fails ([#6329]) ### Documented - io: document cancel safety of `AsyncBufReadExt::fill_buf` ([#6431]) - io: document cancel safety of `AsyncReadExt`'s primitive read functions ([#6337]) - runtime: add doc link from `Runtime` to `#[tokio::main]` ([#6366]) - runtime: make the `enter` example deterministic ([#6351]) - sync: add Semaphore example for limiting the number of outgoing requests ([#6419]) - sync: fix missing period in broadcast docs ([#6377]) - sync: mark `mpsc::Sender::downgrade` with `#[must_use]` ([#6326]) - sync: reorder `const_new` before `new_with` ([#6392]) - sync: update watch channel docs ([#6395]) - task: fix documentation links ([#6336]) ### Changed (unstable) - runtime: include task `Id` in taskdumps ([#6328]) - runtime: panic if `unhandled_panic` is enabled when not supported ([#6410]) [#6300]: https://github.com/tokio-rs/tokio/pull/6300 [#6326]: https://github.com/tokio-rs/tokio/pull/6326 [#6328]: https://github.com/tokio-rs/tokio/pull/6328 [#6329]: https://github.com/tokio-rs/tokio/pull/6329 [#6331]: https://github.com/tokio-rs/tokio/pull/6331 [#6336]: https://github.com/tokio-rs/tokio/pull/6336 [#6337]: https://github.com/tokio-rs/tokio/pull/6337 [#6339]: https://github.com/tokio-rs/tokio/pull/6339 [#6340]: https://github.com/tokio-rs/tokio/pull/6340 [#6345]: https://github.com/tokio-rs/tokio/pull/6345 [#6348]: https://github.com/tokio-rs/tokio/pull/6348 [#6351]: https://github.com/tokio-rs/tokio/pull/6351 [#6360]: https://github.com/tokio-rs/tokio/pull/6360 [#6366]: https://github.com/tokio-rs/tokio/pull/6366 [#6377]: https://github.com/tokio-rs/tokio/pull/6377 [#6388]: https://github.com/tokio-rs/tokio/pull/6388 [#6392]: https://github.com/tokio-rs/tokio/pull/6392 [#6395]: https://github.com/tokio-rs/tokio/pull/6395 [#6403]: https://github.com/tokio-rs/tokio/pull/6403 [#6405]: https://github.com/tokio-rs/tokio/pull/6405 [#6410]: https://github.com/tokio-rs/tokio/pull/6410 [#6411]: https://github.com/tokio-rs/tokio/pull/6411 [#6418]: https://github.com/tokio-rs/tokio/pull/6418 [#6419]: https://github.com/tokio-rs/tokio/pull/6419 [#6431]: https://github.com/tokio-rs/tokio/pull/6431 # 1.36.0 (February 2nd, 2024) ### Added - io: add `tokio::io::Join` ([#6220]) - io: implement `AsyncWrite` for `Empty` ([#6235]) - net: add support for anonymous unix pipes ([#6127]) - net: add `UnixSocket` ([#6290]) - net: expose keepalive option on `TcpSocket` ([#6311]) - sync: add `{Receiver,UnboundedReceiver}::poll_recv_many` ([#6236]) - sync: add `Sender::{try_,}reserve_many` ([#6205]) - sync: add `watch::Receiver::mark_unchanged` ([#6252]) - task: add `JoinSet::try_join_next` ([#6280]) ### Changed - io: make `copy` cooperative ([#6265]) - io: make `repeat` and `sink` cooperative ([#6254]) - io: simplify check for empty slice ([#6293]) - process: use pidfd on Linux when available ([#6152]) - sync: use AtomicBool in broadcast channel future ([#6298]) ### Documented - io: clarify `clear_ready` docs ([#6304]) - net: document that `*Fd` traits on `TcpSocket` are unix-only ([#6294]) - sync: document FIFO behavior of `tokio::sync::Mutex` ([#6279]) - chore: typographic improvements ([#6262]) - runtime: remove obsolete comment ([#6303]) - task: fix typo ([#6261]) [#6220]: https://github.com/tokio-rs/tokio/pull/6220 [#6235]: https://github.com/tokio-rs/tokio/pull/6235 [#6127]: https://github.com/tokio-rs/tokio/pull/6127 [#6290]: https://github.com/tokio-rs/tokio/pull/6290 [#6311]: https://github.com/tokio-rs/tokio/pull/6311 [#6236]: https://github.com/tokio-rs/tokio/pull/6236 [#6205]: https://github.com/tokio-rs/tokio/pull/6205 [#6252]: https://github.com/tokio-rs/tokio/pull/6252 [#6280]: https://github.com/tokio-rs/tokio/pull/6280 [#6265]: https://github.com/tokio-rs/tokio/pull/6265 [#6254]: https://github.com/tokio-rs/tokio/pull/6254 [#6293]: https://github.com/tokio-rs/tokio/pull/6293 [#6238]: https://github.com/tokio-rs/tokio/pull/6238 [#6152]: https://github.com/tokio-rs/tokio/pull/6152 [#6298]: https://github.com/tokio-rs/tokio/pull/6298 [#6262]: https://github.com/tokio-rs/tokio/pull/6262 [#6303]: https://github.com/tokio-rs/tokio/pull/6303 [#6261]: https://github.com/tokio-rs/tokio/pull/6261 [#6304]: https://github.com/tokio-rs/tokio/pull/6304 [#6294]: https://github.com/tokio-rs/tokio/pull/6294 [#6279]: https://github.com/tokio-rs/tokio/pull/6279 # 1.35.1 (December 19, 2023) This is a forward part of a change that was backported to 1.25.3. ### Fixed - io: add budgeting to `tokio::runtime::io::registration::async_io` ([#6221]) [#6221]: https://github.com/tokio-rs/tokio/pull/6221 # 1.35.0 (December 8th, 2023) ### Added - net: add Apple watchOS support ([#6176]) ### Changed - io: drop the `Sized` requirements from `AsyncReadExt.read_buf` ([#6169]) - runtime: make `Runtime` unwind safe ([#6189]) - runtime: reduce the lock contention in task spawn ([#6001]) - tokio: update nix dependency to 0.27.1 ([#6190]) ### Fixed - chore: make `--cfg docsrs` work without net feature ([#6166]) - chore: use relaxed load for `unsync_load` on miri ([#6179]) - runtime: handle missing context on wake ([#6148]) - taskdump: fix taskdump cargo config example ([#6150]) - taskdump: skip notified tasks during taskdumps ([#6194]) - tracing: avoid creating resource spans with current parent, use a None parent instead ([#6107]) - tracing: make task span explicit root ([#6158]) ### Documented - io: flush in `AsyncWriteExt` examples ([#6149]) - runtime: document fairness guarantees and current behavior ([#6145]) - task: document cancel safety of `LocalSet::run_until` ([#6147]) [#6001]: https://github.com/tokio-rs/tokio/pull/6001 [#6107]: https://github.com/tokio-rs/tokio/pull/6107 [#6144]: https://github.com/tokio-rs/tokio/pull/6144 [#6145]: https://github.com/tokio-rs/tokio/pull/6145 [#6147]: https://github.com/tokio-rs/tokio/pull/6147 [#6148]: https://github.com/tokio-rs/tokio/pull/6148 [#6149]: https://github.com/tokio-rs/tokio/pull/6149 [#6150]: https://github.com/tokio-rs/tokio/pull/6150 [#6158]: https://github.com/tokio-rs/tokio/pull/6158 [#6166]: https://github.com/tokio-rs/tokio/pull/6166 [#6169]: https://github.com/tokio-rs/tokio/pull/6169 [#6176]: https://github.com/tokio-rs/tokio/pull/6176 [#6179]: https://github.com/tokio-rs/tokio/pull/6179 [#6189]: https://github.com/tokio-rs/tokio/pull/6189 [#6190]: https://github.com/tokio-rs/tokio/pull/6190 [#6194]: https://github.com/tokio-rs/tokio/pull/6194 # 1.34.0 (November 19th, 2023) ### Fixed - io: allow `clear_readiness` after io driver shutdown ([#6067]) - io: fix integer overflow in `take` ([#6080]) - io: fix I/O resource hang ([#6134]) - sync: fix `broadcast::channel` link ([#6100]) ### Changed - macros: use `::core` qualified imports instead of `::std` inside `tokio::test` macro ([#5973]) ### Added - fs: update cfg attr in `fs::read_dir` to include `aix` ([#6075]) - sync: add `mpsc::Receiver::recv_many` ([#6010]) - tokio: added vita target support ([#6094]) [#5973]: https://github.com/tokio-rs/tokio/pull/5973 [#6067]: https://github.com/tokio-rs/tokio/pull/6067 [#6080]: https://github.com/tokio-rs/tokio/pull/6080 [#6134]: https://github.com/tokio-rs/tokio/pull/6134 [#6100]: https://github.com/tokio-rs/tokio/pull/6100 [#6075]: https://github.com/tokio-rs/tokio/pull/6075 [#6010]: https://github.com/tokio-rs/tokio/pull/6010 [#6094]: https://github.com/tokio-rs/tokio/pull/6094 # 1.33.0 (October 9, 2023) ### Fixed - io: mark `Interest::add` with `#[must_use]` ([#6037]) - runtime: fix cache line size for RISC-V ([#5994]) - sync: prevent lock poisoning in `watch::Receiver::wait_for` ([#6021]) - task: fix `spawn_local` source location ([#5984]) ### Changed - sync: use Acquire/Release orderings instead of SeqCst in `watch` ([#6018]) ### Added - fs: add vectored writes to `tokio::fs::File` ([#5958]) - io: add `Interest::remove` method ([#5906]) - io: add vectored writes to `DuplexStream` ([#5985]) - net: add Apple tvOS support ([#6045]) - sync: add `?Sized` bound to `{MutexGuard,OwnedMutexGuard}::map` ([#5997]) - sync: add `watch::Receiver::mark_unseen` ([#5962], [#6014], [#6017]) - sync: add `watch::Sender::new` ([#5998]) - sync: add const fn `OnceCell::from_value` ([#5903]) ### Removed - remove unused `stats` feature ([#5952]) ### Documented - add missing backticks in code examples ([#5938], [#6056]) - fix typos ([#5988], [#6030]) - process: document that `Child::wait` is cancel safe ([#5977]) - sync: add examples for `Semaphore` ([#5939], [#5956], [#5978], [#6031], [#6032], [#6050]) - sync: document that `broadcast` capacity is a lower bound ([#6042]) - sync: document that `const_new` is not instrumented ([#6002]) - sync: improve cancel-safety documentation for `mpsc::Sender::send` ([#5947]) - sync: improve docs for `watch` channel ([#5954]) - taskdump: render taskdump documentation on docs.rs ([#5972]) ### Unstable - taskdump: fix potential deadlock ([#6036]) [#5903]: https://github.com/tokio-rs/tokio/pull/5903 [#5906]: https://github.com/tokio-rs/tokio/pull/5906 [#5938]: https://github.com/tokio-rs/tokio/pull/5938 [#5939]: https://github.com/tokio-rs/tokio/pull/5939 [#5947]: https://github.com/tokio-rs/tokio/pull/5947 [#5952]: https://github.com/tokio-rs/tokio/pull/5952 [#5954]: https://github.com/tokio-rs/tokio/pull/5954 [#5956]: https://github.com/tokio-rs/tokio/pull/5956 [#5958]: https://github.com/tokio-rs/tokio/pull/5958 [#5960]: https://github.com/tokio-rs/tokio/pull/5960 [#5962]: https://github.com/tokio-rs/tokio/pull/5962 [#5971]: https://github.com/tokio-rs/tokio/pull/5971 [#5972]: https://github.com/tokio-rs/tokio/pull/5972 [#5977]: https://github.com/tokio-rs/tokio/pull/5977 [#5978]: https://github.com/tokio-rs/tokio/pull/5978 [#5984]: https://github.com/tokio-rs/tokio/pull/5984 [#5985]: https://github.com/tokio-rs/tokio/pull/5985 [#5988]: https://github.com/tokio-rs/tokio/pull/5988 [#5994]: https://github.com/tokio-rs/tokio/pull/5994 [#5997]: https://github.com/tokio-rs/tokio/pull/5997 [#5998]: https://github.com/tokio-rs/tokio/pull/5998 [#6002]: https://github.com/tokio-rs/tokio/pull/6002 [#6014]: https://github.com/tokio-rs/tokio/pull/6014 [#6017]: https://github.com/tokio-rs/tokio/pull/6017 [#6018]: https://github.com/tokio-rs/tokio/pull/6018 [#6021]: https://github.com/tokio-rs/tokio/pull/6021 [#6030]: https://github.com/tokio-rs/tokio/pull/6030 [#6031]: https://github.com/tokio-rs/tokio/pull/6031 [#6032]: https://github.com/tokio-rs/tokio/pull/6032 [#6036]: https://github.com/tokio-rs/tokio/pull/6036 [#6037]: https://github.com/tokio-rs/tokio/pull/6037 [#6042]: https://github.com/tokio-rs/tokio/pull/6042 [#6045]: https://github.com/tokio-rs/tokio/pull/6045 [#6050]: https://github.com/tokio-rs/tokio/pull/6050 [#6056]: https://github.com/tokio-rs/tokio/pull/6056 [#6058]: https://github.com/tokio-rs/tokio/pull/6058 # 1.32.1 (December 19, 2023) This is a forward part of a change that was backported to 1.25.3. ### Fixed - io: add budgeting to `tokio::runtime::io::registration::async_io` ([#6221]) [#6221]: https://github.com/tokio-rs/tokio/pull/6221 # 1.32.0 (August 16, 2023) ### Fixed - sync: fix potential quadratic behavior in `broadcast::Receiver` ([#5925]) ### Added - process: stabilize `Command::raw_arg` ([#5930]) - io: enable awaiting error readiness ([#5781]) ### Unstable - rt(alt): improve scalability of alt runtime as the number of cores grows ([#5935]) [#5925]: https://github.com/tokio-rs/tokio/pull/5925 [#5930]: https://github.com/tokio-rs/tokio/pull/5930 [#5781]: https://github.com/tokio-rs/tokio/pull/5781 [#5935]: https://github.com/tokio-rs/tokio/pull/5935 # 1.31.0 (August 10, 2023) ### Fixed * io: delegate `WriteHalf::poll_write_vectored` ([#5914]) ### Unstable * rt(alt): fix memory leak in unstable next-gen scheduler prototype ([#5911]) * rt: expose mean task poll time metric ([#5927]) [#5914]: https://github.com/tokio-rs/tokio/pull/5914 [#5911]: https://github.com/tokio-rs/tokio/pull/5911 [#5927]: https://github.com/tokio-rs/tokio/pull/5927 # 1.30.0 (August 9, 2023) This release bumps the MSRV of Tokio to 1.63. ([#5887]) ### Changed - tokio: reduce LLVM code generation ([#5859]) - io: support `--cfg mio_unsupported_force_poll_poll` flag ([#5881]) - sync: make `const_new` methods always available ([#5885]) - sync: avoid false sharing in mpsc channel ([#5829]) - rt: pop at least one task from inject queue ([#5908]) ### Added - sync: add `broadcast::Sender::new` ([#5824]) - net: implement `UCred` for espidf ([#5868]) - fs: add `File::options()` ([#5869]) - time: implement extra reset variants for `Interval` ([#5878]) - process: add `{ChildStd*}::into_owned_{fd, handle}` ([#5899]) ### Removed - tokio: removed unused `tokio_*` cfgs ([#5890]) - remove build script to speed up compilation ([#5887]) ### Documented - sync: mention lagging in docs for `broadcast::send` ([#5820]) - runtime: expand on sharing runtime docs ([#5858]) - io: use vec in example for `AsyncReadExt::read_exact` ([#5863]) - time: mark `Sleep` as `!Unpin` in docs ([#5916]) - process: fix `raw_arg` not showing up in docs ([#5865]) ### Unstable - rt: add runtime ID ([#5864]) - rt: initial implementation of new threaded runtime ([#5823]) [#5820]: https://github.com/tokio-rs/tokio/pull/5820 [#5823]: https://github.com/tokio-rs/tokio/pull/5823 [#5824]: https://github.com/tokio-rs/tokio/pull/5824 [#5829]: https://github.com/tokio-rs/tokio/pull/5829 [#5858]: https://github.com/tokio-rs/tokio/pull/5858 [#5859]: https://github.com/tokio-rs/tokio/pull/5859 [#5863]: https://github.com/tokio-rs/tokio/pull/5863 [#5864]: https://github.com/tokio-rs/tokio/pull/5864 [#5865]: https://github.com/tokio-rs/tokio/pull/5865 [#5868]: https://github.com/tokio-rs/tokio/pull/5868 [#5869]: https://github.com/tokio-rs/tokio/pull/5869 [#5878]: https://github.com/tokio-rs/tokio/pull/5878 [#5881]: https://github.com/tokio-rs/tokio/pull/5881 [#5885]: https://github.com/tokio-rs/tokio/pull/5885 [#5887]: https://github.com/tokio-rs/tokio/pull/5887 [#5890]: https://github.com/tokio-rs/tokio/pull/5890 [#5899]: https://github.com/tokio-rs/tokio/pull/5899 [#5908]: https://github.com/tokio-rs/tokio/pull/5908 [#5916]: https://github.com/tokio-rs/tokio/pull/5916 # 1.29.1 (June 29, 2023) ### Fixed - rt: fix nesting two `block_in_place` with a `block_on` between ([#5837]) [#5837]: https://github.com/tokio-rs/tokio/pull/5837 # 1.29.0 (June 27, 2023) Technically a breaking change, the `Send` implementation is removed from `runtime::EnterGuard`. This change fixes a bug and should not impact most users. ### Breaking - rt: `EnterGuard` should not be `Send` ([#5766]) ### Fixed - fs: reduce blocking ops in `fs::read_dir` ([#5653]) - rt: fix possible starvation ([#5686], [#5712]) - rt: fix stacked borrows issue in `JoinSet` ([#5693]) - rt: panic if `EnterGuard` dropped incorrect order ([#5772]) - time: do not overflow to signal value ([#5710]) - fs: wait for in-flight ops before cloning `File` ([#5803]) ### Changed - rt: reduce time to poll tasks scheduled from outside the runtime ([#5705], [#5720]) ### Added - net: add uds doc alias for unix sockets ([#5659]) - rt: add metric for number of tasks ([#5628]) - sync: implement more traits for channel errors ([#5666]) - net: add nodelay methods on TcpSocket ([#5672]) - sync: add `broadcast::Receiver::blocking_recv` ([#5690]) - process: add `raw_arg` method to `Command` ([#5704]) - io: support PRIORITY epoll events ([#5566]) - task: add `JoinSet::poll_join_next` ([#5721]) - net: add support for Redox OS ([#5790]) ### Unstable - rt: add the ability to dump task backtraces ([#5608], [#5676], [#5708], [#5717]) - rt: instrument task poll times with a histogram ([#5685]) [#5766]: https://github.com/tokio-rs/tokio/pull/5766 [#5653]: https://github.com/tokio-rs/tokio/pull/5653 [#5686]: https://github.com/tokio-rs/tokio/pull/5686 [#5712]: https://github.com/tokio-rs/tokio/pull/5712 [#5693]: https://github.com/tokio-rs/tokio/pull/5693 [#5772]: https://github.com/tokio-rs/tokio/pull/5772 [#5710]: https://github.com/tokio-rs/tokio/pull/5710 [#5803]: https://github.com/tokio-rs/tokio/pull/5803 [#5705]: https://github.com/tokio-rs/tokio/pull/5705 [#5720]: https://github.com/tokio-rs/tokio/pull/5720 [#5659]: https://github.com/tokio-rs/tokio/pull/5659 [#5628]: https://github.com/tokio-rs/tokio/pull/5628 [#5666]: https://github.com/tokio-rs/tokio/pull/5666 [#5672]: https://github.com/tokio-rs/tokio/pull/5672 [#5690]: https://github.com/tokio-rs/tokio/pull/5690 [#5704]: https://github.com/tokio-rs/tokio/pull/5704 [#5566]: https://github.com/tokio-rs/tokio/pull/5566 [#5721]: https://github.com/tokio-rs/tokio/pull/5721 [#5790]: https://github.com/tokio-rs/tokio/pull/5790 [#5608]: https://github.com/tokio-rs/tokio/pull/5608 [#5676]: https://github.com/tokio-rs/tokio/pull/5676 [#5708]: https://github.com/tokio-rs/tokio/pull/5708 [#5717]: https://github.com/tokio-rs/tokio/pull/5717 [#5685]: https://github.com/tokio-rs/tokio/pull/5685 # 1.28.2 (May 28, 2023) Forward ports 1.18.6 changes. ### Fixed - deps: disable default features for mio ([#5728]) [#5728]: https://github.com/tokio-rs/tokio/pull/5728 # 1.28.1 (May 10th, 2023) This release fixes a mistake in the build script that makes `AsFd` implementations unavailable on Rust 1.63. ([#5677]) [#5677]: https://github.com/tokio-rs/tokio/pull/5677 # 1.28.0 (April 25th, 2023) ### Added - io: add `AsyncFd::async_io` ([#5542]) - io: impl BufMut for ReadBuf ([#5590]) - net: add `recv_buf` for `UdpSocket` and `UnixDatagram` ([#5583]) - sync: add `OwnedSemaphorePermit::semaphore` ([#5618]) - sync: add `same_channel` to broadcast channel ([#5607]) - sync: add `watch::Receiver::wait_for` ([#5611]) - task: add `JoinSet::spawn_blocking` and `JoinSet::spawn_blocking_on` ([#5612]) ### Changed - deps: update windows-sys to 0.48 ([#5591]) - io: make `read_to_end` not grow unnecessarily ([#5610]) - macros: make entrypoints more efficient ([#5621]) - sync: improve Debug impl for `RwLock` ([#5647]) - sync: reduce contention in `Notify` ([#5503]) ### Fixed - net: support `get_peer_cred` on AIX ([#5065]) - sync: avoid deadlocks in `broadcast` with custom wakers ([#5578]) ### Documented - sync: fix typo in `Semaphore::MAX_PERMITS` ([#5645]) - sync: fix typo in `tokio::sync::watch::Sender` docs ([#5587]) [#5065]: https://github.com/tokio-rs/tokio/pull/5065 [#5503]: https://github.com/tokio-rs/tokio/pull/5503 [#5542]: https://github.com/tokio-rs/tokio/pull/5542 [#5578]: https://github.com/tokio-rs/tokio/pull/5578 [#5583]: https://github.com/tokio-rs/tokio/pull/5583 [#5587]: https://github.com/tokio-rs/tokio/pull/5587 [#5590]: https://github.com/tokio-rs/tokio/pull/5590 [#5591]: https://github.com/tokio-rs/tokio/pull/5591 [#5607]: https://github.com/tokio-rs/tokio/pull/5607 [#5610]: https://github.com/tokio-rs/tokio/pull/5610 [#5611]: https://github.com/tokio-rs/tokio/pull/5611 [#5612]: https://github.com/tokio-rs/tokio/pull/5612 [#5618]: https://github.com/tokio-rs/tokio/pull/5618 [#5621]: https://github.com/tokio-rs/tokio/pull/5621 [#5645]: https://github.com/tokio-rs/tokio/pull/5645 [#5647]: https://github.com/tokio-rs/tokio/pull/5647 # 1.27.0 (March 27th, 2023) This release bumps the MSRV of Tokio to 1.56. ([#5559]) ### Added - io: add `async_io` helper method to sockets ([#5512]) - io: add implementations of `AsFd`/`AsHandle`/`AsSocket` ([#5514], [#5540]) - net: add `UdpSocket::peek_sender()` ([#5520]) - sync: add `RwLockWriteGuard::{downgrade_map, try_downgrade_map}` ([#5527]) - task: add `JoinHandle::abort_handle` ([#5543]) ### Changed - io: use `memchr` from `libc` ([#5558]) - macros: accept path as crate rename in `#[tokio::main]` ([#5557]) - macros: update to syn 2.0.0 ([#5572]) - time: don't register for a wakeup when `Interval` returns `Ready` ([#5553]) ### Fixed - fs: fuse std iterator in `ReadDir` ([#5555]) - tracing: fix `spawn_blocking` location fields ([#5573]) - time: clean up redundant check in `Wheel::poll()` ([#5574]) ### Documented - macros: define cancellation safety ([#5525]) - io: add details to docs of `tokio::io::copy[_buf]` ([#5575]) - io: refer to `ReaderStream` and `StreamReader` in module docs ([#5576]) [#5512]: https://github.com/tokio-rs/tokio/pull/5512 [#5514]: https://github.com/tokio-rs/tokio/pull/5514 [#5520]: https://github.com/tokio-rs/tokio/pull/5520 [#5525]: https://github.com/tokio-rs/tokio/pull/5525 [#5527]: https://github.com/tokio-rs/tokio/pull/5527 [#5540]: https://github.com/tokio-rs/tokio/pull/5540 [#5543]: https://github.com/tokio-rs/tokio/pull/5543 [#5553]: https://github.com/tokio-rs/tokio/pull/5553 [#5555]: https://github.com/tokio-rs/tokio/pull/5555 [#5557]: https://github.com/tokio-rs/tokio/pull/5557 [#5558]: https://github.com/tokio-rs/tokio/pull/5558 [#5559]: https://github.com/tokio-rs/tokio/pull/5559 [#5572]: https://github.com/tokio-rs/tokio/pull/5572 [#5573]: https://github.com/tokio-rs/tokio/pull/5573 [#5574]: https://github.com/tokio-rs/tokio/pull/5574 [#5575]: https://github.com/tokio-rs/tokio/pull/5575 [#5576]: https://github.com/tokio-rs/tokio/pull/5576 # 1.26.0 (March 1st, 2023) ### Fixed - macros: fix empty `join!` and `try_join!` ([#5504]) - sync: don't leak tracing spans in mutex guards ([#5469]) - sync: drop wakers after unlocking the mutex in Notify ([#5471]) - sync: drop wakers outside lock in semaphore ([#5475]) ### Added - fs: add `fs::try_exists` ([#4299]) - net: add types for named unix pipes ([#5351]) - sync: add `MappedOwnedMutexGuard` ([#5474]) ### Changed - chore: update windows-sys to 0.45 ([#5386]) - net: use Message Read Mode for named pipes ([#5350]) - sync: mark lock guards with `#[clippy::has_significant_drop]` ([#5422]) - sync: reduce contention in watch channel ([#5464]) - time: remove cache padding in timer entries ([#5468]) - time: Improve `Instant::now()` perf with test-util ([#5513]) ### Internal Changes - io: use `poll_fn` in `copy_bidirectional` ([#5486]) - net: refactor named pipe builders to not use bitfields ([#5477]) - rt: remove Arc from Clock ([#5434]) - sync: make `notify_waiters` calls atomic ([#5458]) - time: don't store deadline twice in sleep entries ([#5410]) ### Unstable - metrics: add a new metric for budget exhaustion yields ([#5517]) ### Documented - io: improve AsyncFd example ([#5481]) - runtime: document the nature of the main future ([#5494]) - runtime: remove extra period in docs ([#5511]) - signal: updated Documentation for Signals ([#5459]) - sync: add doc aliases for `blocking_*` methods ([#5448]) - sync: fix docs for Send/Sync bounds in broadcast ([#5480]) - sync: document drop behavior for channels ([#5497]) - task: clarify what happens to spawned work during runtime shutdown ([#5394]) - task: clarify `process::Command` docs ([#5413]) - task: fix wording with 'unsend' ([#5452]) - time: document immediate completion guarantee for timeouts ([#5509]) - tokio: document supported platforms ([#5483]) [#4299]: https://github.com/tokio-rs/tokio/pull/4299 [#5350]: https://github.com/tokio-rs/tokio/pull/5350 [#5351]: https://github.com/tokio-rs/tokio/pull/5351 [#5386]: https://github.com/tokio-rs/tokio/pull/5386 [#5394]: https://github.com/tokio-rs/tokio/pull/5394 [#5410]: https://github.com/tokio-rs/tokio/pull/5410 [#5413]: https://github.com/tokio-rs/tokio/pull/5413 [#5422]: https://github.com/tokio-rs/tokio/pull/5422 [#5434]: https://github.com/tokio-rs/tokio/pull/5434 [#5448]: https://github.com/tokio-rs/tokio/pull/5448 [#5452]: https://github.com/tokio-rs/tokio/pull/5452 [#5458]: https://github.com/tokio-rs/tokio/pull/5458 [#5459]: https://github.com/tokio-rs/tokio/pull/5459 [#5464]: https://github.com/tokio-rs/tokio/pull/5464 [#5468]: https://github.com/tokio-rs/tokio/pull/5468 [#5469]: https://github.com/tokio-rs/tokio/pull/5469 [#5471]: https://github.com/tokio-rs/tokio/pull/5471 [#5474]: https://github.com/tokio-rs/tokio/pull/5474 [#5475]: https://github.com/tokio-rs/tokio/pull/5475 [#5477]: https://github.com/tokio-rs/tokio/pull/5477 [#5480]: https://github.com/tokio-rs/tokio/pull/5480 [#5481]: https://github.com/tokio-rs/tokio/pull/5481 [#5483]: https://github.com/tokio-rs/tokio/pull/5483 [#5486]: https://github.com/tokio-rs/tokio/pull/5486 [#5494]: https://github.com/tokio-rs/tokio/pull/5494 [#5497]: https://github.com/tokio-rs/tokio/pull/5497 [#5504]: https://github.com/tokio-rs/tokio/pull/5504 [#5509]: https://github.com/tokio-rs/tokio/pull/5509 [#5511]: https://github.com/tokio-rs/tokio/pull/5511 [#5513]: https://github.com/tokio-rs/tokio/pull/5513 [#5517]: https://github.com/tokio-rs/tokio/pull/5517 # 1.25.3 (December 17th, 2023) ### Fixed - io: add budgeting to `tokio::runtime::io::registration::async_io` ([#6221]) [#6221]: https://github.com/tokio-rs/tokio/pull/6221 # 1.25.2 (September 22, 2023) Forward ports 1.20.6 changes. ### Changed - io: use `memchr` from `libc` ([#5960]) [#5960]: https://github.com/tokio-rs/tokio/pull/5960 # 1.25.1 (May 28, 2023) Forward ports 1.18.6 changes. ### Fixed - deps: disable default features for mio ([#5728]) [#5728]: https://github.com/tokio-rs/tokio/pull/5728 # 1.25.0 (January 28, 2023) ### Fixed - rt: fix runtime metrics reporting ([#5330]) ### Added - sync: add `broadcast::Sender::len` ([#5343]) ### Changed - fs: increase maximum read buffer size to 2MiB ([#5397]) [#5330]: https://github.com/tokio-rs/tokio/pull/5330 [#5343]: https://github.com/tokio-rs/tokio/pull/5343 [#5397]: https://github.com/tokio-rs/tokio/pull/5397 # 1.24.2 (January 17, 2023) Forward ports 1.18.5 changes. ### Fixed - io: fix unsoundness in `ReadHalf::unsplit` ([#5375]) [#5375]: https://github.com/tokio-rs/tokio/pull/5375 # 1.24.1 (January 6, 2022) This release fixes a compilation failure on targets without `AtomicU64` when using rustc older than 1.63. ([#5356]) [#5356]: https://github.com/tokio-rs/tokio/pull/5356 # 1.24.0 (January 5, 2022) ### Fixed - rt: improve native `AtomicU64` support detection ([#5284]) ### Added - rt: add configuration option for max number of I/O events polled from the OS per tick ([#5186]) - rt: add an environment variable for configuring the default number of worker threads per runtime instance ([#4250]) ### Changed - sync: reduce MPSC channel stack usage ([#5294]) - io: reduce lock contention in I/O operations ([#5300]) - fs: speed up `read_dir()` by chunking operations ([#5309]) - rt: use internal `ThreadId` implementation ([#5329]) - test: don't auto-advance time when a `spawn_blocking` task is running ([#5115]) [#5186]: https://github.com/tokio-rs/tokio/pull/5186 [#5294]: https://github.com/tokio-rs/tokio/pull/5294 [#5284]: https://github.com/tokio-rs/tokio/pull/5284 [#4250]: https://github.com/tokio-rs/tokio/pull/4250 [#5300]: https://github.com/tokio-rs/tokio/pull/5300 [#5329]: https://github.com/tokio-rs/tokio/pull/5329 [#5115]: https://github.com/tokio-rs/tokio/pull/5115 [#5309]: https://github.com/tokio-rs/tokio/pull/5309 # 1.23.1 (January 4, 2022) This release forward ports changes from 1.18.4. ### Fixed - net: fix Windows named pipe server builder to maintain option when toggling pipe mode ([#5336]). [#5336]: https://github.com/tokio-rs/tokio/pull/5336 # 1.23.0 (December 5, 2022) ### Fixed - net: fix Windows named pipe connect ([#5208]) - io: support vectored writes for `ChildStdin` ([#5216]) - io: fix `async fn ready()` false positive for OS-specific events ([#5231]) ### Changed - runtime: `yield_now` defers task until after driver poll ([#5223]) - runtime: reduce amount of codegen needed per spawned task ([#5213]) - windows: replace `winapi` dependency with `windows-sys` ([#5204]) [#5208]: https://github.com/tokio-rs/tokio/pull/5208 [#5216]: https://github.com/tokio-rs/tokio/pull/5216 [#5213]: https://github.com/tokio-rs/tokio/pull/5213 [#5204]: https://github.com/tokio-rs/tokio/pull/5204 [#5223]: https://github.com/tokio-rs/tokio/pull/5223 [#5231]: https://github.com/tokio-rs/tokio/pull/5231 # 1.22.0 (November 17, 2022) ### Added - runtime: add `Handle::runtime_flavor` ([#5138]) - sync: add `Mutex::blocking_lock_owned` ([#5130]) - sync: add `Semaphore::MAX_PERMITS` ([#5144]) - sync: add `merge()` to semaphore permits ([#4948]) - sync: add `mpsc::WeakUnboundedSender` ([#5189]) ### Added (unstable) - process: add `Command::process_group` ([#5114]) - runtime: export metrics about the blocking thread pool ([#5161]) - task: add `task::id()` and `task::try_id()` ([#5171]) ### Fixed - macros: don't take ownership of futures in macros ([#5087]) - runtime: fix Stacked Borrows violation in `LocalOwnedTasks` ([#5099]) - runtime: mitigate ABA with 32-bit queue indices when possible ([#5042]) - task: wake local tasks to the local queue when woken by the same thread ([#5095]) - time: panic in release mode when `mark_pending` called illegally ([#5093]) - runtime: fix typo in expect message ([#5169]) - runtime: fix `unsync_load` on atomic types ([#5175]) - task: elaborate safety comments in task deallocation ([#5172]) - runtime: fix `LocalSet` drop in thread local ([#5179]) - net: remove libc type leakage in a public API ([#5191]) - runtime: update the alignment of `CachePadded` ([#5106]) ### Changed - io: make `tokio::io::copy` continue filling the buffer when writer stalls ([#5066]) - runtime: remove `coop::budget` from `LocalSet::run_until` ([#5155]) - sync: make `Notify` panic safe ([#5154]) ### Documented - io: fix doc for `write_i8` to use signed integers ([#5040]) - net: fix doc typos for TCP and UDP `set_tos` methods ([#5073]) - net: fix function name in `UdpSocket::recv` documentation ([#5150]) - sync: typo in `TryLockError` for `RwLock::try_write` ([#5160]) - task: document that spawned tasks execute immediately ([#5117]) - time: document return type of `timeout` ([#5118]) - time: document that `timeout` checks only before poll ([#5126]) - sync: specify return type of `oneshot::Receiver` in docs ([#5198]) ### Internal changes - runtime: use const `Mutex::new` for globals ([#5061]) - runtime: remove `Option` around `mio::Events` in io driver ([#5078]) - runtime: remove a conditional compilation clause ([#5104]) - runtime: remove a reference to internal time handle ([#5107]) - runtime: misc time driver cleanup ([#5120]) - runtime: move signal driver to runtime module ([#5121]) - runtime: signal driver now uses I/O driver directly ([#5125]) - runtime: start decoupling I/O driver and I/O handle ([#5127]) - runtime: switch `io::handle` refs with scheduler:Handle ([#5128]) - runtime: remove Arc from I/O driver ([#5134]) - runtime: use signal driver handle via `scheduler::Handle` ([#5135]) - runtime: move internal clock fns out of context ([#5139]) - runtime: remove `runtime::context` module ([#5140]) - runtime: keep driver cfgs in `driver.rs` ([#5141]) - runtime: add `runtime::context` to unify thread-locals ([#5143]) - runtime: rename some confusing internal variables/fns ([#5151]) - runtime: move `coop` mod into `runtime` ([#5152]) - runtime: move budget state to context thread-local ([#5157]) - runtime: move park logic into runtime module ([#5158]) - runtime: move `Runtime` into its own file ([#5159]) - runtime: unify entering a runtime with `Handle::enter` ([#5163]) - runtime: remove handle reference from each scheduler ([#5166]) - runtime: move `enter` into `context` ([#5167]) - runtime: combine context and entered thread-locals ([#5168]) - runtime: fix accidental unsetting of current handle ([#5178]) - runtime: move `CoreStage` methods to `Core` ([#5182]) - sync: name mpsc semaphore types ([#5146]) [#4948]: https://github.com/tokio-rs/tokio/pull/4948 [#5040]: https://github.com/tokio-rs/tokio/pull/5040 [#5042]: https://github.com/tokio-rs/tokio/pull/5042 [#5061]: https://github.com/tokio-rs/tokio/pull/5061 [#5066]: https://github.com/tokio-rs/tokio/pull/5066 [#5073]: https://github.com/tokio-rs/tokio/pull/5073 [#5078]: https://github.com/tokio-rs/tokio/pull/5078 [#5087]: https://github.com/tokio-rs/tokio/pull/5087 [#5093]: https://github.com/tokio-rs/tokio/pull/5093 [#5095]: https://github.com/tokio-rs/tokio/pull/5095 [#5099]: https://github.com/tokio-rs/tokio/pull/5099 [#5104]: https://github.com/tokio-rs/tokio/pull/5104 [#5106]: https://github.com/tokio-rs/tokio/pull/5106 [#5107]: https://github.com/tokio-rs/tokio/pull/5107 [#5114]: https://github.com/tokio-rs/tokio/pull/5114 [#5117]: https://github.com/tokio-rs/tokio/pull/5117 [#5118]: https://github.com/tokio-rs/tokio/pull/5118 [#5120]: https://github.com/tokio-rs/tokio/pull/5120 [#5121]: https://github.com/tokio-rs/tokio/pull/5121 [#5125]: https://github.com/tokio-rs/tokio/pull/5125 [#5126]: https://github.com/tokio-rs/tokio/pull/5126 [#5127]: https://github.com/tokio-rs/tokio/pull/5127 [#5128]: https://github.com/tokio-rs/tokio/pull/5128 [#5130]: https://github.com/tokio-rs/tokio/pull/5130 [#5134]: https://github.com/tokio-rs/tokio/pull/5134 [#5135]: https://github.com/tokio-rs/tokio/pull/5135 [#5138]: https://github.com/tokio-rs/tokio/pull/5138 [#5138]: https://github.com/tokio-rs/tokio/pull/5138 [#5139]: https://github.com/tokio-rs/tokio/pull/5139 [#5140]: https://github.com/tokio-rs/tokio/pull/5140 [#5141]: https://github.com/tokio-rs/tokio/pull/5141 [#5143]: https://github.com/tokio-rs/tokio/pull/5143 [#5144]: https://github.com/tokio-rs/tokio/pull/5144 [#5144]: https://github.com/tokio-rs/tokio/pull/5144 [#5146]: https://github.com/tokio-rs/tokio/pull/5146 [#5150]: https://github.com/tokio-rs/tokio/pull/5150 [#5151]: https://github.com/tokio-rs/tokio/pull/5151 [#5152]: https://github.com/tokio-rs/tokio/pull/5152 [#5154]: https://github.com/tokio-rs/tokio/pull/5154 [#5155]: https://github.com/tokio-rs/tokio/pull/5155 [#5157]: https://github.com/tokio-rs/tokio/pull/5157 [#5158]: https://github.com/tokio-rs/tokio/pull/5158 [#5159]: https://github.com/tokio-rs/tokio/pull/5159 [#5160]: https://github.com/tokio-rs/tokio/pull/5160 [#5161]: https://github.com/tokio-rs/tokio/pull/5161 [#5163]: https://github.com/tokio-rs/tokio/pull/5163 [#5166]: https://github.com/tokio-rs/tokio/pull/5166 [#5167]: https://github.com/tokio-rs/tokio/pull/5167 [#5168]: https://github.com/tokio-rs/tokio/pull/5168 [#5169]: https://github.com/tokio-rs/tokio/pull/5169 [#5171]: https://github.com/tokio-rs/tokio/pull/5171 [#5172]: https://github.com/tokio-rs/tokio/pull/5172 [#5175]: https://github.com/tokio-rs/tokio/pull/5175 [#5178]: https://github.com/tokio-rs/tokio/pull/5178 [#5179]: https://github.com/tokio-rs/tokio/pull/5179 [#5182]: https://github.com/tokio-rs/tokio/pull/5182 [#5189]: https://github.com/tokio-rs/tokio/pull/5189 [#5191]: https://github.com/tokio-rs/tokio/pull/5191 [#5198]: https://github.com/tokio-rs/tokio/pull/5198 # 1.21.2 (September 27, 2022) This release removes the dependency on the `once_cell` crate to restore the MSRV of 1.21.x, which is the latest minor version at the time of release. ([#5048]) [#5048]: https://github.com/tokio-rs/tokio/pull/5048 # 1.21.1 (September 13, 2022) ### Fixed - net: fix dependency resolution for socket2 ([#5000]) - task: ignore failure to set TLS in `LocalSet` Drop ([#4976]) [#4976]: https://github.com/tokio-rs/tokio/pull/4976 [#5000]: https://github.com/tokio-rs/tokio/pull/5000 # 1.21.0 (September 2, 2022) This release is the first release of Tokio to intentionally support WASM. The `sync,macros,io-util,rt,time` features are stabilized on WASM. Additionally the wasm32-wasi target is given unstable support for the `net` feature. ### Added - net: add `device` and `bind_device` methods to TCP/UDP sockets ([#4882]) - net: add `tos` and `set_tos` methods to TCP and UDP sockets ([#4877]) - net: add security flags to named pipe `ServerOptions` ([#4845]) - signal: add more windows signal handlers ([#4924]) - sync: add `mpsc::Sender::max_capacity` method ([#4904]) - sync: implement Weak version of `mpsc::Sender` ([#4595]) - task: add `LocalSet::enter` ([#4765]) - task: stabilize `JoinSet` and `AbortHandle` ([#4920]) - tokio: add `track_caller` to public APIs ([#4805], [#4848], [#4852]) - wasm: initial support for `wasm32-wasi` target ([#4716]) ### Fixed - miri: improve miri compatibility by avoiding temporary references in `linked_list::Link` impls ([#4841]) - signal: don't register write interest on signal pipe ([#4898]) - sync: add `#[must_use]` to lock guards ([#4886]) - sync: fix hang when calling `recv` on closed and reopened broadcast channel ([#4867]) - task: propagate attributes on task-locals ([#4837]) ### Changed - fs: change panic to error in `File::start_seek` ([#4897]) - io: reduce syscalls in `poll_read` ([#4840]) - process: use blocking threadpool for child stdio I/O ([#4824]) - signal: make `SignalKind` methods const ([#4956]) ### Internal changes - rt: extract `basic_scheduler::Config` ([#4935]) - rt: move I/O driver into `runtime` module ([#4942]) - rt: rename internal scheduler types ([#4945]) ### Documented - chore: fix typos and grammar ([#4858], [#4894], [#4928]) - io: fix typo in `AsyncSeekExt::rewind` docs ([#4893]) - net: add documentation to `try_read()` for zero-length buffers ([#4937]) - runtime: remove incorrect panic section for `Builder::worker_threads` ([#4849]) - sync: doc of `watch::Sender::send` improved ([#4959]) - task: add cancel safety docs to `JoinHandle` ([#4901]) - task: expand on cancellation of `spawn_blocking` ([#4811]) - time: clarify that the first tick of `Interval::tick` happens immediately ([#4951]) ### Unstable - rt: add unstable option to disable the LIFO slot ([#4936]) - task: fix incorrect signature in `Builder::spawn_on` ([#4953]) - task: make `task::Builder::spawn*` methods fallible ([#4823]) [#4595]: https://github.com/tokio-rs/tokio/pull/4595 [#4716]: https://github.com/tokio-rs/tokio/pull/4716 [#4765]: https://github.com/tokio-rs/tokio/pull/4765 [#4805]: https://github.com/tokio-rs/tokio/pull/4805 [#4811]: https://github.com/tokio-rs/tokio/pull/4811 [#4823]: https://github.com/tokio-rs/tokio/pull/4823 [#4824]: https://github.com/tokio-rs/tokio/pull/4824 [#4837]: https://github.com/tokio-rs/tokio/pull/4837 [#4840]: https://github.com/tokio-rs/tokio/pull/4840 [#4841]: https://github.com/tokio-rs/tokio/pull/4841 [#4845]: https://github.com/tokio-rs/tokio/pull/4845 [#4848]: https://github.com/tokio-rs/tokio/pull/4848 [#4849]: https://github.com/tokio-rs/tokio/pull/4849 [#4852]: https://github.com/tokio-rs/tokio/pull/4852 [#4858]: https://github.com/tokio-rs/tokio/pull/4858 [#4867]: https://github.com/tokio-rs/tokio/pull/4867 [#4877]: https://github.com/tokio-rs/tokio/pull/4877 [#4882]: https://github.com/tokio-rs/tokio/pull/4882 [#4886]: https://github.com/tokio-rs/tokio/pull/4886 [#4893]: https://github.com/tokio-rs/tokio/pull/4893 [#4894]: https://github.com/tokio-rs/tokio/pull/4894 [#4897]: https://github.com/tokio-rs/tokio/pull/4897 [#4898]: https://github.com/tokio-rs/tokio/pull/4898 [#4901]: https://github.com/tokio-rs/tokio/pull/4901 [#4904]: https://github.com/tokio-rs/tokio/pull/4904 [#4920]: https://github.com/tokio-rs/tokio/pull/4920 [#4924]: https://github.com/tokio-rs/tokio/pull/4924 [#4928]: https://github.com/tokio-rs/tokio/pull/4928 [#4935]: https://github.com/tokio-rs/tokio/pull/4935 [#4936]: https://github.com/tokio-rs/tokio/pull/4936 [#4937]: https://github.com/tokio-rs/tokio/pull/4937 [#4942]: https://github.com/tokio-rs/tokio/pull/4942 [#4945]: https://github.com/tokio-rs/tokio/pull/4945 [#4951]: https://github.com/tokio-rs/tokio/pull/4951 [#4953]: https://github.com/tokio-rs/tokio/pull/4953 [#4956]: https://github.com/tokio-rs/tokio/pull/4956 [#4959]: https://github.com/tokio-rs/tokio/pull/4959 # 1.20.6 (September 22, 2023) This is a backport of a change from 1.27.0. ### Changed - io: use `memchr` from `libc` ([#5960]) [#5960]: https://github.com/tokio-rs/tokio/pull/5960 # 1.20.5 (May 28, 2023) Forward ports 1.18.6 changes. ### Fixed - deps: disable default features for mio ([#5728]) [#5728]: https://github.com/tokio-rs/tokio/pull/5728 # 1.20.4 (January 17, 2023) Forward ports 1.18.5 changes. ### Fixed - io: fix unsoundness in `ReadHalf::unsplit` ([#5375]) [#5375]: https://github.com/tokio-rs/tokio/pull/5375 # 1.20.3 (January 3, 2022) This release forward ports changes from 1.18.4. ### Fixed - net: fix Windows named pipe server builder to maintain option when toggling pipe mode ([#5336]). [#5336]: https://github.com/tokio-rs/tokio/pull/5336 # 1.20.2 (September 27, 2022) This release removes the dependency on the `once_cell` crate to restore the MSRV of the 1.20.x LTS release. ([#5048]) [#5048]: https://github.com/tokio-rs/tokio/pull/5048 # 1.20.1 (July 25, 2022) ### Fixed - chore: fix version detection in build script ([#4860]) [#4860]: https://github.com/tokio-rs/tokio/pull/4860 # 1.20.0 (July 12, 2022) ### Added - tokio: add `track_caller` to public APIs ([#4772], [#4791], [#4793], [#4806], [#4808]) - sync: Add `has_changed` method to `watch::Ref` ([#4758]) ### Changed - time: remove `src/time/driver/wheel/stack.rs` ([#4766]) - rt: clean up arguments passed to basic scheduler ([#4767]) - net: be more specific about winapi features ([#4764]) - tokio: use const initialized thread locals where possible ([#4677]) - task: various small improvements to LocalKey ([#4795]) ### Documented - fs: warn about performance pitfall ([#4762]) - chore: fix spelling ([#4769]) - sync: document spurious failures in oneshot ([#4777]) - sync: add warning for watch in non-Send futures ([#4741]) - chore: fix typo ([#4798]) ### Unstable - joinset: rename `join_one` to `join_next` ([#4755]) - rt: unhandled panic config for current thread rt ([#4770]) [#4677]: https://github.com/tokio-rs/tokio/pull/4677 [#4741]: https://github.com/tokio-rs/tokio/pull/4741 [#4755]: https://github.com/tokio-rs/tokio/pull/4755 [#4758]: https://github.com/tokio-rs/tokio/pull/4758 [#4762]: https://github.com/tokio-rs/tokio/pull/4762 [#4764]: https://github.com/tokio-rs/tokio/pull/4764 [#4766]: https://github.com/tokio-rs/tokio/pull/4766 [#4767]: https://github.com/tokio-rs/tokio/pull/4767 [#4769]: https://github.com/tokio-rs/tokio/pull/4769 [#4770]: https://github.com/tokio-rs/tokio/pull/4770 [#4772]: https://github.com/tokio-rs/tokio/pull/4772 [#4777]: https://github.com/tokio-rs/tokio/pull/4777 [#4791]: https://github.com/tokio-rs/tokio/pull/4791 [#4793]: https://github.com/tokio-rs/tokio/pull/4793 [#4795]: https://github.com/tokio-rs/tokio/pull/4795 [#4798]: https://github.com/tokio-rs/tokio/pull/4798 [#4806]: https://github.com/tokio-rs/tokio/pull/4806 [#4808]: https://github.com/tokio-rs/tokio/pull/4808 # 1.19.2 (June 6, 2022) This release fixes another bug in `Notified::enable`. ([#4751]) [#4751]: https://github.com/tokio-rs/tokio/pull/4751 # 1.19.1 (June 5, 2022) This release fixes a bug in `Notified::enable`. ([#4747]) [#4747]: https://github.com/tokio-rs/tokio/pull/4747 # 1.19.0 (June 3, 2022) ### Added - runtime: add `is_finished` method for `JoinHandle` and `AbortHandle` ([#4709]) - runtime: make global queue and event polling intervals configurable ([#4671]) - sync: add `Notified::enable` ([#4705]) - sync: add `watch::Sender::send_if_modified` ([#4591]) - sync: add resubscribe method to broadcast::Receiver ([#4607]) - net: add `take_error` to `TcpSocket` and `TcpStream` ([#4739]) ### Changed - io: refactor out usage of Weak in the io handle ([#4656]) ### Fixed - macros: avoid starvation in `join!` and `try_join!` ([#4624]) ### Documented - runtime: clarify semantics of tasks outliving `block_on` ([#4729]) - time: fix example for `MissedTickBehavior::Burst` ([#4713]) ### Unstable - metrics: correctly update atomics in `IoDriverMetrics` ([#4725]) - metrics: fix compilation with unstable, process, and rt, but without net ([#4682]) - task: add `#[track_caller]` to `JoinSet`/`JoinMap` ([#4697]) - task: add `Builder::{spawn_on, spawn_local_on, spawn_blocking_on}` ([#4683]) - task: add `consume_budget` for cooperative scheduling ([#4498]) - task: add `join_set::Builder` for configuring `JoinSet` tasks ([#4687]) - task: update return value of `JoinSet::join_one` ([#4726]) [#4498]: https://github.com/tokio-rs/tokio/pull/4498 [#4591]: https://github.com/tokio-rs/tokio/pull/4591 [#4607]: https://github.com/tokio-rs/tokio/pull/4607 [#4624]: https://github.com/tokio-rs/tokio/pull/4624 [#4656]: https://github.com/tokio-rs/tokio/pull/4656 [#4671]: https://github.com/tokio-rs/tokio/pull/4671 [#4682]: https://github.com/tokio-rs/tokio/pull/4682 [#4683]: https://github.com/tokio-rs/tokio/pull/4683 [#4687]: https://github.com/tokio-rs/tokio/pull/4687 [#4697]: https://github.com/tokio-rs/tokio/pull/4697 [#4705]: https://github.com/tokio-rs/tokio/pull/4705 [#4709]: https://github.com/tokio-rs/tokio/pull/4709 [#4713]: https://github.com/tokio-rs/tokio/pull/4713 [#4725]: https://github.com/tokio-rs/tokio/pull/4725 [#4726]: https://github.com/tokio-rs/tokio/pull/4726 [#4729]: https://github.com/tokio-rs/tokio/pull/4729 [#4739]: https://github.com/tokio-rs/tokio/pull/4739 # 1.18.6 (May 28, 2023) ### Fixed - deps: disable default features for mio ([#5728]) [#5728]: https://github.com/tokio-rs/tokio/pull/5728 # 1.18.5 (January 17, 2023) ### Fixed - io: fix unsoundness in `ReadHalf::unsplit` ([#5375]) [#5375]: https://github.com/tokio-rs/tokio/pull/5375 # 1.18.4 (January 3, 2022) ### Fixed - net: fix Windows named pipe server builder to maintain option when toggling pipe mode ([#5336]). [#5336]: https://github.com/tokio-rs/tokio/pull/5336 # 1.18.3 (September 27, 2022) This release removes the dependency on the `once_cell` crate to restore the MSRV of the 1.18.x LTS release. ([#5048]) [#5048]: https://github.com/tokio-rs/tokio/pull/5048 # 1.18.2 (May 5, 2022) Add missing features for the `winapi` dependency. ([#4663]) [#4663]: https://github.com/tokio-rs/tokio/pull/4663 # 1.18.1 (May 2, 2022) The 1.18.0 release broke the build for targets without 64-bit atomics when building with `tokio_unstable`. This release fixes that. ([#4649]) [#4649]: https://github.com/tokio-rs/tokio/pull/4649 # 1.18.0 (April 27, 2022) This release adds a number of new APIs in `tokio::net`, `tokio::signal`, and `tokio::sync`. In addition, it adds new unstable APIs to `tokio::task` (`Id`s for uniquely identifying a task, and `AbortHandle` for remotely cancelling a task), as well as a number of bugfixes. ### Fixed - blocking: add missing `#[track_caller]` for `spawn_blocking` ([#4616]) - macros: fix `select` macro to process 64 branches ([#4519]) - net: fix `try_io` methods not calling Mio's `try_io` internally ([#4582]) - runtime: recover when OS fails to spawn a new thread ([#4485]) ### Added - net: add `UdpSocket::peer_addr` ([#4611]) - net: add `try_read_buf` method for named pipes ([#4626]) - signal: add `SignalKind` `Hash`/`Eq` impls and `c_int` conversion ([#4540]) - signal: add support for signals up to `SIGRTMAX` ([#4555]) - sync: add `watch::Sender::send_modify` method ([#4310]) - sync: add `broadcast::Receiver::len` method ([#4542]) - sync: add `watch::Receiver::same_channel` method ([#4581]) - sync: implement `Clone` for `RecvError` types ([#4560]) ### Changed - update `mio` to 0.8.1 ([#4582]) - macros: rename `tokio::select!`'s internal `util` module ([#4543]) - runtime: use `Vec::with_capacity` when building runtime ([#4553]) ### Documented - improve docs for `tokio_unstable` ([#4524]) - runtime: include more documentation for thread_pool/worker ([#4511]) - runtime: update `Handle::current`'s docs to mention `EnterGuard` ([#4567]) - time: clarify platform specific timer resolution ([#4474]) - signal: document that `Signal::recv` is cancel-safe ([#4634]) - sync: `UnboundedReceiver` close docs ([#4548]) ### Unstable The following changes only apply when building with `--cfg tokio_unstable`: - task: add `task::Id` type ([#4630]) - task: add `AbortHandle` type for cancelling tasks in a `JoinSet` ([#4530], [#4640]) - task: fix missing `doc(cfg(...))` attributes for `JoinSet` ([#4531]) - task: fix broken link in `AbortHandle` RustDoc ([#4545]) - metrics: add initial IO driver metrics ([#4507]) [#4616]: https://github.com/tokio-rs/tokio/pull/4616 [#4519]: https://github.com/tokio-rs/tokio/pull/4519 [#4582]: https://github.com/tokio-rs/tokio/pull/4582 [#4485]: https://github.com/tokio-rs/tokio/pull/4485 [#4613]: https://github.com/tokio-rs/tokio/pull/4613 [#4611]: https://github.com/tokio-rs/tokio/pull/4611 [#4626]: https://github.com/tokio-rs/tokio/pull/4626 [#4540]: https://github.com/tokio-rs/tokio/pull/4540 [#4555]: https://github.com/tokio-rs/tokio/pull/4555 [#4310]: https://github.com/tokio-rs/tokio/pull/4310 [#4542]: https://github.com/tokio-rs/tokio/pull/4542 [#4581]: https://github.com/tokio-rs/tokio/pull/4581 [#4560]: https://github.com/tokio-rs/tokio/pull/4560 [#4631]: https://github.com/tokio-rs/tokio/pull/4631 [#4582]: https://github.com/tokio-rs/tokio/pull/4582 [#4543]: https://github.com/tokio-rs/tokio/pull/4543 [#4553]: https://github.com/tokio-rs/tokio/pull/4553 [#4524]: https://github.com/tokio-rs/tokio/pull/4524 [#4511]: https://github.com/tokio-rs/tokio/pull/4511 [#4567]: https://github.com/tokio-rs/tokio/pull/4567 [#4474]: https://github.com/tokio-rs/tokio/pull/4474 [#4634]: https://github.com/tokio-rs/tokio/pull/4634 [#4548]: https://github.com/tokio-rs/tokio/pull/4548 [#4630]: https://github.com/tokio-rs/tokio/pull/4630 [#4530]: https://github.com/tokio-rs/tokio/pull/4530 [#4640]: https://github.com/tokio-rs/tokio/pull/4640 [#4531]: https://github.com/tokio-rs/tokio/pull/4531 [#4545]: https://github.com/tokio-rs/tokio/pull/4545 [#4507]: https://github.com/tokio-rs/tokio/pull/4507 # 1.17.0 (February 16, 2022) This release updates the minimum supported Rust version (MSRV) to 1.49, the `mio` dependency to v0.8, and the (optional) `parking_lot` dependency to v0.12. Additionally, it contains several bug fixes, as well as internal refactoring and performance improvements. ### Fixed - time: prevent panicking in `sleep` with large durations ([#4495]) - time: eliminate potential panics in `Instant` arithmetic on platforms where `Instant::now` is not monotonic ([#4461]) - io: fix `DuplexStream` not participating in cooperative yielding ([#4478]) - rt: fix potential double panic when dropping a `JoinHandle` ([#4430]) ### Changed - update minimum supported Rust version to 1.49 ([#4457]) - update `parking_lot` dependency to v0.12.0 ([#4459]) - update `mio` dependency to v0.8 ([#4449]) - rt: remove an unnecessary lock in the blocking pool ([#4436]) - rt: remove an unnecessary enum in the basic scheduler ([#4462]) - time: use bit manipulation instead of modulo to improve performance ([#4480]) - net: use `std::future::Ready` instead of our own `Ready` future ([#4271]) - replace deprecated `atomic::spin_loop_hint` with `hint::spin_loop` ([#4491]) - fix miri failures in intrusive linked lists ([#4397]) ### Documented - io: add an example for `tokio::process::ChildStdin` ([#4479]) ### Unstable The following changes only apply when building with `--cfg tokio_unstable`: - task: fix missing location information in `tracing` spans generated by `spawn_local` ([#4483]) - task: add `JoinSet` for managing sets of tasks ([#4335]) - metrics: fix compilation error on MIPS ([#4475]) - metrics: fix compilation error on arm32v7 ([#4453]) [#4495]: https://github.com/tokio-rs/tokio/pull/4495 [#4461]: https://github.com/tokio-rs/tokio/pull/4461 [#4478]: https://github.com/tokio-rs/tokio/pull/4478 [#4430]: https://github.com/tokio-rs/tokio/pull/4430 [#4457]: https://github.com/tokio-rs/tokio/pull/4457 [#4459]: https://github.com/tokio-rs/tokio/pull/4459 [#4449]: https://github.com/tokio-rs/tokio/pull/4449 [#4462]: https://github.com/tokio-rs/tokio/pull/4462 [#4436]: https://github.com/tokio-rs/tokio/pull/4436 [#4480]: https://github.com/tokio-rs/tokio/pull/4480 [#4271]: https://github.com/tokio-rs/tokio/pull/4271 [#4491]: https://github.com/tokio-rs/tokio/pull/4491 [#4397]: https://github.com/tokio-rs/tokio/pull/4397 [#4479]: https://github.com/tokio-rs/tokio/pull/4479 [#4483]: https://github.com/tokio-rs/tokio/pull/4483 [#4335]: https://github.com/tokio-rs/tokio/pull/4335 [#4475]: https://github.com/tokio-rs/tokio/pull/4475 [#4453]: https://github.com/tokio-rs/tokio/pull/4453 # 1.16.1 (January 28, 2022) This release fixes a bug in [#4428] with the change [#4437]. [#4428]: https://github.com/tokio-rs/tokio/pull/4428 [#4437]: https://github.com/tokio-rs/tokio/pull/4437 # 1.16.0 (January 27, 2022) Fixes a soundness bug in `io::Take` ([#4428]). The unsoundness is exposed when leaking memory in the given `AsyncRead` implementation and then overwriting the supplied buffer: ```rust impl AsyncRead for Buggy { fn poll_read( self: Pin<&mut Self>, cx: &mut Context<'_>, buf: &mut ReadBuf<'_> ) -> Poll> { let new_buf = vec![0; 5].leak(); *buf = ReadBuf::new(new_buf); buf.put_slice(b"hello"); Poll::Ready(Ok(())) } } ``` Also, this release includes improvements to the multi-threaded scheduler that can increase throughput by up to 20% in some cases ([#4383]). ### Fixed - io: **soundness** don't expose uninitialized memory when using `io::Take` in edge case ([#4428]) - fs: ensure `File::write` results in a `write` syscall when the runtime shuts down ([#4316]) - process: drop pipe after child exits in `wait_with_output` ([#4315]) - rt: improve error message when spawning a thread fails ([#4398]) - rt: reduce false-positive thread wakups in the multi-threaded scheduler ([#4383]) - sync: don't inherit `Send` from `parking_lot::*Guard` ([#4359]) ### Added - net: `TcpSocket::linger()` and `set_linger()` ([#4324]) - net: impl `UnwindSafe` for socket types ([#4384]) - rt: impl `UnwindSafe` for `JoinHandle` ([#4418]) - sync: `watch::Receiver::has_changed()` ([#4342]) - sync: `oneshot::Receiver::blocking_recv()` ([#4334]) - sync: `RwLock` blocking operations ([#4425]) ### Unstable The following changes only apply when building with `--cfg tokio_unstable` - rt: **breaking change** overhaul runtime metrics API ([#4373]) [#4428]: https://github.com/tokio-rs/tokio/pull/4428 [#4316]: https://github.com/tokio-rs/tokio/pull/4316 [#4315]: https://github.com/tokio-rs/tokio/pull/4315 [#4398]: https://github.com/tokio-rs/tokio/pull/4398 [#4383]: https://github.com/tokio-rs/tokio/pull/4383 [#4359]: https://github.com/tokio-rs/tokio/pull/4359 [#4324]: https://github.com/tokio-rs/tokio/pull/4324 [#4384]: https://github.com/tokio-rs/tokio/pull/4384 [#4418]: https://github.com/tokio-rs/tokio/pull/4418 [#4342]: https://github.com/tokio-rs/tokio/pull/4342 [#4334]: https://github.com/tokio-rs/tokio/pull/4334 [#4425]: https://github.com/tokio-rs/tokio/pull/4425 [#4373]: https://github.com/tokio-rs/tokio/pull/4373 # 1.15.0 (December 15, 2021) ### Fixed - io: add cooperative yielding support to `io::empty()` ([#4300]) - time: make timeout robust against budget-depleting tasks ([#4314]) ### Changed - update minimum supported Rust version to 1.46. ### Added - time: add `Interval::reset()` ([#4248]) - io: add explicit lifetimes to `AsyncFdReadyGuard` ([#4267]) - process: add `Command::as_std()` ([#4295]) ### Added (unstable) - tracing: instrument `tokio::sync` types ([#4302]) [#4302]: https://github.com/tokio-rs/tokio/pull/4302 [#4300]: https://github.com/tokio-rs/tokio/pull/4300 [#4295]: https://github.com/tokio-rs/tokio/pull/4295 [#4267]: https://github.com/tokio-rs/tokio/pull/4267 [#4248]: https://github.com/tokio-rs/tokio/pull/4248 [#4314]: https://github.com/tokio-rs/tokio/pull/4314 # 1.14.0 (November 15, 2021) ### Fixed - macros: fix compiler errors when using `mut` patterns in `select!` ([#4211]) - sync: fix a data race between `oneshot::Sender::send` and awaiting a `oneshot::Receiver` when the oneshot has been closed ([#4226]) - sync: make `AtomicWaker` panic safe ([#3689]) - runtime: fix basic scheduler dropping tasks outside a runtime context ([#4213]) ### Added - stats: add `RuntimeStats::busy_duration_total` ([#4179], [#4223]) ### Changed - io: updated `copy` buffer size to match `std::io::copy` ([#4209]) ### Documented - io: rename buffer to file in doc-test ([#4230]) - sync: fix Notify example ([#4212]) [#4211]: https://github.com/tokio-rs/tokio/pull/4211 [#4226]: https://github.com/tokio-rs/tokio/pull/4226 [#3689]: https://github.com/tokio-rs/tokio/pull/3689 [#4213]: https://github.com/tokio-rs/tokio/pull/4213 [#4179]: https://github.com/tokio-rs/tokio/pull/4179 [#4223]: https://github.com/tokio-rs/tokio/pull/4223 [#4209]: https://github.com/tokio-rs/tokio/pull/4209 [#4230]: https://github.com/tokio-rs/tokio/pull/4230 [#4212]: https://github.com/tokio-rs/tokio/pull/4212 # 1.13.1 (November 15, 2021) ### Fixed - sync: fix a data race between `oneshot::Sender::send` and awaiting a `oneshot::Receiver` when the oneshot has been closed ([#4226]) [#4226]: https://github.com/tokio-rs/tokio/pull/4226 # 1.13.0 (October 29, 2021) ### Fixed - sync: fix `Notify` to clone the waker before locking its waiter list ([#4129]) - tokio: add riscv32 to non atomic64 architectures ([#4185]) ### Added - net: add `poll_{recv,send}_ready` methods to `udp` and `uds_datagram` ([#4131]) - net: add `try_*`, `readable`, `writable`, `ready`, and `peer_addr` methods to split halves ([#4120]) - sync: add `blocking_lock` to `Mutex` ([#4130]) - sync: add `watch::Sender::send_replace` ([#3962], [#4195]) - sync: expand `Debug` for `Mutex` impl to unsized `T` ([#4134]) - tracing: instrument time::Sleep ([#4072]) - tracing: use structured location fields for spawned tasks ([#4128]) ### Changed - io: add assert in `copy_bidirectional` that `poll_write` is sensible ([#4125]) - macros: use qualified syntax when polling in `select!` ([#4192]) - runtime: handle `block_on` wakeups better ([#4157]) - task: allocate callback on heap immediately in debug mode ([#4203]) - tokio: assert platform-minimum requirements at build time ([#3797]) ### Documented - docs: conversion of doc comments to indicative mood ([#4174]) - docs: add returning on the first error example for `try_join!` ([#4133]) - docs: fixing broken links in `tokio/src/lib.rs` ([#4132]) - signal: add example with background listener ([#4171]) - sync: add more oneshot examples ([#4153]) - time: document `Interval::tick` cancel safety ([#4152]) [#3797]: https://github.com/tokio-rs/tokio/pull/3797 [#3962]: https://github.com/tokio-rs/tokio/pull/3962 [#4072]: https://github.com/tokio-rs/tokio/pull/4072 [#4120]: https://github.com/tokio-rs/tokio/pull/4120 [#4125]: https://github.com/tokio-rs/tokio/pull/4125 [#4128]: https://github.com/tokio-rs/tokio/pull/4128 [#4129]: https://github.com/tokio-rs/tokio/pull/4129 [#4130]: https://github.com/tokio-rs/tokio/pull/4130 [#4131]: https://github.com/tokio-rs/tokio/pull/4131 [#4132]: https://github.com/tokio-rs/tokio/pull/4132 [#4133]: https://github.com/tokio-rs/tokio/pull/4133 [#4134]: https://github.com/tokio-rs/tokio/pull/4134 [#4152]: https://github.com/tokio-rs/tokio/pull/4152 [#4153]: https://github.com/tokio-rs/tokio/pull/4153 [#4157]: https://github.com/tokio-rs/tokio/pull/4157 [#4171]: https://github.com/tokio-rs/tokio/pull/4171 [#4174]: https://github.com/tokio-rs/tokio/pull/4174 [#4185]: https://github.com/tokio-rs/tokio/pull/4185 [#4192]: https://github.com/tokio-rs/tokio/pull/4192 [#4195]: https://github.com/tokio-rs/tokio/pull/4195 [#4203]: https://github.com/tokio-rs/tokio/pull/4203 # 1.12.0 (September 21, 2021) ### Fixed - mpsc: ensure `try_reserve` error is consistent with `try_send` ([#4119]) - mpsc: use `spin_loop_hint` instead of `yield_now` ([#4115]) - sync: make `SendError` field public ([#4097]) ### Added - io: add POSIX AIO on FreeBSD ([#4054]) - io: add convenience method `AsyncSeekExt::rewind` ([#4107]) - runtime: add tracing span for `block_on` futures ([#4094]) - runtime: callback when a worker parks and unparks ([#4070]) - sync: implement `try_recv` for mpsc channels ([#4113]) ### Documented - docs: clarify CPU-bound tasks on Tokio ([#4105]) - mpsc: document spurious failures on `poll_recv` ([#4117]) - mpsc: document that `PollSender` impls `Sink` ([#4110]) - task: document non-guarantees of `yield_now` ([#4091]) - time: document paused time details better ([#4061], [#4103]) [#4027]: https://github.com/tokio-rs/tokio/pull/4027 [#4054]: https://github.com/tokio-rs/tokio/pull/4054 [#4061]: https://github.com/tokio-rs/tokio/pull/4061 [#4070]: https://github.com/tokio-rs/tokio/pull/4070 [#4091]: https://github.com/tokio-rs/tokio/pull/4091 [#4094]: https://github.com/tokio-rs/tokio/pull/4094 [#4097]: https://github.com/tokio-rs/tokio/pull/4097 [#4103]: https://github.com/tokio-rs/tokio/pull/4103 [#4105]: https://github.com/tokio-rs/tokio/pull/4105 [#4107]: https://github.com/tokio-rs/tokio/pull/4107 [#4110]: https://github.com/tokio-rs/tokio/pull/4110 [#4113]: https://github.com/tokio-rs/tokio/pull/4113 [#4115]: https://github.com/tokio-rs/tokio/pull/4115 [#4117]: https://github.com/tokio-rs/tokio/pull/4117 [#4119]: https://github.com/tokio-rs/tokio/pull/4119 # 1.11.0 (August 31, 2021) ### Fixed - time: don't panic when Instant is not monotonic ([#4044]) - io: fix panic in `fill_buf` by not calling `poll_fill_buf` twice ([#4084]) ### Added - watch: add `watch::Sender::subscribe` ([#3800]) - process: add `from_std` to `ChildStd*` ([#4045]) - stats: initial work on runtime stats ([#4043]) ### Changed - tracing: change span naming to new console convention ([#4042]) - io: speed-up waking by using uninitialized array ([#4055], [#4071], [#4075]) ### Documented - time: make Sleep examples easier to find ([#4040]) [#3800]: https://github.com/tokio-rs/tokio/pull/3800 [#4040]: https://github.com/tokio-rs/tokio/pull/4040 [#4042]: https://github.com/tokio-rs/tokio/pull/4042 [#4043]: https://github.com/tokio-rs/tokio/pull/4043 [#4044]: https://github.com/tokio-rs/tokio/pull/4044 [#4045]: https://github.com/tokio-rs/tokio/pull/4045 [#4055]: https://github.com/tokio-rs/tokio/pull/4055 [#4071]: https://github.com/tokio-rs/tokio/pull/4071 [#4075]: https://github.com/tokio-rs/tokio/pull/4075 [#4084]: https://github.com/tokio-rs/tokio/pull/4084 # 1.10.1 (August 24, 2021) ### Fixed - runtime: fix leak in UnownedTask ([#4063]) [#4063]: https://github.com/tokio-rs/tokio/pull/4063 # 1.10.0 (August 12, 2021) ### Added - io: add `(read|write)_f(32|64)[_le]` methods ([#4022]) - io: add `fill_buf` and `consume` to `AsyncBufReadExt` ([#3991]) - process: add `Child::raw_handle()` on windows ([#3998]) ### Fixed - doc: fix non-doc builds with `--cfg docsrs` ([#4020]) - io: flush eagerly in `io::copy` ([#4001]) - runtime: a debug assert was sometimes triggered during shutdown ([#4005]) - sync: use `spin_loop_hint` instead of `yield_now` in mpsc ([#4037]) - tokio: the test-util feature depends on rt, sync, and time ([#4036]) ### Changes - runtime: reorganize parts of the runtime ([#3979], [#4005]) - signal: make windows docs for signal module show up on unix builds ([#3770]) - task: quickly send task to heap on debug mode ([#4009]) ### Documented - io: document cancellation safety of `AsyncBufReadExt` ([#3997]) - sync: document when `watch::send` fails ([#4021]) [#3770]: https://github.com/tokio-rs/tokio/pull/3770 [#3979]: https://github.com/tokio-rs/tokio/pull/3979 [#3991]: https://github.com/tokio-rs/tokio/pull/3991 [#3997]: https://github.com/tokio-rs/tokio/pull/3997 [#3998]: https://github.com/tokio-rs/tokio/pull/3998 [#4001]: https://github.com/tokio-rs/tokio/pull/4001 [#4005]: https://github.com/tokio-rs/tokio/pull/4005 [#4009]: https://github.com/tokio-rs/tokio/pull/4009 [#4020]: https://github.com/tokio-rs/tokio/pull/4020 [#4021]: https://github.com/tokio-rs/tokio/pull/4021 [#4022]: https://github.com/tokio-rs/tokio/pull/4022 [#4036]: https://github.com/tokio-rs/tokio/pull/4036 [#4037]: https://github.com/tokio-rs/tokio/pull/4037 # 1.9.0 (July 22, 2021) ### Added - net: allow customized I/O operations for `TcpStream` ([#3888]) - sync: add getter for the mutex from a guard ([#3928]) - task: expose nameable future for `TaskLocal::scope` ([#3273]) ### Fixed - Fix leak if output of future panics on drop ([#3967]) - Fix leak in `LocalSet` ([#3978]) ### Changes - runtime: reorganize parts of the runtime ([#3909], [#3939], [#3950], [#3955], [#3980]) - sync: clean up `OnceCell` ([#3945]) - task: remove mutex in `JoinError` ([#3959]) [#3273]: https://github.com/tokio-rs/tokio/pull/3273 [#3888]: https://github.com/tokio-rs/tokio/pull/3888 [#3909]: https://github.com/tokio-rs/tokio/pull/3909 [#3928]: https://github.com/tokio-rs/tokio/pull/3928 [#3934]: https://github.com/tokio-rs/tokio/pull/3934 [#3939]: https://github.com/tokio-rs/tokio/pull/3939 [#3945]: https://github.com/tokio-rs/tokio/pull/3945 [#3950]: https://github.com/tokio-rs/tokio/pull/3950 [#3955]: https://github.com/tokio-rs/tokio/pull/3955 [#3959]: https://github.com/tokio-rs/tokio/pull/3959 [#3967]: https://github.com/tokio-rs/tokio/pull/3967 [#3978]: https://github.com/tokio-rs/tokio/pull/3978 [#3980]: https://github.com/tokio-rs/tokio/pull/3980 # 1.8.3 (July 26, 2021) This release backports two fixes from 1.9.0 ### Fixed - Fix leak if output of future panics on drop ([#3967]) - Fix leak in `LocalSet` ([#3978]) [#3967]: https://github.com/tokio-rs/tokio/pull/3967 [#3978]: https://github.com/tokio-rs/tokio/pull/3978 # 1.8.2 (July 19, 2021) Fixes a missed edge case from 1.8.1. ### Fixed - runtime: drop canceled future on next poll ([#3965]) [#3965]: https://github.com/tokio-rs/tokio/pull/3965 # 1.8.1 (July 6, 2021) Forward ports 1.5.1 fixes. ### Fixed - runtime: remotely abort tasks on `JoinHandle::abort` ([#3934]) [#3934]: https://github.com/tokio-rs/tokio/pull/3934 # 1.8.0 (July 2, 2021) ### Added - io: add `get_{ref,mut}` methods to `AsyncFdReadyGuard` and `AsyncFdReadyMutGuard` ([#3807]) - io: efficient implementation of vectored writes for `BufWriter` ([#3163]) - net: add ready/try methods to `NamedPipe{Client,Server}` ([#3866], [#3899]) - sync: add `watch::Receiver::borrow_and_update` ([#3813]) - sync: implement `From` for `OnceCell` ([#3877]) - time: allow users to specify Interval behavior when delayed ([#3721]) ### Added (unstable) - rt: add `tokio::task::Builder` ([#3881]) ### Fixed - net: handle HUP event with `UnixStream` ([#3898]) ### Documented - doc: document cancellation safety ([#3900]) - time: add wait alias to sleep ([#3897]) - time: document auto-advancing behavior of runtime ([#3763]) [#3163]: https://github.com/tokio-rs/tokio/pull/3163 [#3721]: https://github.com/tokio-rs/tokio/pull/3721 [#3763]: https://github.com/tokio-rs/tokio/pull/3763 [#3807]: https://github.com/tokio-rs/tokio/pull/3807 [#3813]: https://github.com/tokio-rs/tokio/pull/3813 [#3866]: https://github.com/tokio-rs/tokio/pull/3866 [#3877]: https://github.com/tokio-rs/tokio/pull/3877 [#3881]: https://github.com/tokio-rs/tokio/pull/3881 [#3897]: https://github.com/tokio-rs/tokio/pull/3897 [#3898]: https://github.com/tokio-rs/tokio/pull/3898 [#3899]: https://github.com/tokio-rs/tokio/pull/3899 [#3900]: https://github.com/tokio-rs/tokio/pull/3900 # 1.7.2 (July 6, 2021) Forward ports 1.5.1 fixes. ### Fixed - runtime: remotely abort tasks on `JoinHandle::abort` ([#3934]) [#3934]: https://github.com/tokio-rs/tokio/pull/3934 # 1.7.1 (June 18, 2021) ### Fixed - runtime: fix early task shutdown during runtime shutdown ([#3870]) [#3870]: https://github.com/tokio-rs/tokio/pull/3870 # 1.7.0 (June 15, 2021) ### Added - net: add named pipes on windows ([#3760]) - net: add `TcpSocket` from `std::net::TcpStream` conversion ([#3838]) - sync: add `receiver_count` to `watch::Sender` ([#3729]) - sync: export `sync::notify::Notified` future publicly ([#3840]) - tracing: instrument task wakers ([#3836]) ### Fixed - macros: suppress `clippy::default_numeric_fallback` lint in generated code ([#3831]) - runtime: immediately drop new tasks when runtime is shut down ([#3752]) - sync: deprecate unused `mpsc::RecvError` type ([#3833]) ### Documented - io: clarify EOF condition for `AsyncReadExt::read_buf` ([#3850]) - io: clarify limits on return values of `AsyncWrite::poll_write` ([#3820]) - sync: add examples to Semaphore ([#3808]) [#3729]: https://github.com/tokio-rs/tokio/pull/3729 [#3752]: https://github.com/tokio-rs/tokio/pull/3752 [#3760]: https://github.com/tokio-rs/tokio/pull/3760 [#3808]: https://github.com/tokio-rs/tokio/pull/3808 [#3820]: https://github.com/tokio-rs/tokio/pull/3820 [#3831]: https://github.com/tokio-rs/tokio/pull/3831 [#3833]: https://github.com/tokio-rs/tokio/pull/3833 [#3836]: https://github.com/tokio-rs/tokio/pull/3836 [#3838]: https://github.com/tokio-rs/tokio/pull/3838 [#3840]: https://github.com/tokio-rs/tokio/pull/3840 [#3850]: https://github.com/tokio-rs/tokio/pull/3850 # 1.6.3 (July 6, 2021) Forward ports 1.5.1 fixes. ### Fixed - runtime: remotely abort tasks on `JoinHandle::abort` ([#3934]) [#3934]: https://github.com/tokio-rs/tokio/pull/3934 # 1.6.2 (June 14, 2021) ### Fixes - test: sub-ms `time:advance` regression introduced in 1.6 ([#3852]) [#3852]: https://github.com/tokio-rs/tokio/pull/3852 # 1.6.1 (May 28, 2021) This release reverts [#3518] because it doesn't work on some kernels due to a kernel bug. ([#3803]) [#3518]: https://github.com/tokio-rs/tokio/issues/3518 [#3803]: https://github.com/tokio-rs/tokio/issues/3803 # 1.6.0 (May 14, 2021) ### Added - fs: try doing a non-blocking read before punting to the threadpool ([#3518]) - io: add `write_all_buf` to `AsyncWriteExt` ([#3737]) - io: implement `AsyncSeek` for `BufReader`, `BufWriter`, and `BufStream` ([#3491]) - net: support non-blocking vectored I/O ([#3761]) - sync: add `mpsc::Sender::{reserve_owned, try_reserve_owned}` ([#3704]) - sync: add a `MutexGuard::map` method that returns a `MappedMutexGuard` ([#2472]) - time: add getter for Interval's period ([#3705]) ### Fixed - io: wake pending writers on `DuplexStream` close ([#3756]) - process: avoid redundant effort to reap orphan processes ([#3743]) - signal: use `std::os::raw::c_int` instead of `libc::c_int` on public API ([#3774]) - sync: preserve permit state in `notify_waiters` ([#3660]) - task: update `JoinHandle` panic message ([#3727]) - time: prevent `time::advance` from going too far ([#3712]) ### Documented - net: hide `net::unix::datagram` module from docs ([#3775]) - process: updated example ([#3748]) - sync: `Barrier` doc should use task, not thread ([#3780]) - task: update documentation on `block_in_place` ([#3753]) [#2472]: https://github.com/tokio-rs/tokio/pull/2472 [#3491]: https://github.com/tokio-rs/tokio/pull/3491 [#3518]: https://github.com/tokio-rs/tokio/pull/3518 [#3660]: https://github.com/tokio-rs/tokio/pull/3660 [#3704]: https://github.com/tokio-rs/tokio/pull/3704 [#3705]: https://github.com/tokio-rs/tokio/pull/3705 [#3712]: https://github.com/tokio-rs/tokio/pull/3712 [#3727]: https://github.com/tokio-rs/tokio/pull/3727 [#3737]: https://github.com/tokio-rs/tokio/pull/3737 [#3743]: https://github.com/tokio-rs/tokio/pull/3743 [#3748]: https://github.com/tokio-rs/tokio/pull/3748 [#3753]: https://github.com/tokio-rs/tokio/pull/3753 [#3756]: https://github.com/tokio-rs/tokio/pull/3756 [#3761]: https://github.com/tokio-rs/tokio/pull/3761 [#3774]: https://github.com/tokio-rs/tokio/pull/3774 [#3775]: https://github.com/tokio-rs/tokio/pull/3775 [#3780]: https://github.com/tokio-rs/tokio/pull/3780 # 1.5.1 (July 6, 2021) ### Fixed - runtime: remotely abort tasks on `JoinHandle::abort` ([#3934]) [#3934]: https://github.com/tokio-rs/tokio/pull/3934 # 1.5.0 (April 12, 2021) ### Added - io: add `AsyncSeekExt::stream_position` ([#3650]) - io: add `AsyncWriteExt::write_vectored` ([#3678]) - io: add a `copy_bidirectional` utility ([#3572]) - net: implement `IntoRawFd` for `TcpSocket` ([#3684]) - sync: add `OnceCell` ([#3591]) - sync: add `OwnedRwLockReadGuard` and `OwnedRwLockWriteGuard` ([#3340]) - sync: add `Semaphore::is_closed` ([#3673]) - sync: add `mpsc::Sender::capacity` ([#3690]) - sync: allow configuring `RwLock` max reads ([#3644]) - task: add `sync_scope` for `LocalKey` ([#3612]) ### Fixed - chore: try to avoid `noalias` attributes on intrusive linked list ([#3654]) - rt: fix panic in `JoinHandle::abort()` when called from other threads ([#3672]) - sync: don't panic in `oneshot::try_recv` ([#3674]) - sync: fix notifications getting dropped on receiver drop ([#3652]) - sync: fix `Semaphore` permit overflow calculation ([#3644]) ### Documented - io: clarify requirements of `AsyncFd` ([#3635]) - runtime: fix unclear docs for `{Handle,Runtime}::block_on` ([#3628]) - sync: document that `Semaphore` is fair ([#3693]) - sync: improve doc on blocking mutex ([#3645]) [#3340]: https://github.com/tokio-rs/tokio/pull/3340 [#3572]: https://github.com/tokio-rs/tokio/pull/3572 [#3591]: https://github.com/tokio-rs/tokio/pull/3591 [#3612]: https://github.com/tokio-rs/tokio/pull/3612 [#3628]: https://github.com/tokio-rs/tokio/pull/3628 [#3635]: https://github.com/tokio-rs/tokio/pull/3635 [#3644]: https://github.com/tokio-rs/tokio/pull/3644 [#3645]: https://github.com/tokio-rs/tokio/pull/3645 [#3650]: https://github.com/tokio-rs/tokio/pull/3650 [#3652]: https://github.com/tokio-rs/tokio/pull/3652 [#3654]: https://github.com/tokio-rs/tokio/pull/3654 [#3672]: https://github.com/tokio-rs/tokio/pull/3672 [#3673]: https://github.com/tokio-rs/tokio/pull/3673 [#3674]: https://github.com/tokio-rs/tokio/pull/3674 [#3678]: https://github.com/tokio-rs/tokio/pull/3678 [#3684]: https://github.com/tokio-rs/tokio/pull/3684 [#3690]: https://github.com/tokio-rs/tokio/pull/3690 [#3693]: https://github.com/tokio-rs/tokio/pull/3693 # 1.4.0 (March 20, 2021) ### Added - macros: introduce biased argument for `select!` ([#3603]) - runtime: add `Handle::block_on` ([#3569]) ### Fixed - runtime: avoid unnecessary polling of `block_on` future ([#3582]) - runtime: fix memory leak/growth when creating many runtimes ([#3564]) - runtime: mark `EnterGuard` with `must_use` ([#3609]) ### Documented - chore: mention fix for building docs in contributing guide ([#3618]) - doc: add link to `PollSender` ([#3613]) - doc: alias sleep to delay ([#3604]) - sync: improve `Mutex` FIFO explanation ([#3615]) - timer: fix double newline in module docs ([#3617]) [#3564]: https://github.com/tokio-rs/tokio/pull/3564 [#3613]: https://github.com/tokio-rs/tokio/pull/3613 [#3618]: https://github.com/tokio-rs/tokio/pull/3618 [#3617]: https://github.com/tokio-rs/tokio/pull/3617 [#3582]: https://github.com/tokio-rs/tokio/pull/3582 [#3615]: https://github.com/tokio-rs/tokio/pull/3615 [#3603]: https://github.com/tokio-rs/tokio/pull/3603 [#3609]: https://github.com/tokio-rs/tokio/pull/3609 [#3604]: https://github.com/tokio-rs/tokio/pull/3604 [#3569]: https://github.com/tokio-rs/tokio/pull/3569 # 1.3.0 (March 9, 2021) ### Added - coop: expose an `unconstrained()` opt-out ([#3547]) - net: add `into_std` for net types without it ([#3509]) - sync: add `same_channel` method to `mpsc::Sender` ([#3532]) - sync: add `{try_,}acquire_many_owned` to `Semaphore` ([#3535]) - sync: add back `RwLockWriteGuard::map` and `RwLockWriteGuard::try_map` ([#3348]) ### Fixed - sync: allow `oneshot::Receiver::close` after successful `try_recv` ([#3552]) - time: do not panic on `timeout(Duration::MAX)` ([#3551]) ### Documented - doc: doc aliases for pre-1.0 function names ([#3523]) - io: fix typos ([#3541]) - io: note the EOF behavior of `read_until` ([#3536]) - io: update `AsyncRead::poll_read` doc ([#3557]) - net: update `UdpSocket` splitting doc ([#3517]) - runtime: add link to `LocalSet` on `new_current_thread` ([#3508]) - runtime: update documentation of thread limits ([#3527]) - sync: do not recommend `join_all` for `Barrier` ([#3514]) - sync: documentation for `oneshot` ([#3592]) - sync: rename `notify` to `notify_one` ([#3526]) - time: fix typo in `Sleep` doc ([#3515]) - time: sync `interval.rs` and `time/mod.rs` docs ([#3533]) [#3348]: https://github.com/tokio-rs/tokio/pull/3348 [#3508]: https://github.com/tokio-rs/tokio/pull/3508 [#3509]: https://github.com/tokio-rs/tokio/pull/3509 [#3514]: https://github.com/tokio-rs/tokio/pull/3514 [#3515]: https://github.com/tokio-rs/tokio/pull/3515 [#3517]: https://github.com/tokio-rs/tokio/pull/3517 [#3523]: https://github.com/tokio-rs/tokio/pull/3523 [#3526]: https://github.com/tokio-rs/tokio/pull/3526 [#3527]: https://github.com/tokio-rs/tokio/pull/3527 [#3532]: https://github.com/tokio-rs/tokio/pull/3532 [#3533]: https://github.com/tokio-rs/tokio/pull/3533 [#3535]: https://github.com/tokio-rs/tokio/pull/3535 [#3536]: https://github.com/tokio-rs/tokio/pull/3536 [#3541]: https://github.com/tokio-rs/tokio/pull/3541 [#3547]: https://github.com/tokio-rs/tokio/pull/3547 [#3551]: https://github.com/tokio-rs/tokio/pull/3551 [#3552]: https://github.com/tokio-rs/tokio/pull/3552 [#3557]: https://github.com/tokio-rs/tokio/pull/3557 [#3592]: https://github.com/tokio-rs/tokio/pull/3592 # 1.2.0 (February 5, 2021) ### Added - signal: make `Signal::poll_recv` method public ([#3383]) ### Fixed - time: make `test-util` paused time fully deterministic ([#3492]) ### Documented - sync: link to new broadcast and watch wrappers ([#3504]) [#3383]: https://github.com/tokio-rs/tokio/pull/3383 [#3492]: https://github.com/tokio-rs/tokio/pull/3492 [#3504]: https://github.com/tokio-rs/tokio/pull/3504 # 1.1.1 (January 29, 2021) Forward ports 1.0.3 fix. ### Fixed - io: memory leak during shutdown ([#3477]). # 1.1.0 (January 22, 2021) ### Added - net: add `try_read_buf` and `try_recv_buf` ([#3351]) - mpsc: Add `Sender::try_reserve` function ([#3418]) - sync: add `RwLock` `try_read` and `try_write` methods ([#3400]) - io: add `ReadBuf::inner_mut` ([#3443]) ### Changed - macros: improve `select!` error message ([#3352]) - io: keep track of initialized bytes in `read_to_end` ([#3426]) - runtime: consolidate errors for context missing ([#3441]) ### Fixed - task: wake `LocalSet` on `spawn_local` ([#3369]) - sync: fix panic in broadcast::Receiver drop ([#3434]) ### Documented - stream: link to new `Stream` wrappers in `tokio-stream` ([#3343]) - docs: mention that `test-util` feature is not enabled with full ([#3397]) - process: add documentation to process::Child fields ([#3437]) - io: clarify `AsyncFd` docs about changes of the inner fd ([#3430]) - net: update datagram docs on splitting ([#3448]) - time: document that `Sleep` is not `Unpin` ([#3457]) - sync: add link to `PollSemaphore` ([#3456]) - task: add `LocalSet` example ([#3438]) - sync: improve bounded `mpsc` documentation ([#3458]) [#3343]: https://github.com/tokio-rs/tokio/pull/3343 [#3351]: https://github.com/tokio-rs/tokio/pull/3351 [#3352]: https://github.com/tokio-rs/tokio/pull/3352 [#3369]: https://github.com/tokio-rs/tokio/pull/3369 [#3397]: https://github.com/tokio-rs/tokio/pull/3397 [#3400]: https://github.com/tokio-rs/tokio/pull/3400 [#3418]: https://github.com/tokio-rs/tokio/pull/3418 [#3426]: https://github.com/tokio-rs/tokio/pull/3426 [#3430]: https://github.com/tokio-rs/tokio/pull/3430 [#3434]: https://github.com/tokio-rs/tokio/pull/3434 [#3437]: https://github.com/tokio-rs/tokio/pull/3437 [#3438]: https://github.com/tokio-rs/tokio/pull/3438 [#3441]: https://github.com/tokio-rs/tokio/pull/3441 [#3443]: https://github.com/tokio-rs/tokio/pull/3443 [#3448]: https://github.com/tokio-rs/tokio/pull/3448 [#3456]: https://github.com/tokio-rs/tokio/pull/3456 [#3457]: https://github.com/tokio-rs/tokio/pull/3457 [#3458]: https://github.com/tokio-rs/tokio/pull/3458 # 1.0.3 (January 28, 2021) ### Fixed - io: memory leak during shutdown ([#3477]). [#3477]: https://github.com/tokio-rs/tokio/pull/3477 # 1.0.2 (January 14, 2021) ### Fixed - io: soundness in `read_to_end` ([#3428]). [#3428]: https://github.com/tokio-rs/tokio/pull/3428 # 1.0.1 (December 25, 2020) This release fixes a soundness hole caused by the combination of `RwLockWriteGuard::map` and `RwLockWriteGuard::downgrade` by removing the `map` function. This is a breaking change, but breaking changes are allowed under our semver policy when they are required to fix a soundness hole. (See [this RFC][semver] for more.) Note that we have chosen not to do a deprecation cycle or similar because Tokio 1.0.0 was released two days ago, and therefore the impact should be minimal. Due to the soundness hole, we have also yanked Tokio version 1.0.0. ### Removed - sync: remove `RwLockWriteGuard::map` and `RwLockWriteGuard::try_map` ([#3345]) ### Fixed - docs: remove stream feature from docs ([#3335]) [semver]: https://github.com/rust-lang/rfcs/blob/master/text/1122-language-semver.md#soundness-changes [#3335]: https://github.com/tokio-rs/tokio/pull/3335 [#3345]: https://github.com/tokio-rs/tokio/pull/3345 # 1.0.0 (December 23, 2020) Commit to the API and long-term support. ### Fixed - sync: spurious wakeup in `watch` ([#3234]). ### Changed - io: rename `AsyncFd::with_io()` to `try_io()` ([#3306]) - fs: avoid OS specific `*Ext` traits in favor of conditionally defining the fn ([#3264]). - fs: `Sleep` is `!Unpin` ([#3278]). - net: pass `SocketAddr` by value ([#3125]). - net: `TcpStream::poll_peek` takes `ReadBuf` ([#3259]). - rt: rename `runtime::Builder::max_threads()` to `max_blocking_threads()` ([#3287]). - time: require `current_thread` runtime when calling `time::pause()` ([#3289]). ### Removed - remove `tokio::prelude` ([#3299]). - io: remove `AsyncFd::with_poll()` ([#3306]). - net: remove `{Tcp,Unix}Stream::shutdown()` in favor of `AsyncWrite::shutdown()` ([#3298]). - stream: move all stream utilities to `tokio-stream` until `Stream` is added to `std` ([#3277]). - sync: mpsc `try_recv()` due to unexpected behavior ([#3263]). - tracing: make unstable as `tracing-core` is not 1.0 yet ([#3266]). ### Added - fs: `poll_*` fns to `DirEntry` ([#3308]). - io: `poll_*` fns to `io::Lines`, `io::Split` ([#3308]). - io: `_mut` method variants to `AsyncFd` ([#3304]). - net: `poll_*` fns to `UnixDatagram` ([#3223]). - net: `UnixStream` readiness and non-blocking ops ([#3246]). - sync: `UnboundedReceiver::blocking_recv()` ([#3262]). - sync: `watch::Sender::borrow()` ([#3269]). - sync: `Semaphore::close()` ([#3065]). - sync: `poll_recv` fns to `mpsc::Receiver`, `mpsc::UnboundedReceiver` ([#3308]). - time: `poll_tick` fn to `time::Interval` ([#3316]). [#3065]: https://github.com/tokio-rs/tokio/pull/3065 [#3125]: https://github.com/tokio-rs/tokio/pull/3125 [#3223]: https://github.com/tokio-rs/tokio/pull/3223 [#3234]: https://github.com/tokio-rs/tokio/pull/3234 [#3246]: https://github.com/tokio-rs/tokio/pull/3246 [#3259]: https://github.com/tokio-rs/tokio/pull/3259 [#3262]: https://github.com/tokio-rs/tokio/pull/3262 [#3263]: https://github.com/tokio-rs/tokio/pull/3263 [#3264]: https://github.com/tokio-rs/tokio/pull/3264 [#3266]: https://github.com/tokio-rs/tokio/pull/3266 [#3269]: https://github.com/tokio-rs/tokio/pull/3269 [#3277]: https://github.com/tokio-rs/tokio/pull/3277 [#3278]: https://github.com/tokio-rs/tokio/pull/3278 [#3287]: https://github.com/tokio-rs/tokio/pull/3287 [#3289]: https://github.com/tokio-rs/tokio/pull/3289 [#3298]: https://github.com/tokio-rs/tokio/pull/3298 [#3299]: https://github.com/tokio-rs/tokio/pull/3299 [#3304]: https://github.com/tokio-rs/tokio/pull/3304 [#3306]: https://github.com/tokio-rs/tokio/pull/3306 [#3308]: https://github.com/tokio-rs/tokio/pull/3308 [#3316]: https://github.com/tokio-rs/tokio/pull/3316 # 0.3.6 (December 14, 2020) ### Fixed - rt: fix deadlock in shutdown ([#3228]) - rt: fix panic in task abort when off rt ([#3159]) - sync: make `add_permits` panic with usize::MAX >> 3 permits ([#3188]) - time: Fix race condition in timer drop ([#3229]) - watch: fix spurious wakeup ([#3244]) ### Added - example: add back udp-codec example ([#3205]) - net: add `TcpStream::into_std` ([#3189]) [#3159]: https://github.com/tokio-rs/tokio/pull/3159 [#3188]: https://github.com/tokio-rs/tokio/pull/3188 [#3189]: https://github.com/tokio-rs/tokio/pull/3189 [#3205]: https://github.com/tokio-rs/tokio/pull/3205 [#3228]: https://github.com/tokio-rs/tokio/pull/3228 [#3229]: https://github.com/tokio-rs/tokio/pull/3229 [#3244]: https://github.com/tokio-rs/tokio/pull/3244 # 0.3.5 (November 30, 2020) ### Fixed - rt: fix `shutdown_timeout(0)` ([#3196]). - time: fixed race condition with small sleeps ([#3069]). ### Added - io: `AsyncFd::with_interest()` ([#3167]). - signal: `CtrlC` stream on windows ([#3186]). [#3069]: https://github.com/tokio-rs/tokio/pull/3069 [#3167]: https://github.com/tokio-rs/tokio/pull/3167 [#3186]: https://github.com/tokio-rs/tokio/pull/3186 [#3196]: https://github.com/tokio-rs/tokio/pull/3196 # 0.3.4 (November 18, 2020) ### Fixed - stream: `StreamMap` `Default` impl bound ([#3093]). - io: `AsyncFd::into_inner()` should deregister the FD ([#3104]). ### Changed - meta: `parking_lot` feature enabled with `full` ([#3119]). ### Added - io: `AsyncWrite` vectored writes ([#3149]). - net: TCP/UDP readiness and non-blocking ops ([#3130], [#2743], [#3138]). - net: TCP socket option (linger, send/recv buf size) ([#3145], [#3143]). - net: PID field in `UCred` with solaris/illumos ([#3085]). - rt: `runtime::Handle` allows spawning onto a runtime ([#3079]). - sync: `Notify::notify_waiters()` ([#3098]). - sync: `acquire_many()`, `try_acquire_many()` to `Semaphore` ([#3067]). [#2743]: https://github.com/tokio-rs/tokio/pull/2743 [#3067]: https://github.com/tokio-rs/tokio/pull/3067 [#3079]: https://github.com/tokio-rs/tokio/pull/3079 [#3085]: https://github.com/tokio-rs/tokio/pull/3085 [#3093]: https://github.com/tokio-rs/tokio/pull/3093 [#3098]: https://github.com/tokio-rs/tokio/pull/3098 [#3104]: https://github.com/tokio-rs/tokio/pull/3104 [#3119]: https://github.com/tokio-rs/tokio/pull/3119 [#3130]: https://github.com/tokio-rs/tokio/pull/3130 [#3138]: https://github.com/tokio-rs/tokio/pull/3138 [#3143]: https://github.com/tokio-rs/tokio/pull/3143 [#3145]: https://github.com/tokio-rs/tokio/pull/3145 [#3149]: https://github.com/tokio-rs/tokio/pull/3149 # 0.3.3 (November 2, 2020) Fixes a soundness hole by adding a missing `Send` bound to `Runtime::spawn_blocking()`. ### Fixed - rt: include missing `Send`, fixing soundness hole ([#3089]). - tracing: avoid huge trace span names ([#3074]). ### Added - net: `TcpSocket::reuseport()`, `TcpSocket::set_reuseport()` ([#3083]). - net: `TcpSocket::reuseaddr()` ([#3093]). - net: `TcpSocket::local_addr()` ([#3093]). - net: add pid to `UCred` ([#2633]). [#2633]: https://github.com/tokio-rs/tokio/pull/2633 [#3074]: https://github.com/tokio-rs/tokio/pull/3074 [#3083]: https://github.com/tokio-rs/tokio/pull/3083 [#3089]: https://github.com/tokio-rs/tokio/pull/3089 [#3093]: https://github.com/tokio-rs/tokio/pull/3093 # 0.3.2 (October 27, 2020) Adds `AsyncFd` as a replacement for v0.2's `PollEvented`. ### Fixed - io: fix a potential deadlock when shutting down the I/O driver ([#2903]). - sync: `RwLockWriteGuard::downgrade()` bug ([#2957]). ### Added - io: `AsyncFd` for receiving readiness events on raw FDs ([#2903]). - net: `poll_*` function on `UdpSocket` ([#2981]). - net: `UdpSocket::take_error()` ([#3051]). - sync: `oneshot::Sender::poll_closed()` ([#3032]). [#2903]: https://github.com/tokio-rs/tokio/pull/2903 [#2957]: https://github.com/tokio-rs/tokio/pull/2957 [#2981]: https://github.com/tokio-rs/tokio/pull/2981 [#3032]: https://github.com/tokio-rs/tokio/pull/3032 [#3051]: https://github.com/tokio-rs/tokio/pull/3051 # 0.3.1 (October 21, 2020) This release fixes an use-after-free in the IO driver. Additionally, the `read_buf` and `write_buf` methods have been added back to the IO traits, as the bytes crate is now on track to reach version 1.0 together with Tokio. ### Fixed - net: fix use-after-free ([#3019]). - fs: ensure buffered data is written on shutdown ([#3009]). ### Added - io: `copy_buf()` ([#2884]). - io: `AsyncReadExt::read_buf()`, `AsyncReadExt::write_buf()` for working with `Buf`/`BufMut` ([#3003]). - rt: `Runtime::spawn_blocking()` ([#2980]). - sync: `watch::Sender::is_closed()` ([#2991]). [#2884]: https://github.com/tokio-rs/tokio/pull/2884 [#2980]: https://github.com/tokio-rs/tokio/pull/2980 [#2991]: https://github.com/tokio-rs/tokio/pull/2991 [#3003]: https://github.com/tokio-rs/tokio/pull/3003 [#3009]: https://github.com/tokio-rs/tokio/pull/3009 [#3019]: https://github.com/tokio-rs/tokio/pull/3019 # 0.3.0 (October 15, 2020) This represents a 1.0 beta release. APIs are polished and future-proofed. APIs not included for 1.0 stabilization have been removed. Biggest changes are: - I/O driver internal rewrite. The windows implementation includes significant changes. - Runtime API is polished, especially with how it interacts with feature flag combinations. - Feature flags are simplified - `rt-core` and `rt-util` are combined to `rt` - `rt-threaded` is renamed to `rt-multi-thread` to match builder API - `tcp`, `udp`, `uds`, `dns` are combined to `net`. - `parking_lot` is included with `full` ### Changes - meta: Minimum supported Rust version is now 1.45. - io: `AsyncRead` trait now takes `ReadBuf` in order to safely handle reading into uninitialized memory ([#2758]). - io: Internal I/O driver storage is now able to compact ([#2757]). - rt: `Runtime::block_on` now takes `&self` ([#2782]). - sync: `watch` reworked to decouple receiving a change notification from receiving the value ([#2814], [#2806]). - sync: `Notify::notify` is renamed to `notify_one` ([#2822]). - process: `Child::kill` is now an `async fn` that cleans zombies ([#2823]). - sync: use `const fn` constructors as possible ([#2833], [#2790]) - signal: reduce cross-thread notification ([#2835]). - net: tcp,udp,uds types support operations with `&self` ([#2828], [#2919], [#2934]). - sync: blocking `mpsc` channel supports `send` with `&self` ([#2861]). - time: rename `delay_for` and `delay_until` to `sleep` and `sleep_until` ([#2826]). - io: upgrade to `mio` 0.7 ([#2893]). - io: `AsyncSeek` trait is tweaked ([#2885]). - fs: `File` operations take `&self` ([#2930]). - rt: runtime API, and `#[tokio::main]` macro polish ([#2876]) - rt: `Runtime::enter` uses an RAII guard instead of a closure ([#2954]). - net: the `from_std` function on all sockets no longer sets socket into non-blocking mode ([#2893]) ### Added - sync: `map` function to lock guards ([#2445]). - sync: `blocking_recv` and `blocking_send` fns to `mpsc` for use outside of Tokio ([#2685]). - rt: `Builder::thread_name_fn` for configuring thread names ([#1921]). - fs: impl `FromRawFd` and `FromRawHandle` for `File` ([#2792]). - process: `Child::wait` and `Child::try_wait` ([#2796]). - rt: support configuring thread keep-alive duration ([#2809]). - rt: `task::JoinHandle::abort` forcibly cancels a spawned task ([#2474]). - sync: `RwLock` write guard to read guard downgrading ([#2733]). - net: add `poll_*` functions that take `&self` to all net types ([#2845]) - sync: `get_mut()` for `Mutex`, `RwLock` ([#2856]). - sync: `mpsc::Sender::closed()` waits for `Receiver` half to close ([#2840]). - sync: `mpsc::Sender::is_closed()` returns true if `Receiver` half is closed ([#2726]). - stream: `iter` and `iter_mut` to `StreamMap` ([#2890]). - net: implement `AsRawSocket` on windows ([#2911]). - net: `TcpSocket` creates a socket without binding or listening ([#2920]). ### Removed - io: vectored ops are removed from `AsyncRead`, `AsyncWrite` traits ([#2882]). - io: `mio` is removed from the public API. `PollEvented` and` Registration` are removed ([#2893]). - io: remove `bytes` from public API. `Buf` and `BufMut` implementation are removed ([#2908]). - time: `DelayQueue` is moved to `tokio-util` ([#2897]). ### Fixed - io: `stdout` and `stderr` buffering on windows ([#2734]). [#1921]: https://github.com/tokio-rs/tokio/pull/1921 [#2445]: https://github.com/tokio-rs/tokio/pull/2445 [#2474]: https://github.com/tokio-rs/tokio/pull/2474 [#2685]: https://github.com/tokio-rs/tokio/pull/2685 [#2726]: https://github.com/tokio-rs/tokio/pull/2726 [#2733]: https://github.com/tokio-rs/tokio/pull/2733 [#2734]: https://github.com/tokio-rs/tokio/pull/2734 [#2757]: https://github.com/tokio-rs/tokio/pull/2757 [#2758]: https://github.com/tokio-rs/tokio/pull/2758 [#2782]: https://github.com/tokio-rs/tokio/pull/2782 [#2790]: https://github.com/tokio-rs/tokio/pull/2790 [#2792]: https://github.com/tokio-rs/tokio/pull/2792 [#2796]: https://github.com/tokio-rs/tokio/pull/2796 [#2806]: https://github.com/tokio-rs/tokio/pull/2806 [#2809]: https://github.com/tokio-rs/tokio/pull/2809 [#2814]: https://github.com/tokio-rs/tokio/pull/2814 [#2822]: https://github.com/tokio-rs/tokio/pull/2822 [#2823]: https://github.com/tokio-rs/tokio/pull/2823 [#2826]: https://github.com/tokio-rs/tokio/pull/2826 [#2828]: https://github.com/tokio-rs/tokio/pull/2828 [#2833]: https://github.com/tokio-rs/tokio/pull/2833 [#2835]: https://github.com/tokio-rs/tokio/pull/2835 [#2840]: https://github.com/tokio-rs/tokio/pull/2840 [#2845]: https://github.com/tokio-rs/tokio/pull/2845 [#2856]: https://github.com/tokio-rs/tokio/pull/2856 [#2861]: https://github.com/tokio-rs/tokio/pull/2861 [#2876]: https://github.com/tokio-rs/tokio/pull/2876 [#2882]: https://github.com/tokio-rs/tokio/pull/2882 [#2885]: https://github.com/tokio-rs/tokio/pull/2885 [#2890]: https://github.com/tokio-rs/tokio/pull/2890 [#2893]: https://github.com/tokio-rs/tokio/pull/2893 [#2897]: https://github.com/tokio-rs/tokio/pull/2897 [#2908]: https://github.com/tokio-rs/tokio/pull/2908 [#2911]: https://github.com/tokio-rs/tokio/pull/2911 [#2919]: https://github.com/tokio-rs/tokio/pull/2919 [#2920]: https://github.com/tokio-rs/tokio/pull/2920 [#2930]: https://github.com/tokio-rs/tokio/pull/2930 [#2934]: https://github.com/tokio-rs/tokio/pull/2934 [#2954]: https://github.com/tokio-rs/tokio/pull/2954 # 0.2.22 (July 21, 2020) ### Fixes - docs: misc improvements ([#2572], [#2658], [#2663], [#2656], [#2647], [#2630], [#2487], [#2621], [#2624], [#2600], [#2623], [#2622], [#2577], [#2569], [#2589], [#2575], [#2540], [#2564], [#2567], [#2520], [#2521], [#2493]) - rt: allow calls to `block_on` inside calls to `block_in_place` that are themselves inside `block_on` ([#2645]) - net: fix non-portable behavior when dropping `TcpStream` `OwnedWriteHalf` ([#2597]) - io: improve stack usage by allocating large buffers on directly on the heap ([#2634]) - io: fix unsound pin projection in `AsyncReadExt::read_buf` and `AsyncWriteExt::write_buf` ([#2612]) - io: fix unnecessary zeroing for `AsyncRead` implementors ([#2525]) - io: Fix `BufReader` not correctly forwarding `poll_write_buf` ([#2654]) - io: fix panic in `AsyncReadExt::read_line` ([#2541]) ### Changes - coop: returning `Poll::Pending` no longer decrements the task budget ([#2549]) ### Added - io: little-endian variants of `AsyncReadExt` and `AsyncWriteExt` methods ([#1915]) - task: add [`tracing`] instrumentation to spawned tasks ([#2655]) - sync: allow unsized types in `Mutex` and `RwLock` (via `default` constructors) ([#2615]) - net: add `ToSocketAddrs` implementation for `&[SocketAddr]` ([#2604]) - fs: add `OpenOptionsExt` for `OpenOptions` ([#2515]) - fs: add `DirBuilder` ([#2524]) [`tracing`]: https://crates.io/crates/tracing [#1915]: https://github.com/tokio-rs/tokio/pull/1915 [#2487]: https://github.com/tokio-rs/tokio/pull/2487 [#2493]: https://github.com/tokio-rs/tokio/pull/2493 [#2515]: https://github.com/tokio-rs/tokio/pull/2515 [#2520]: https://github.com/tokio-rs/tokio/pull/2520 [#2521]: https://github.com/tokio-rs/tokio/pull/2521 [#2524]: https://github.com/tokio-rs/tokio/pull/2524 [#2525]: https://github.com/tokio-rs/tokio/pull/2525 [#2540]: https://github.com/tokio-rs/tokio/pull/2540 [#2541]: https://github.com/tokio-rs/tokio/pull/2541 [#2549]: https://github.com/tokio-rs/tokio/pull/2549 [#2564]: https://github.com/tokio-rs/tokio/pull/2564 [#2567]: https://github.com/tokio-rs/tokio/pull/2567 [#2569]: https://github.com/tokio-rs/tokio/pull/2569 [#2572]: https://github.com/tokio-rs/tokio/pull/2572 [#2575]: https://github.com/tokio-rs/tokio/pull/2575 [#2577]: https://github.com/tokio-rs/tokio/pull/2577 [#2589]: https://github.com/tokio-rs/tokio/pull/2589 [#2597]: https://github.com/tokio-rs/tokio/pull/2597 [#2600]: https://github.com/tokio-rs/tokio/pull/2600 [#2604]: https://github.com/tokio-rs/tokio/pull/2604 [#2612]: https://github.com/tokio-rs/tokio/pull/2612 [#2615]: https://github.com/tokio-rs/tokio/pull/2615 [#2621]: https://github.com/tokio-rs/tokio/pull/2621 [#2622]: https://github.com/tokio-rs/tokio/pull/2622 [#2623]: https://github.com/tokio-rs/tokio/pull/2623 [#2624]: https://github.com/tokio-rs/tokio/pull/2624 [#2630]: https://github.com/tokio-rs/tokio/pull/2630 [#2634]: https://github.com/tokio-rs/tokio/pull/2634 [#2645]: https://github.com/tokio-rs/tokio/pull/2645 [#2647]: https://github.com/tokio-rs/tokio/pull/2647 [#2654]: https://github.com/tokio-rs/tokio/pull/2654 [#2655]: https://github.com/tokio-rs/tokio/pull/2655 [#2656]: https://github.com/tokio-rs/tokio/pull/2656 [#2658]: https://github.com/tokio-rs/tokio/pull/2658 [#2663]: https://github.com/tokio-rs/tokio/pull/2663 # 0.2.21 (May 13, 2020) ### Fixes - macros: disambiguate built-in `#[test]` attribute in macro expansion ([#2503]) - rt: `LocalSet` and task budgeting ([#2462]). - rt: task budgeting with `block_in_place` ([#2502]). - sync: release `broadcast` channel memory without sending a value ([#2509]). - time: notify when resetting a `Delay` to a time in the past ([#2290]) ### Added - io: `get_mut`, `get_ref`, and `into_inner` to `Lines` ([#2450]). - io: `mio::Ready` argument to `PollEvented` ([#2419]). - os: illumos support ([#2486]). - rt: `Handle::spawn_blocking` ([#2501]). - sync: `OwnedMutexGuard` for `Arc>` ([#2455]). [#2290]: https://github.com/tokio-rs/tokio/pull/2290 [#2419]: https://github.com/tokio-rs/tokio/pull/2419 [#2450]: https://github.com/tokio-rs/tokio/pull/2450 [#2455]: https://github.com/tokio-rs/tokio/pull/2455 [#2462]: https://github.com/tokio-rs/tokio/pull/2462 [#2486]: https://github.com/tokio-rs/tokio/pull/2486 [#2501]: https://github.com/tokio-rs/tokio/pull/2501 [#2502]: https://github.com/tokio-rs/tokio/pull/2502 [#2503]: https://github.com/tokio-rs/tokio/pull/2503 [#2509]: https://github.com/tokio-rs/tokio/pull/2509 # 0.2.20 (April 28, 2020) ### Fixes - sync: `broadcast` closing the channel no longer requires capacity ([#2448]). - rt: regression when configuring runtime with `max_threads` less than number of CPUs ([#2457]). [#2448]: https://github.com/tokio-rs/tokio/pull/2448 [#2457]: https://github.com/tokio-rs/tokio/pull/2457 # 0.2.19 (April 24, 2020) ### Fixes - docs: misc improvements ([#2400], [#2405], [#2414], [#2420], [#2423], [#2426], [#2427], [#2434], [#2436], [#2440]). - rt: support `block_in_place` in more contexts ([#2409], [#2410]). - stream: no panic in `merge()` and `chain()` when using `size_hint()` ([#2430]). - task: include visibility modifier when defining a task-local ([#2416]). ### Added - rt: `runtime::Handle::block_on` ([#2437]). - sync: owned `Semaphore` permit ([#2421]). - tcp: owned split ([#2270]). [#2270]: https://github.com/tokio-rs/tokio/pull/2270 [#2400]: https://github.com/tokio-rs/tokio/pull/2400 [#2405]: https://github.com/tokio-rs/tokio/pull/2405 [#2409]: https://github.com/tokio-rs/tokio/pull/2409 [#2410]: https://github.com/tokio-rs/tokio/pull/2410 [#2414]: https://github.com/tokio-rs/tokio/pull/2414 [#2416]: https://github.com/tokio-rs/tokio/pull/2416 [#2420]: https://github.com/tokio-rs/tokio/pull/2420 [#2421]: https://github.com/tokio-rs/tokio/pull/2421 [#2423]: https://github.com/tokio-rs/tokio/pull/2423 [#2426]: https://github.com/tokio-rs/tokio/pull/2426 [#2427]: https://github.com/tokio-rs/tokio/pull/2427 [#2430]: https://github.com/tokio-rs/tokio/pull/2430 [#2434]: https://github.com/tokio-rs/tokio/pull/2434 [#2436]: https://github.com/tokio-rs/tokio/pull/2436 [#2437]: https://github.com/tokio-rs/tokio/pull/2437 [#2440]: https://github.com/tokio-rs/tokio/pull/2440 # 0.2.18 (April 12, 2020) ### Fixes - task: `LocalSet` was incorrectly marked as `Send` ([#2398]) - io: correctly report `WriteZero` failure in `write_int` ([#2334]) [#2334]: https://github.com/tokio-rs/tokio/pull/2334 [#2398]: https://github.com/tokio-rs/tokio/pull/2398 # 0.2.17 (April 9, 2020) ### Fixes - rt: bug in work-stealing queue ([#2387]) ### Changes - rt: threadpool uses logical CPU count instead of physical by default ([#2391]) [#2387]: https://github.com/tokio-rs/tokio/pull/2387 [#2391]: https://github.com/tokio-rs/tokio/pull/2391 # 0.2.16 (April 3, 2020) ### Fixes - sync: fix a regression where `Mutex`, `Semaphore`, and `RwLock` futures no longer implement `Sync` ([#2375]) - fs: fix `fs::copy` not copying file permissions ([#2354]) ### Added - time: added `deadline` method to `delay_queue::Expired` ([#2300]) - io: added `StreamReader` ([#2052]) [#2052]: https://github.com/tokio-rs/tokio/pull/2052 [#2300]: https://github.com/tokio-rs/tokio/pull/2300 [#2354]: https://github.com/tokio-rs/tokio/pull/2354 [#2375]: https://github.com/tokio-rs/tokio/pull/2375 # 0.2.15 (April 2, 2020) ### Fixes - rt: fix queue regression ([#2362]). ### Added - sync: Add disarm to `mpsc::Sender` ([#2358]). [#2358]: https://github.com/tokio-rs/tokio/pull/2358 [#2362]: https://github.com/tokio-rs/tokio/pull/2362 # 0.2.14 (April 1, 2020) ### Fixes - rt: concurrency bug in scheduler ([#2273]). - rt: concurrency bug with shell runtime ([#2333]). - test-util: correct pause/resume of time ([#2253]). - time: `DelayQueue` correct wakeup after `insert` ([#2285]). ### Added - io: impl `RawFd`, `AsRawHandle` for std io types ([#2335]). - rt: automatic cooperative task yielding ([#2160], [#2343], [#2349]). - sync: `RwLock::into_inner` ([#2321]). ### Changed - sync: semaphore, mutex internals rewritten to avoid allocations ([#2325]). [#2160]: https://github.com/tokio-rs/tokio/pull/2160 [#2253]: https://github.com/tokio-rs/tokio/pull/2253 [#2273]: https://github.com/tokio-rs/tokio/pull/2273 [#2285]: https://github.com/tokio-rs/tokio/pull/2285 [#2321]: https://github.com/tokio-rs/tokio/pull/2321 [#2325]: https://github.com/tokio-rs/tokio/pull/2325 [#2333]: https://github.com/tokio-rs/tokio/pull/2333 [#2335]: https://github.com/tokio-rs/tokio/pull/2335 [#2343]: https://github.com/tokio-rs/tokio/pull/2343 [#2349]: https://github.com/tokio-rs/tokio/pull/2349 # 0.2.13 (February 28, 2020) ### Fixes - macros: unresolved import in `pin!` ([#2281]). [#2281]: https://github.com/tokio-rs/tokio/pull/2281 # 0.2.12 (February 27, 2020) ### Fixes - net: `UnixStream::poll_shutdown` should call `shutdown(Write)` ([#2245]). - process: Wake up read and write on `EPOLLERR` ([#2218]). - rt: potential deadlock when using `block_in_place` and shutting down the runtime ([#2119]). - rt: only detect number of CPUs if `core_threads` not specified ([#2238]). - sync: reduce `watch::Receiver` struct size ([#2191]). - time: succeed when setting delay of `$MAX-1` ([#2184]). - time: avoid having to poll `DelayQueue` after inserting new delay ([#2217]). ### Added - macros: `pin!` variant that assigns to identifier and pins ([#2274]). - net: impl `Stream` for `Listener` types ([#2275]). - rt: `Runtime::shutdown_timeout` waits for runtime to shutdown for specified duration ([#2186]). - stream: `StreamMap` merges streams and can insert / remove streams at runtime ([#2185]). - stream: `StreamExt::skip()` skips a fixed number of items ([#2204]). - stream: `StreamExt::skip_while()` skips items based on a predicate ([#2205]). - sync: `Notify` provides basic `async` / `await` task notification ([#2210]). - sync: `Mutex::into_inner` retrieves guarded data ([#2250]). - sync: `mpsc::Sender::send_timeout` sends, waiting for up to specified duration for channel capacity ([#2227]). - time: impl `Ord` and `Hash` for `Instant` ([#2239]). [#2119]: https://github.com/tokio-rs/tokio/pull/2119 [#2184]: https://github.com/tokio-rs/tokio/pull/2184 [#2185]: https://github.com/tokio-rs/tokio/pull/2185 [#2186]: https://github.com/tokio-rs/tokio/pull/2186 [#2191]: https://github.com/tokio-rs/tokio/pull/2191 [#2204]: https://github.com/tokio-rs/tokio/pull/2204 [#2205]: https://github.com/tokio-rs/tokio/pull/2205 [#2210]: https://github.com/tokio-rs/tokio/pull/2210 [#2217]: https://github.com/tokio-rs/tokio/pull/2217 [#2218]: https://github.com/tokio-rs/tokio/pull/2218 [#2227]: https://github.com/tokio-rs/tokio/pull/2227 [#2238]: https://github.com/tokio-rs/tokio/pull/2238 [#2239]: https://github.com/tokio-rs/tokio/pull/2239 [#2245]: https://github.com/tokio-rs/tokio/pull/2245 [#2250]: https://github.com/tokio-rs/tokio/pull/2250 [#2274]: https://github.com/tokio-rs/tokio/pull/2274 [#2275]: https://github.com/tokio-rs/tokio/pull/2275 # 0.2.11 (January 27, 2020) ### Fixes - docs: misc fixes and tweaks ([#2155], [#2103], [#2027], [#2167], [#2175]). - macros: handle generics in `#[tokio::main]` method ([#2177]). - sync: `broadcast` potential lost notifications ([#2135]). - rt: improve "no runtime" panic messages ([#2145]). ### Added - optional support for using `parking_lot` internally ([#2164]). - fs: `fs::copy`, an async version of `std::fs::copy` ([#2079]). - macros: `select!` waits for the first branch to complete ([#2152]). - macros: `join!` waits for all branches to complete ([#2158]). - macros: `try_join!` waits for all branches to complete or the first error ([#2169]). - macros: `pin!` pins a value to the stack ([#2163]). - net: `ReadHalf::poll()` and `ReadHalf::poll_peak` ([#2151]) - stream: `StreamExt::timeout()` sets a per-item max duration ([#2149]). - stream: `StreamExt::fold()` applies a function, producing a single value. ([#2122]). - sync: impl `Eq`, `PartialEq` for `oneshot::RecvError` ([#2168]). - task: methods for inspecting the `JoinError` cause ([#2051]). [#2027]: https://github.com/tokio-rs/tokio/pull/2027 [#2051]: https://github.com/tokio-rs/tokio/pull/2051 [#2079]: https://github.com/tokio-rs/tokio/pull/2079 [#2103]: https://github.com/tokio-rs/tokio/pull/2103 [#2122]: https://github.com/tokio-rs/tokio/pull/2122 [#2135]: https://github.com/tokio-rs/tokio/pull/2135 [#2145]: https://github.com/tokio-rs/tokio/pull/2145 [#2149]: https://github.com/tokio-rs/tokio/pull/2149 [#2151]: https://github.com/tokio-rs/tokio/pull/2151 [#2152]: https://github.com/tokio-rs/tokio/pull/2152 [#2155]: https://github.com/tokio-rs/tokio/pull/2155 [#2158]: https://github.com/tokio-rs/tokio/pull/2158 [#2163]: https://github.com/tokio-rs/tokio/pull/2163 [#2164]: https://github.com/tokio-rs/tokio/pull/2164 [#2167]: https://github.com/tokio-rs/tokio/pull/2167 [#2168]: https://github.com/tokio-rs/tokio/pull/2168 [#2169]: https://github.com/tokio-rs/tokio/pull/2169 [#2175]: https://github.com/tokio-rs/tokio/pull/2175 [#2177]: https://github.com/tokio-rs/tokio/pull/2177 # 0.2.10 (January 21, 2020) ### Fixes - `#[tokio::main]` when `rt-core` feature flag is not enabled ([#2139]). - remove `AsyncBufRead` from `BufStream` impl block ([#2108]). - potential undefined behavior when implementing `AsyncRead` incorrectly ([#2030]). ### Added - `BufStream::with_capacity` ([#2125]). - impl `From` and `Default` for `RwLock` ([#2089]). - `io::ReadHalf::is_pair_of` checks if provided `WriteHalf` is for the same underlying object ([#1762], [#2144]). - `runtime::Handle::try_current()` returns a handle to the current runtime ([#2118]). - `stream::empty()` returns an immediately ready empty stream ([#2092]). - `stream::once(val)` returns a stream that yields a single value: `val` ([#2094]). - `stream::pending()` returns a stream that never becomes ready ([#2092]). - `StreamExt::chain()` sequences a second stream after the first completes ([#2093]). - `StreamExt::collect()` transform a stream into a collection ([#2109]). - `StreamExt::fuse` ends the stream after the first `None` ([#2085]). - `StreamExt::merge` combines two streams, yielding values as they become ready ([#2091]). - Task-local storage ([#2126]). [#1762]: https://github.com/tokio-rs/tokio/pull/1762 [#2030]: https://github.com/tokio-rs/tokio/pull/2030 [#2085]: https://github.com/tokio-rs/tokio/pull/2085 [#2089]: https://github.com/tokio-rs/tokio/pull/2089 [#2091]: https://github.com/tokio-rs/tokio/pull/2091 [#2092]: https://github.com/tokio-rs/tokio/pull/2092 [#2093]: https://github.com/tokio-rs/tokio/pull/2093 [#2094]: https://github.com/tokio-rs/tokio/pull/2094 [#2108]: https://github.com/tokio-rs/tokio/pull/2108 [#2109]: https://github.com/tokio-rs/tokio/pull/2109 [#2118]: https://github.com/tokio-rs/tokio/pull/2118 [#2125]: https://github.com/tokio-rs/tokio/pull/2125 [#2126]: https://github.com/tokio-rs/tokio/pull/2126 [#2139]: https://github.com/tokio-rs/tokio/pull/2139 [#2144]: https://github.com/tokio-rs/tokio/pull/2144 # 0.2.9 (January 9, 2020) ### Fixes - `AsyncSeek` impl for `File` ([#1986]). - rt: shutdown deadlock in `threaded_scheduler` ([#2074], [#2082]). - rt: memory ordering when dropping `JoinHandle` ([#2044]). - docs: misc API documentation fixes and improvements. [#1986]: https://github.com/tokio-rs/tokio/pull/1986 [#2044]: https://github.com/tokio-rs/tokio/pull/2044 [#2074]: https://github.com/tokio-rs/tokio/pull/2074 [#2082]: https://github.com/tokio-rs/tokio/pull/2082 # 0.2.8 (January 7, 2020) ### Fixes - depend on new version of `tokio-macros`. # 0.2.7 (January 7, 2020) ### Fixes - potential deadlock when dropping `basic_scheduler` Runtime. - calling `spawn_blocking` from within a `spawn_blocking` ([#2006]). - storing a `Runtime` instance in a thread-local ([#2011]). - miscellaneous documentation fixes. - rt: fix `Waker::will_wake` to return true when tasks match ([#2045]). - test-util: `time::advance` runs pending tasks before changing the time ([#2059]). ### Added - `net::lookup_host` maps a `T: ToSocketAddrs` to a stream of `SocketAddrs` ([#1870]). - `process::Child` fields are made public to match `std` ([#2014]). - impl `Stream` for `sync::broadcast::Receiver` ([#2012]). - `sync::RwLock` provides an asynchronous read-write lock ([#1699]). - `runtime::Handle::current` returns the handle for the current runtime ([#2040]). - `StreamExt::filter` filters stream values according to a predicate ([#2001]). - `StreamExt::filter_map` simultaneously filter and map stream values ([#2001]). - `StreamExt::try_next` convenience for streams of `Result` ([#2005]). - `StreamExt::take` limits a stream to a specified number of values ([#2025]). - `StreamExt::take_while` limits a stream based on a predicate ([#2029]). - `StreamExt::all` tests if every element of the stream matches a predicate ([#2035]). - `StreamExt::any` tests if any element of the stream matches a predicate ([#2034]). - `task::LocalSet.await` runs spawned tasks until the set is idle ([#1971]). - `time::DelayQueue::len` returns the number entries in the queue ([#1755]). - expose runtime options from the `#[tokio::main]` and `#[tokio::test]` ([#2022]). [#1699]: https://github.com/tokio-rs/tokio/pull/1699 [#1755]: https://github.com/tokio-rs/tokio/pull/1755 [#1870]: https://github.com/tokio-rs/tokio/pull/1870 [#1971]: https://github.com/tokio-rs/tokio/pull/1971 [#2001]: https://github.com/tokio-rs/tokio/pull/2001 [#2005]: https://github.com/tokio-rs/tokio/pull/2005 [#2006]: https://github.com/tokio-rs/tokio/pull/2006 [#2011]: https://github.com/tokio-rs/tokio/pull/2011 [#2012]: https://github.com/tokio-rs/tokio/pull/2012 [#2014]: https://github.com/tokio-rs/tokio/pull/2014 [#2022]: https://github.com/tokio-rs/tokio/pull/2022 [#2025]: https://github.com/tokio-rs/tokio/pull/2025 [#2029]: https://github.com/tokio-rs/tokio/pull/2029 [#2034]: https://github.com/tokio-rs/tokio/pull/2034 [#2035]: https://github.com/tokio-rs/tokio/pull/2035 [#2040]: https://github.com/tokio-rs/tokio/pull/2040 [#2045]: https://github.com/tokio-rs/tokio/pull/2045 [#2059]: https://github.com/tokio-rs/tokio/pull/2059 # 0.2.6 (December 19, 2019) ### Fixes - `fs::File::seek` API regression ([#1991]). [#1991]: https://github.com/tokio-rs/tokio/pull/1991 # 0.2.5 (December 18, 2019) ### Added - `io::AsyncSeek` trait ([#1924]). - `Mutex::try_lock` ([#1939]) - `mpsc::Receiver::try_recv` and `mpsc::UnboundedReceiver::try_recv` ([#1939]). - `writev` support for `TcpStream` ([#1956]). - `time::throttle` for throttling streams ([#1949]). - implement `Stream` for `time::DelayQueue` ([#1975]). - `sync::broadcast` provides a fan-out channel ([#1943]). - `sync::Semaphore` provides an async semaphore ([#1973]). - `stream::StreamExt` provides stream utilities ([#1962]). ### Fixes - deadlock risk while shutting down the runtime ([#1972]). - panic while shutting down the runtime ([#1978]). - `sync::MutexGuard` debug output ([#1961]). - misc doc improvements ([#1933], [#1934], [#1940], [#1942]). ### Changes - runtime threads are configured with `runtime::Builder::core_threads` and `runtime::Builder::max_threads`. `runtime::Builder::num_threads` is deprecated ([#1977]). [#1924]: https://github.com/tokio-rs/tokio/pull/1924 [#1933]: https://github.com/tokio-rs/tokio/pull/1933 [#1934]: https://github.com/tokio-rs/tokio/pull/1934 [#1939]: https://github.com/tokio-rs/tokio/pull/1939 [#1940]: https://github.com/tokio-rs/tokio/pull/1940 [#1942]: https://github.com/tokio-rs/tokio/pull/1942 [#1943]: https://github.com/tokio-rs/tokio/pull/1943 [#1949]: https://github.com/tokio-rs/tokio/pull/1949 [#1956]: https://github.com/tokio-rs/tokio/pull/1956 [#1961]: https://github.com/tokio-rs/tokio/pull/1961 [#1962]: https://github.com/tokio-rs/tokio/pull/1962 [#1972]: https://github.com/tokio-rs/tokio/pull/1972 [#1973]: https://github.com/tokio-rs/tokio/pull/1973 [#1975]: https://github.com/tokio-rs/tokio/pull/1975 [#1977]: https://github.com/tokio-rs/tokio/pull/1977 [#1978]: https://github.com/tokio-rs/tokio/pull/1978 # 0.2.4 (December 6, 2019) ### Fixes - `sync::Mutex` deadlock when `lock()` future is dropped early ([#1898]). [#1898]: https://github.com/tokio-rs/tokio/pull/1898 # 0.2.3 (December 6, 2019) ### Added - read / write integers using `AsyncReadExt` and `AsyncWriteExt` ([#1863]). - `read_buf` / `write_buf` for reading / writing `Buf` / `BufMut` ([#1881]). - `TcpStream::poll_peek` - pollable API for performing TCP peek ([#1864]). - `sync::oneshot::error::TryRecvError` provides variants to detect the error kind ([#1874]). - `LocalSet::block_on` accepts `!'static` task ([#1882]). - `task::JoinError` is now `Sync` ([#1888]). - impl conversions between `tokio::time::Instant` and `std::time::Instant` ([#1904]). ### Fixes - calling `spawn_blocking` after runtime shutdown ([#1875]). - `LocalSet` drop infinite loop ([#1892]). - `LocalSet` hang under load ([#1905]). - improved documentation ([#1865], [#1866], [#1868], [#1874], [#1876], [#1911]). [#1863]: https://github.com/tokio-rs/tokio/pull/1863 [#1864]: https://github.com/tokio-rs/tokio/pull/1864 [#1865]: https://github.com/tokio-rs/tokio/pull/1865 [#1866]: https://github.com/tokio-rs/tokio/pull/1866 [#1868]: https://github.com/tokio-rs/tokio/pull/1868 [#1874]: https://github.com/tokio-rs/tokio/pull/1874 [#1875]: https://github.com/tokio-rs/tokio/pull/1875 [#1876]: https://github.com/tokio-rs/tokio/pull/1876 [#1881]: https://github.com/tokio-rs/tokio/pull/1881 [#1882]: https://github.com/tokio-rs/tokio/pull/1882 [#1888]: https://github.com/tokio-rs/tokio/pull/1888 [#1892]: https://github.com/tokio-rs/tokio/pull/1892 [#1904]: https://github.com/tokio-rs/tokio/pull/1904 [#1905]: https://github.com/tokio-rs/tokio/pull/1905 [#1911]: https://github.com/tokio-rs/tokio/pull/1911 # 0.2.2 (November 29, 2019) ### Fixes - scheduling with `basic_scheduler` ([#1861]). - update `spawn` panic message to specify that a task scheduler is required ([#1839]). - API docs example for `runtime::Builder` to include a task scheduler ([#1841]). - general documentation ([#1834]). - building on illumos/solaris ([#1772]). - panic when dropping `LocalSet` ([#1843]). - API docs mention the required Cargo features for `Builder::{basic, threaded}_scheduler` ([#1858]). ### Added - impl `Stream` for `signal::unix::Signal` ([#1849]). - API docs for platform specific behavior of `signal::ctrl_c` and `signal::unix::Signal` ([#1854]). - API docs for `signal::unix::Signal::{recv, poll_recv}` and `signal::windows::CtrlBreak::{recv, poll_recv}` ([#1854]). - `File::into_std` and `File::try_into_std` methods ([#1856]). [#1772]: https://github.com/tokio-rs/tokio/pull/1772 [#1834]: https://github.com/tokio-rs/tokio/pull/1834 [#1839]: https://github.com/tokio-rs/tokio/pull/1839 [#1841]: https://github.com/tokio-rs/tokio/pull/1841 [#1843]: https://github.com/tokio-rs/tokio/pull/1843 [#1849]: https://github.com/tokio-rs/tokio/pull/1849 [#1854]: https://github.com/tokio-rs/tokio/pull/1854 [#1856]: https://github.com/tokio-rs/tokio/pull/1856 [#1858]: https://github.com/tokio-rs/tokio/pull/1858 [#1861]: https://github.com/tokio-rs/tokio/pull/1861 # 0.2.1 (November 26, 2019) ### Fixes - API docs for `TcpListener::incoming`, `UnixListener::incoming` ([#1831]). ### Added - `tokio::task::LocalSet` provides a strategy for spawning `!Send` tasks ([#1733]). - export `tokio::time::Elapsed` ([#1826]). - impl `AsRawFd`, `AsRawHandle` for `tokio::fs::File` ([#1827]). [#1733]: https://github.com/tokio-rs/tokio/pull/1733 [#1826]: https://github.com/tokio-rs/tokio/pull/1826 [#1827]: https://github.com/tokio-rs/tokio/pull/1827 [#1831]: https://github.com/tokio-rs/tokio/pull/1831 # 0.2.0 (November 26, 2019) A major breaking change. Most implementation and APIs have changed one way or another. This changelog entry contains a highlight ### Changed - APIs are updated to use `async / await`. - most `tokio-*` crates are collapsed into this crate. - Scheduler is rewritten. - `tokio::spawn` returns a `JoinHandle`. - A single I/O / timer is used per runtime. - I/O driver uses a concurrent slab for allocating state. - components are made available via feature flag. - Use `bytes` 0.5 - `tokio::codec` is moved to `tokio-util`. ### Removed - Standalone `timer` and `net` drivers are removed, use `Runtime` instead - `current_thread` runtime is removed, use `tokio::runtime::Runtime` with `basic_scheduler` instead. # 0.1.21 (May 30, 2019) ### Changed - Bump `tokio-trace-core` version to 0.2 ([#1111]). [#1111]: https://github.com/tokio-rs/tokio/pull/1111 # 0.1.20 (May 14, 2019) ### Added - `tokio::runtime::Builder::panic_handler` allows configuring handling panics on the runtime ([#1055]). [#1055]: https://github.com/tokio-rs/tokio/pull/1055 # 0.1.19 (April 22, 2019) ### Added - Re-export `tokio::sync::Mutex` primitive ([#964]). [#964]: https://github.com/tokio-rs/tokio/pull/964 # 0.1.18 (March 22, 2019) ### Added - `TypedExecutor` re-export and implementations ([#993]). [#993]: https://github.com/tokio-rs/tokio/pull/993 # 0.1.17 (March 13, 2019) ### Added - Propagate trace subscriber in the runtime ([#966]). [#966]: https://github.com/tokio-rs/tokio/pull/966 # 0.1.16 (March 1, 2019) ### Fixed - async-await: track latest nightly changes ([#940]). ### Added - `sync::Watch`, a single value broadcast channel ([#922]). - Async equivalent of read / write file helpers being added to `std` ([#896]). [#896]: https://github.com/tokio-rs/tokio/pull/896 [#922]: https://github.com/tokio-rs/tokio/pull/922 [#940]: https://github.com/tokio-rs/tokio/pull/940 # 0.1.15 (January 24, 2019) ### Added - Re-export tokio-sync APIs ([#839]). - Stream enumerate combinator ([#832]). [#832]: https://github.com/tokio-rs/tokio/pull/832 [#839]: https://github.com/tokio-rs/tokio/pull/839 # 0.1.14 (January 6, 2019) - Use feature flags to break up the crate, allowing users to pick & choose components ([#808]). - Export `UnixDatagram` and `UnixDatagramFramed` ([#772]). [#772]: https://github.com/tokio-rs/tokio/pull/772 [#808]: https://github.com/tokio-rs/tokio/pull/808 # 0.1.13 (November 21, 2018) - Fix `Runtime::reactor()` when no tasks are spawned ([#721]). - `runtime::Builder` no longer uses deprecated methods ([#749]). - Provide `after_start` and `before_stop` configuration settings for `Runtime` ([#756]). - Implement throttle stream combinator ([#736]). [#721]: https://github.com/tokio-rs/tokio/pull/721 [#736]: https://github.com/tokio-rs/tokio/pull/736 [#749]: https://github.com/tokio-rs/tokio/pull/749 [#756]: https://github.com/tokio-rs/tokio/pull/756 # 0.1.12 (October 23, 2018) - runtime: expose `keep_alive` on runtime builder ([#676]). - runtime: create a reactor per worker thread ([#660]). - codec: fix panic in `LengthDelimitedCodec` ([#682]). - io: re-export `tokio_io::io::read` function ([#689]). - runtime: check for executor re-entry in more places ([#708]). [#660]: https://github.com/tokio-rs/tokio/pull/660 [#676]: https://github.com/tokio-rs/tokio/pull/676 [#682]: https://github.com/tokio-rs/tokio/pull/682 [#689]: https://github.com/tokio-rs/tokio/pull/689 [#708]: https://github.com/tokio-rs/tokio/pull/708 # 0.1.11 (September 28, 2018) - Fix `tokio-async-await` dependency ([#675]). [#675]: https://github.com/tokio-rs/tokio/pull/675 # 0.1.10 (September 27, 2018) - Fix minimal versions # 0.1.9 (September 27, 2018) - Experimental async/await improvements ([#661]). - Re-export `TaskExecutor` from `tokio-current-thread` ([#652]). - Improve `Runtime` builder API ([#645]). - `tokio::run` panics when called from the context of an executor ([#646]). - Introduce `StreamExt` with a `timeout` helper ([#573]). - Move `length_delimited` into `tokio` ([#575]). - Re-organize `tokio::net` module ([#548]). - Re-export `tokio-current-thread::spawn` in current_thread runtime ([#579]). [#548]: https://github.com/tokio-rs/tokio/pull/548 [#573]: https://github.com/tokio-rs/tokio/pull/573 [#575]: https://github.com/tokio-rs/tokio/pull/575 [#579]: https://github.com/tokio-rs/tokio/pull/579 [#645]: https://github.com/tokio-rs/tokio/pull/645 [#646]: https://github.com/tokio-rs/tokio/pull/646 [#652]: https://github.com/tokio-rs/tokio/pull/652 [#661]: https://github.com/tokio-rs/tokio/pull/661 # 0.1.8 (August 23, 2018) - Extract tokio::executor::current_thread to a sub crate ([#370]) - Add `Runtime::block_on` ([#398]) - Add `runtime::current_thread::block_on_all` ([#477]) - Misc documentation improvements ([#450]) - Implement `std::error::Error` for error types ([#501]) [#370]: https://github.com/tokio-rs/tokio/pull/370 [#398]: https://github.com/tokio-rs/tokio/pull/398 [#450]: https://github.com/tokio-rs/tokio/pull/450 [#477]: https://github.com/tokio-rs/tokio/pull/477 [#501]: https://github.com/tokio-rs/tokio/pull/501 # 0.1.7 (June 6, 2018) - Add `Runtime::block_on` for concurrent runtime ([#391]). - Provide handle to `current_thread::Runtime` that allows spawning tasks from other threads ([#340]). - Provide `clock::now()`, a configurable source of time ([#381]). [#340]: https://github.com/tokio-rs/tokio/pull/340 [#381]: https://github.com/tokio-rs/tokio/pull/381 [#391]: https://github.com/tokio-rs/tokio/pull/391 # 0.1.6 (May 2, 2018) - Add asynchronous filesystem APIs ([#323]). - Add "current thread" runtime variant ([#308]). - `CurrentThread`: Expose inner `Park` instance. - Improve fairness of `CurrentThread` executor ([#313]). [#308]: https://github.com/tokio-rs/tokio/pull/308 [#313]: https://github.com/tokio-rs/tokio/pull/313 [#323]: https://github.com/tokio-rs/tokio/pull/323 # 0.1.5 (March 30, 2018) - Provide timer API ([#266]) [#266]: https://github.com/tokio-rs/tokio/pull/266 # 0.1.4 (March 22, 2018) - Fix build on FreeBSD ([#218]) - Shutdown the Runtime when the handle is dropped ([#214]) - Set Runtime thread name prefix for worker threads ([#232]) - Add builder for Runtime ([#234]) - Extract TCP and UDP types into separate crates ([#224]) - Optionally support futures 0.2. [#214]: https://github.com/tokio-rs/tokio/pull/214 [#218]: https://github.com/tokio-rs/tokio/pull/218 [#224]: https://github.com/tokio-rs/tokio/pull/224 [#232]: https://github.com/tokio-rs/tokio/pull/232 [#234]: https://github.com/tokio-rs/tokio/pull/234 # 0.1.3 (March 09, 2018) - Fix `CurrentThread::turn` to block on idle ([#212]). [#212]: https://github.com/tokio-rs/tokio/pull/212 # 0.1.2 (March 09, 2018) - Introduce Tokio Runtime ([#141]) - Provide `CurrentThread` for more flexible usage of current thread executor ([#141]). - Add Lio for platforms that support it ([#142]). - I/O resources now lazily bind to the reactor ([#160]). - Extract Reactor to dedicated crate ([#169]) - Add facade to sub crates and add prelude ([#166]). - Switch TCP/UDP fns to poll\_ -> Poll<...> style ([#175]) [#141]: https://github.com/tokio-rs/tokio/pull/141 [#142]: https://github.com/tokio-rs/tokio/pull/142 [#160]: https://github.com/tokio-rs/tokio/pull/160 [#166]: https://github.com/tokio-rs/tokio/pull/166 [#169]: https://github.com/tokio-rs/tokio/pull/169 [#175]: https://github.com/tokio-rs/tokio/pull/175 # 0.1.1 (February 09, 2018) - Doc fixes # 0.1.0 (February 07, 2018) - Initial crate released based on [RFC](https://github.com/tokio-rs/tokio-rfcs/pull/3). #![cfg(feature = "process")] #![warn(rust_2018_idioms)] // This tests test the behavior of `process::Command::spawn` when it is used // outside runtime, and when `process::Child::wait ` is used in a different // runtime from which `process::Command::spawn` is used. #![cfg(all(unix, not(target_os = "freebsd"), not(miri)))] // Miri cannot run system commands use std::process::Stdio; use tokio::{process::Command, runtime::Runtime}; #[test] fn process_spawned_and_wait_in_different_runtime() { let mut child = Runtime::new().unwrap().block_on(async { Command::new("true") .stdin(Stdio::piped()) .stdout(Stdio::null()) .spawn() .unwrap() }); Runtime::new().unwrap().block_on(async { let _ = child.wait().await.unwrap(); }); } #[test] #[should_panic( expected = "there is no reactor running, must be called from the context of a Tokio 1.x runtime" )] fn process_spawned_outside_runtime() { let _ = Command::new("true") .stdin(Stdio::piped()) .stdout(Stdio::null()) .spawn(); } # Changelog This project follows semantic versioning. The MSRV (Minimum Supported Rust Version) is 1.37.0, and typenum is tested against this Rust version. ### Unreleased ### 1.20.0 (2026-04-18) - [removed] Removed `no_std` feature flag (deprecated since 1.3.0) - [removed] Removed `force_unix_path_separator` feature flag (deprecated since 1.17.0) - [changed] Replaced `build.rs` script with pre-generated test files - [added] Indexing into tuples - [changed] MSRV now 1.41.0 ### 1.19.0 (2025-10-01) - [fixed] Conflicting trait implementations with the `const-generics` feature on 16-bit targets - [fixed] Remove deprecated feature flag - [added] Support `core::fmt::Binary` - [added] Constants for 2^N - 1 - [added] Implemented `ToInt` for `isize`, `i128`, and `u128` ### 1.18.0 (2025-02-17) - [changed] Remove build scripts; instead check-in the built code (PR #219) - [added] Constants for 3600 (PR #220) - [added] Elixir-style syntax for `tarr!` macro (PR #214) - [added] `FoldAdd` and `FoldMul` to get the sum/product of an array (PR #209) ### 1.17.0 (2023-09-15) - [removed] Remove `force_unix_path_separator` feature, make it the default - [added] docs.rs metadata and cfg options - [added] Playground metadata ### 1.16.0 (2022-12-05) - [added] `const INT` field to the `ToInt` trait. - [added] `const-generics` field with `U` mapping where `N` is a const generic. ### 1.15.0 (2021-12-25) - [fixed] Cross-compilation issue due to doing math in build script. (PR #177) - [added] New feature `scale_info` for using inside [Substrate](https://github.com/paritytech/substrate.git)-based runtimes (PR #175) ### 1.14.0 (2021-09-01) - [changed] Sealed all marker traits. Documentation already stated that these should not be implemented outside the crate, so this is not considered a breaking change. ### 1.13.0 (2021-03-12) - [changed] MSRV from 1.22.0 to 1.37.0. - [fixed] `op` macro with 2018 edition import. - [changed] Allowed calling `assert_type_eq` and `assert_type` at top level. - [added] Marker trait `Zero` for `Z0`, `U0`, and `B0`. - [added] Implementation of `Pow` trait for f32 and f64 with negative exponent. - [added] Trait `ToInt`. ### 1.12.0 (2020-04-13) - [added] Feature `force_unix_path_separator` to support building without Cargo. - [added] Greatest common divisor operator `Gcd` with alias `Gcf`. - [added] `gcd` to the `op!` macro. - [changed] Added `Copy` bound to `Rhs` of `Mul` impl for ``. - [changed] Added `Copy` bound to `Rhs` of `Div` impl for ``. - [changed] Added `Copy` bound to `Rhs` of `PartialDiv` impl for ``. - [changed] Added `Copy` bound to `Rhs` of `Rem` impl for ``. - [fixed] Make all functions #[inline]. ### 1.11.2 (2019-08-26) - [fixed] Cross compilation from Linux to Windows. ### 1.11.1 (2019-08-25) - [fixed] Builds on earlier Rust builds again and added Rust 1.22.0 to Travis to prevent future breakage. ### 1.11.0 (2019-08-25) - [added] Integer `log2` to the `op!` macro. - [added] Integer binary logarithm operator `Logarithm2` with alias `Log2`. - [changed] Removed `feature(i128_type)` when running with the `i128` feature. Kept the feature flag. for typenum to maintain compatibility with old Rust versions. - [added] Integer `sqrt` to the `op!` macro. - [added] Integer square root operator `SquareRoot` with alias `Sqrt`. - [fixed] Bug with attempting to create U1024 type alias twice. ### 1.10.0 (2018-03-11) - [added] The `PowerOfTwo` marker trait. - [added] Associated constants for `Bit`, `Unsigned`, and `Integer`. ### 1.9.0 (2017-05-14) - [added] The `Abs` type operator and corresponding `AbsVal` alias. - [added] The feature `i128` that enables creating 128-bit integers from typenums. - [added] The `assert_type!` and `assert_type_eq!` macros. - [added] Operators to the `op!` macro, including those performed by `cmp!`. - [fixed] Bug in `op!` macro involving functions and convoluted expressions. - [deprecated] The `cmp!` macro. ### 1.8.0 (2017-04-12) - [added] The `op!` macro for conveniently performing type-level operations. - [added] The `cmp!` macro for conveniently performing type-level comparisons. - [added] Some comparison type-operators that are used by the `cmp!` macro. ### 1.7.0 (2017-03-24) - [added] Type operators `Min` and `Max` with accompanying aliases `Minimum` and `Maximum` ### 1.6.0 (2017-02-24) - [fixed] Bug in `Array` division. - [fixed] Bug where `Rem` would sometimes exit early with the wrong answer. - [added] `PartialDiv` operator that performs division as a partial function -- it's defined only when there is no remainder. ### 1.5.2 (2017-02-04) - [fixed] Bug between `Div` implementation and type system. ### 1.5.1 (2016-11-08) - [fixed] Expanded implementation of `Pow` for primitives. ### 1.5.0 (2016-11-03) - [added] Functions to the `Pow` and `Len` traits. This is *technically* a breaking change, but it would only break someone's code if they have a custom impl for `Pow`. I would be very surprised if that is anyone other than me. ### 1.4.0 (2016-10-29) - [added] Type-level arrays of type-level integers. (PR #66) - [added] The types in this crate are now instantiable. (Issue #67, PR #68) ### 1.3.1 (2016-03-31) - [fixed] Bug with recent nightlies. ### 1.3.0 (2016-02-07) - [changed] Removed dependency on libstd. (Issue #53, PR #55) - [changed] Reorganized module structure. (PR #57) ### 1.2.0 (2016-01-03) - [added] This change log! - [added] Convenience type aliases for operators. (Issue #48, PR #50) - [added] Types in this crate now derive all possible traits. (Issue #42, PR #51) # Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [0.30.3] - 2025-11-16 ### Added ### Fixed - the text output now uses the singular form when there was 1 unmatched diagnostic ### Changed - Bump `prettydiff` dependency to 0.9 ## [0.30.2] - 2025-07-01 ### Added ### Fixed ### Changed - DependencyBuilder: if `config.target` is set (which is always the case if you use `run_tests_generic`), ui_test now supports the same crate showing up as a direct dependency and a dependency of a proc-macro. ### Removed ## [0.30.1] - 2025-05-28 ### Added ### Fixed * the JSON output now properly escapes backslashes on Windows ### Changed ### Removed ## [0.30.0] - 2025-05-20 ### Added * support for JSON output via argument `--format=json` ### Fixed * missing lines in diff output ### Changed ### Removed ## [0.29.0] - 2025-02-25 ### Added ### Fixed ### Changed * output conflict handling now only takes the unnormalized output and is expected to normalize itself if desired. ### Removed ## [0.28.0] - 2025-01-27 ### Added ### Fixed * exported previously-unnameable parser types ### Changed * moved rustc revision-specific arguments (`--cfg=`...) to a custom flag (`custom_flags::revision_args`) ## [0.27.0] - 2024-10-07 ### Added * debug status emitter for when you have problems with ui_test * cargo features to disable gha or CLI refreshing ### Fixed * CLI refreshing is now reliable and not leaving around fragments * Can run multiple `Config`s that test the same files in parallel. ### Changed * `only`/`ignore` filters now only accept integers, alphabetic characters, `-` and `_` * `only`/ `ignore` filters allow comments by ignoring everything from an `#` onwards * `OutputConflictHandling` has been replaced by `error_on_output_conflict`, `bless_output_files`, and `ignore_output_conflict` functions. Custom functions can now be used to implement special handling of output conflicts. * `Run` now forwards env vars passed to the compiler to the executable, too ### Removed ## [0.26.4] - 2024-09-09 ### Added ### Fixed * custom flags were not overriding the default, but the other way around. ### Changed * Made more code public for miri to use * Replaced `lazy_static` with std's `OnceLock` ### Removed ## [0.26.3] - 2024-09-08 ### Added ### Fixed ### Changed ### Removed ## [0.26.2] - 2024-09-08 ### Added ### Fixed * The order of normalizations and other settings is now that individual tests' normalizations get applied after the global normalizations. ### Changed ### Removed ## [0.26.0] - 2024-09-07 ### Added * examples and usage instructions * `Config::comment_start` field for changing the default comment symbols from `//` ### Fixed ### Changed * default comment symbols for `Config::cargo` changed to `#` * Ctrl+C now prints the summary of the tests that were run before Ctrl+C is pressed * `//@only-target` and `//@only-host` are now separated from the triple substring by a `:` instead of a `-` and accepts multiple (space separated) filters where just one of them needs to match * `//@only-64bit` is now `//@only-bitwidth: 64`. You can use `//@only-bitwidth: 64 16` to enable the test for 64 and 16 bit but not for 32 bit. ### Removed * `TestStatus::update_status`, instead use a revision if you want to run subcommands ## [0.25.0] - 2024-07-24 ### Added ### Fixed * panics when ui_test tried to show diagnostics on multi-byte chars ### Changed ### Removed ## [0.24.0] - 2024-07-11 ### Added * `Text::diff()` creates a text status emitter that does not do full dumps of test stderr/stdout, but only emits the diff of the changes * Support `-Zbuild-std` by add * use `DependencyBuilder::build_std` to enable it ### Fixed * Missing result dump if printing thread is too slow and the entire test exits before it is done. ### Changed * Split up `Revisioned::mode` into `Revisioned::exit_status` and `Revisioned::require_annotations` * `Config::output_conflict_handling` is now `Error` instead of `Bless` * Rustfix tests now create multiple `.fixed` files if diagnostics contain multiple suggestions * updated `prettydiff` from 0.6.4 to 0.7.0, which drops `ansi_term` and `winapi*` deps. ### Removed ## [0.23.0] - 2024-05-02 ### Added * `Config::custom_comments` * `Revisioned::custom` * `Flag` trait for custom `//@` flags * `Build` trait for custom aux/dep build * `BuildManager` for deduplicating these builds on a per-`Config` basis ### Fixed * folders and libraries linked by build scripts were ignored, causing linker failures ### Changed * removed `Revisioned::no_rustfix` in favor of turning that into a rustc-specific custom flag * use `config.comment_defaults.base().set_custom("rustfix", RustFixMode::Everything);` to overwrite the `MachineApplicable` default * removed `Revisioned::edition` in favor of turning that into a rustc-specific custom flag * removed `Revisioned::needs_asm_support` in favor of turning that into a rustc-specific custom flag * replaced `Mode::Run` with a rustc-specific run flag * replaced rustfix with a rustc-specific rustfix flag * replaced `rustfix` fields of `Mode::Fail` and `Mode::Yolo` by instead overwriting the rustc-specific custom flag * aux builds and dependencies are now built *per* `Config` instead of being built just for the first `Config` and the result shared by the others * the configs could be different enough that aux builds built with a different config are incompatible (e.g. different targets). * replaced `Revisioned::aux_builds` with a rustc-specific custom flag * replaced `dependency_builder` and `dependency_manifest_path` with `DependencyBuilder` `Flag` that you an add to the default comments. * use `config.comment_defaults.base().set_custom("dependencies", DependencyBuilder::default());` to get the same behaviour as setting `Config.toml` as the `dependency_manifest_path`. * updated `rustfix` from 0.6.1 to 0.8.1. This may cause additional suggestions to be applied that previously weren't. ### Removed ## [0.22.3] - 2024-04-05 ### Added * Reexporting `eyre::Result` at the root level ### Fixed * Passing `--target` to build command when cross-compiling. ### Changed ### Removed ## [0.22.2] - 2024-02-27 ### Added ### Fixed ### Changed * `spanned` dependency bump to lower `bstr` to `1.6.0` to resolve windows linker issues with `1.7` ### Removed ## [0.22.1] - 2024-02-16 ### Added * Add `//~v` comments to put an error matcher above the error site. ### Fixed * Give aux builds the default comment config, too ### Changed ### Removed ## [0.22.0] - 2024-01-24 ### Added * Started maintaining a changelog * `Config::comment_defaults` allows setting `//@` comments for all tests * `//~` comments can now specify just an error code or lint name, without any message. ERROR level is implied * `Revisioned::diagnostic_code_prefix` allows stripping a prefix of diagnostic codes to avoid having to repeat `clippy::` in all messages ### Fixed * report an error instead of panicking when encountering a suggestion that does not belong to the main file. * number of filtered tests is now > 0 when things actually got filtered. ### Changed * crate-private span handling was passed off to the `spanned` crate, improving some diagnostics along the way. * `Config::output_conflict_handling` does not contain the bless command message anymore, it is instead available separately as `Config::bless_command` * Updating `cargo_metadata` to `0.18` * Updated `spanned` to `0.1.5`, giving more precise spans for more iterator operations * `Config::cfgs` is now `Config::program::cfg_flag` * Bumped `annotate-snippets` to `0.10` ### Removed * `$DIR` and `RUSTLIB` replacements * `Config::edition` (replaced by `config.comment_defaults.base().edition`) * `Config::filter_stdout` (replaced by `config.comment_defaults.base().normalize_stdout`) * `Config::filter_stderr` (replaced by `config.comment_defaults.base().normalize_stderr`) * `Config::mode` (replaced by `config.comment_defaults.base().mode`) ## [0.21.2] - 2023-09-27 name: Release new version on: workflow_dispatch: secrets: CARGO_REGISTRY_TOKEN: required: true env: RUST_BACKTRACE: 1 CARGO_TERM_COLOR: always jobs: create-release: name: Create release runs-on: ubuntu-latest if: github.ref == 'refs/heads/main' steps: - name: Checkout uses: actions/checkout@v4 with: persist-credentials: true - name: Install rust uses: actions-rs/toolchain@v1 with: toolchain: stable profile: minimal override: true - uses: Swatinem/rust-cache@v2 # Determine which version we're about to publish, so we can tag it appropriately. # If the tag already exists, then we've already published this version. - name: Determine current version id: version-check run: | # Fail on first error, on undefined variables, and on errors in pipes. set -euo pipefail export VERSION="$(cargo metadata --format-version 1 | \ jq --arg crate_name ui_test --exit-status -r \ '.packages[] | select(.name == $crate_name) | .version')" echo "version=$VERSION" >> $GITHUB_OUTPUT if [[ "$(git tag -l "$VERSION")" != '' ]]; then echo "Aborting: Version $VERSION is already published, we found its tag in the repo." exit 1 fi - name: Install binstall run: curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash # TODO: Replace this with the cargo-semver-checks v2 GitHub Action when it's stabilized: # https://github.com/obi1kenobi/cargo-semver-checks-action/pull/21 - name: Semver-check run: | # Fail on first error, on undefined variables, and on errors in pipes. set -euo pipefail cargo binstall --locked cargo-semver-checks cargo semver-checks check-release - name: Publish run: cargo publish env: CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} - name: Tag the version run: | # Fail on first error, on undefined variables, and on errors in pipes. set -euo pipefail git tag "${{ steps.version-check.outputs.version }}" git push origin "${{ steps.version-check.outputs.version }}" - uses: taiki-e/create-gh-release-action@v1 name: Create GitHub release with: branch: main ref: refs/tags/${{ steps.version-check.outputs.version }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] ### Added ### Fixed ### Changed ## [0.30.5] - 2026-05-04 ### Added - Added support for Cargo's new `build-dir` layout ### Fixed - Update the help string in CLI to include new flags ### Changed - when a test file has no error patterns, there's now a suggestion to add `//@check-pass` ## [0.30.4] - 2025-11-24 ### Added ### Fixed ### Changed - Bump `indicatif` dependency to 0.18.3 ## [0.30.3] - 2025-11-16 ### Added ### Fixed - the text output now uses the singular form when there was 1 unmatched diagnostic ### Changed - Bump `prettydiff` dependency to 0.9 ## [0.30.2] - 2025-07-01 ### Added ### Fixed ### Changed - DependencyBuilder: if `config.target` is set (which is always the case if you use `run_tests_generic`), ui_test now supports the same crate showing up as a direct dependency and a dependency of a proc-macro. ### Removed ## [0.30.1] - 2025-05-28 ### Added ### Fixed * the JSON output now properly escapes backslashes on Windows ### Changed ### Removed ## [0.30.0] - 2025-05-20 ### Added * support for JSON output via argument `--format=json` ### Fixed * missing lines in diff output ### Changed ### Removed ## [0.29.0] - 2025-02-25 ### Added ### Fixed ### Changed * output conflict handling now only takes the unnormalized output and is expected to normalize itself if desired. ### Removed ## [0.28.0] - 2025-01-27 ### Added ### Fixed * exported previously-unnameable parser types ### Changed * moved rustc revision-specific arguments (`--cfg=`...) to a custom flag (`custom_flags::revision_args`) ## [0.27.0] - 2024-10-07 ### Added * debug status emitter for when you have problems with ui_test * cargo features to disable gha or CLI refreshing ### Fixed * CLI refreshing is now reliable and not leaving around fragments * Can run multiple `Config`s that test the same files in parallel. ### Changed * `only`/`ignore` filters now only accept integers, alphabetic characters, `-` and `_` * `only`/ `ignore` filters allow comments by ignoring everything from an `#` onwards * `OutputConflictHandling` has been replaced by `error_on_output_conflict`, `bless_output_files`, and `ignore_output_conflict` functions. Custom functions can now be used to implement special handling of output conflicts. * `Run` now forwards env vars passed to the compiler to the executable, too ### Removed ## [0.26.4] - 2024-09-09 ### Added ### Fixed * custom flags were not overriding the default, but the other way around. ### Changed * Made more code public for miri to use * Replaced `lazy_static` with std's `OnceLock` ### Removed ## [0.26.3] - 2024-09-08 ### Added ### Fixed ### Changed ### Removed ## [0.26.2] - 2024-09-08 ### Added ### Fixed * The order of normalizations and other settings is now that individual tests' normalizations get applied after the global normalizations. ### Changed ### Removed ## [0.26.0] - 2024-09-07 ### Added * examples and usage instructions * `Config::comment_start` field for changing the default comment symbols from `//` ### Fixed ### Changed * default comment symbols for `Config::cargo` changed to `#` * Ctrl+C now prints the summary of the tests that were run before Ctrl+C is pressed * `//@only-target` and `//@only-host` are now separated from the triple substring by a `:` instead of a `-` and accepts multiple (space separated) filters where just one of them needs to match * `//@only-64bit` is now `//@only-bitwidth: 64`. You can use `//@only-bitwidth: 64 16` to enable the test for 64 and 16 bit but not for 32 bit. ### Removed * `TestStatus::update_status`, instead use a revision if you want to run subcommands ## [0.25.0] - 2024-07-24 ### Added ### Fixed * panics when ui_test tried to show diagnostics on multi-byte chars ### Changed ### Removed ## [0.24.0] - 2024-07-11 ### Added * `Text::diff()` creates a text status emitter that does not do full dumps of test stderr/stdout, but only emits the diff of the changes * Support `-Zbuild-std` by add * use `DependencyBuilder::build_std` to enable it ### Fixed * Missing result dump if printing thread is too slow and the entire test exits before it is done. ### Changed * Split up `Revisioned::mode` into `Revisioned::exit_status` and `Revisioned::require_annotations` * `Config::output_conflict_handling` is now `Error` instead of `Bless` * Rustfix tests now create multiple `.fixed` files if diagnostics contain multiple suggestions * updated `prettydiff` from 0.6.4 to 0.7.0, which drops `ansi_term` and `winapi*` deps. ### Removed ## [0.23.0] - 2024-05-02 ### Added * `Config::custom_comments` * `Revisioned::custom` * `Flag` trait for custom `//@` flags * `Build` trait for custom aux/dep build * `BuildManager` for deduplicating these builds on a per-`Config` basis ### Fixed * folders and libraries linked by build scripts were ignored, causing linker failures ### Changed * removed `Revisioned::no_rustfix` in favor of turning that into a rustc-specific custom flag * use `config.comment_defaults.base().set_custom("rustfix", RustFixMode::Everything);` to overwrite the `MachineApplicable` default * removed `Revisioned::edition` in favor of turning that into a rustc-specific custom flag * removed `Revisioned::needs_asm_support` in favor of turning that into a rustc-specific custom flag * replaced `Mode::Run` with a rustc-specific run flag * replaced rustfix with a rustc-specific rustfix flag * replaced `rustfix` fields of `Mode::Fail` and `Mode::Yolo` by instead overwriting the rustc-specific custom flag * aux builds and dependencies are now built *per* `Config` instead of being built just for the first `Config` and the result shared by the others * the configs could be different enough that aux builds built with a different config are incompatible (e.g. different targets). * replaced `Revisioned::aux_builds` with a rustc-specific custom flag * replaced `dependency_builder` and `dependency_manifest_path` with `DependencyBuilder` `Flag` that you an add to the default comments. * use `config.comment_defaults.base().set_custom("dependencies", DependencyBuilder::default());` to get the same behaviour as setting `Config.toml` as the `dependency_manifest_path`. * updated `rustfix` from 0.6.1 to 0.8.1. This may cause additional suggestions to be applied that previously weren't. ### Removed ## [0.22.3] - 2024-04-05 ### Added * Reexporting `eyre::Result` at the root level ### Fixed * Passing `--target` to build command when cross-compiling. ### Changed ### Removed ## [0.22.2] - 2024-02-27 ### Added ### Fixed ### Changed * `spanned` dependency bump to lower `bstr` to `1.6.0` to resolve windows linker issues with `1.7` ### Removed ## [0.22.1] - 2024-02-16 ### Added * Add `//~v` comments to put an error matcher above the error site. ### Fixed * Give aux builds the default comment config, too ### Changed ### Removed ## [0.22.0] - 2024-01-24 ### Added * Started maintaining a changelog * `Config::comment_defaults` allows setting `//@` comments for all tests * `//~` comments can now specify just an error code or lint name, without any message. ERROR level is implied * `Revisioned::diagnostic_code_prefix` allows stripping a prefix of diagnostic codes to avoid having to repeat `clippy::` in all messages ### Fixed * report an error instead of panicking when encountering a suggestion that does not belong to the main file. * number of filtered tests is now > 0 when things actually got filtered. ### Changed * crate-private span handling was passed off to the `spanned` crate, improving some diagnostics along the way. * `Config::output_conflict_handling` does not contain the bless command message anymore, it is instead available separately as `Config::bless_command` * Updating `cargo_metadata` to `0.18` * Updated `spanned` to `0.1.5`, giving more precise spans for more iterator operations * `Config::cfgs` is now `Config::program::cfg_flag` * Bumped `annotate-snippets` to `0.10` ### Removed * `$DIR` and `RUSTLIB` replacements * `Config::edition` (replaced by `config.comment_defaults.base().edition`) * `Config::filter_stdout` (replaced by `config.comment_defaults.base().normalize_stdout`) * `Config::filter_stderr` (replaced by `config.comment_defaults.base().normalize_stderr`) * `Config::mode` (replaced by `config.comment_defaults.base().mode`) ## [0.21.2] - 2023-09-27 #![allow(unused_imports)] #![allow(clippy::all)] use wasm_bindgen::prelude::*; #[wasm_bindgen] #[doc = "The `CaretChangedReason` enum."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CaretChangedReason`*"] #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub enum CaretChangedReason { Visibilitychange = "visibilitychange", Updateposition = "updateposition", Longpressonemptycontent = "longpressonemptycontent", Taponcaret = "taponcaret", Presscaret = "presscaret", Releasecaret = "releasecaret", Scroll = "scroll", } #![allow(unused_imports)] #![allow(clippy::all)] use super::*; use wasm_bindgen::prelude::*; #[wasm_bindgen] extern "C" { #[wasm_bindgen(extends = "::js_sys::Object", js_name = "CaretStateChangedEventInit")] #[derive(Debug, Clone, PartialEq, Eq)] #[doc = "The `CaretStateChangedEventInit` dictionary."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] pub type CaretStateChangedEventInit; #[doc = "Get the `bubbles` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &CaretStateChangedEventInit) -> Option; #[doc = "Change the `bubbles` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] pub fn set_bubbles(this: &CaretStateChangedEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &CaretStateChangedEventInit) -> Option; #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] pub fn set_cancelable(this: &CaretStateChangedEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &CaretStateChangedEventInit) -> Option; #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] #[wasm_bindgen(method, setter = "composed")] pub fn set_composed(this: &CaretStateChangedEventInit, val: bool); #[cfg(feature = "DomRectReadOnly")] #[doc = "Get the `boundingClientRect` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`, `DomRectReadOnly`*"] #[wasm_bindgen(method, getter = "boundingClientRect")] pub fn get_bounding_client_rect(this: &CaretStateChangedEventInit) -> Option; #[cfg(feature = "DomRectReadOnly")] #[doc = "Change the `boundingClientRect` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`, `DomRectReadOnly`*"] #[wasm_bindgen(method, setter = "boundingClientRect")] pub fn set_bounding_client_rect( this: &CaretStateChangedEventInit, val: Option<&DomRectReadOnly>, ); #[doc = "Get the `caretVisible` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] #[wasm_bindgen(method, getter = "caretVisible")] pub fn get_caret_visible(this: &CaretStateChangedEventInit) -> Option; #[doc = "Change the `caretVisible` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] #[wasm_bindgen(method, setter = "caretVisible")] pub fn set_caret_visible(this: &CaretStateChangedEventInit, val: bool); #[doc = "Get the `caretVisuallyVisible` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] #[wasm_bindgen(method, getter = "caretVisuallyVisible")] pub fn get_caret_visually_visible(this: &CaretStateChangedEventInit) -> Option; #[doc = "Change the `caretVisuallyVisible` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] #[wasm_bindgen(method, setter = "caretVisuallyVisible")] pub fn set_caret_visually_visible(this: &CaretStateChangedEventInit, val: bool); #[doc = "Get the `collapsed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] #[wasm_bindgen(method, getter = "collapsed")] pub fn get_collapsed(this: &CaretStateChangedEventInit) -> Option; #[doc = "Change the `collapsed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] #[wasm_bindgen(method, setter = "collapsed")] pub fn set_collapsed(this: &CaretStateChangedEventInit, val: bool); #[cfg(feature = "CaretChangedReason")] #[doc = "Get the `reason` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CaretChangedReason`, `CaretStateChangedEventInit`*"] #[wasm_bindgen(method, getter = "reason")] pub fn get_reason(this: &CaretStateChangedEventInit) -> Option; #[cfg(feature = "CaretChangedReason")] #[doc = "Change the `reason` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CaretChangedReason`, `CaretStateChangedEventInit`*"] #[wasm_bindgen(method, setter = "reason")] pub fn set_reason(this: &CaretStateChangedEventInit, val: CaretChangedReason); #[doc = "Get the `selectedTextContent` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] #[wasm_bindgen(method, getter = "selectedTextContent")] pub fn get_selected_text_content( this: &CaretStateChangedEventInit, ) -> Option<::alloc::string::String>; #[doc = "Change the `selectedTextContent` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] #[wasm_bindgen(method, setter = "selectedTextContent")] pub fn set_selected_text_content(this: &CaretStateChangedEventInit, val: &str); #[doc = "Get the `selectionEditable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] #[wasm_bindgen(method, getter = "selectionEditable")] pub fn get_selection_editable(this: &CaretStateChangedEventInit) -> Option; #[doc = "Change the `selectionEditable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] #[wasm_bindgen(method, setter = "selectionEditable")] pub fn set_selection_editable(this: &CaretStateChangedEventInit, val: bool); #[doc = "Get the `selectionVisible` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] #[wasm_bindgen(method, getter = "selectionVisible")] pub fn get_selection_visible(this: &CaretStateChangedEventInit) -> Option; #[doc = "Change the `selectionVisible` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] #[wasm_bindgen(method, setter = "selectionVisible")] pub fn set_selection_visible(this: &CaretStateChangedEventInit, val: bool); } impl CaretStateChangedEventInit { #[doc = "Construct a new `CaretStateChangedEventInit`."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] pub fn new() -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } #[cfg(feature = "DomRectReadOnly")] #[deprecated = "Use `set_bounding_client_rect()` instead."] pub fn bounding_client_rect(&mut self, val: Option<&DomRectReadOnly>) -> &mut Self { self.set_bounding_client_rect(val); self } #[deprecated = "Use `set_caret_visible()` instead."] pub fn caret_visible(&mut self, val: bool) -> &mut Self { self.set_caret_visible(val); self } #[deprecated = "Use `set_caret_visually_visible()` instead."] pub fn caret_visually_visible(&mut self, val: bool) -> &mut Self { self.set_caret_visually_visible(val); self } #[deprecated = "Use `set_collapsed()` instead."] pub fn collapsed(&mut self, val: bool) -> &mut Self { self.set_collapsed(val); self } #[cfg(feature = "CaretChangedReason")] #[deprecated = "Use `set_reason()` instead."] pub fn reason(&mut self, val: CaretChangedReason) -> &mut Self { self.set_reason(val); self } #[deprecated = "Use `set_selected_text_content()` instead."] pub fn selected_text_content(&mut self, val: &str) -> &mut Self { self.set_selected_text_content(val); self } #[deprecated = "Use `set_selection_editable()` instead."] pub fn selection_editable(&mut self, val: bool) -> &mut Self { self.set_selection_editable(val); self } #[deprecated = "Use `set_selection_visible()` instead."] pub fn selection_visible(&mut self, val: bool) -> &mut Self { self.set_selection_visible(val); self } } impl Default for CaretStateChangedEventInit { fn default() -> Self { Self::new() } } #![allow(unused_imports)] #![allow(clippy::all)] use super::*; use wasm_bindgen::prelude::*; #[wasm_bindgen] extern "C" { #[wasm_bindgen( extends = "Event", extends = "::js_sys::Object", js_name = "CookieChangeEvent", typescript_type = "CookieChangeEvent" )] #[derive(Debug, Clone, PartialEq, Eq)] #[doc = "The `CookieChangeEvent` class."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CookieChangeEvent)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CookieChangeEvent`*"] pub type CookieChangeEvent; #[wasm_bindgen(method, getter, js_class = "CookieChangeEvent", js_name = "changed")] #[doc = "Getter for the `changed` field of this object."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CookieChangeEvent/changed)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CookieChangeEvent`*"] pub fn changed(this: &CookieChangeEvent) -> ::js_sys::Array; #[wasm_bindgen(method, getter, js_class = "CookieChangeEvent", js_name = "deleted")] #[doc = "Getter for the `deleted` field of this object."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CookieChangeEvent/deleted)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CookieChangeEvent`*"] pub fn deleted(this: &CookieChangeEvent) -> ::js_sys::Array; #[wasm_bindgen(catch, constructor, js_class = "CookieChangeEvent")] #[doc = "The `new CookieChangeEvent(..)` constructor, creating a new instance of `CookieChangeEvent`."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CookieChangeEvent/CookieChangeEvent)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CookieChangeEvent`*"] pub fn new(type_: &str) -> Result; #[cfg(feature = "CookieChangeEventInit")] #[wasm_bindgen(catch, constructor, js_class = "CookieChangeEvent")] #[doc = "The `new CookieChangeEvent(..)` constructor, creating a new instance of `CookieChangeEvent`."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CookieChangeEvent/CookieChangeEvent)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CookieChangeEvent`, `CookieChangeEventInit`*"] pub fn new_with_event_init_dict( type_: &str, event_init_dict: &CookieChangeEventInit, ) -> Result; } #![allow(unused_imports)] #![allow(clippy::all)] use super::*; use wasm_bindgen::prelude::*; #[wasm_bindgen] extern "C" { #[wasm_bindgen(extends = "::js_sys::Object", js_name = "CookieChangeEventInit")] #[derive(Debug, Clone, PartialEq, Eq)] #[doc = "The `CookieChangeEventInit` dictionary."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CookieChangeEventInit`*"] pub type CookieChangeEventInit; #[doc = "Get the `bubbles` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CookieChangeEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &CookieChangeEventInit) -> Option; #[doc = "Change the `bubbles` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CookieChangeEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] pub fn set_bubbles(this: &CookieChangeEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CookieChangeEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &CookieChangeEventInit) -> Option; #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CookieChangeEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] pub fn set_cancelable(this: &CookieChangeEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CookieChangeEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &CookieChangeEventInit) -> Option; #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CookieChangeEventInit`*"] #[wasm_bindgen(method, setter = "composed")] pub fn set_composed(this: &CookieChangeEventInit, val: bool); #[doc = "Get the `changed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CookieChangeEventInit`*"] #[wasm_bindgen(method, getter = "changed")] pub fn get_changed(this: &CookieChangeEventInit) -> Option<::js_sys::Array>; #[doc = "Change the `changed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CookieChangeEventInit`*"] #[wasm_bindgen(method, setter = "changed")] pub fn set_changed(this: &CookieChangeEventInit, val: &::wasm_bindgen::JsValue); #[doc = "Get the `deleted` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CookieChangeEventInit`*"] #[wasm_bindgen(method, getter = "deleted")] pub fn get_deleted(this: &CookieChangeEventInit) -> Option<::js_sys::Array>; #[doc = "Change the `deleted` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CookieChangeEventInit`*"] #[wasm_bindgen(method, setter = "deleted")] pub fn set_deleted(this: &CookieChangeEventInit, val: &::wasm_bindgen::JsValue); } impl CookieChangeEventInit { #[doc = "Construct a new `CookieChangeEventInit`."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CookieChangeEventInit`*"] pub fn new() -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } #[deprecated = "Use `set_changed()` instead."] pub fn changed(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_changed(val); self } #[deprecated = "Use `set_deleted()` instead."] pub fn deleted(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_deleted(val); self } } impl Default for CookieChangeEventInit { fn default() -> Self { Self::new() } } #![allow(unused_imports)] #![allow(clippy::all)] use super::*; use wasm_bindgen::prelude::*; #[wasm_bindgen] extern "C" { #[wasm_bindgen( extends = "ExtendableEvent", extends = "Event", extends = "::js_sys::Object", js_name = "ExtendableCookieChangeEvent", typescript_type = "ExtendableCookieChangeEvent" )] #[derive(Debug, Clone, PartialEq, Eq)] #[doc = "The `ExtendableCookieChangeEvent` class."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ExtendableCookieChangeEvent)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ExtendableCookieChangeEvent`*"] pub type ExtendableCookieChangeEvent; #[wasm_bindgen( method, getter, js_class = "ExtendableCookieChangeEvent", js_name = "changed" )] #[doc = "Getter for the `changed` field of this object."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ExtendableCookieChangeEvent/changed)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ExtendableCookieChangeEvent`*"] pub fn changed(this: &ExtendableCookieChangeEvent) -> ::js_sys::Array; #[wasm_bindgen( method, getter, js_class = "ExtendableCookieChangeEvent", js_name = "deleted" )] #[doc = "Getter for the `deleted` field of this object."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ExtendableCookieChangeEvent/deleted)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ExtendableCookieChangeEvent`*"] pub fn deleted(this: &ExtendableCookieChangeEvent) -> ::js_sys::Array; #[wasm_bindgen(catch, constructor, js_class = "ExtendableCookieChangeEvent")] #[doc = "The `new ExtendableCookieChangeEvent(..)` constructor, creating a new instance of `ExtendableCookieChangeEvent`."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ExtendableCookieChangeEvent/ExtendableCookieChangeEvent)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ExtendableCookieChangeEvent`*"] pub fn new(type_: &str) -> Result; #[cfg(feature = "ExtendableCookieChangeEventInit")] #[wasm_bindgen(catch, constructor, js_class = "ExtendableCookieChangeEvent")] #[doc = "The `new ExtendableCookieChangeEvent(..)` constructor, creating a new instance of `ExtendableCookieChangeEvent`."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ExtendableCookieChangeEvent/ExtendableCookieChangeEvent)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ExtendableCookieChangeEvent`, `ExtendableCookieChangeEventInit`*"] pub fn new_with_event_init_dict( type_: &str, event_init_dict: &ExtendableCookieChangeEventInit, ) -> Result; } #![allow(unused_imports)] #![allow(clippy::all)] use super::*; use wasm_bindgen::prelude::*; #[wasm_bindgen] extern "C" { #[wasm_bindgen( extends = "::js_sys::Object", js_name = "ExtendableCookieChangeEventInit" )] #[derive(Debug, Clone, PartialEq, Eq)] #[doc = "The `ExtendableCookieChangeEventInit` dictionary."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ExtendableCookieChangeEventInit`*"] pub type ExtendableCookieChangeEventInit; #[doc = "Get the `bubbles` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ExtendableCookieChangeEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &ExtendableCookieChangeEventInit) -> Option; #[doc = "Change the `bubbles` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ExtendableCookieChangeEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] pub fn set_bubbles(this: &ExtendableCookieChangeEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ExtendableCookieChangeEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &ExtendableCookieChangeEventInit) -> Option; #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ExtendableCookieChangeEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] pub fn set_cancelable(this: &ExtendableCookieChangeEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ExtendableCookieChangeEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &ExtendableCookieChangeEventInit) -> Option; #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ExtendableCookieChangeEventInit`*"] #[wasm_bindgen(method, setter = "composed")] pub fn set_composed(this: &ExtendableCookieChangeEventInit, val: bool); #[doc = "Get the `changed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ExtendableCookieChangeEventInit`*"] #[wasm_bindgen(method, getter = "changed")] pub fn get_changed(this: &ExtendableCookieChangeEventInit) -> Option<::js_sys::Array>; #[doc = "Change the `changed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ExtendableCookieChangeEventInit`*"] #[wasm_bindgen(method, setter = "changed")] pub fn set_changed(this: &ExtendableCookieChangeEventInit, val: &::wasm_bindgen::JsValue); #[doc = "Get the `deleted` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ExtendableCookieChangeEventInit`*"] #[wasm_bindgen(method, getter = "deleted")] pub fn get_deleted(this: &ExtendableCookieChangeEventInit) -> Option<::js_sys::Array>; #[doc = "Change the `deleted` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ExtendableCookieChangeEventInit`*"] #[wasm_bindgen(method, setter = "deleted")] pub fn set_deleted(this: &ExtendableCookieChangeEventInit, val: &::wasm_bindgen::JsValue); } impl ExtendableCookieChangeEventInit { #[doc = "Construct a new `ExtendableCookieChangeEventInit`."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ExtendableCookieChangeEventInit`*"] pub fn new() -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } #[deprecated = "Use `set_changed()` instead."] pub fn changed(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_changed(val); self } #[deprecated = "Use `set_deleted()` instead."] pub fn deleted(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_deleted(val); self } } impl Default for ExtendableCookieChangeEventInit { fn default() -> Self { Self::new() } } #![allow(unused_imports)] #![allow(clippy::all)] use super::*; use wasm_bindgen::prelude::*; #[wasm_bindgen] extern "C" { #[wasm_bindgen( extends = "Event", extends = "::js_sys::Object", js_name = "HashChangeEvent", typescript_type = "HashChangeEvent" )] #[derive(Debug, Clone, PartialEq, Eq)] #[doc = "The `HashChangeEvent` class."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HashChangeEvent)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HashChangeEvent`*"] pub type HashChangeEvent; #[wasm_bindgen(method, getter, js_class = "HashChangeEvent", js_name = "oldURL")] #[doc = "Getter for the `oldURL` field of this object."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HashChangeEvent/oldURL)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HashChangeEvent`*"] pub fn old_url(this: &HashChangeEvent) -> ::alloc::string::String; #[wasm_bindgen(method, getter, js_class = "HashChangeEvent", js_name = "newURL")] #[doc = "Getter for the `newURL` field of this object."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HashChangeEvent/newURL)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HashChangeEvent`*"] pub fn new_url(this: &HashChangeEvent) -> ::alloc::string::String; #[wasm_bindgen(catch, constructor, js_class = "HashChangeEvent")] #[doc = "The `new HashChangeEvent(..)` constructor, creating a new instance of `HashChangeEvent`."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HashChangeEvent/HashChangeEvent)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HashChangeEvent`*"] pub fn new(type_: &str) -> Result; #[cfg(feature = "HashChangeEventInit")] #[wasm_bindgen(catch, constructor, js_class = "HashChangeEvent")] #[doc = "The `new HashChangeEvent(..)` constructor, creating a new instance of `HashChangeEvent`."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HashChangeEvent/HashChangeEvent)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HashChangeEvent`, `HashChangeEventInit`*"] pub fn new_with_event_init_dict( type_: &str, event_init_dict: &HashChangeEventInit, ) -> Result; #[wasm_bindgen(method, js_class = "HashChangeEvent", js_name = "initHashChangeEvent")] #[doc = "The `initHashChangeEvent()` method."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HashChangeEvent/initHashChangeEvent)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HashChangeEvent`*"] pub fn init_hash_change_event(this: &HashChangeEvent, type_arg: &str); #[wasm_bindgen(method, js_class = "HashChangeEvent", js_name = "initHashChangeEvent")] #[doc = "The `initHashChangeEvent()` method."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HashChangeEvent/initHashChangeEvent)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HashChangeEvent`*"] pub fn init_hash_change_event_with_can_bubble_arg( this: &HashChangeEvent, type_arg: &str, can_bubble_arg: bool, ); #[wasm_bindgen(method, js_class = "HashChangeEvent", js_name = "initHashChangeEvent")] #[doc = "The `initHashChangeEvent()` method."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HashChangeEvent/initHashChangeEvent)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HashChangeEvent`*"] pub fn init_hash_change_event_with_can_bubble_arg_and_cancelable_arg( this: &HashChangeEvent, type_arg: &str, can_bubble_arg: bool, cancelable_arg: bool, ); #[wasm_bindgen(method, js_class = "HashChangeEvent", js_name = "initHashChangeEvent")] #[doc = "The `initHashChangeEvent()` method."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HashChangeEvent/initHashChangeEvent)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HashChangeEvent`*"] pub fn init_hash_change_event_with_can_bubble_arg_and_cancelable_arg_and_old_url_arg( this: &HashChangeEvent, type_arg: &str, can_bubble_arg: bool, cancelable_arg: bool, old_url_arg: &str, ); #[wasm_bindgen(method, js_class = "HashChangeEvent", js_name = "initHashChangeEvent")] #[doc = "The `initHashChangeEvent()` method."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HashChangeEvent/initHashChangeEvent)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HashChangeEvent`*"] pub fn init_hash_change_event_with_can_bubble_arg_and_cancelable_arg_and_old_url_arg_and_new_url_arg( this: &HashChangeEvent, type_arg: &str, can_bubble_arg: bool, cancelable_arg: bool, old_url_arg: &str, new_url_arg: &str, ); } #![allow(unused_imports)] #![allow(clippy::all)] use super::*; use wasm_bindgen::prelude::*; #[wasm_bindgen] extern "C" { #[wasm_bindgen(extends = "::js_sys::Object", js_name = "HashChangeEventInit")] #[derive(Debug, Clone, PartialEq, Eq)] #[doc = "The `HashChangeEventInit` dictionary."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HashChangeEventInit`*"] pub type HashChangeEventInit; #[doc = "Get the `bubbles` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HashChangeEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &HashChangeEventInit) -> Option; #[doc = "Change the `bubbles` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HashChangeEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] pub fn set_bubbles(this: &HashChangeEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HashChangeEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &HashChangeEventInit) -> Option; #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HashChangeEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] pub fn set_cancelable(this: &HashChangeEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HashChangeEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &HashChangeEventInit) -> Option; #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HashChangeEventInit`*"] #[wasm_bindgen(method, setter = "composed")] pub fn set_composed(this: &HashChangeEventInit, val: bool); #[doc = "Get the `newURL` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HashChangeEventInit`*"] #[wasm_bindgen(method, getter = "newURL")] pub fn get_new_url(this: &HashChangeEventInit) -> Option<::alloc::string::String>; #[doc = "Change the `newURL` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HashChangeEventInit`*"] #[wasm_bindgen(method, setter = "newURL")] pub fn set_new_url(this: &HashChangeEventInit, val: &str); #[doc = "Get the `oldURL` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HashChangeEventInit`*"] #[wasm_bindgen(method, getter = "oldURL")] pub fn get_old_url(this: &HashChangeEventInit) -> Option<::alloc::string::String>; #[doc = "Change the `oldURL` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HashChangeEventInit`*"] #[wasm_bindgen(method, setter = "oldURL")] pub fn set_old_url(this: &HashChangeEventInit, val: &str); } impl HashChangeEventInit { #[doc = "Construct a new `HashChangeEventInit`."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HashChangeEventInit`*"] pub fn new() -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } #[deprecated = "Use `set_new_url()` instead."] pub fn new_url(&mut self, val: &str) -> &mut Self { self.set_new_url(val); self } #[deprecated = "Use `set_old_url()` instead."] pub fn old_url(&mut self, val: &str) -> &mut Self { self.set_old_url(val); self } } impl Default for HashChangeEventInit { fn default() -> Self { Self::new() } } #![allow(unused_imports)] #![allow(clippy::all)] use super::*; use wasm_bindgen::prelude::*; #[wasm_bindgen] extern "C" { #[wasm_bindgen( extends = "Event", extends = "::js_sys::Object", js_name = "IDBVersionChangeEvent", typescript_type = "IDBVersionChangeEvent" )] #[derive(Debug, Clone, PartialEq, Eq)] #[doc = "The `IdbVersionChangeEvent` class."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBVersionChangeEvent)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IdbVersionChangeEvent`*"] pub type IdbVersionChangeEvent; #[wasm_bindgen( method, getter, js_class = "IDBVersionChangeEvent", js_name = "oldVersion" )] #[doc = "Getter for the `oldVersion` field of this object."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBVersionChangeEvent/oldVersion)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IdbVersionChangeEvent`*"] pub fn old_version(this: &IdbVersionChangeEvent) -> f64; #[wasm_bindgen( method, getter, js_class = "IDBVersionChangeEvent", js_name = "newVersion" )] #[doc = "Getter for the `newVersion` field of this object."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBVersionChangeEvent/newVersion)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IdbVersionChangeEvent`*"] pub fn new_version(this: &IdbVersionChangeEvent) -> Option; #[wasm_bindgen(catch, constructor, js_class = "IDBVersionChangeEvent")] #[doc = "The `new IdbVersionChangeEvent(..)` constructor, creating a new instance of `IdbVersionChangeEvent`."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBVersionChangeEvent/IDBVersionChangeEvent)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IdbVersionChangeEvent`*"] pub fn new(type_: &str) -> Result; #[cfg(feature = "IdbVersionChangeEventInit")] #[wasm_bindgen(catch, constructor, js_class = "IDBVersionChangeEvent")] #[doc = "The `new IdbVersionChangeEvent(..)` constructor, creating a new instance of `IdbVersionChangeEvent`."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBVersionChangeEvent/IDBVersionChangeEvent)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IdbVersionChangeEvent`, `IdbVersionChangeEventInit`*"] pub fn new_with_event_init_dict( type_: &str, event_init_dict: &IdbVersionChangeEventInit, ) -> Result; } #![allow(unused_imports)] #![allow(clippy::all)] use super::*; use wasm_bindgen::prelude::*; #[wasm_bindgen] extern "C" { #[wasm_bindgen(extends = "::js_sys::Object", js_name = "IDBVersionChangeEventInit")] #[derive(Debug, Clone, PartialEq, Eq)] #[doc = "The `IdbVersionChangeEventInit` dictionary."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IdbVersionChangeEventInit`*"] pub type IdbVersionChangeEventInit; #[doc = "Get the `bubbles` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IdbVersionChangeEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &IdbVersionChangeEventInit) -> Option; #[doc = "Change the `bubbles` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IdbVersionChangeEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] pub fn set_bubbles(this: &IdbVersionChangeEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IdbVersionChangeEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &IdbVersionChangeEventInit) -> Option; #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IdbVersionChangeEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] pub fn set_cancelable(this: &IdbVersionChangeEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IdbVersionChangeEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &IdbVersionChangeEventInit) -> Option; #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IdbVersionChangeEventInit`*"] #[wasm_bindgen(method, setter = "composed")] pub fn set_composed(this: &IdbVersionChangeEventInit, val: bool); #[doc = "Get the `newVersion` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IdbVersionChangeEventInit`*"] #[wasm_bindgen(method, getter = "newVersion")] pub fn get_new_version(this: &IdbVersionChangeEventInit) -> Option; #[doc = "Change the `newVersion` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IdbVersionChangeEventInit`*"] #[wasm_bindgen(method, setter = "newVersion")] pub fn set_new_version(this: &IdbVersionChangeEventInit, val: Option); #[doc = "Change the `newVersion` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IdbVersionChangeEventInit`*"] #[wasm_bindgen(method, setter = "newVersion")] pub fn set_new_version_opt_u32(this: &IdbVersionChangeEventInit, val: Option); #[doc = "Change the `newVersion` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IdbVersionChangeEventInit`*"] #[wasm_bindgen(method, setter = "newVersion")] pub fn set_new_version_opt_f64(this: &IdbVersionChangeEventInit, val: Option); #[doc = "Get the `oldVersion` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IdbVersionChangeEventInit`*"] #[wasm_bindgen(method, getter = "oldVersion")] pub fn get_old_version(this: &IdbVersionChangeEventInit) -> Option; #[doc = "Change the `oldVersion` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IdbVersionChangeEventInit`*"] #[wasm_bindgen(method, setter = "oldVersion")] pub fn set_old_version(this: &IdbVersionChangeEventInit, val: f64); #[doc = "Change the `oldVersion` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IdbVersionChangeEventInit`*"] #[wasm_bindgen(method, setter = "oldVersion")] pub fn set_old_version_u32(this: &IdbVersionChangeEventInit, val: u32); #[doc = "Change the `oldVersion` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IdbVersionChangeEventInit`*"] #[wasm_bindgen(method, setter = "oldVersion")] pub fn set_old_version_f64(this: &IdbVersionChangeEventInit, val: f64); } impl IdbVersionChangeEventInit { #[doc = "Construct a new `IdbVersionChangeEventInit`."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IdbVersionChangeEventInit`*"] pub fn new() -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } #[deprecated = "Use `set_new_version()` instead."] pub fn new_version(&mut self, val: Option) -> &mut Self { self.set_new_version(val); self } #[deprecated = "Use `set_old_version()` instead."] pub fn old_version(&mut self, val: f64) -> &mut Self { self.set_old_version(val); self } } impl Default for IdbVersionChangeEventInit { fn default() -> Self { Self::new() } } #![allow(unused_imports)] #![allow(clippy::all)] use super::*; use wasm_bindgen::prelude::*; #[wasm_bindgen] extern "C" { #[wasm_bindgen( extends = "PaymentRequestUpdateEvent", extends = "Event", extends = "::js_sys::Object", js_name = "PaymentMethodChangeEvent", typescript_type = "PaymentMethodChangeEvent" )] #[derive(Debug, Clone, PartialEq, Eq)] #[doc = "The `PaymentMethodChangeEvent` class."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PaymentMethodChangeEvent)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PaymentMethodChangeEvent`*"] pub type PaymentMethodChangeEvent; #[wasm_bindgen( method, getter, js_class = "PaymentMethodChangeEvent", js_name = "methodName" )] #[doc = "Getter for the `methodName` field of this object."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PaymentMethodChangeEvent/methodName)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PaymentMethodChangeEvent`*"] pub fn method_name(this: &PaymentMethodChangeEvent) -> ::alloc::string::String; #[wasm_bindgen( method, getter, js_class = "PaymentMethodChangeEvent", js_name = "methodDetails" )] #[doc = "Getter for the `methodDetails` field of this object."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PaymentMethodChangeEvent/methodDetails)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PaymentMethodChangeEvent`*"] pub fn method_details(this: &PaymentMethodChangeEvent) -> Option<::js_sys::Object>; #[wasm_bindgen(catch, constructor, js_class = "PaymentMethodChangeEvent")] #[doc = "The `new PaymentMethodChangeEvent(..)` constructor, creating a new instance of `PaymentMethodChangeEvent`."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PaymentMethodChangeEvent/PaymentMethodChangeEvent)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PaymentMethodChangeEvent`*"] pub fn new(type_: &str) -> Result; #[cfg(feature = "PaymentMethodChangeEventInit")] #[wasm_bindgen(catch, constructor, js_class = "PaymentMethodChangeEvent")] #[doc = "The `new PaymentMethodChangeEvent(..)` constructor, creating a new instance of `PaymentMethodChangeEvent`."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PaymentMethodChangeEvent/PaymentMethodChangeEvent)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PaymentMethodChangeEvent`, `PaymentMethodChangeEventInit`*"] pub fn new_with_event_init_dict( type_: &str, event_init_dict: &PaymentMethodChangeEventInit, ) -> Result; } #![allow(unused_imports)] #![allow(clippy::all)] use super::*; use wasm_bindgen::prelude::*; #[wasm_bindgen] extern "C" { #[wasm_bindgen(extends = "::js_sys::Object", js_name = "PaymentMethodChangeEventInit")] #[derive(Debug, Clone, PartialEq, Eq)] #[doc = "The `PaymentMethodChangeEventInit` dictionary."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PaymentMethodChangeEventInit`*"] pub type PaymentMethodChangeEventInit; #[doc = "Get the `bubbles` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PaymentMethodChangeEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &PaymentMethodChangeEventInit) -> Option; #[doc = "Change the `bubbles` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PaymentMethodChangeEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] pub fn set_bubbles(this: &PaymentMethodChangeEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PaymentMethodChangeEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &PaymentMethodChangeEventInit) -> Option; #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PaymentMethodChangeEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] pub fn set_cancelable(this: &PaymentMethodChangeEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PaymentMethodChangeEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &PaymentMethodChangeEventInit) -> Option; #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PaymentMethodChangeEventInit`*"] #[wasm_bindgen(method, setter = "composed")] pub fn set_composed(this: &PaymentMethodChangeEventInit, val: bool); #[doc = "Get the `methodDetails` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PaymentMethodChangeEventInit`*"] #[wasm_bindgen(method, getter = "methodDetails")] pub fn get_method_details(this: &PaymentMethodChangeEventInit) -> Option<::js_sys::Object>; #[doc = "Change the `methodDetails` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PaymentMethodChangeEventInit`*"] #[wasm_bindgen(method, setter = "methodDetails")] pub fn set_method_details(this: &PaymentMethodChangeEventInit, val: Option<&::js_sys::Object>); #[doc = "Get the `methodName` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PaymentMethodChangeEventInit`*"] #[wasm_bindgen(method, getter = "methodName")] pub fn get_method_name(this: &PaymentMethodChangeEventInit) -> ::alloc::string::String; #[doc = "Change the `methodName` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PaymentMethodChangeEventInit`*"] #[wasm_bindgen(method, setter = "methodName")] pub fn set_method_name(this: &PaymentMethodChangeEventInit, val: &str); } impl PaymentMethodChangeEventInit { #[doc = "Construct a new `PaymentMethodChangeEventInit`."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PaymentMethodChangeEventInit`*"] pub fn new(method_name: &str) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret.set_method_name(method_name); ret } #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } #[deprecated = "Use `set_method_details()` instead."] pub fn method_details(&mut self, val: Option<&::js_sys::Object>) -> &mut Self { self.set_method_details(val); self } #[deprecated = "Use `set_method_name()` instead."] pub fn method_name(&mut self, val: &str) -> &mut Self { self.set_method_name(val); self } } #![allow(unused_imports)] #![allow(clippy::all)] use super::*; use wasm_bindgen::prelude::*; #[wasm_bindgen] extern "C" { #[wasm_bindgen( extends = "Event", extends = "::js_sys::Object", js_name = "RTCDTMFToneChangeEvent", typescript_type = "RTCDTMFToneChangeEvent" )] #[derive(Debug, Clone, PartialEq, Eq)] #[doc = "The `RtcdtmfToneChangeEvent` class."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCDTMFToneChangeEvent)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcdtmfToneChangeEvent`*"] pub type RtcdtmfToneChangeEvent; #[wasm_bindgen(method, getter, js_class = "RTCDTMFToneChangeEvent", js_name = "tone")] #[doc = "Getter for the `tone` field of this object."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCDTMFToneChangeEvent/tone)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcdtmfToneChangeEvent`*"] pub fn tone(this: &RtcdtmfToneChangeEvent) -> ::alloc::string::String; #[wasm_bindgen(catch, constructor, js_class = "RTCDTMFToneChangeEvent")] #[doc = "The `new RtcdtmfToneChangeEvent(..)` constructor, creating a new instance of `RtcdtmfToneChangeEvent`."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCDTMFToneChangeEvent/RTCDTMFToneChangeEvent)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcdtmfToneChangeEvent`*"] pub fn new(type_: &str) -> Result; #[cfg(feature = "RtcdtmfToneChangeEventInit")] #[wasm_bindgen(catch, constructor, js_class = "RTCDTMFToneChangeEvent")] #[doc = "The `new RtcdtmfToneChangeEvent(..)` constructor, creating a new instance of `RtcdtmfToneChangeEvent`."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCDTMFToneChangeEvent/RTCDTMFToneChangeEvent)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcdtmfToneChangeEvent`, `RtcdtmfToneChangeEventInit`*"] pub fn new_with_event_init_dict( type_: &str, event_init_dict: &RtcdtmfToneChangeEventInit, ) -> Result; } #![allow(unused_imports)] #![allow(clippy::all)] use super::*; use wasm_bindgen::prelude::*; #[wasm_bindgen] extern "C" { #[wasm_bindgen(extends = "::js_sys::Object", js_name = "RTCDTMFToneChangeEventInit")] #[derive(Debug, Clone, PartialEq, Eq)] #[doc = "The `RtcdtmfToneChangeEventInit` dictionary."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcdtmfToneChangeEventInit`*"] pub type RtcdtmfToneChangeEventInit; #[doc = "Get the `bubbles` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcdtmfToneChangeEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &RtcdtmfToneChangeEventInit) -> Option; #[doc = "Change the `bubbles` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcdtmfToneChangeEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] pub fn set_bubbles(this: &RtcdtmfToneChangeEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcdtmfToneChangeEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &RtcdtmfToneChangeEventInit) -> Option; #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcdtmfToneChangeEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] pub fn set_cancelable(this: &RtcdtmfToneChangeEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcdtmfToneChangeEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &RtcdtmfToneChangeEventInit) -> Option; #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcdtmfToneChangeEventInit`*"] #[wasm_bindgen(method, setter = "composed")] pub fn set_composed(this: &RtcdtmfToneChangeEventInit, val: bool); #[doc = "Get the `tone` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcdtmfToneChangeEventInit`*"] #[wasm_bindgen(method, getter = "tone")] pub fn get_tone(this: &RtcdtmfToneChangeEventInit) -> Option<::alloc::string::String>; #[doc = "Change the `tone` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcdtmfToneChangeEventInit`*"] #[wasm_bindgen(method, setter = "tone")] pub fn set_tone(this: &RtcdtmfToneChangeEventInit, val: &str); } impl RtcdtmfToneChangeEventInit { #[doc = "Construct a new `RtcdtmfToneChangeEventInit`."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcdtmfToneChangeEventInit`*"] pub fn new() -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } #[deprecated = "Use `set_tone()` instead."] pub fn tone(&mut self, val: &str) -> &mut Self { self.set_tone(val); self } } impl Default for RtcdtmfToneChangeEventInit { fn default() -> Self { Self::new() } } #![allow(unused_imports)] #![allow(clippy::all)] use super::*; use wasm_bindgen::prelude::*; #[wasm_bindgen] extern "C" { #[wasm_bindgen(extends = "::js_sys::Object", js_name = "ScrollViewChangeEventInit")] #[derive(Debug, Clone, PartialEq, Eq)] #[doc = "The `ScrollViewChangeEventInit` dictionary."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ScrollViewChangeEventInit`*"] pub type ScrollViewChangeEventInit; #[doc = "Get the `bubbles` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ScrollViewChangeEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &ScrollViewChangeEventInit) -> Option; #[doc = "Change the `bubbles` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ScrollViewChangeEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] pub fn set_bubbles(this: &ScrollViewChangeEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ScrollViewChangeEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &ScrollViewChangeEventInit) -> Option; #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ScrollViewChangeEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] pub fn set_cancelable(this: &ScrollViewChangeEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ScrollViewChangeEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &ScrollViewChangeEventInit) -> Option; #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ScrollViewChangeEventInit`*"] #[wasm_bindgen(method, setter = "composed")] pub fn set_composed(this: &ScrollViewChangeEventInit, val: bool); #[cfg(feature = "ScrollState")] #[doc = "Get the `state` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ScrollState`, `ScrollViewChangeEventInit`*"] #[wasm_bindgen(method, getter = "state")] pub fn get_state(this: &ScrollViewChangeEventInit) -> Option; #[cfg(feature = "ScrollState")] #[doc = "Change the `state` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ScrollState`, `ScrollViewChangeEventInit`*"] #[wasm_bindgen(method, setter = "state")] pub fn set_state(this: &ScrollViewChangeEventInit, val: ScrollState); } impl ScrollViewChangeEventInit { #[doc = "Construct a new `ScrollViewChangeEventInit`."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ScrollViewChangeEventInit`*"] pub fn new() -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } #[cfg(feature = "ScrollState")] #[deprecated = "Use `set_state()` instead."] pub fn state(&mut self, val: ScrollState) -> &mut Self { self.set_state(val); self } } impl Default for ScrollViewChangeEventInit { fn default() -> Self { Self::new() } } #![allow(unused_imports)] #![allow(clippy::all)] use super::*; use wasm_bindgen::prelude::*; #[wasm_bindgen] extern "C" { #[wasm_bindgen(extends = "::js_sys::Object", js_name = "StyleRuleChangeEventInit")] #[derive(Debug, Clone, PartialEq, Eq)] #[doc = "The `StyleRuleChangeEventInit` dictionary."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StyleRuleChangeEventInit`*"] pub type StyleRuleChangeEventInit; #[doc = "Get the `bubbles` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StyleRuleChangeEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &StyleRuleChangeEventInit) -> Option; #[doc = "Change the `bubbles` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StyleRuleChangeEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] pub fn set_bubbles(this: &StyleRuleChangeEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StyleRuleChangeEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &StyleRuleChangeEventInit) -> Option; #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StyleRuleChangeEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] pub fn set_cancelable(this: &StyleRuleChangeEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StyleRuleChangeEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &StyleRuleChangeEventInit) -> Option; #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StyleRuleChangeEventInit`*"] #[wasm_bindgen(method, setter = "composed")] pub fn set_composed(this: &StyleRuleChangeEventInit, val: bool); #[cfg(feature = "CssRule")] #[doc = "Get the `rule` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CssRule`, `StyleRuleChangeEventInit`*"] #[wasm_bindgen(method, getter = "rule")] pub fn get_rule(this: &StyleRuleChangeEventInit) -> Option; #[cfg(feature = "CssRule")] #[doc = "Change the `rule` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CssRule`, `StyleRuleChangeEventInit`*"] #[wasm_bindgen(method, setter = "rule")] pub fn set_rule(this: &StyleRuleChangeEventInit, val: Option<&CssRule>); #[cfg(feature = "CssStyleSheet")] #[doc = "Get the `stylesheet` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CssStyleSheet`, `StyleRuleChangeEventInit`*"] #[wasm_bindgen(method, getter = "stylesheet")] pub fn get_stylesheet(this: &StyleRuleChangeEventInit) -> Option; #[cfg(feature = "CssStyleSheet")] #[doc = "Change the `stylesheet` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CssStyleSheet`, `StyleRuleChangeEventInit`*"] #[wasm_bindgen(method, setter = "stylesheet")] pub fn set_stylesheet(this: &StyleRuleChangeEventInit, val: Option<&CssStyleSheet>); } impl StyleRuleChangeEventInit { #[doc = "Construct a new `StyleRuleChangeEventInit`."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StyleRuleChangeEventInit`*"] pub fn new() -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } #[cfg(feature = "CssRule")] #[deprecated = "Use `set_rule()` instead."] pub fn rule(&mut self, val: Option<&CssRule>) -> &mut Self { self.set_rule(val); self } #[cfg(feature = "CssStyleSheet")] #[deprecated = "Use `set_stylesheet()` instead."] pub fn stylesheet(&mut self, val: Option<&CssStyleSheet>) -> &mut Self { self.set_stylesheet(val); self } } impl Default for StyleRuleChangeEventInit { fn default() -> Self { Self::new() } } #![allow(unused_imports)] #![allow(clippy::all)] use super::*; use wasm_bindgen::prelude::*; #[wasm_bindgen] extern "C" { #[wasm_bindgen( extends = "::js_sys::Object", js_name = "StyleSheetApplicableStateChangeEventInit" )] #[derive(Debug, Clone, PartialEq, Eq)] #[doc = "The `StyleSheetApplicableStateChangeEventInit` dictionary."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StyleSheetApplicableStateChangeEventInit`*"] pub type StyleSheetApplicableStateChangeEventInit; #[doc = "Get the `bubbles` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StyleSheetApplicableStateChangeEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &StyleSheetApplicableStateChangeEventInit) -> Option; #[doc = "Change the `bubbles` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StyleSheetApplicableStateChangeEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] pub fn set_bubbles(this: &StyleSheetApplicableStateChangeEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StyleSheetApplicableStateChangeEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &StyleSheetApplicableStateChangeEventInit) -> Option; #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StyleSheetApplicableStateChangeEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] pub fn set_cancelable(this: &StyleSheetApplicableStateChangeEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StyleSheetApplicableStateChangeEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &StyleSheetApplicableStateChangeEventInit) -> Option; #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StyleSheetApplicableStateChangeEventInit`*"] #[wasm_bindgen(method, setter = "composed")] pub fn set_composed(this: &StyleSheetApplicableStateChangeEventInit, val: bool); #[doc = "Get the `applicable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StyleSheetApplicableStateChangeEventInit`*"] #[wasm_bindgen(method, getter = "applicable")] pub fn get_applicable(this: &StyleSheetApplicableStateChangeEventInit) -> Option; #[doc = "Change the `applicable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StyleSheetApplicableStateChangeEventInit`*"] #[wasm_bindgen(method, setter = "applicable")] pub fn set_applicable(this: &StyleSheetApplicableStateChangeEventInit, val: bool); #[cfg(feature = "CssStyleSheet")] #[doc = "Get the `stylesheet` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CssStyleSheet`, `StyleSheetApplicableStateChangeEventInit`*"] #[wasm_bindgen(method, getter = "stylesheet")] pub fn get_stylesheet(this: &StyleSheetApplicableStateChangeEventInit) -> Option; #[cfg(feature = "CssStyleSheet")] #[doc = "Change the `stylesheet` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CssStyleSheet`, `StyleSheetApplicableStateChangeEventInit`*"] #[wasm_bindgen(method, setter = "stylesheet")] pub fn set_stylesheet( this: &StyleSheetApplicableStateChangeEventInit, val: Option<&CssStyleSheet>, ); } impl StyleSheetApplicableStateChangeEventInit { #[doc = "Construct a new `StyleSheetApplicableStateChangeEventInit`."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StyleSheetApplicableStateChangeEventInit`*"] pub fn new() -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } #[deprecated = "Use `set_applicable()` instead."] pub fn applicable(&mut self, val: bool) -> &mut Self { self.set_applicable(val); self } #[cfg(feature = "CssStyleSheet")] #[deprecated = "Use `set_stylesheet()` instead."] pub fn stylesheet(&mut self, val: Option<&CssStyleSheet>) -> &mut Self { self.set_stylesheet(val); self } } impl Default for StyleSheetApplicableStateChangeEventInit { fn default() -> Self { Self::new() } } #![allow(unused_imports)] #![allow(clippy::all)] use super::*; use wasm_bindgen::prelude::*; #[wasm_bindgen] extern "C" { #[wasm_bindgen(extends = "::js_sys::Object", js_name = "StyleSheetChangeEventInit")] #[derive(Debug, Clone, PartialEq, Eq)] #[doc = "The `StyleSheetChangeEventInit` dictionary."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StyleSheetChangeEventInit`*"] pub type StyleSheetChangeEventInit; #[doc = "Get the `bubbles` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StyleSheetChangeEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &StyleSheetChangeEventInit) -> Option; #[doc = "Change the `bubbles` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StyleSheetChangeEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] pub fn set_bubbles(this: &StyleSheetChangeEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StyleSheetChangeEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &StyleSheetChangeEventInit) -> Option; #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StyleSheetChangeEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] pub fn set_cancelable(this: &StyleSheetChangeEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StyleSheetChangeEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &StyleSheetChangeEventInit) -> Option; #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StyleSheetChangeEventInit`*"] #[wasm_bindgen(method, setter = "composed")] pub fn set_composed(this: &StyleSheetChangeEventInit, val: bool); #[doc = "Get the `documentSheet` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StyleSheetChangeEventInit`*"] #[wasm_bindgen(method, getter = "documentSheet")] pub fn get_document_sheet(this: &StyleSheetChangeEventInit) -> Option; #[doc = "Change the `documentSheet` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StyleSheetChangeEventInit`*"] #[wasm_bindgen(method, setter = "documentSheet")] pub fn set_document_sheet(this: &StyleSheetChangeEventInit, val: bool); #[cfg(feature = "CssStyleSheet")] #[doc = "Get the `stylesheet` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CssStyleSheet`, `StyleSheetChangeEventInit`*"] #[wasm_bindgen(method, getter = "stylesheet")] pub fn get_stylesheet(this: &StyleSheetChangeEventInit) -> Option; #[cfg(feature = "CssStyleSheet")] #[doc = "Change the `stylesheet` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CssStyleSheet`, `StyleSheetChangeEventInit`*"] #[wasm_bindgen(method, setter = "stylesheet")] pub fn set_stylesheet(this: &StyleSheetChangeEventInit, val: Option<&CssStyleSheet>); } impl StyleSheetChangeEventInit { #[doc = "Construct a new `StyleSheetChangeEventInit`."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StyleSheetChangeEventInit`*"] pub fn new() -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } #[deprecated = "Use `set_document_sheet()` instead."] pub fn document_sheet(&mut self, val: bool) -> &mut Self { self.set_document_sheet(val); self } #[cfg(feature = "CssStyleSheet")] #[deprecated = "Use `set_stylesheet()` instead."] pub fn stylesheet(&mut self, val: Option<&CssStyleSheet>) -> &mut Self { self.set_stylesheet(val); self } } impl Default for StyleSheetChangeEventInit { fn default() -> Self { Self::new() } } #![allow(unused_imports)] #![allow(clippy::all)] use super::*; use wasm_bindgen::prelude::*; #[cfg(web_sys_unstable_apis)] #[wasm_bindgen] extern "C" { #[wasm_bindgen( extends = "Event", extends = "::js_sys::Object", js_name = "TaskPriorityChangeEvent", typescript_type = "TaskPriorityChangeEvent" )] #[derive(Debug, Clone, PartialEq, Eq)] #[doc = "The `TaskPriorityChangeEvent` class."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TaskPriorityChangeEvent)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TaskPriorityChangeEvent`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type TaskPriorityChangeEvent; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "TaskPriority")] #[wasm_bindgen( method, getter, js_class = "TaskPriorityChangeEvent", js_name = "previousPriority" )] #[doc = "Getter for the `previousPriority` field of this object."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TaskPriorityChangeEvent/previousPriority)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TaskPriority`, `TaskPriorityChangeEvent`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn previous_priority(this: &TaskPriorityChangeEvent) -> TaskPriority; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "TaskPriorityChangeEventInit")] #[wasm_bindgen(catch, constructor, js_class = "TaskPriorityChangeEvent")] #[doc = "The `new TaskPriorityChangeEvent(..)` constructor, creating a new instance of `TaskPriorityChangeEvent`."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TaskPriorityChangeEvent/TaskPriorityChangeEvent)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TaskPriorityChangeEvent`, `TaskPriorityChangeEventInit`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn new( type_: &str, priority_change_event_init_dict: &TaskPriorityChangeEventInit, ) -> Result; } #![allow(unused_imports)] #![allow(clippy::all)] use super::*; use wasm_bindgen::prelude::*; #[cfg(web_sys_unstable_apis)] #[wasm_bindgen] extern "C" { #[wasm_bindgen(extends = "::js_sys::Object", js_name = "TaskPriorityChangeEventInit")] #[derive(Debug, Clone, PartialEq, Eq)] #[doc = "The `TaskPriorityChangeEventInit` dictionary."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TaskPriorityChangeEventInit`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type TaskPriorityChangeEventInit; #[cfg(web_sys_unstable_apis)] #[doc = "Get the `bubbles` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TaskPriorityChangeEventInit`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &TaskPriorityChangeEventInit) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `bubbles` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TaskPriorityChangeEventInit`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "bubbles")] pub fn set_bubbles(this: &TaskPriorityChangeEventInit, val: bool); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TaskPriorityChangeEventInit`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &TaskPriorityChangeEventInit) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TaskPriorityChangeEventInit`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "cancelable")] pub fn set_cancelable(this: &TaskPriorityChangeEventInit, val: bool); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TaskPriorityChangeEventInit`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &TaskPriorityChangeEventInit) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TaskPriorityChangeEventInit`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "composed")] pub fn set_composed(this: &TaskPriorityChangeEventInit, val: bool); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "TaskPriority")] #[doc = "Get the `previousPriority` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TaskPriority`, `TaskPriorityChangeEventInit`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "previousPriority")] pub fn get_previous_priority(this: &TaskPriorityChangeEventInit) -> TaskPriority; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "TaskPriority")] #[doc = "Change the `previousPriority` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TaskPriority`, `TaskPriorityChangeEventInit`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "previousPriority")] pub fn set_previous_priority(this: &TaskPriorityChangeEventInit, val: TaskPriority); } #[cfg(web_sys_unstable_apis)] impl TaskPriorityChangeEventInit { #[cfg(feature = "TaskPriority")] #[doc = "Construct a new `TaskPriorityChangeEventInit`."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TaskPriority`, `TaskPriorityChangeEventInit`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn new(previous_priority: TaskPriority) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret.set_previous_priority(previous_priority); ret } #[cfg(web_sys_unstable_apis)] #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } #[cfg(web_sys_unstable_apis)] #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } #[cfg(web_sys_unstable_apis)] #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "TaskPriority")] #[deprecated = "Use `set_previous_priority()` instead."] pub fn previous_priority(&mut self, val: TaskPriority) -> &mut Self { self.set_previous_priority(val); self } } #![allow(unused_imports)] #![allow(clippy::all)] use super::*; use wasm_bindgen::prelude::*; #[cfg(web_sys_unstable_apis)] #[wasm_bindgen] extern "C" { #[wasm_bindgen( extends = "Event", extends = "::js_sys::Object", js_name = "XRInputSourcesChangeEvent", typescript_type = "XRInputSourcesChangeEvent" )] #[derive(Debug, Clone, PartialEq, Eq)] #[doc = "The `XrInputSourcesChangeEvent` class."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XRInputSourcesChangeEvent)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `XrInputSourcesChangeEvent`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type XrInputSourcesChangeEvent; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "XrSession")] #[wasm_bindgen( method, getter, js_class = "XRInputSourcesChangeEvent", js_name = "session" )] #[doc = "Getter for the `session` field of this object."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XRInputSourcesChangeEvent/session)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `XrInputSourcesChangeEvent`, `XrSession`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn session(this: &XrInputSourcesChangeEvent) -> XrSession; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "XrInputSource")] #[wasm_bindgen( method, getter, js_class = "XRInputSourcesChangeEvent", js_name = "added" )] #[doc = "Getter for the `added` field of this object."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XRInputSourcesChangeEvent/added)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `XrInputSource`, `XrInputSourcesChangeEvent`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn added(this: &XrInputSourcesChangeEvent) -> ::js_sys::Array; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "XrInputSource")] #[wasm_bindgen( method, getter, js_class = "XRInputSourcesChangeEvent", js_name = "removed" )] #[doc = "Getter for the `removed` field of this object."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XRInputSourcesChangeEvent/removed)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `XrInputSource`, `XrInputSourcesChangeEvent`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn removed(this: &XrInputSourcesChangeEvent) -> ::js_sys::Array; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "XrInputSourcesChangeEventInit")] #[wasm_bindgen(catch, constructor, js_class = "XRInputSourcesChangeEvent")] #[doc = "The `new XrInputSourcesChangeEvent(..)` constructor, creating a new instance of `XrInputSourcesChangeEvent`."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XRInputSourcesChangeEvent/XRInputSourcesChangeEvent)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `XrInputSourcesChangeEvent`, `XrInputSourcesChangeEventInit`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn new( type_: &str, event_init_dict: &XrInputSourcesChangeEventInit, ) -> Result; } #![allow(unused_imports)] #![allow(clippy::all)] use super::*; use wasm_bindgen::prelude::*; #[cfg(web_sys_unstable_apis)] #[wasm_bindgen] extern "C" { #[wasm_bindgen( extends = "::js_sys::Object", js_name = "XRInputSourcesChangeEventInit" )] #[derive(Debug, Clone, PartialEq, Eq)] #[doc = "The `XrInputSourcesChangeEventInit` dictionary."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `XrInputSourcesChangeEventInit`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type XrInputSourcesChangeEventInit; #[cfg(web_sys_unstable_apis)] #[doc = "Get the `bubbles` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `XrInputSourcesChangeEventInit`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &XrInputSourcesChangeEventInit) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `bubbles` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `XrInputSourcesChangeEventInit`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "bubbles")] pub fn set_bubbles(this: &XrInputSourcesChangeEventInit, val: bool); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `XrInputSourcesChangeEventInit`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &XrInputSourcesChangeEventInit) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `XrInputSourcesChangeEventInit`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "cancelable")] pub fn set_cancelable(this: &XrInputSourcesChangeEventInit, val: bool); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `XrInputSourcesChangeEventInit`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &XrInputSourcesChangeEventInit) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `XrInputSourcesChangeEventInit`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "composed")] pub fn set_composed(this: &XrInputSourcesChangeEventInit, val: bool); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "XrInputSource")] #[doc = "Get the `added` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `XrInputSource`, `XrInputSourcesChangeEventInit`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "added")] pub fn get_added(this: &XrInputSourcesChangeEventInit) -> ::js_sys::Array; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "XrInputSource")] #[doc = "Change the `added` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `XrInputSource`, `XrInputSourcesChangeEventInit`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "added")] pub fn set_added(this: &XrInputSourcesChangeEventInit, val: &[XrInputSource]); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "XrInputSource")] #[doc = "Get the `removed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `XrInputSource`, `XrInputSourcesChangeEventInit`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "removed")] pub fn get_removed(this: &XrInputSourcesChangeEventInit) -> ::js_sys::Array; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "XrInputSource")] #[doc = "Change the `removed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `XrInputSource`, `XrInputSourcesChangeEventInit`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "removed")] pub fn set_removed(this: &XrInputSourcesChangeEventInit, val: &[XrInputSource]); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "XrSession")] #[doc = "Get the `session` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `XrInputSourcesChangeEventInit`, `XrSession`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "session")] pub fn get_session(this: &XrInputSourcesChangeEventInit) -> XrSession; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "XrSession")] #[doc = "Change the `session` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `XrInputSourcesChangeEventInit`, `XrSession`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "session")] pub fn set_session(this: &XrInputSourcesChangeEventInit, val: &XrSession); } #[cfg(web_sys_unstable_apis)] impl XrInputSourcesChangeEventInit { #[cfg(all(feature = "XrInputSource", feature = "XrSession",))] #[doc = "Construct a new `XrInputSourcesChangeEventInit`."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `XrInputSource`, `XrInputSourcesChangeEventInit`, `XrSession`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn new(added: &[XrInputSource], removed: &[XrInputSource], session: &XrSession) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret.set_added(added); ret.set_removed(removed); ret.set_session(session); ret } #[cfg(web_sys_unstable_apis)] #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } #[cfg(web_sys_unstable_apis)] #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } #[cfg(web_sys_unstable_apis)] #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "XrInputSource")] #[deprecated = "Use `set_added()` instead."] pub fn added(&mut self, val: &[XrInputSource]) -> &mut Self { self.set_added(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "XrInputSource")] #[deprecated = "Use `set_removed()` instead."] pub fn removed(&mut self, val: &[XrInputSource]) -> &mut Self { self.set_removed(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "XrSession")] #[deprecated = "Use `set_session()` instead."] pub fn session(&mut self, val: &XrSession) -> &mut Self { self.set_session(val); self } }