Creating vec! in compile time in Rust but in different files

Suppose I want to get a list of things from my app through command line:

command_line.value("get_things").is_some() {
    println!("{}", vec!["a", "b", "c"])

Now suppose that this list of things is spread over the app files like this:




However, this list has to be constructed in compile time, not in runtime. Is this possible in Rust? So when the program starts, the list is already available.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.