4 ms·
It's easy to call preprocessor macros from Nim, no difference from wrapping C: Example on wrapping a simple benchmark macro: - https://github.com/mratsim/weav
by mratsim 7y ago
It's easy to call preprocessor macros from Nim, no difference from wrapping C:
Example on wrapping a simple benchmark macro:
- https://github.com/mratsim/weave/blob/052ae40a/experiments/e04_channel_based_work_stealing/primitives/coz.h#L79 https://github.com/mratsim/weave/blob/052ae40a/experiments/e...
- https://github.com/mratsim/weave/blob/052ae40a/experiments/e04_channel_based_work_stealing/primitives/coz.nim#L21 https://github.com/mratsim/weave/blob/052ae40a/experiments/e...
- atilaneves 7y agoWhile nice, one still has to manually declare a Nim proc and tell it whence it came from. That's not the same.
- nimmer 7y ago...or let automated tools like c2nim do the job.
- atilaneves 7y agoSo just like the article describes.