Skip to content

Commit e5a4e17

Browse files
committed
Rust: Deprecate staticlib, rlib, cdylib and dylib crate types
Meson already knows if it's a shared or static library, user only need to specify the ABI (Rust or C).
1 parent b7f0faf commit e5a4e17

File tree

2 files changed

+17
-13
lines changed

2 files changed

+17
-13
lines changed
Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
## New `clib` value for `rust_crate_type`
22

3-
Similar to `lib` value but for building a C ABI static or shared library
4-
depending on the value of `default_library` when using `library()`.
3+
Similar to the `lib` value that was already accepted, but for building a C ABI
4+
static or shared library depending on the value of `default_library` when using
5+
`library()`.
6+
7+
`staticlib`, `rlib`, `cdylib` and `dylib` values are now deprecated because
8+
Meson already knows if it's a shared or static library, user only need to specify
9+
the ABI (Rust or C).

docs/yaml/functions/_build_target_base.yaml

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -295,17 +295,16 @@ kwargs:
295295
If the target is an [[executable]] this defaults to "bin", the only
296296
allowed value.
297297
298-
If it is a [[static_library]] it defaults to "lib", and may be "lib", "clib"
299-
"staticlib", or "rlib". "clib" and "staticlib" means a C ABI library,
300-
"lib" and "rlib" means a Rust ABI.
301-
302-
If it is a [[shared_library]] it defaults to "lib", and may be "lib", "clib",
303-
"dylib", "cdylib", or "proc-macro". "clib" and "cdylib" means a C ABI library,
304-
"lib" and "dylib" means a Rust ABI, and "proc-macro" is a special rust
305-
procedural macro crate.
306-
307-
"proc-macro" is new in 0.62.0.
308-
"clib" is new in 1.3.0.
298+
If it is a [[static_library]] it defaults to "lib" which builds a Rust ABI
299+
library (rlib), "clib" builds a C ABI library (staticlib).
300+
*Since 1.3.0* "clib" value has been added, "staticlib" and "rlib" values
301+
have been deprecated.
302+
303+
If it is a [[shared_library]] it defaults to "lib" which builds a Rust ABI
304+
library (dylib), "clib" value builds a C ABI library (cdylib).
305+
*Since 0.62.0* "proc-macro" value builds a special rust procedural macro crate.
306+
*Since 1.3.0* "clib" value has been added, "cdylib" and "dylib" values
307+
have been deprecated.
309308
310309
rust_dependency_map:
311310
type: dict[str]

0 commit comments

Comments
 (0)