Skip to content

Commit 6c38aec

Browse files
committed
Provide reasons for when you should use kind="dll"
1 parent aa58318 commit 6c38aec

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

text/0000-dll-kind.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,14 @@ This would also allow `winapi` to not have to bundle import libraries for the `p
2222
# Guide-level explanation
2323
[guide-level-explanation]: #guide-level-explanation
2424

25-
When trying to link to a Windows dll, the `dylib` kind may sometimes be unsuitable, and `kind="dll"` can be used instead:
25+
When trying to link to a Windows dll, the `dylib` kind may sometimes be unsuitable, and `kind="dll"` can be used instead. A central requirement of `kind="dll"` is that the dll has a stable ABI. Here are some examples of valid reasons to use `kind="dll"`:
26+
27+
* You've had it up to here with trying to create an import library for a dll that has stdcall functions.
28+
* You're in linking hell with multiple import libraries providing the same symbol but from different dlls.
29+
* You know exactly which dll you need a symbol from, but you don't know which version of the dll the import library is going to give you.
30+
* You maintain `winapi`.
31+
32+
Here is an example of usage:
2633

2734
```rust
2835
#[cfg(windows)]

0 commit comments

Comments
 (0)