Allows setting linker arugments at compile time without a build script. Currently only supports Windows MSVC toolchains.
Usage
Add this to your Cargo.toml
:
[]
= "0.6"
Examples
Put these examples at the root of your main.rs
or lib.rs
.
Set the size of the stack
Reserve 8 MiB (8,388,608 bytes) of virtual memory for the stack. This should
only be set for crates that produce a .exe
or .dll
binary.
!;
stack_size
Add a default library
Add "kernel32.lib" to the libraries that are serached for symbols.
!;
default_lib
Use the windows!
macro
The [windows!
] macro lets you set multiple arguments at once.
!
windows
If you use unsafe linker arguments the you must mark the whole block as
unsafe
.
// Only set these in release mode.
windows!