1
0
mirror of https://github.com/janet-lang/janet synced 2025-10-31 07:33:01 +00:00

Add experimental meson build.

Should help with IDE integration.
This commit is contained in:
Calvin Rose
2019-03-22 18:07:10 -04:00
parent cb2caecbb3
commit 25aa7a26c5
8 changed files with 163 additions and 6 deletions

View File

@@ -26,7 +26,7 @@
extern const unsigned char *janet_gen_boot;
extern int32_t janet_gen_boot_size;
int main() {
int main(int argc, const char **argv) {
/* Init janet */
janet_init();
@@ -46,6 +46,12 @@ int main() {
env = janet_core_env(NULL);
/* Create args tuple */
JanetArray *args = janet_array(argc);
for (int i = 0; i < argc; i++)
janet_array_push(args, janet_cstringv(argv[i]));
janet_def(env, "process/args", janet_wrap_array(args), "Command line arguments.");
/* Run bootstrap script to generate core image */
status = janet_dobytes(env, janet_gen_boot, janet_gen_boot_size, "boot.janet", NULL);