Add a very simple embedding demo for doc purposes

This commit is contained in:
K. Lange 2021-02-19 21:25:15 +09:00
parent 2af6291834
commit 298f429c30

12
tools/demo.c Normal file
View File

@ -0,0 +1,12 @@
#include <stdio.h>
#include <kuroko/kuroko.h>
#include <kuroko/vm.h>
int main(int argc, char *argv[]) {
krk_initVM(0);
krk_startModule("__main__");
krk_interpret("import kuroko\nprint('Kuroko',kuroko.version)\n", 1, "<stdin>","<stdin>");
krk_freeVM();
return 0;
}