4 ms·
Usually you don't create a struct yourself, but use c2nim to wrap it, like I did here: http://hookrace.net/blog/what-makes-nim-practical/#wrapping-libraries-wit
by def- 12y ago
Usually you don't create a struct yourself, but use c2nim to wrap it, like I did here: http://hookrace.net/blog/what-makes-nim-practical/#wrapping-libraries-with-c2nim http://hookrace.net/blog/what-makes-nim-practical/#wrapping-...
When you look at the resulting Nim wrapper, here's what a C struct got turned into: https://github.com/def-/nim-bpg/blob/master/src/bpg.nim#L61-L65 https://github.com/def-/nim-bpg/blob/master/src/bpg.nim#L61-...