Skip to content

refactor: to have similar structure to uutils/coreutils - #262

Open
toggysmith wants to merge 3 commits into
uutils:mainfrom
toggysmith:split-into-separate-crates
Open

refactor: to have similar structure to uutils/coreutils#262
toggysmith wants to merge 3 commits into
uutils:mainfrom
toggysmith:split-into-separate-crates

Conversation

@toggysmith

@toggysmith toggysmith commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

This refactors the codebase to have a more similar structure to uutils/coreutils.

Each of the utils have been moved into their own crates under src/uu and shared code has been moved into the src/uucore crate. Each util crate has a symlink to the licences in the root of the repo.

The changes here are purely a refactor - nothing else has been changed.

@toggysmith
toggysmith force-pushed the split-into-separate-crates branch from f811086 to 062bcca Compare July 11, 2026 22:24
@toggysmith
toggysmith marked this pull request as draft July 11, 2026 22:28
@toggysmith
toggysmith marked this pull request as ready for review July 11, 2026 22:34
@sylvestre
sylvestre force-pushed the split-into-separate-crates branch from 517a649 to 17daa24 Compare August 24, 2026 19:09
@sylvestre

Copy link
Copy Markdown
Collaborator

uucore is used by coreutils. i will just rename it to diffutils_core

@sylvestre

Copy link
Copy Markdown
Collaborator

great work btw :)
i wanted this for years!

@github-actions

Copy link
Copy Markdown

GNU diffutils testsuite comparison:

Test results comparison:
  Current:   TOTAL: 33 / PASSED: 0 / FAILED: 33 / SKIPPED: 0
  Reference: TOTAL: 33 / PASSED: 8 / FAILED: 21 / SKIPPED: 4

Changes from main branch:
  TOTAL: +0
  PASSED: -8
  FAILED: +12

New test failures (12):
  - basic
  - bignum
  - brief-vs-stat-zero-kernel-lies
  - bug-64316
  - cmp
  - diff3
  - help-version
  - large-subopt
  - strcoll-0-names
  - strip-trailing-cr
  - timezone
  - y2038-vs-32bit

@codspeed-hq

codspeed-hq Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will degrade performance by 3.57%

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

❌ 1 regressed benchmark
✅ 25 untouched benchmarks

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation cmp_parser 12.4 µs 12.8 µs -3.57%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing toggysmith:split-into-separate-crates (bc9defb) with main (cbc5298)

Open in CodSpeed

sylvestre added a commit that referenced this pull request Aug 24, 2026
GnuTests on #262 reported "PASSED: -8 / FAILED: +12" although the branch
changes nothing for the testsuite.
sylvestre added a commit that referenced this pull request Aug 24, 2026
GnuTests on #262 reported "PASSED: -8 / FAILED: +12" although the branch
changes nothing for the testsuite.
toggysmith and others added 3 commits August 24, 2026 22:56
This refactors the codebase to have a more similar structure to
uutils/coreutils.

Each of the utils have been moved into their own crates under
`src/uu` and shared code has been moved into the `src/uucore`
crate. Each util crate has a symlink to the licences in the
root of the repo.
The name `uucore` belongs to the shared crate of uutils/coreutils, so the
shared code of diffutils cannot use it. Rename the crate (and its
directory) to `diffutils_core`.

Also:
- drop the stray `src/uu/cmp/Cargo.lock` (workspace members share the
  root lockfile)
- add the LICENSE symlinks to the shared crate, like the util crates
- add `description`/`repository` metadata to the new crates
- move the root crate's test-only dependencies back to dev-dependencies

Claude-Session: https://claude.ai/code/session_01QK4eB5VFJ91FmZYFy3kphk
@sylvestre
sylvestre force-pushed the split-into-separate-crates branch from 17daa24 to bc9defb Compare August 24, 2026 20:56
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.

2 participants