- What is this thing?
- Supported amboso features
- Extended amboso features
- See how it behaves
- Basic benchmark
- Todo
This is a Rust port of amboso, a basic build tool wrapping make and supporting git tags.
Invil can be used to:
- Automate building a repo-curated list of git tagged versions (or also basic tagged versions with a full directory copy).
- Ideally, the build command should be as short as
invil build.
- Ideally, the build command should be as short as
- Run tests for a repo-curated directory with output comparison.
- Generate new projects supporting the build tool using
invil init <DIR> - Generate a basic header+impl containing project info, such as time of current commit
It's (*) on par with the original implementation, as of amboso 2.0.11.
Check the next section for more support info.
Check this section for info about extensions to amboso 2.0.4.
At the moment, only C projects are supported.
- Check this section for info about the WIP python support.
- The README still mostly refers only to the ambosoC kern usage.
Different build modes are provided internally, depending on how full your autotool build support is:
- Basic mode: a single
gcccall. This may be expanded in a future version, to at least provide support for passing arguments to the compiler. - Make mode: for all tags higher than the version specified as providing make support,
invilwill expect a readyMakefilethat correctly builds the target binary whenmakeis called. - Automake mode: for all tags higher than the version specified as providing automake support,
invilwill expect aMakefile.amand aconfigure.ac, so that aMakefilewith the same assumptions as Make mode can be generated.
For more information on the stego.lock file, see the amboso info about it.
For more information on the anvil tool, see the amboso wiki. Work in progress.
-
Basic arguments parsing that complies with the bash implementation
-
Same default for amboso directory (
./bin). -
Parse
stego.lockwith compatible logic to bash implementation -
Base mode: full support
- The original implementation itself does not expect autotools prep for base mode, but it can be done trivially.
-
Git mode: full support
- The original implementation itself expects git mode tags to contain a
Makefilein repo root.
- The original implementation itself expects git mode tags to contain a
-
C header gen: complete support (*)
- The original implementation print time as a pre-formatted string.
-
Test mode: complete support (*)
- Run executable found in test directories
- Handle test macro flag to run on all valid queries
- Record test output with
-b- Not compliant with amboso <1.9.7 expectations: missing trailing
$.
- Not compliant with amboso <1.9.7 expectations: missing trailing
-
Passing configure arguments: complete support
- Not compliant with amboso <1.9.9 expectations: -C flag was passing the arguments directly, not by reading a file.
-
Subcommands:
- build Quickly build latest version for current mode
- init Prepare new project with amboso
- version Print invil version
-
Note:
- As of version
0.1.6, by defaultmake rebuildis called on build operation. This is the expected behaviour ofamboso2.x. To revert to1.xoriginal behaviour and call justmake, run with-Ror--no-rebuild.
- As of version
Flags support status:
- Basic env flags:
-D,-K,-M,-S,-E - Clock flag:
-Y <startTime> - Linter mode:
-x- Lint only:
-l - Report lex:
-L
- Lint only:
- C header gen mode:
-G(detailed info is empty) - Verbose flag:
-V - Test macro:
-t - Test mode:
-T - Git mode:
-g - Base mode:
-B - Build:
-b - Run:
-r - Init:
-i - Delete:
-d - Purge:
-p - Help:
-h - Big Help:
-H - Version:
-v - List tags for current mode:
-l - List tags for git/base mode:
-L - Quiet flag:
-q - Watch flag:
-w - Warranty flag:
-W - Ignore gitcheck flag:
-X - Silent:
-s - Pass config argument:
-C - Run make pack:
-z - No rebuild:
-R - Logged run:
-J- Outputs to
./anvil.log. Not backwards compatible with repos not ignoring the file explicitly.
- Outputs to
- No color:
-P - Force build:
-F - Turn off extensions:
-e(Only relative to 2.0.0) - Pass CFLAGS to single file build mode:
-Z - Run make when no arguments are provided
- When in
makebuild mode, callmake rebuildby default- Add
--no-rebuildto disable make rebuild and run justmake
- Add
- Add
--loggedto output full log to file- Outputs to
./anvil.log. Not backwards compatible with repos not ignoring the file explicitly.
- Outputs to
- Add
-Gflag also includes:- a string for build OS (from
env::consts::OS) - HEAD commit message
- a string for build OS (from
- Add
--no-colorto disable color output - Add
--forceto overwrite ready targets
- Turn off extensions with
-e, --strict - Ignore missing repo in current work dir
- Add
-ato set compatibility level - Add
-kto set project type - Add
-Oto set stego.lock dir (defaults to working directory) - Retrocompatible
stego.lockparsing, up to1.7.x - Init subcommand uses passed directory's basename for generated flags
- Read global config file from
$HOME/.anvil/anvil.toml - Add
-Zto pass CFLAGS to single file build mode
These features are experimental and subject to change.
To enable them, add --features="anvilPy" to your build/install command.
- Use "anvilPy" kern to support python projects
- Expects a suitable
pyproject.tomlis present alongsidestego.lock - Experimental support for almost all flags
- Only supported when provided from
stego.lockitself - Example usage (make sure this is in your
stego.lock):[ anvil ] version = "2.1.0" kern = "anvilPy"
- Expects a suitable
- Refuse the experimental kern when running with
--strict- The original implementation is not ready to support this extension.
To see how this marvelous work of art works, run:
cd try-anvil
./try_anvil_autoRefer to amboso info about this test script: link
Our version was slightly modified to actually make cargo build the release version of the binary we want to symlink to anvil.
Check out this page for a very basic benchmark of runtime, relative to bash amboso implementation.
- Extend original impl by handling autotools in base mode
- Improve logging with a custom format
- Improve horrendous git mode command chain
- The current implementation is naive and just calls a bunch of
Commandto pipeline the git operations in a ugly iper-indented mess. - Resorting to shell commands is bad and defeats the purpose of this rewrite.
- We have git2 crate to handle the git commands and should be able to reduce the amount of command wrapping.
- The current implementation is naive and just calls a bunch of