You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I looked into the current [patch.crates-io] to see what remains to be unpatched.
Right now, the only entry left in Cargo.toml is ntapi:
[patch.crates-io]
# The `heim` crates depend on `ntapi` 0.3.7 on Windows, but that version has an# unaligned access bug fixed in the following revision.ntapi = { git = "https://github.com/MSxDOS/ntapi.git", rev = "24fc1e47677fc9f6e38e5f154e6011dc9b270da6" }
Context & Root Cause
Transitive dependency: ntapi is pulled transitively via heim. Since the upstream heim crate hasn't had a release in ~6 years, Vector maintains its own fork.
The bug: The patch exists to fix an unaligned memory access crash on Windows present in ntapi 0.3.7 (used by heim).
Upstream status: As discussed in the ntapi issue, this was fixed in ntapi 0.4.x, but since 0.4 introduces breaking API changes, Cargo resolves versions independently and won't automatically upgrade 0.3.x.
Two Alternatives
Bump ntapi in the heim fork: Technically, we could bump ntapi to 0.4.x directly inside Vector's heim fork, which would allow dropping the [patch.crates-io] entry here. However, this means taking on FFI changes and potential regression risks. It can be hard and painful :(
Given that the current [patch.crates-io] is stable and working, spending effort modifying the legacy heim fork purely to remove a [patch.crates-io] introduces unnecessary risk.
It might make sense to close this issue (or at least remove the good first issue label) so it doesn't mislead new contributors into thinking this is a simple standalone cleanup task, and track the remaining work directly in #21861.
Thanks for your comment. I’ve closed #24674. I’d be happy to help with #21861 by comparing Vector’s current heim usage with sysinfo’s capabilities and documenting any platform-specific gaps. Would that be useful?
Activity
Trighap52 commentedon Feb 15, 2026
I gave this a shot and opened a PR: #24658
pront commentedon Feb 17, 2026
Thanks @Trighap52, we will take a look at your PR.
Captain1653 commentedon Oct 12, 2026
Hi.
I looked into the current
[patch.crates-io]to see what remains to be unpatched.Right now, the only entry left in
Cargo.tomlisntapi:Context & Root Cause
Transitive dependency:
ntapiis pulled transitively viaheim. Since the upstream heim crate hasn't had a release in ~6 years, Vector maintains its own fork.The bug: The patch exists to fix an unaligned memory access crash on Windows present in ntapi 0.3.7 (used by heim).
Upstream status: As discussed in the ntapi issue, this was fixed in ntapi 0.4.x, but since 0.4 introduces breaking API changes, Cargo resolves versions independently and won't automatically upgrade 0.3.x.
Two Alternatives
Bump ntapi in the heim fork: Technically, we could bump ntapi to 0.4.x directly inside Vector's heim fork, which would allow dropping the [patch.crates-io] entry here. However, this means taking on FFI changes and potential regression risks. It can be hard and painful :(
Close this issue in favor of Replace
heimmetrics collection crate withsysinfo#21861: Vector already tracks replacing heim with sysinfo in Replaceheimmetrics collection crate withsysinfo#21861 . Once that migration lands, heim and the ntapi patch will naturally be removed together without touching the old fork.Recommendation
Given that the current
[patch.crates-io]is stable and working, spending effort modifying the legacy heim fork purely to remove a[patch.crates-io]introduces unnecessary risk.It might make sense to close this issue (or at least remove the
good first issuelabel) so it doesn't mislead new contributors into thinking this is a simple standalone cleanup task, and track the remaining work directly in #21861.This old PR also can be closed.
Trighap52 commentedon Oct 13, 2026
Thanks for your comment. I’ve closed #24674. I’d be happy to help with #21861 by comparing Vector’s current heim usage with sysinfo’s capabilities and documenting any platform-specific gaps. Would that be useful?