LibMake

A code generator to reduce repetitive tasks and build high-quality Rust libraries

Made With Rust Crates.io Lib.rs Docs.rs License Codecov

Welcome to libmake 👋

libmake Banner

Website â€ĸ Documentation â€ĸ Report Bug â€ĸ Request Feature â€ĸ Contributing Guidelines

Overview 📖

LibMake is a tool designed to quickly help creating high-quality Rust libraries by generating a set of pre-filled and pre-defined templated files. This opinionated boilerplate scaffolding tool aims to greatly reduces development time and minimizes 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:

Getting Started 🚀

It takes just a few minutes to get up and running with LibMake.

Installation

To install LibMake, you need to have the Rust toolchain installed on your machine. You can install the Rust toolchain by following the instructions on the Rust website.

Once you have the Rust toolchain installed, you can install LibMake using the following command:

shell cargo install libmake

You can then run the help command to see the available options:

shell libmake --help

Requirements

The minimum supported Rust toolchain version is currently Rust 1.67.1 or later (stable).

Platform support

LibMake is supported and tested on the following platforms:

Linux targets 🐧

| Target | Description | Status | | --- | --- | --- | | aarch64-unknown-linux-gnu | 64-bit Linux systems on ARM architecture | ✅ | | aarch64-unknown-linux-musl | 64-bit Linux systems on ARM architecture | ✅ | | arm-unknown-linux-gnueabi | ARMv6 Linux (kernel 3.2, glibc 2.17) | ✅ | | armv7-unknown-linux-gnueabihf | ARMv7 Linux, hardfloat (kernel 3.2, glibc 2.17) | ✅ | | i686-unknown-linux-gnu | 32-bit Linux (kernel 3.2+, glibc 2.17+) | ✅ | | i686-unknown-linux-musl | 32-bit Linux (kernel 3.2+, musl libc) | ✅ | | x8664-unknown-linux-gnu | 64-bit Linux (kernel 2.6.32+, glibc 2.11+) | ✅ | | x8664-unknown-linux-musl | 64-bit Linux (kernel 2.6.32+, musl libc) | ✅ |

macOS targets 🍎

| Target | Description | Status | | --- | --- | --- | | x86_64-apple-darwin | 64-bit macOS (10.7 Lion or later) | ✅ |

The GitHub Actions shows the platforms in which the LibMake library tests are run.

Documentation

â„šī¸ Info: Please check out our website for more information. You can find our documentation on docs.rs, lib.rs and crates.io.

Usage 📖

To use LibMake library in your project, add the following to your Cargo.toml file:

toml [dependencies] libmake = "0.0.4"

Add the following to your main.rs file:

rust extern crate libmake; use libmake::*;

then you can use the functions in your application code.

Examples

To get started with LibMake, you can use the examples provided in the examples directory of the project.

To run the examples, clone the repository and run the following command in your terminal from the project root directory.

Generate a new library using a CSV file

The following code uses the generate_via_csv function from the libmake crate to generate a library template from a CSV file.

Have a look at the tests/data/mylibrary.csv file for an example and feel free to use it for your own library as a template.

The CSV file contains the following header columns:

Then you need to create a row in your CSV file with the values for each

You can now run the following command to generate a new library using

shell cargo run --example generate_via_csv

Generate a new library using a JSON file

The following code uses the generate_via_json function from the libmake crate to generate a library template from a JSON file.

shell cargo run --example generate_via_json

Generate a new library using a YAML file

The following code uses the generate_via_yaml function from the libmake crate to generate a library template from a YAML file.

shell cargo run --example generate_via_yaml

Semantic Versioning Policy đŸšĨ

For transparency into our release cycle and in striving to maintain backward compatibility, libmake follows semantic versioning.

License 📝

The project is licensed under the terms of both the MIT license and the Apache License (Version 2.0).

Contribution 🤝

We welcome all people who want to contribute. Please see the contributing instructions for more information.

Contributions in any form (issues, pull requests, etc.) to this project must adhere to the Rust's Code of Conduct.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Acknowledgements 💙

A big thank you to all the awesome contributors of libmake for their help and support. A special thank you goes to the Rust Reddit community for providing a lot of useful suggestions on how to improve this project.