Skip to content

nice: Remove unsafe and reduce bin size#11489

Merged
sylvestre merged 1 commit intouutils:mainfrom
oech3:nice-rustix
Mar 31, 2026
Merged

nice: Remove unsafe and reduce bin size#11489
sylvestre merged 1 commit intouutils:mainfrom
oech3:nice-rustix

Conversation

@oech3
Copy link
Copy Markdown
Contributor

@oech3 oech3 commented Mar 25, 2026

@github-actions
Copy link
Copy Markdown

GNU testsuite comparison:

Skip an intermittent issue tests/cut/bounded-memory (fails in this run but passes in the 'main' branch)
Skipping an intermittent issue tests/date/date-locale-hour (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/date/resolution (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/pr/bounded-memory (passes in this run but fails in the 'main' branch)
Note: The gnu test tests/tail/pipe-f is now being skipped but was previously passing.

@oech3 oech3 marked this pull request as ready for review March 25, 2026 15:33
@sylvestre
Copy link
Copy Markdown
Contributor

Replace 2 unsafe libc usage and nix with rustix (which is #9549)

Sure it is already a transitive dep but you are adding a third way to call system libs ?! :/
it won't simplify our code base

@oech3
Copy link
Copy Markdown
Contributor Author

oech3 commented Mar 25, 2026

Ofcause this makes additional way to call systel libs, but I want to do that since

  • rustix mathes with Rust's Ok and Err style
  • rustix tries to call syscall directly (bypass linker's overhead)
  • We can try to remove nix in the future (I now it is hard to that soon)

@github-actions
Copy link
Copy Markdown

GNU testsuite comparison:

Skip an intermittent issue tests/date/resolution (fails in this run but passes in the 'main' branch)
Skipping an intermittent issue tests/tail/follow-name (passes in this run but fails in the 'main' branch)
Note: The gnu test tests/cut/cut-huge-range is now being skipped but was previously passing.
Note: The gnu test tests/seq/seq-epipe is now being skipped but was previously passing.

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Mar 25, 2026

Merging this PR will improve performance by 13.59%

⚡ 1 improved benchmark
✅ 299 untouched benchmarks
⏩ 46 skipped benchmarks1

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Memory cp_recursive_deep_tree[(120, 4)] 699.2 KB 615.6 KB +13.59%

Comparing oech3:nice-rustix (91ce3c1) with main (ac72aa8)

Open in CodSpeed

Footnotes

  1. 46 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@xtqqczze
Copy link
Copy Markdown
Contributor

Can we use nix to remove the unsafe?

@oech3
Copy link
Copy Markdown
Contributor Author

oech3 commented Mar 25, 2026

Can we use nix to remove the unsafe?

I don't think so. This PR removed 2 unsafe, but it looks accidentaly happened.
Forget this

@oech3
Copy link
Copy Markdown
Contributor Author

oech3 commented Mar 25, 2026

Please close #9549 if you don't agree with this PR.

@oech3
Copy link
Copy Markdown
Contributor Author

oech3 commented Mar 25, 2026

But uutils previously replaced chrono with jiff with many PRs. Why cannot we do same things?

@sylvestre
Copy link
Copy Markdown
Contributor

But uutils previously replaced chrono with jiff with many PRs. Why cannot we do same things?

Because chrono had plenty of limitations

@oech3

This comment was marked as outdated.

@oech3

This comment was marked as outdated.

@sylvestre sylvestre merged commit 21e3b1e into uutils:main Mar 31, 2026
162 of 163 checks passed
@oech3 oech3 deleted the nice-rustix branch March 31, 2026 06:07
@oech3
Copy link
Copy Markdown
Contributor Author

oech3 commented Mar 31, 2026

Thankou. Is it OK to split #11548 (keeping author's address)?

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.

nice: replace nix and libc with rustix

3 participants