Expand description
A build dependency for running xmake
to build a native library
This crate provides some necessary boilerplate and shim support for running
the system xmake
command to build a native library.
The builder-style configuration allows for various variables and such to be passed down into the build as well.
§Installation
Add this to your Cargo.toml
:
[build-dependencies]
xmake = "0.3.0"
§Examples
use xmake;
// Builds the project in the directory located in `libfoo`, and link it
xmake::build("libfoo");
use xmake::Config;
Config::new("libfoo")
.option("bar", "true")
.env("XMAKE", "path/to/xmake")
.build();
Structs§
- Build
Info - Represents the link information for a build.
- Config
- Builder style configuration for a pending XMake build.
- Link
- Represents a single linked library.
Enums§
- Link
Kind - Represents the different kinds of linkage for a library.
- Parsing
Error - Represents errors that can occur when parsing a string to it’s
BuildInfo
representation.
Functions§
- build
- Builds the native library rooted at
path
with the default xmake options. This will return the directory in which the library was installed.