Crate compile_time_create_file[][src]

Expand description

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
);
"
);

Macros

Create a file or directory using a relative or absolute path, creating non existent parent subdirectories of the target file and expanding to nothing. If file or directory already exists, doesn’t overwrites it.