Expand description
§LibMake
A code generator to reduce repetitive tasks and build high-quality Rust libraries.
Part of the Mini Functions family of libraries.
§Overview
LibMake is a tool designed to quickly help create high-quality
Rust libraries by generating a set of pre-filled and pre-defined
templated files. This opinionated boilerplate scaffolding tool aims
to greatly reduce development time and minimize repetitive tasks,
allowing you to focus on your business logic while enforcing
standards, best practices, consistency, and providing style guides
for your library.
With LibMake, you can easily generate a new Rust library code base
structure with all the necessary files, layouts, build
configurations, code, tests, benchmarks, documentation, and much
more in a matter of seconds.
The library is designed to be used as a command-line tool. It is available on Crates.io and Lib.rs.
§Features
LibMake offers the following features and benefits:
- Create your Rust library with ease using the command-line interface or by providing a configuration file in CSV, JSON, or YAML format.
- Rapidly generate new library projects with a pre-defined structure and boilerplate code that you can customize with your own template.
- Automatically generate basic functions, methods, and macros to get you started with your Rust library.
- Enforce best practices and standards with starter documentation, test suites, and benchmark suites that are designed to help you get up and running quickly.
§Usage
serde: Enable serialization/deserialization via serde
Modules§
- args
- The
argsmodule contains functions for processing command-line arguments. - cli
- The
climodule contains functions for processing command-line input. - generator
- The
generatormodule contains functions for generating the new library. - generators
- The
generatorsmodule contains functions for generating code. - interface
- The
interfacemodule contains functions for displaying the interface. - macros
- The
macrosmodule contains functions for generating macros. - models
- The
modelsmodule contains the models for the library. - utilities
- The
utilitiesmodule contains utility functions for the library. - utils
- The
utilsmodule contains a function for reading a CSV file at the given file path and returns the value of the given field.
Macros§
- extract_
param - Extracts a parameter from a
Matchesobject. - generate_
file - Macro to simplify the match logic for file generation.
- macro_
ascii - A macro for generating ASCII art from text.
- macro_
check_ directory macro_check_directoryMacro- macro_
cleanup_ directories macro_cleanup_directoriesMacro- macro_
create_ directories macro_create_directoriesMacro- macro_
execute_ and_ log - Executes a shell command and logs the start, completion, and any errors.
- macro_
generate_ files - Attempts to generate file templates from the given parameters.
- macro_
generate_ from_ args - Attempts to generate file templates from command-line arguments.
- macro_
generate_ from_ config - Attempts to generate file templates from a configuration file.
- macro_
generate_ from_ csv - Attempts to generate file templates from a CSV file.
- macro_
generate_ from_ ini - Attempts to generate file templates from a INI file.
- macro_
generate_ from_ json - Attempts to generate file templates from a JSON file.
- macro_
generate_ from_ toml - Attempts to generate file templates from a TOML file.
- macro_
generate_ from_ yaml - Attempts to generate file templates from a YAML file.
- macro_
get_ field - Macro to generate a function that retrieves a field value from a JSON file.
- macro_
log_ info - Custom logging macro for various log levels and formats.
- macro_
replace_ placeholder - Replaces placeholders in a given line with corresponding values from the provided parameters.
Functions§
- run
- Initializes the logger with a file logger and a terminal logger and processes command-line arguments to generate the new library.