#build #create #file

macro compile-time-create-file

Create files and directories at compile time using a procedural macro in Rust

3 unstable releases

0.1.0 Sep 17, 2021
0.0.2 Sep 17, 2021
0.0.1 Sep 17, 2021

#4 in #create

37 downloads per month

Custom license

8KB
75 lines

compile-time-create-file

Documentation crates.io CI status

Create files and directories at compile time using a procedural macro in Rust.

Example

use compile_time_create_file::create_file;

create_file!(
    "migrations/users.sql",
    "create table if not exists users (
    id serial,
    username varchar(128) not null,
    password varchar(512) not null,
    email varchar(256) not null,
    enabled boolean not null default true
);
"
);

Installation

Add compile-time-create-file = "0.0.1" under your development dependencies:

[dev-dependencies]
compile-time-create-file = "0.0.1"

Dependencies

~230–620KB
~15K SLoC