Crates.io | embargo |
lib.rs | embargo |
version | 0.1.1 |
source | src |
created_at | 2023-03-24 12:34:30.504256 |
updated_at | 2023-05-01 18:35:25.605346 |
description | A simple and fast opinionated build system for c/c++ |
homepage | |
repository | https://github.com/Valchap/embargo |
max_upload_size | |
id | 819279 |
size | 72,360 |
Embargo is a simple and fast opinionated build system for c/c++
Install rust
Then install embargo with rust package manager :
cargo install embargo
Embargo uses the llvm toolchain by default (clang, lldb, clang-tidy)
Debian dependencies :
apt install clang lldb clang-tidy
First create a project folder, then type the following command inside it:
embargo init
This will create a default "Hello World"
Debug build :
embargo build
Release build :
embargo release-build
Builds can be found in the build/debug
or build/release
folder
Debug run :
embargo run
Release run :
embargo release-run
Embargo will build your app before running it so that you always run the latest version of your app
embargo run
runs your app inside a debugger so that you can easily find where a crash happened in your code.
embargo debug
This will start the debugger with your app attached to it
embargo lint
This will use clang-tidy
to find common mistakes in your code
embargo clangd-config
This will create the compile_flags.txt
that can the be used by the clangd language server
embargo clean
This will remove the build folder
embargo show-config
This will show Embargo configuration for the current project
Embargo project configuration is read from the Embargo.toml file at the root of your project
Here is an example configuration with Embargo default settings
compiler = "clang++"
debugger = "lldb"
linter = "clang-tidy"
flags = ["-Wall", "-Wextra", "-pedantic"]
debug-flags = ["-g"]
release-flags = ["-O2"]
linker-flags = []
linter-checks = ["clang-analyzer-*"]
If a key is missing in the configuration Embargo will use these as default settings
If you don't want to install the rust toolchain, but still want similar functionality, you may have a look at PyBargo