Repository navigation
fix(build): make the CLI allocators optional for library consumers - #1004
Merged
Merged
Conversation
tikv-jemallocator and mimalloc were unconditional target dependencies, so a crate that embeds rumdl as a library with default-features = false still linked jemalloc. The library never installs it as the global allocator; it only adds a native build and a links = "jemalloc" entry, which fails resolution as soon as the embedding crate links a different tikv-jemalloc-sys. The allocators are now optional and enabled by the native feature, which the CLI builds with by default, so the binary is unchanged.
Goldziher
added a commit
to polylint/rumdl
that referenced
this pull request
Nov 16, 2026
Picks up the optional CLI allocators (rvben#1004), so embedding the library no longer links jemalloc.
Goldziher
added a commit
to polylint/polylint
that referenced
this pull request
Nov 16, 2026
Upstream rumdl 0.3.4 builds on Oxc 0.137, so the web component linked a second oxc next to poly's 0.158, plus rumdl's unconditional jemalloc. polylint-rumdl 0.3.5 is polylint's fork on Oxc 0.158 with the CLI allocators optional (rvben/rumdl#1003, rvben/rumdl#1004), and adrlint 0.5.2 depends on it, so upstream rumdl leaves the graph entirely. The lib name stays rumdl_lib, so no source changes; the engine versions move so cached results are recomputed (#192). components/Cargo.lock duplicates (package names locked at more than one version): 67 -> 54. oxc: 12 duplicated crates (0.137 + 0.158) -> 0. `cargo tree -d -e normal --target all` lists no oxc_, rumdl or tikv-jemalloc entry, and tikv-jemallocator is no longer in the graph (was 0.6.1 through rumdl).
rvben
added a commit
that referenced
this pull request
Nov 16, 2026
Merges polylint/rumdl. Raises the MSRV to 1.97, moves the MDX parser to Oxc 0.158 and upgrades all dependencies. Conflict resolution keeps tikv-jemallocator optional (as introduced in #1004) at the upgraded 0.7, and states the 1.97 MSRV under the rolling-window policy.
Owner
|
Thanks @Goldziher, this was a clear diagnosis: the library never installs the allocator, so the dependency only added a native build and the One gap remains, and we'll close it ourselves: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
tikv-jemallocator(andmimalloc/libmimalloc-syson MSVC) were unconditional target dependencies. A crate that embeds rumdl as a library withdefault-features = falsetherefore still linked jemalloc. The library never installs it as the global allocator; the dependency only added a native build and alinks = "jemalloc"entry.That
linksentry is what breaks consumers. If the embedding project also links a differenttikv-jemalloc-sysversion, Cargo cannot resolve the graph, because only one package may declarelinks = "jemalloc". polylint hit this once its other dependencies moved totikv-jemallocator0.7.The allocators are now optional and enabled by the
nativefeature, which is in the default set, so the CLI binary is unchanged. The#[global_allocator]statics and the mimalloc exit-option call are gated onfeature = "native"as well.Checked:
cargo tree -e normal -i tikv-jemallocator --no-default-featuresmatches nothing. With default features it still shows rumdl.cargo clippy --all-targets --all-features -- -D warnings -D clippy::uninlined_format_argsis clean.cargo check --lib --no-default-featurespasses.cargo fmt --checkis clean.