I\'m trying to do almost the same as How to create a static string at compile time.
use std::{env};
use std::path::Path;
use std::io::{Wri
If anyone is interested in a more convenient way to achieve the same, I also created the build_script_file_gen crate which can be used as follows
extern crate build_script_file_gen;
use build_script_file_gen::gen_file_str;
fn main() {
let file_content = "Hello World!";
gen_file_str("hello.txt", &file_content);
}
#[macro_use]
extern crate build_script_file_gen;
fn main() {
println!(include_file_str!("hello.txt"));
}