Skip to content

Commit 7fec86b

Browse files
committed
tutorial.md: tiny correction for --crate-type=lib
Compiling a crate with `rustc --crate-type=lib` produces an rlib file, not a shared object. The latter is only produced for `--crate-type=dylib`.
1 parent feb294c commit 7fec86b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/doc/tutorial.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3247,7 +3247,7 @@ fn main() { println!("hello {}", world::explore()); }
32473247
Now compile and run like this (adjust to your platform if necessary):
32483248

32493249
~~~~console
3250-
$ rustc --crate-type=lib world.rs # compiles libworld-<HASH>-0.42.so
3250+
$ rustc --crate-type=lib world.rs # compiles libworld-<HASH>-0.42.rlib
32513251
$ rustc main.rs -L . # compiles main
32523252
$ ./main
32533253
"hello world"

0 commit comments

Comments
 (0)