Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add zlib-rs support via the libz-rs-sys C api for zlib-rs #400

Merged
merged 1 commit into from
Apr 24, 2024

Conversation

folkertdev
Copy link
Contributor

This PR adds (experimental) support for using flate2 with the zlib-rs backend. The zlib-rs crate is a pure-rust implementation of the zlib api that makes use of SIMD to achieve performance close to zlib-ng (currently 5% to 10% slower).

For the moment, the libz-rs-sys C api is used for the integration. At some point in the future, zlib-rs will get a more convenient rust api that will require less (hopefully no) unsafe code.

cc @joshtriplett

Comment on lines +69 to +74
// for zlib-rs, it is most efficient to have it provide the allocator.
// The libz-rs-sys dependency is configured to use the rust system allocator
#[cfg(all(feature = "any_zlib", feature = "libz-rs-sys"))]
zalloc: None,
#[cfg(all(feature = "any_zlib", feature = "libz-rs-sys"))]
zfree: None,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

the trick is that because zlib-rs can do equality comparisons on the function pointer, it can know when its built-in allocator is used, and this allocator guarantees 64-byte alignment. The allocation of zfree and zalloc below is not needed (and that implementation is less efficient to deal with allignment).

@@ -75,54 +87,65 @@ impl Drop for StreamWrapper {
}
}

const ALIGN: usize = std::mem::align_of::<usize>();
#[cfg(all(feature = "any_zlib", not(feature = "libz-rs-sys")))]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

in the case of zlib-rs, the allocator logic is unused. That is an error for this crate, so it's only conditionally compiled now.

src/ffi/c.rs Outdated Show resolved Hide resolved
src/ffi/c.rs Show resolved Hide resolved
@folkertdev folkertdev force-pushed the zlib-rs-c-api branch 3 times, most recently from 2f646b2 to e9232c7 Compare April 16, 2024 18:13
@@ -43,6 +43,8 @@ jobs:
if: matrix.build != 'mingw'
- run: cargo test --features zlib-ng --no-default-features
if: matrix.build != 'mingw'
- run: cargo test --features zlib-rs --no-default-features
if: matrix.build != 'mingw'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

we should eventually be able to compile on mingw, but the current release doesn't, and we don't test for it, so disabling for now.

Copy link
Member

Choose a reason for hiding this comment

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

This will need fixing before we could consider it as a potential default, but it's fine for now.

Copy link
Member

@Byron Byron left a comment

Choose a reason for hiding this comment

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

Thanks a lot for contributing what could one day be the new default backend, and replace minizoxide in this space.

As CI is failing on Windows, I think that might be a good reason to run tests on Windows (and maybe more) platforms as well.

Further, when looking at the dependencies of libz-rs-sys, I was surprised that zlib-rs has what looks like test-dependencies as part of its normal dependencies. It's clear that these are optional and behind features, but I would have thought that dev-dependencies work fine for unit-tests as well. It somehow worried me that this (what seems like a) workaround was necessary, and I hoped there is another way. Maybe APIs could be made public behind a hidden feature toggle, and a separate test-only crate could carry all the dependencies? Then the separation would be clear, and maybe some test-specific code could be extracted into a separate space. This comment is probably not relevant to this PR though, merely a side-note.

I would definitely wait for CI to be fixed, and a second reviewer.

src/ffi/c.rs Show resolved Hide resolved
src/ffi/c.rs Show resolved Hide resolved
@folkertdev
Copy link
Contributor Author

thanks for the review

  • we're working on windows support (already merged into our main branch but needs a little cleanup still). Should be ready soon.
  • the dependency situation is kind of nasty. From what I observe, it seems that if crate A has a dev-dependency on crate B, then crate B is not compiled with cfg(test) to be true. Our crate B needs to expose/derive things for testing in crate A. So, we haven't yet found a better solution than the feature flags, but it is far from ideal, I'd really like to not be doing that.
  • we've been in regular contact with @joshtriplett so he'd be a natural second reviewer here.

@Byron Byron requested a review from joshtriplett April 17, 2024 12:33
@Byron
Copy link
Member

Byron commented Apr 17, 2024

That all is great to hear!

Regarding the testing, thanks for the explanation - I understand now why these test-dependencies can't be dev-dependencies.

Besides that, I think with Josh approving this PR, it can be merged.

@oyvindln
Copy link
Contributor

oyvindln commented Apr 17, 2024

Thanks a lot for contributing what could one day be the new default backend, and replace minizoxide in this space.

Well it would have been nice to have some help to improve miniz-oxide rather than creating yet another rust deflate implementation I guess... but i digress

@Byron
Copy link
Member

Byron commented Apr 17, 2024

My apologies, that callout what unnecessary, and lacked the appreciation that is due for it as the backend which just works. I got carried away by the pure-Rust-powered zlib-ng like performance as default here, it's something that gitoxide benefits from a lot.

But maybe this could be a starting point for eventually bringing both projects together (without having any idea if this is technically or even legally possible).

@oyvindln
Copy link
Contributor

oyvindln commented Apr 18, 2024

Ah sorry, maybe I came across as overly grumpy, wasn't meant for you or anyone in particular, it's just happened a few times now. I kinda expect miniz-oxide to be obsoleted eventually unless someone else comes along and picks it up as I'm not really in a position to actively put in a lot of work into it myself - as of now I guess zlib-rs has some different aims though as it makes rather heavy use of unsafe code and probably has to keep doing so as long as explicit SIMD requires it.

@Byron
Copy link
Member

Byron commented Apr 18, 2024

Right, thanks for clarifying this! If miniz-oxide is 100% safe Rust, there is value in that alone, independently of performance. Then, even if zlib-rs is equivalent functionally and regarding portability, figuring out what the default backend should be wouldn't be straightforward anymore and probably stay as is :).

@folkertdev
Copy link
Contributor Author

We certainly have no ill will versus miniz-oxide: it's simple, small, consistent between platforms, no unsafe besides some C api stuff, and performs slightly better than the original zlib, which is perfectly adequate for many use cases.

zlib-rs is more ambitious though: it aims to match zlib-ng performance and properly provide the full zlib api, meaning that we can create a drop-in replacement for the zlib dynamic library.

I'm not sure a generic, shared deflate implementation works, but we're happy to share code/knowlegde. It is our impression however that the majority of performance improvements stem from the explicit use of SIMD instructions, which miniz-oxide does not seem to want to use?


We believe to have fixed the windows issues. I'll try that here on CI now by setting the dependency to a git branch again. This should not be merged in that state. I'll report back after we've pushed another release to crates.io and think this is ready.

@oyvindln
Copy link
Contributor

It is our impression however that the majority of performance improvements stem from the explicit use of SIMD instructions, which miniz-oxide does not seem to want to use?

We don't want to use any unsafe code in miniz_oxide (external C api requires it of course but that's a separate thing), and as far as I know at least there isn't any way to use explicit SIMD without unsafe on stable rust (the portable simd API could help solve that but it seems to have been stalled as of now). There may be some crates out there that implement something similar though those again will be using unsafe internally.

To what extent explicit SIMD is needed to reach performance parity and to what extent it can be achieved with autovectorization with the right code layout I don't know.

In any case zlib-rs will now provide a rust alternative to using the C implementation of zlib-ng that's close to the same performance for users that are okay with the safety tradeoffs (and that hopefully won't be patched out by debian maintainers like zlib-ng is)

@folkertdev
Copy link
Contributor Author

The explicit SIMD is essential, e.g. https://github.com/memorysafety/zlib-rs/blob/main/zlib-rs/src/deflate/compare256.rs#L170, LLVM just can't see that idea with the wide comparison and bit counting.

There are a couple of tricks around breaking dependency chains in the bit reader that you may benefit from. E.g. https://github.com/Frommi/miniz_oxide/blob/master/miniz_oxide/src/inflate/core.rs#L423 the if here is very prone to misprediction. The optimized implementations just always add more bits to the buffer, e.g. we https://github.com/memorysafety/zlib-rs/blob/main/zlib-rs/src/inflate/bitreader.rs#L103 have no branches in that function at all. A bounds check would be acceptable because it is easy to predict.

What's the story behind removing zlib-ng from the flate2 debian package?

@folkertdev
Copy link
Contributor Author

We have released version 0.1.1 that fixes various issues on windows and macos (x86 and aarch64). These targets are now tested in our CI so there should be no regressions.

From my side this PR is now done and ready to be merged

Copy link
Member

@Byron Byron left a comment

Choose a reason for hiding this comment

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

Thanks a lot for all your hard work and for seeing it through!

The only concern I have is that this CI is testing more platforms than the zlib-rs CI (even though Windows checks were added now), and I hope that this isn't prone to unexpected breakage here.

Then, I will leave it for @joshtriplett to finalize the review and possibly merge as well.

@folkertdev
Copy link
Contributor Author

folkertdev commented Apr 23, 2024

What platforms do we miss? mingw is deliberately omitted for now. I guess we could add a build with the nightly target?

https://github.com/memorysafety/zlib-rs/blob/main/.github/workflows/checks.yaml#L25

@Byron
Copy link
Member

Byron commented Apr 24, 2024

Actually, I confused this repo with the one from libz which builds on many, many different platforms. Here it's indeed only mingw that isn't tested in zlib-rs. I think my argument could still apply, but much more weakly.

I don't think that nightly should play a role as nightly shouldn't ever break anything (and if it does, it's a bug that will be fixed before it hits stable).

@@ -19,6 +19,7 @@ and raw deflate streams.
[dependencies]
libz-sys = { version = "1.1.8", optional = true, default-features = false }
libz-ng-sys = { version = "1.1.8", optional = true }
libz-rs-sys = { version = "0.1.1", optional = true, default-features = false, features = ["std", "rust-allocator"] }
Copy link
Member

Choose a reason for hiding this comment

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

libz-rs-sys has default = ["std", "rust-allocator"]. What's the rationale for disabling default features and then writing them out by hand, here? Defensive programming against future additions to the defaults?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes exactly. it also clarifies that we're explicitly using the rust allocator; that will always be the default when the crate is used from rust, but not when we build a C dynamic library.

Copy link
Member

@joshtriplett joshtriplett left a comment

Choose a reason for hiding this comment

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

Looks good to me! Wrote a comment about the feature usage, but I don't think that's a blocker to merging.

@joshtriplett joshtriplett merged commit 320e7c7 into rust-lang:main Apr 24, 2024
10 checks passed
@folkertdev
Copy link
Contributor Author

Thanks! would it be possible to make a release with these changes?

@Byron
Copy link
Member

Byron commented Apr 25, 2024

Yes, cold you create a PR that bumps the version? I can't self-approve my own PRs hence the need for help :).

@Byron
Copy link
Member

Byron commented Apr 26, 2024

A new release is now available: https://github.com/rust-lang/flate2-rs/releases/tag/1.0.29

@torokati44
Copy link

Does the README not mention this because it's still experimental (and therefore shouldn't be used "in production")?

@Byron
Copy link
Member

Byron commented Apr 29, 2024

That's a good point - it might have been an oversight, and it should probably be mentioned along with a note of being not necessarily production-proven yet.

@torokati44
Copy link

I see, thank you. We won't opt into it yet then.

renovate bot referenced this pull request in gitext-rs/git-dive May 1, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [anyhow](https://github.com/dtolnay/anyhow) | dependencies | patch |
`1.0.81` -> `1.0.82` |
| [encoding_rs](https://docs.rs/encoding_rs/)
([source](https://github.com/hsivonen/encoding_rs)) | dependencies |
patch | `0.8.33` -> `0.8.34` |
| [flate2](https://github.com/rust-lang/flate2-rs) | dependencies |
patch | `1.0.28` -> `1.0.30` |
| [serde](https://serde.rs)
([source](https://github.com/serde-rs/serde)) | dependencies | patch |
`1.0.197` -> `1.0.199` |

---

### Release Notes

<details>
<summary>dtolnay/anyhow (anyhow)</summary>

### [`v1.0.82`](https://github.com/dtolnay/anyhow/releases/tag/1.0.82)

[Compare
Source](https://github.com/dtolnay/anyhow/compare/1.0.81...1.0.82)

-   Documentation improvements

</details>

<details>
<summary>hsivonen/encoding_rs (encoding_rs)</summary>

###
[`v0.8.34`](https://github.com/hsivonen/encoding_rs/compare/v0.8.33...v0.8.34)

[Compare
Source](https://github.com/hsivonen/encoding_rs/compare/v0.8.33...v0.8.34)

</details>

<details>
<summary>rust-lang/flate2-rs (flate2)</summary>

###
[`v1.0.30`](https://github.com/rust-lang/flate2-rs/releases/tag/1.0.30):
- docs.rs pages should build again

[Compare
Source](https://github.com/rust-lang/flate2-rs/compare/1.0.29...1.0.30)

#### What's Changed

- Fix typos by [@&#8203;striezel](https://github.com/striezel) in
[https://github.com/rust-lang/flate2-rs/pull/406](https://github.com/rust-lang/flate2-rs/pull/406)
- Update actions/checkout in GitHub Actions workflows to v4 by
[@&#8203;striezel](https://github.com/striezel) in
[https://github.com/rust-lang/flate2-rs/pull/407](https://github.com/rust-lang/flate2-rs/pull/407)
- fix CI - `--all-features` wasn't tested and didn't work with arrival
of `zlib-rs` by [@&#8203;Byron](https://github.com/Byron) in
[https://github.com/rust-lang/flate2-rs/pull/405](https://github.com/rust-lang/flate2-rs/pull/405)

#### New Contributors

- [@&#8203;striezel](https://github.com/striezel) made their first
contribution in
[https://github.com/rust-lang/flate2-rs/pull/406](https://github.com/rust-lang/flate2-rs/pull/406)

**Full Changelog**:
rust-lang/flate2-rs@1.0.29...1.0.30

###
[`v1.0.29`](https://github.com/rust-lang/flate2-rs/releases/tag/1.0.29):
- with new `zlib-rs` feature (~`zlib-ng` in Rust)

[Compare
Source](https://github.com/rust-lang/flate2-rs/compare/1.0.28...1.0.29)

With the [new `zlib-rs`](https://github.com/memorysafety/zlib-rs)
feature, a new backend is enabled that brings in a SIMD-accelerated Rust
implementation.

#### What's Changed

- Fix build for beta and nightly by
[@&#8203;JakubOnderka](https://github.com/JakubOnderka) in
[https://github.com/rust-lang/flate2-rs/pull/388](https://github.com/rust-lang/flate2-rs/pull/388)
- Store `StreamWrapper::inner` as a raw pointer by
[@&#8203;icmccorm](https://github.com/icmccorm) in
[https://github.com/rust-lang/flate2-rs/pull/394](https://github.com/rust-lang/flate2-rs/pull/394)
- Avoid redudant imports by [@&#8203;Byron](https://github.com/Byron)
in
[https://github.com/rust-lang/flate2-rs/pull/398](https://github.com/rust-lang/flate2-rs/pull/398)
- add `zlib-rs` support via the `libz-rs-sys` C api for `zlib-rs` by
[@&#8203;folkertdev](https://github.com/folkertdev) in
[https://github.com/rust-lang/flate2-rs/pull/400](https://github.com/rust-lang/flate2-rs/pull/400)
- Add tests to show BufRead can be used after decoding by
[@&#8203;jongiddy](https://github.com/jongiddy) in
[https://github.com/rust-lang/flate2-rs/pull/402](https://github.com/rust-lang/flate2-rs/pull/402)
- release version 1.0.29: support for zlib-rs by
[@&#8203;folkertdev](https://github.com/folkertdev) in
[https://github.com/rust-lang/flate2-rs/pull/403](https://github.com/rust-lang/flate2-rs/pull/403)

#### New Contributors

- [@&#8203;JakubOnderka](https://github.com/JakubOnderka) made their
first contribution in
[https://github.com/rust-lang/flate2-rs/pull/388](https://github.com/rust-lang/flate2-rs/pull/388)
- [@&#8203;icmccorm](https://github.com/icmccorm) made their first
contribution in
[https://github.com/rust-lang/flate2-rs/pull/394](https://github.com/rust-lang/flate2-rs/pull/394)
- [@&#8203;folkertdev](https://github.com/folkertdev) made their first
contribution in
[https://github.com/rust-lang/flate2-rs/pull/400](https://github.com/rust-lang/flate2-rs/pull/400)

**Full Changelog**:
rust-lang/flate2-rs@1.0.28...1.0.29

</details>

<details>
<summary>serde-rs/serde (serde)</summary>

###
[`v1.0.199`](https://github.com/serde-rs/serde/releases/tag/v1.0.199)

[Compare
Source](https://github.com/serde-rs/serde/compare/v1.0.198...v1.0.199)

- Fix ambiguous associated item when `forward_to_deserialize_any!` is
used on an enum with `Error` variant
([#&#8203;2732](https://github.com/serde-rs/serde/issues/2732), thanks
[@&#8203;aatifsyed](https://github.com/aatifsyed))

###
[`v1.0.198`](https://github.com/serde-rs/serde/releases/tag/v1.0.198)

[Compare
Source](https://github.com/serde-rs/serde/compare/v1.0.197...v1.0.198)

- Support serializing and deserializing `Saturating<T>`
([#&#8203;2709](https://github.com/serde-rs/serde/issues/2709), thanks
[@&#8203;jbethune](https://github.com/jbethune))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 5am on the first day of the
month" (UTC), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://github.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/gitext-rs/git-dive).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMjEuMiIsInVwZGF0ZWRJblZlciI6IjM3LjMyMS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
bors referenced this pull request in rust-lang/cargo May 1, 2024
chore(deps): update compatible

[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [annotate-snippets](https://github.com/rust-lang/annotate-snippets-rs) | workspace.dependencies | patch | `0.11.1` -> `0.11.2` |
| [anyhow](https://github.com/dtolnay/anyhow) | workspace.dependencies | patch | `1.0.81` -> `1.0.82` |
| [base64](https://github.com/marshallpierce/rust-base64) | workspace.dependencies | patch | `0.22.0` -> `0.22.1` |
| [color-print](https://gitlab.com/dajoha/color-print) | workspace.dependencies | patch | `0.3.5` -> `0.3.6` |
| [flate2](https://github.com/rust-lang/flate2-rs) | workspace.dependencies | patch | `1.0.28` -> `1.0.30` |
| [indexmap](https://github.com/indexmap-rs/indexmap) | workspace.dependencies | patch | `2` -> `2.2.6` |
| [jobserver](https://github.com/rust-lang/jobserver-rs) | workspace.dependencies | patch | `0.1.28` -> `0.1.31` |
| [libc](https://github.com/rust-lang/libc) | workspace.dependencies | patch | `0.2.153` -> `0.2.154` |
| [pathdiff](https://github.com/Manishearth/pathdiff) | workspace.dependencies | patch | `0.2` -> `0.2.1` |
| [percent-encoding](https://github.com/servo/rust-url) | workspace.dependencies | patch | `2.3` -> `2.3.1` |
| [pulldown-cmark](https://github.com/raphlinus/pulldown-cmark) | workspace.dependencies | patch | `0.10.2` -> `0.10.3` |
| [serde](https://serde.rs) ([source](https://github.com/serde-rs/serde)) | workspace.dependencies | patch | `1.0.197` -> `1.0.199` |
| [serde_json](https://github.com/serde-rs/json) | workspace.dependencies | patch | `1.0.115` -> `1.0.116` |
| [thiserror](https://github.com/dtolnay/thiserror) | workspace.dependencies | patch | `1.0.58` -> `1.0.59` |
| [time](https://time-rs.github.io) ([source](https://github.com/time-rs/time)) | workspace.dependencies | patch | `0.3` -> `0.3.36` |
| [toml_edit](https://github.com/toml-rs/toml) | workspace.dependencies | patch | `0.22.11` -> `0.22.12` |
| [unicode-width](https://github.com/unicode-rs/unicode-width) | workspace.dependencies | patch | `0.1.11` -> `0.1.12` |

---

### Release Notes

<details>
<summary>rust-lang/annotate-snippets-rs (annotate-snippets)</summary>

### [`v0.11.2`](https://github.com/rust-lang/annotate-snippets-rs/blob/HEAD/CHANGELOG.md#0112---2024-04-27)

[Compare Source](https://github.com/rust-lang/annotate-snippets-rs/compare/0.11.1...0.11.2)

##### Added

-   All public types now implement `Debug` [#&#8203;119](https://github.com/rust-lang/annotate-snippets-rs/pull/119)

</details>

<details>
<summary>dtolnay/anyhow (anyhow)</summary>

### [`v1.0.82`](https://github.com/dtolnay/anyhow/releases/tag/1.0.82)

[Compare Source](https://github.com/dtolnay/anyhow/compare/1.0.81...1.0.82)

-   Documentation improvements

</details>

<details>
<summary>marshallpierce/rust-base64 (base64)</summary>

### [`v0.22.1`](https://github.com/marshallpierce/rust-base64/blob/HEAD/RELEASE-NOTES.md#0221)

[Compare Source](https://github.com/marshallpierce/rust-base64/compare/v0.22.0...v0.22.1)

-   Correct the symbols used for the predefined `alphabet::BIN_HEX`.

</details>

<details>
<summary>dajoha/color-print (color-print)</summary>

### [`v0.3.6`](https://gitlab.com/dajoha/color-print/compare/v0.3.5...v0.3.6)

[Compare Source](https://gitlab.com/dajoha/color-print/compare/v0.3.5...v0.3.6)

</details>

<details>
<summary>rust-lang/flate2-rs (flate2)</summary>

### [`v1.0.30`](https://github.com/rust-lang/flate2-rs/releases/tag/1.0.30): - docs.rs pages should build again

[Compare Source](https://github.com/rust-lang/flate2-rs/compare/1.0.29...1.0.30)

##### What's Changed

-   Fix typos by [`@&#8203;striezel](https://github.com/striezel)` in [https://github.com/rust-lang/flate2-rs/pull/406](https://github.com/rust-lang/flate2-rs/pull/406)
-   Update actions/checkout in GitHub Actions workflows to v4 by [`@&#8203;striezel](https://github.com/striezel)` in [https://github.com/rust-lang/flate2-rs/pull/407](https://github.com/rust-lang/flate2-rs/pull/407)
-   fix CI - `--all-features` wasn't tested and didn't work with arrival of `zlib-rs` by [`@&#8203;Byron](https://github.com/Byron)` in [https://github.com/rust-lang/flate2-rs/pull/405](https://github.com/rust-lang/flate2-rs/pull/405)

##### New Contributors

-   [`@&#8203;striezel](https://github.com/striezel)` made their first contribution in [https://github.com/rust-lang/flate2-rs/pull/406](https://github.com/rust-lang/flate2-rs/pull/406)

**Full Changelog**: rust-lang/flate2-rs@1.0.29...1.0.30

### [`v1.0.29`](https://github.com/rust-lang/flate2-rs/releases/tag/1.0.29): - with new `zlib-rs` feature (~`zlib-ng` in Rust)

[Compare Source](https://github.com/rust-lang/flate2-rs/compare/1.0.28...1.0.29)

With the [new `zlib-rs`](https://github.com/memorysafety/zlib-rs) feature, a new backend is enabled that brings in a SIMD-accelerated Rust implementation.

##### What's Changed

-   Fix build for beta and nightly by [`@&#8203;JakubOnderka](https://github.com/JakubOnderka)` in [https://github.com/rust-lang/flate2-rs/pull/388](https://github.com/rust-lang/flate2-rs/pull/388)
-   Store `StreamWrapper::inner` as a raw pointer by [`@&#8203;icmccorm](https://github.com/icmccorm)` in [https://github.com/rust-lang/flate2-rs/pull/394](https://github.com/rust-lang/flate2-rs/pull/394)
-   Avoid redudant imports by [`@&#8203;Byron](https://github.com/Byron)` in [https://github.com/rust-lang/flate2-rs/pull/398](https://github.com/rust-lang/flate2-rs/pull/398)
-   add `zlib-rs` support via the `libz-rs-sys` C api for `zlib-rs` by [`@&#8203;folkertdev](https://github.com/folkertdev)` in [https://github.com/rust-lang/flate2-rs/pull/400](https://github.com/rust-lang/flate2-rs/pull/400)
-   Add tests to show BufRead can be used after decoding by [`@&#8203;jongiddy](https://github.com/jongiddy)` in [https://github.com/rust-lang/flate2-rs/pull/402](https://github.com/rust-lang/flate2-rs/pull/402)
-   release version 1.0.29: support for zlib-rs by [`@&#8203;folkertdev](https://github.com/folkertdev)` in [https://github.com/rust-lang/flate2-rs/pull/403](https://github.com/rust-lang/flate2-rs/pull/403)

##### New Contributors

-   [`@&#8203;JakubOnderka](https://github.com/JakubOnderka)` made their first contribution in [https://github.com/rust-lang/flate2-rs/pull/388](https://github.com/rust-lang/flate2-rs/pull/388)
-   [`@&#8203;icmccorm](https://github.com/icmccorm)` made their first contribution in [https://github.com/rust-lang/flate2-rs/pull/394](https://github.com/rust-lang/flate2-rs/pull/394)
-   [`@&#8203;folkertdev](https://github.com/folkertdev)` made their first contribution in [https://github.com/rust-lang/flate2-rs/pull/400](https://github.com/rust-lang/flate2-rs/pull/400)

**Full Changelog**: rust-lang/flate2-rs@1.0.28...1.0.29

</details>

<details>
<summary>rust-lang/libc (libc)</summary>

### [`v0.2.154`](https://github.com/rust-lang/libc/releases/tag/0.2.154)

[Compare Source](https://github.com/rust-lang/libc/compare/0.2.153...0.2.154)

#### What's Changed

-   Fix CI on v0.2 by [`@&#8203;JohnTitor](https://github.com/JohnTitor)` in [https://github.com/rust-lang/libc/pull/3589](https://github.com/rust-lang/libc/pull/3589)
-   \[Backport [#&#8203;3547](https://github.com/rust-lang/libc/issues/3547)] Add ioctl FS_IOC\_{G,S}{ETVERSION,ETFLAGS} for CSKY by [`@&#8203;Dirreke](https://github.com/Dirreke)` in [https://github.com/rust-lang/libc/pull/3572](https://github.com/rust-lang/libc/pull/3572)
-   Add Linux riscv64 HWCAP defines (libc-0.2) by [`@&#8203;Xeonacid](https://github.com/Xeonacid)` in [https://github.com/rust-lang/libc/pull/3580](https://github.com/rust-lang/libc/pull/3580)
-   Add missing MIPS R6 FS_IOC_\* definitions by [`@&#8203;chenx97](https://github.com/chenx97)` in [https://github.com/rust-lang/libc/pull/3591](https://github.com/rust-lang/libc/pull/3591)
-   Support posix_spawn on Android by [`@&#8203;pcc](https://github.com/pcc)` in [https://github.com/rust-lang/libc/pull/3602](https://github.com/rust-lang/libc/pull/3602)
-   \[0.2] Fix libc-tests for loongarch64 by [`@&#8203;heiher](https://github.com/heiher)` in [https://github.com/rust-lang/libc/pull/3607](https://github.com/rust-lang/libc/pull/3607)
-   visionOS Support by [`@&#8203;agg23](https://github.com/agg23)` in [https://github.com/rust-lang/libc/pull/3568](https://github.com/rust-lang/libc/pull/3568)
-   \[0.2] linux/musl: Add support for LoongArch64 by [`@&#8203;heiher](https://github.com/heiher)` in [https://github.com/rust-lang/libc/pull/3606](https://github.com/rust-lang/libc/pull/3606)
-   v0.2: Fix c_char on AIX by [`@&#8203;taiki-e](https://github.com/taiki-e)` in [https://github.com/rust-lang/libc/pull/3662](https://github.com/rust-lang/libc/pull/3662)
-   solarish adding SO_EXCLBIND constant. by [`@&#8203;devnexen](https://github.com/devnexen)` in [https://github.com/rust-lang/libc/pull/3651](https://github.com/rust-lang/libc/pull/3651)
-   \[0.2] Add SIG constants to espidf by [`@&#8203;Tevz-Beskovnik](https://github.com/Tevz-Beskovnik)` in [https://github.com/rust-lang/libc/pull/3658](https://github.com/rust-lang/libc/pull/3658)
-   add all android sysconf constants by [`@&#8203;fkm3](https://github.com/fkm3)` in [https://github.com/rust-lang/libc/pull/3656](https://github.com/rust-lang/libc/pull/3656)
-   feat: more \_PC_XXX constants for apple targets by [`@&#8203;SteveLauC](https://github.com/SteveLauC)` in [https://github.com/rust-lang/libc/pull/3649](https://github.com/rust-lang/libc/pull/3649)
-   feat: O_EXEC/O_SEARCH for apple platforms by [`@&#8203;SteveLauC](https://github.com/SteveLauC)` in [https://github.com/rust-lang/libc/pull/3668](https://github.com/rust-lang/libc/pull/3668)
-   \[0.2] Add constant AT_MINSIGSTKSZ by [`@&#8203;ur4t](https://github.com/ur4t)` in [https://github.com/rust-lang/libc/pull/3637](https://github.com/rust-lang/libc/pull/3637)
-   Haiku: synchronize with post R1-beta 4 changes in libc by [`@&#8203;nielx](https://github.com/nielx)` in [https://github.com/rust-lang/libc/pull/3638](https://github.com/rust-lang/libc/pull/3638)
-   adding getentropy/getrandom to dragonflybsd. by [`@&#8203;devnexen](https://github.com/devnexen)` in [https://github.com/rust-lang/libc/pull/3618](https://github.com/rust-lang/libc/pull/3618)
-   Move strftime, strftime_l, strptime to linux_like by [`@&#8203;pcc](https://github.com/pcc)` in [https://github.com/rust-lang/libc/pull/3600](https://github.com/rust-lang/libc/pull/3600)
-   update crate version to 0.2.154 by [`@&#8203;Dirreke](https://github.com/Dirreke)` in [https://github.com/rust-lang/libc/pull/3573](https://github.com/rust-lang/libc/pull/3573)

#### New Contributors

-   [`@&#8203;pcc](https://github.com/pcc)` made their first contribution in [https://github.com/rust-lang/libc/pull/3602](https://github.com/rust-lang/libc/pull/3602)
-   [`@&#8203;agg23](https://github.com/agg23)` made their first contribution in [https://github.com/rust-lang/libc/pull/3568](https://github.com/rust-lang/libc/pull/3568)
-   [`@&#8203;Tevz-Beskovnik](https://github.com/Tevz-Beskovnik)` made their first contribution in [https://github.com/rust-lang/libc/pull/3658](https://github.com/rust-lang/libc/pull/3658)
-   [`@&#8203;ur4t](https://github.com/ur4t)` made their first contribution in [https://github.com/rust-lang/libc/pull/3637](https://github.com/rust-lang/libc/pull/3637)

**Full Changelog**: rust-lang/libc@0.2.153...0.2.154

</details>

<details>
<summary>raphlinus/pulldown-cmark (pulldown-cmark)</summary>

### [`v0.10.3`](https://github.com/pulldown-cmark/pulldown-cmark/releases/tag/v0.10.3)

[Compare Source](https://github.com/raphlinus/pulldown-cmark/compare/v0.10.2...v0.10.3)

The main change of this release is the `simd` feature was not being used in the escape functions  since the version 0.10 due to a mistake during the separation of the crate `pulldown-cmark-escape`.

The crate `pulldown-cmark-escape` has been updated to the version 0.10.1.

#### What's Changed

-   fix: fix dead code warning from nightly compiler by [`@&#8203;rhysd](https://github.com/rhysd)` in [https://github.com/pulldown-cmark/pulldown-cmark/pull/876](https://github.com/pulldown-cmark/pulldown-cmark/pull/876)
-   Eat all spaces after line break in link title by [`@&#8203;notriddle](https://github.com/notriddle)` in [https://github.com/pulldown-cmark/pulldown-cmark/pull/877](https://github.com/pulldown-cmark/pulldown-cmark/pull/877)
-   Mark `Rule` as a block item by [`@&#8203;notriddle](https://github.com/notriddle)` in [https://github.com/pulldown-cmark/pulldown-cmark/pull/879](https://github.com/pulldown-cmark/pulldown-cmark/pull/879)

**Full Changelog**: pulldown-cmark/pulldown-cmark@v0.10.2...v0.10.3

</details>

<details>
<summary>serde-rs/serde (serde)</summary>

### [`v1.0.199`](https://github.com/serde-rs/serde/releases/tag/v1.0.199)

[Compare Source](https://github.com/serde-rs/serde/compare/v1.0.198...v1.0.199)

-   Fix ambiguous associated item when `forward_to_deserialize_any!` is used on an enum with `Error` variant ([#&#8203;2732](https://github.com/serde-rs/serde/issues/2732), thanks [`@&#8203;aatifsyed](https://github.com/aatifsyed))`

### [`v1.0.198`](https://github.com/serde-rs/serde/releases/tag/v1.0.198)

[Compare Source](https://github.com/serde-rs/serde/compare/v1.0.197...v1.0.198)

-   Support serializing and deserializing `Saturating<T>` ([#&#8203;2709](https://github.com/serde-rs/serde/issues/2709), thanks [`@&#8203;jbethune](https://github.com/jbethune))`

</details>

<details>
<summary>serde-rs/json (serde_json)</summary>

### [`v1.0.116`](https://github.com/serde-rs/json/releases/tag/v1.0.116)

[Compare Source](https://github.com/serde-rs/json/compare/v1.0.115...v1.0.116)

-   Make module structure comprehensible to static analysis ([#&#8203;1124](https://github.com/serde-rs/json/issues/1124), thanks [`@&#8203;mleonhard](https://github.com/mleonhard))`

</details>

<details>
<summary>dtolnay/thiserror (thiserror)</summary>

### [`v1.0.59`](https://github.com/dtolnay/thiserror/releases/tag/1.0.59)

[Compare Source](https://github.com/dtolnay/thiserror/compare/1.0.58...1.0.59)

-   Unblock testing of rustc `debug-fmt-detail` option ([#&#8203;297](https://github.com/dtolnay/thiserror/issues/297))

</details>

<details>
<summary>time-rs/time (time)</summary>

### [`v0.3.36`](https://github.com/time-rs/time/blob/HEAD/CHANGELOG.md#0336-2024-04-10)

[Compare Source](https://github.com/time-rs/time/compare/v0.3.35...v0.3.36)

##### # Fixed

-   `FormatItem` can be used as part of an import path. See [#&#8203;675] for details.

[#&#8203;675]: https://github.com/time-rs/time/issues/675

### [`v0.3.35`](https://github.com/time-rs/time/blob/HEAD/CHANGELOG.md#0335-2024-04-10)

[Compare Source](https://github.com/time-rs/time/compare/v0.3.34...v0.3.35)

##### Added

-   `Duration::checked_neg`
-   `ext::InstantExt`, which provides methods for using `time::Duration` with `std::time::Instant`

##### Changed

-   `Instant` is deprecated. It is recommended to use `std::time::Instant` directly, importing
    `time::ext::InstantExt` for interoperability with `time::Duration`.
-   `FormatItem` has been renamed to `BorrowedFormatItem`, avoiding confusion with `OwnedFormatItem`.
    An alias has been added for backwards compatibility.

##### Fixed

-   The weekday is optional when parsing RFC2822.
-   The range of sub-second values in `Duration` is documented correctly. The previous documentation
    contained an off-by-one error.
-   Leap seconds are now correctly handled when parsing ISO 8601.

</details>

<details>
<summary>toml-rs/toml (toml_edit)</summary>

### [`v0.22.12`](https://github.com/toml-rs/toml/compare/v0.22.11...v0.22.12)

[Compare Source](https://github.com/toml-rs/toml/compare/v0.22.11...v0.22.12)

</details>

<details>
<summary>unicode-rs/unicode-width (unicode-width)</summary>

### [`v0.1.12`](https://github.com/unicode-rs/unicode-width/compare/v0.1.11...v0.1.12)

[Compare Source](https://github.com/unicode-rs/unicode-width/compare/v0.1.11...v0.1.12)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 5am on the first day of the month" (UTC), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://github.com/renovatebot/renovate/discussions) if that's undesired.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/rust-lang/cargo).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMjEuMiIsInVwZGF0ZWRJblZlciI6IjM3LjMzMS4wIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIiwibGFiZWxzIjpbXX0=-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants