I have still some trouble understanding your intended use case. Nim is a high 
level language, so low level stuff like pointers, cast, addr, GC_ref and 
GC_unref is generally only necessary if interfacing with low level C libraries, 
when at all. (OK, it may be also needed when you write real low level code in 
Nim, for example kernels or hardware depending device drivers.)

For exported symbols Nim uses the star marker *, as Modula or Oberon did 
already many years ago. For exported objects, you mark the object type itself 
and all of its exported fields with as star marker. If no fields are marked 
with *, you get a fully opaque type. Of course Nim compiler still does full 
type checking, as long you do not use low level stuff as cast and addr. And the 
later is nearly never needed in pure Nim. For export marker see manual 
[https://nim-lang.org/docs/manual.html#procedures-export-marker](https://nim-lang.org/docs/manual.html#procedures-export-marker)

Reply via email to