Nim defines a proc allocCStringArray*(a: openArray[string]): cstringArray Run
in the `system` module (no need to explicitly `import` it). There is also a corresponding: proc deallocCStringArray*(a: cstringArray) Run You probably want to use those two calls.