Including a binary data file as a Nim array

2024-04-19 Thread amkrajewski
If you would like to process a binary file and assign it to an array without embedding the binary file itself, you can utilize the `static` block which will execute at compile time and return just what you need.

Including a binary data file as a Nim array

2024-04-19 Thread dissolved_girl
I think you want

Including a binary data file as a Nim array

2024-04-19 Thread tord
That looks perfect. Thank you!

Including a binary data file as a Nim array

2024-04-19 Thread tord
I have a binary data file that I would like to embed in the executable at compile time, and assign to a Nim array. Something similar to Rust's [include_bytes](https://doc.rust-lang.org/core/macro.include_bytes.html) macro or [this solution for C/C++](https://github.com/graphitemaster/incbin/tre