see

  * `tests/compilerapi/tcompilerapi.nim` which might be what you want
  * `nim secret` seems relevant
  * `moduleSymbols` (<https://github.com/nim-lang/Nim/pull/17641>) which allows 
getting all symbols (private or not) from a module, including variables


Reply via email to