@@ -18,7 +18,8 @@ be ignored in favor of only building the artifacts specified by command line.
18
18
* ` --crate-type=bin ` , ` #[crate_type = "bin"] ` - A runnable executable will be
19
19
produced. This requires that there is a ` main ` function in the crate which
20
20
will be run when the program begins executing. This will link in all Rust and
21
- native dependencies, producing a distributable binary.
21
+ native dependencies, producing a single distributable binary.
22
+ This is the default crate type.
22
23
23
24
* ` --crate-type=lib ` , ` #[crate_type = "lib"] ` - A Rust library will be produced.
24
25
This is an ambiguous concept as to what exactly is produced because a library
@@ -33,17 +34,17 @@ be ignored in favor of only building the artifacts specified by command line.
33
34
be produced. This is different from the ` lib ` output type in that this forces
34
35
dynamic library generation. The resulting dynamic library can be used as a
35
36
dependency for other libraries and/or executables. This output type will
36
- create ` *.so ` files on linux , ` *.dylib ` files on osx , and ` *.dll ` files on
37
- windows .
37
+ create ` *.so ` files on Linux , ` *.dylib ` files on macOS , and ` *.dll ` files on
38
+ Windows .
38
39
39
40
* ` --crate-type=staticlib ` , ` #[crate_type = "staticlib"] ` - A static system
40
41
library will be produced. This is different from other library outputs in that
41
42
the compiler will never attempt to link to ` staticlib ` outputs. The
42
43
purpose of this output type is to create a static library containing all of
43
- the local crate's code along with all upstream dependencies. The static
44
- library is actually a ` *.a ` archive on linux and osx and windows (MinGW), and
45
- a ` *.lib ` file on windows (MSVC). This format is recommended for use in
46
- situations such as linking Rust code into an existing non-Rust application
44
+ the local crate's code along with all upstream dependencies. This output type
45
+ will create ` *.a ` files on Linux, macOS and Windows (MinGW), and ` *.lib ` files
46
+ on Windows (MSVC). This format is recommended for use in situations such as
47
+ linking Rust code into an existing non-Rust application
47
48
because it will not have dynamic dependencies on other Rust code.
48
49
49
50
* ` --crate-type=cdylib ` , ` #[crate_type = "cdylib"] ` - A dynamic system
0 commit comments