← Back to context

Comment by ncruces

5 days ago

I'm not that great at long form writing to be honest, it's always a bit of a chore, and I'm never happy with the result.

To answer your question, it needs a libc because you're including stdlib.h, and exporting and allocator (even if you're not otherwise using it). You need a libc for malloc.

This is generally a good idea, if you need to send anything beyond numbers across the API (e.g. you need an allocator if you want to send strings as pointers).

I never used WIT, so I have no idea if this a requirement for WIT.