Skip to content

Instantly share code, notes, and snippets.

@Abhiroop
Created November 22, 2022 13:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Abhiroop/b5a1b061edd8e5cebbb8a078293bbc90 to your computer and use it in GitHub Desktop.
Save Abhiroop/b5a1b061edd8e5cebbb8a078293bbc90 to your computer and use it in GitHub Desktop.
Foreign Export
#include<HsFFI.h>
.
.
static void my_enter(void) __attribute__((constructor));
static void my_enter(void)
{
static char *argv[] = { "libFoo.so", 0 }, **argv_ = argv;
static int argc = 1;
hs_init(&argc, &argv_);
}
.
.
.
.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment