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

Dynamic linking #68

Open
the8472 opened this issue Aug 2, 2024 · 2 comments
Open

Dynamic linking #68

the8472 opened this issue Aug 2, 2024 · 2 comments
Labels
help wanted Extra attention is needed

Comments

@the8472
Copy link

the8472 commented Aug 2, 2024

Dynamically linking against libstd and possibly other libraries can significantly reduce binary size (even though not overall size).

This has of course the caveat that rust has no stable ABI so everything needs to be compiled with the same compiler version and build flags. But it can still be useful for multi-binary projects that share a lot of code or embedded-linux-builds where recompile-the-world is an acceptable cost.

@johnthagen
Copy link
Owner

johnthagen commented Aug 3, 2024

I think this would be a great example for a blog post that showed how this could work and the resulting binary size savings.

If someone writes such a blog post, I'll link to it in min-sized-rust.

@johnthagen johnthagen added the help wanted Extra attention is needed label Aug 3, 2024
@otavio
Copy link

otavio commented Aug 26, 2024

Just for the sake of completeness, I think that recompiling the world is not a problem for embedded devices, mostly because this is usually done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants