How to inject compile time value?


I need to set a global static a value that is known at build time only. Is that possible with cargo? Through or other mechanism I don't know yet.


You can use the env! macro, or include_bytes!/include_str! to get an external value at compile time.

1 Like

Thank you very much!

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.