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

Add blog post for 1.71 #1118

Merged
merged 4 commits into from
Jul 13, 2023
Merged

Conversation

Mark-Simulacrum
Copy link
Member

r? @rust-lang/release

posts/2023-07-13-Rust-1.71.0.md Outdated Show resolved Hide resolved
posts/2023-07-13-Rust-1.71.0.md Outdated Show resolved Hide resolved
Co-authored-by: Eric Huss <[email protected]>
@joshtriplett
Copy link
Member

joshtriplett commented Jul 9, 2023

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.

@Mark-Simulacrum
Copy link
Member Author

Happy to receive PR/suggestion/etc on it. 3 items is a very loose rule.

@joshtriplett
Copy link
Member

@Mark-Simulacrum Done.

@Mark-Simulacrum
Copy link
Member Author

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.

@Mark-Simulacrum Mark-Simulacrum merged commit 1fdfb9c into rust-lang:master Jul 13, 2023
@Mark-Simulacrum Mark-Simulacrum deleted the 1.71.0 branch July 13, 2023 14:04
Comment on lines +57 to +63
### 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.
Copy link
Member

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.

Copy link
Member

@joshtriplett joshtriplett Jul 31, 2023

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.

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.

7 participants