Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document how to use as a standalone linker #7

Open
petr-tik opened this issue Jun 28, 2022 · 2 comments
Open

Document how to use as a standalone linker #7

petr-tik opened this issue Jun 28, 2022 · 2 comments
Labels
documentation Improvements or additions to documentation

Comments

@petr-tik
Copy link

Hey, thanks for the awesome project.

I was curious to try zld with cargo/rust, but found no instructions to do so.

If you are willing and able to dedicate time, I would appreciate if you could document how to point cargo to use zld for linking.

Mold has something like this, which makes it pretty easy
https://github.com/rui314/mold#how-to-use

@kubkon
Copy link
Owner

kubkon commented Jul 8, 2022

Hi @petr-tik! Thanks for dropping this comment - I will be honest with you that I never thought of bare zld being used this way at all - I always intended for it to be used via the Zig compiler directly. However, you are making a good point, and I am actively trying my best to keep this repo with the changes to the MachO linker in Zig proper in sync, so I will work on a short note on how you can use the zld as a drop-in linker replacement.

@kubkon kubkon added the documentation Improvements or additions to documentation label Jul 8, 2022
@petr-tik
Copy link
Author

petr-tik commented Jul 9, 2022

Nice! Glad you find this interesting. It will help zig adoption if people can try a standalone zig-implemented linker, measure its performance improvement without learning about zig, toolchain and installation.

Personally, I am most interested in linking 1GB+ Cpp executables built with cmake and rust executables built with cargo on Linux x86_64. Happy to test drive, compare against mold and report results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants