From 64106c4d3d4ddba8c7bc2af75376e6d3d3d75601 Mon Sep 17 00:00:00 2001 From: Date: Mon, 29 Jun 2015 20:16:15 +0000 Subject: Update documentation --- gcc/index.html | 161 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 161 insertions(+) create mode 100644 gcc/index.html (limited to 'gcc/index.html') diff --git a/gcc/index.html b/gcc/index.html new file mode 100644 index 0000000..1953b95 --- /dev/null +++ b/gcc/index.html @@ -0,0 +1,161 @@ + + + + + + + + + + gcc - Rust + + + + + + + + + + + + + + + +
+

Crate gcc + + [] + + [src]

+

A library for build scripts to compile custom C code

+ +

This library is intended to be used as a build-dependencies entry in +Cargo.toml:

+ +
[build-dependencies]
+gcc = "0.2"
+
+ +

The purpose of this crate is to provide the utility functions necessary to +compile C code into a static archive which is then linked into a Rust crate. +The top-level compile_library function serves as a convenience and more +advanced configuration is available through the Config builder.

+ +

This crate will automatically detect situations such as cross compilation or +other environment variables set by Cargo and will build code appropriately.

+ +

Examples

+

Use the default configuration:

+
+extern crate gcc;
+
+fn main() {
+    gcc::compile_library("libfoo.a", &["src/foo.c"]);
+}
+
+ +

Use more advanced configuration:

+
+extern crate gcc;
+
+fn main() {
+    gcc::Config::new()
+                .file("src/foo.c")
+                .define("FOO", Some("bar"))
+                .include("src")
+                .compile("libfoo.a");
+}
+
+

Structs

+ + + + + +
Config +

Extra configuration to pass to gcc.

+ +

Functions

+ + + + + +
compile_library +

Compile a library from the given set of input C files.

+ +
+ + + + + + + + + + + + + + + \ No newline at end of file -- cgit v1.2.3