5 releases

0.2.3 Nov 13, 2024
0.2.2 Jul 3, 2024
0.2.1 Aug 14, 2023
0.2.0 Jul 6, 2023
0.1.0 May 2, 2023

#220 in Build Utils

Download history 9/week @ 2024-09-13 10/week @ 2024-09-20 9/week @ 2024-09-27 2/week @ 2024-10-04 98/week @ 2024-11-08 25/week @ 2024-11-15 5/week @ 2024-11-22 10/week @ 2024-11-29 16/week @ 2024-12-06

86 downloads per month

MIT license

20KB
350 lines

xmake

A build dependency for running the xmake build tool to compile a native library.

# Cargo.toml
[build-dependencies]
xmake = "0.2.3"

The XMake executable is assumed to be xmake unless the XMAKE environmental variable is set.

If you need to cross-compile your project, xmake provides a built-in package manager that can set up the emscripten or Android NDK toolchains. The first two lines of the code snippet below enter a single package environment, overwriting the previous environment. However, the last line enters both the emscripten and NDK environments simultaneously.

xrepo env -b ndk shell
xrepo env -b emscripten shell
xrepo env -b "emscripten, ndk" shell

After executing one of these commands, xmake will automatically detect either the emscripten or NDK toolchain.

If you prefer to use your own toolchain, you can set either the ANDROID_NDK_HOME or EMSCRIPTEN_HOME environment variables to specify the path to the corresponding toolchain.

An example is available in the test-crate folder of the repo.

Dependencies

~230–325KB