Open n6garcia opened 2 months ago
Although this is not directly supported at the moment, it is trivially easy to modify the generated C program to not have a main function.
Just remove the definition of WITH_MAIN
at the beginning and manually call hvm_c
like the main function does right now (you can check at the end of the generated file).
hvm-c doesn't receive arguments right now, so I don't know how useful that would be, but you can totally do it
I am trying to use bend to make c code that I can call within C++ but there is no option to compile programs with no main (as libraries)