pantry/projects/duktape.org/test.c
Andrii Riabchenko d5a7f8c394 new file: projects/duktape.org/package.yml
new file:   projects/duktape.org/test.c
new file:   projects/duktape.org/test.js
2023-10-02 17:12:14 -04:00

10 lines
No EOL
260 B
C

#include <stdio.h>
#include "duktape.h"
int main(int argc, char *argv[]) {
duk_context *ctx = duk_create_heap_default();
duk_eval_string(ctx, "1 + 2");
printf("1 + 2 = %d\\n", (int) duk_get_int(ctx, -1));
duk_destroy_heap(ctx);
return 0;
}