I finally found a solution - it's inelegant, but gets the job done!
First, I made a C file like so:
extern int rust_main();
int main() {
return rust_main();
}
...then I write my rust_main
in Rust with #[no_mangle]
, compile it into the C file, and compile that into the .o
file I need.
Like I said - inelegant, but it works.
Thanks again for the help @Yandros!