pocketlang/tests/native/example0.c
Thakee Nathees bd61e77593 extension module implemented
now it's possible to import a dynamic libray (*.dll, *.so) in
a pocket script.
2022-05-30 22:55:22 +05:30

24 lines
378 B
C

/*
* Copyright (c) 2020-2021 Thakee Nathees
* Distributed Under The MIT License
*/
#include <pocketlang.h>
int main(int argc, char** argv) {
// Create a new pocket VM.
PKVM* vm = pkNewVM(NULL);
// Run a string.
pkRunString(vm, "print('hello world')");
// Run from file.
pkRunFile(vm, "script.pk");
// Free the VM.
pkFreeVM(vm);
return 0;
}