#build-dependencies #cgo #cgo-rust #golang #build #go

build cgo_oligami

A library for build scripts to compile custom Go code

5 releases

0.3.5 Sep 18, 2023
0.3.4 Sep 18, 2023
0.3.3 Sep 18, 2023
0.3.2 Sep 17, 2023
0.3.1 Sep 17, 2023

#118 in Build Utils

Download history 165/week @ 2023-09-15 53/week @ 2023-09-22

218 downloads per month
Used in oracle-nosql-db-sdk-rust

MIT license

17KB
298 lines

cgo-rs

A library for build scripts to compile custom Go code, inspired by the excellent cc crate.

It is intended that you use this library from within your build.rs file by adding the cgo crate to your build-dependencies:

[build-dependencies]
cgo = "*"

Examples

The following example will statically compile the Go package and instruct cargo to link the resulting library (libexample).

fn main() {
    cgo::Build::new()
        .package("pkg/example/main.go")
        .build("example");
}

lib.rs:

A library for build scripts to compile custom Go code, inspired by the excellent cc crate.

It is intended that you use this library from within your build.rs file by adding the cgo_oligami crate to your build-dependencies:

[build-dependencies]
cgo_oligami = "*"

Examples

The following example will statically compile the Go package and instruct cargo to link the resulting library (libexample).

fn main() {
    cgo_oligami::Build::new()
        .package("pkg/example/main.go")
        .build("example");
}

Dependencies

~145KB