-
Notifications
You must be signed in to change notification settings - Fork 293
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
Add blog post for 1.71 #1118
Add blog post for 1.71 #1118
Conversation
Co-authored-by: Eric Huss <[email protected]>
I think there's another important item worth highlighting. (I know the blog posts usually aim for three items, but one of them is from an old release and not this one...) raw-dylib being stabilized is something that ideally will have a broad impact on the ecosystem. Any crate building against a shared library on Windows should be using it, instead of import libraries. I'm happy to write the blog post text. |
Happy to receive PR/suggestion/etc on it. 3 items is a very loose rule. |
@Mark-Simulacrum Done. |
Co-authored-by: Josh Triplett <[email protected]>
I believe commits pushed now resolve the comments; I'm not fully satisfied with the C-unwind section but I think it's OK and users can click through for more details. |
### raw-dylib linking | ||
|
||
On Windows platforms, Rust now supports using functions from dynamic libraries without requiring those libraries to be available at build time, using the new `kind="raw-dylib”` option for `#[link]`. | ||
|
||
This avoids requiring users to install those libraries (particularly difficult for cross-compilation), and avoids having to ship stub versions of libraries in crates to link against. This simplifies crates providing bindings to Windows libraries. | ||
|
||
Rust also supports binding to symbols provided by DLLs by ordinal rather than named symbol, using the new `#[link_ordinal]` attribute. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry I'm late to this, but I think people are finding this confusing due to the unclear distinction between types of libraries. You've never needed to install the .dll
(dynamic library) in order to link to it. In fact having it is no help at all. You did need a .lib
(a static library) that describes which symbol is imported from which dll. This is usually called an "import library". But now you don't need it because raw-dylib
.
Admittedly I don't have better wording right now but I thought I should bring it up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ChrisDenton With hindsight, it might have been clearer to say "This avoids requiring developers to install those libraries", rather than "users".
It might also have made sense to spell out more details about import libraries, rather than glossing over the distinction.
r? @rust-lang/release