-
Notifications
You must be signed in to change notification settings - Fork 15
Rust Linker Error MacOS
Vladislav Buinovski edited this page Jan 21, 2025
·
1 revision
This error commonly occurs on MacOS systems, particularly on M1 machines, but can also appear on earlier versions of MacOS.
The issue can be resolved by configuring Rust's linker settings. Create or modify the ~/.cargo/config.toml file with the following content:
[target.x86_64-apple-darwin]
rustflags = [
"-C", "link-arg=-undefined",
"-C", "link-arg=dynamic_lookup",
]
[target.aarch64-apple-darwin]
rustflags = [
"-C", "link-arg=-undefined",
"-C", "link-arg=dynamic_lookup",
]This configuration sets up the necessary linker arguments for both Intel (x86_64) and Apple Silicon (aarch64) architectures.
- The configuration file path follows the Cargo configuration format
- This solution is based on community recommendations from Stack Overflow
Quick Links: Repository | Issues | Pull Requests | Releases
To contribute to the wiki documentation:
- Fork the wiki repository
- Make your changes in your forked repository
- Submit a Pull Request
- Wait for review and approval
All wiki changes must go through Pull Requests - direct edits are not allowed.
Note: Make sure to sync your fork regularly to avoid conflicts.
StyleX Rust Plugin Contributors. Built with ❤️ using StyleX and NAPI-RS.