Files
pallet/README.md

83 lines
1.6 KiB
Markdown
Raw Permalink Normal View History

2026-03-22 11:16:14 -05:00
# Pallet
2026-03-22 18:42:53 -05:00
Pallet is a project manager and build system for C inspired by Rust's Cargo.
2026-03-22 11:16:14 -05:00
This is a toy project not meant to be taken very seriously.
2026-03-22 18:03:12 -06:00
## Requirements for Use
2026-03-23 10:13:26 -06:00
[GCC](https://en.wikipedia.org/wiki/GNU_Compiler_Collection) is recommended as the compiler installed for `Pallet` projects.
2026-03-22 18:03:12 -06:00
2026-03-23 10:13:26 -06:00
You can define a different `gcc` compatible compiler instead per-project by editing `Pallet.toml`:
2026-03-22 18:03:12 -06:00
2026-03-23 10:13:26 -06:00
```toml
name = "my-app"
default_build = "debug"
compiler = "clang"
[[build]]
name = "debug"
args = [
"-g",
"-O0",
]
[[build]]
name = "release"
args = [
"-DNDEBUG",
"-O3",
]
```
2026-03-22 18:03:12 -06:00
2026-03-22 11:16:14 -05:00
## Usage
- `pallet new <project>`: initializes a new project at `project`
- `pallet init`: initializes a new project in the current directory
- `pallet run`: runs the local project
- `pallet build`: builds the local project
2026-03-22 18:42:53 -05:00
- `pallet clean`: cleans the local project's build artifacts
2026-03-22 11:16:14 -05:00
## Configuring
You can configure options by editing `Pallet.toml`
### Options
2026-03-22 18:42:53 -05:00
- `name`: the name of the output executable
- `default_build`: the name of the default build profile to use
Additionally, one can define one or more build profiles with the following parameters:
- `name`: the name of the build profile
- `args`: the args to supply to gcc when using this profile
For example:
```toml
name = "my-app"
default_build = "debug"
[[build]]
name = "debug"
args = [
"-g",
"-O0",
]
[[build]]
name = "release"
args = [
"-DNDEBUG",
"-O3",
]
```
2026-03-23 17:03:58 -06:00
## Creating Changelogs
Use the following command to create a changelog:
```sh
git log --oneline (git describe --tags --abbrev=0)..HEAD | sed 's/^/- /' | xclip -selection clipboard
```