Struct nasm_rs::Build
[−]
[src]
pub struct Build { /* fields omitted */ }
Methods
impl Build
[src]
fn new() -> Self
[src]
fn file<P: AsRef<Path>>(&mut self, p: P) -> &mut Self
[src]
Add a file which will be compiled
e.g. "foo.s"
fn include<P: AsRef<Path>>(&mut self, dir: P) -> &mut Self
[src]
Add a directory to the -I
include path
fn define<'a, V: Into<Option<&'a str>>>(
&mut self,
var: &str,
val: V
) -> &mut Self
[src]
&mut self,
var: &str,
val: V
) -> &mut Self
Pre-define a macro with an optional value
fn debug(&mut self, enable: bool) -> &mut Self
[src]
Configures whether the assembler will generate debug information.
This option is automatically scraped from the DEBUG
environment
variable by build scripts (only enabled when the profile is "debug"), so
it's not required to call this function.
fn flag(&mut self, flag: &str) -> &mut Self
[src]
Add an arbitrary flag to the invocation of the assembler
e.g. "-Fdwarf"
fn target(&mut self, target: &str) -> &mut Self
[src]
Configures the target this configuration will be compiling for.
This option is automatically scraped from the TARGET
environment
variable by build scripts, so it's not required to call this function.
fn archiver<P: AsRef<Path>>(&mut self, archiver: P) -> &mut Self
[src]
Configures the tool used to assemble archives.
This option is automatically determined from the target platform or a number of environment variables, so it's not required to call this function.
fn nasm<P: AsRef<Path>>(&mut self, nasm: P) -> &mut Self
[src]
Configures path to nasm
command
fn compile(&mut self, output: &str)
[src]
Run the compiler, generating the file output
The name output should be the name of the library
including platform-specific prefix and file extension,
e.g. "libfoo.a"