[−][src]Crate gobuild
A library for build scripts to compile go Code.
It's like the cc
crate for go.
Add this library as a build-dependency in Cargo.toml
:
[build-dependencies]
gobuild = "0.1.0-alpha.1"
Examples
Use the Build
struct to compile hello.go
:
fn main() { gobuild::Build::new() .file("hello.go") .compile("foo"); }
This will generate a libhello.h
and libhello.a
in OUT_DIR
.
Consider combining this with bindgen
to generate a Rust wrapper
for the header.
Structs
Build | A builder for compilation of a native golang project. |
Error | Represents an internal error that occurred, with an explanation. |
Enums
BuildMode | Set the |