Skip to content

fix: Symlink rustfmt instead of copying#43

Merged
emgrav merged 1 commit into
mainfrom
charlie/fix-rustfmt-dylib
Jul 16, 2026
Merged

fix: Symlink rustfmt instead of copying#43
emgrav merged 1 commit into
mainfrom
charlie/fix-rustfmt-dylib

Conversation

@emgrav

@emgrav emgrav commented Jul 15, 2026

Copy link
Copy Markdown
Member

This should solve an issue I was having on aarch64-darwin where the rustfmt binary is apparently dynamically linked.

@cursor

cursor Bot commented Jul 15, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Small Nix dev-toolchain packaging change with no runtime app or security impact.

Overview
Updates famedly-rust-toolchain packaging so nightly cargo-fmt and rustfmt are symlinked from the nightly toolchain instead of copied into the composite toolchain’s bin/.

That keeps rustfmt working on aarch64-darwin, where those binaries are dynamically linked and need the original toolchain’s lib/ layout. A short comment documents the platform-specific reason.

Reviewed by Cursor Bugbot for commit 27efecb. Bugbot is set up for automated code reviews on this repo. Configure here.

@tlater-famedly tlater-famedly left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, in spite of my preference on how this file is commented.

Comment thread nix/rust/toolchain.nix
Comment on lines -29 to -31
# We want *only* the rustfmt binaries. This trick doesn't
# really work for other components of the rust toolchain,
# but specifically rustfmt is quite self-contained.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nit: We should keep this comment in addition to the new one. This comment explains why overriding parts of the toolchain like this is fine, the other one explains why we're symlinking instead of copying.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Good point, thanks. Done

@emgrav emgrav force-pushed the charlie/fix-rustfmt-dylib branch from d42d6e6 to 27efecb Compare July 16, 2026 06:23
@emgrav emgrav merged commit 27efecb into main Jul 16, 2026
4 checks passed
@emgrav emgrav deleted the charlie/fix-rustfmt-dylib branch July 16, 2026 06:34
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