-
First of all, I've seen that you implemented it for every platform so great job!!! Now this will make Vox read to be used in production as it can link with any C library! So I'm trying to play with this feature a little bit by trying to use "printf". Now its signature in C is the following:
Other versions gave me an error for not accepted syntax |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
On linux Also, C-style variadic functions are not supported, and I'm not sure that implementing it mostly for The most complicated and valuable part is float to string conversion though. I haven't yet implemented it using Vox. But here you can see a simple implementation that I use for printing stuff (supports ints, pointers, strings, bools) https://github.com/MrSmith33/voxelman2/blob/master/plugins/core/utils.vx#L217-L230 Latest CI builds have debug version, btw |
Beta Was this translation helpful? Give feedback.
On linux
@extern(module)
is not useful, as linking shared libraries is still work in progress (I'm close to figuring it out though).Also, C-style variadic functions are not supported, and I'm not sure that implementing it mostly for
printf
from libc is worth it.The most complicated and valuable part is float to string conversion though. I haven't yet implemented it using Vox. But here you can see a simple implementation that I use for printing stuff (supports ints, pointers, strings, bools) https://github.com/MrSmith33/voxelman2/blob/master/plugins/core/utils.vx#L217-L230
Latest CI builds have debug version, btw