mirror of
				https://github.com/pocketpy/pocketpy
				synced 2025-10-26 14:30:17 +00:00 
			
		
		
		
	
		
			
				
	
	
	
		
			766 B
		
	
	
	
	
	
	
	
			
		
		
	
	
			766 B
		
	
	
	
	
	
	
	
| title | icon | order | 
|---|---|---|
| Introduction | dot | 10 | 
We take a lot of inspiration from the lua api for these bindings. The key difference being most methods return a bool, true if it succeeded false if it did not.
!!! Special thanks for @koltenpearson for bringing us the Lua Style API implementation. !!!
Basic Functions
pkpy_vm* pkpy_vm_create(bool use_stdio, bool enable_os)
Creates a new Lua Style VM.
- use_stdio: if true, the VM will use stdout and stderr
- enable_os: if true, the VM will have access to the os library
bool pkpy_vm_run(pkpy_vm*, const char* source)
Runs the given source code in the VM.
- source: the source code to run
void pkpy_vm_destroy(pkpy_vm*)
Destroys the VM.