I'm trying open file in macro, but I got exception:
template/generic instantiation of `some` from here
Error: cannot 'importc' variable at compile time; fopen
My Nim code:
import macros
macro some(): untyped =
var f = open("some.txt")
echo f.readAll()
f.close()
some()
to compile:
nim js file
use
staticRead("some.txt")