pocketlang/tests/native
Thakee Nathees 5bc9dcad6b method bind implemented
- MethodBind type added.
- Now methods are first class and can be passed around as arguments
  store as a variable and return it from a function and they're first
  class callbales.
- Can bind instance to a method bind using .bind() method
- Class.methods() method added -> return a list of all methods as
  method binds
- Module.globals() method added -> returns a list of all globals
  of that module.
- Var._class -> attribute added which will return the class of the
  variable
- Class.name, MethodBind.name, Closure.name attribute and Modue._name
  attribute added
- Class._docs, Closure._docs, MethodBind._docs attribute added
- MethodBind.instance attribute added
2022-06-06 02:47:31 +05:30
..
dl method bind implemented 2022-06-06 02:47:31 +05:30
example0.c extension module implemented 2022-05-30 22:55:22 +05:30
example1.c native interface refactored 2022-05-05 12:54:15 +05:30
example2.c More code enhancements (read bellow) 2022-05-23 03:48:35 +05:30
README.md More code enhancements (read bellow) 2022-05-23 03:48:35 +05:30
script.pk extension module implemented 2022-05-30 22:55:22 +05:30

Example on how to integrate pocket VM with in your application.

  • Including this example this repository contains several examples on how to integrate pocket VM with your application

    • These examples (currently 2 examples)
    • The cli/ application
    • The docs/try/main.c web assembly version of pocketlang
  • To integrate pocket VM in you project:

    • Just drag and drop the src/ directory in your project
    • Add all C files in the directory with your source files
    • Add src/include to the include path
    • Compile

example0.c - Contains how to run simple pocket script

gcc example0.c -o example0 ../../src/core/*.c ../../src/libs/*.c -I../../src/include -lm

example1.c - Contains how to pass values between pocket VM and C

gcc example1.c -o example1 ../../src/core/*.c ../../src/libs/*.c -I../../src/include -lm

example2.c - Contains how to create your own custom native type in C

gcc example2.c -o example2 ../../src/core/*.c ../../src/libs/*.c -I../../src/include -lm