Crates.io | yabs |
lib.rs | yabs |
version | 0.2.2 |
source | src |
created_at | 2015-06-22 16:26:10.399523 |
updated_at | 2018-04-30 01:46:51.178983 |
description | Yet another build system |
homepage | |
repository | https://github.com/0X1A/yabs |
max_upload_size | |
id | 2447 |
size | 43,444 |
Yet another build system. A C and C++ build system, with projects described using TOML.
Note: Yabs is still very much a work in progress and is subject to change.
Until yabs reaches version 1.0.0
, it should be assumed that yabs will continue
to change.
To install yabs simply run cargo install yabs
. If you are installing from
crates.io please see the version of documentation available on docs.rs that corresponds to
your output of yabs --version
. Otherwise, clone this repo and build the release target and add
yabs to your $PATH
To build yabs
you will need rustc
and cargo
. Simply run cargo build --release
, this will build a binary called yabs
in target/release
.
Output of yabs -h
yabs 0.2.0
Alberto Corona <ac@albertocorona.com>
Yet another build system
USAGE:
yabs [FLAGS] [SUBCOMMAND]
FLAGS:
-h, --help Prints help information
--sources Print source files found by yabs or listed in 'src'
-V, --version Prints version information
SUBCOMMANDS:
build Build a binary or library, builds all binaries and libraries if no options are given
clean Removes all object files, binaries and libraries built by yabs
help Prints this message or the help of the given subcommand(s)
new Create a new yabs project
yabs
uses TOML to define projects. For example, a project in C++ using libraries such as SDL2, SDL2-image, SDL2-ttf, and Lua 5.3 would look similar to the following:
[project]
name = "kuma"
file-extensions = ["cpp"]
compiler = "g++"
compiler-flags = ["std=c++14", "O0", "Wall", "Wextra", "g", "D_DEBUG_"]
include = ["src","`pkg-config --cflags sdl2 lua5.3`", "/usr/include/yaml-cpp", "third_party/sol2/single/sol"]
libraries = [
"`pkg-config --libs sdl2 SDL2_image SDL2_ttf SDL2_mixer lua5.3 yaml-cpp`",
]
ignore = [
"tests/",
"third_party/",
]
[[bin]]
name = "kuma"
path = "./src/main.cpp"
[[lib]]
name = "libkuma"
types = ["static"]
Currently yabs
builds all targets listed in [[bin]]
and [[lib]]
sections
The following tables describes what keys are available to yabs project files.
Key | Value | Type |
---|---|---|
name |
Name for project | String |
file-extensions |
Extensions used for source files | Array |
version |
Version number | String |
compiler |
Compiler to use | String |
src |
Source files | Array |
libraries |
Libraries to link | Array |
librariy-directories |
Library directories to use | Array |
include |
Include directories | Array |
compiler-flags |
Compiler flags | Array |
linker-flags |
Linker flags | Array |
ignore |
Directories or files to ignore | Array |
before-script |
Scripts to run before a build | Array |
after-script |
Scripts to run after a build | Array |
ar |
Archiving tool to use | String |
arflags |
Flags for archiving tool | Array |
Key | Value | Type |
---|---|---|
name |
Name and path for the binary | String |
path |
Path for the binary entry point (main ) |
String |
Key | Value | Type |
---|---|---|
name |
Name of library | String |
types |
Library types to create | Array |