mirror of
				https://github.com/janet-lang/janet
				synced 2025-10-31 07:33:01 +00:00 
			
		
		
		
	Add description of embedding to README.md
This commit is contained in:
		
							
								
								
									
										13
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								README.md
									
									
									
									
									
								
							| @@ -48,6 +48,7 @@ Janet makes a good system scripting language, or a language to embed in other pr | |||||||
| * REPL | * REPL | ||||||
| * Parsing Expression Grammars built in to the core library | * Parsing Expression Grammars built in to the core library | ||||||
| * 300+ functions and macros in the core library | * 300+ functions and macros in the core library | ||||||
|  | * Embedding Janet in other programs | ||||||
| * Interactive environment with detailed stack traces | * Interactive environment with detailed stack traces | ||||||
|  |  | ||||||
| ## Documentation | ## Documentation | ||||||
| @@ -108,6 +109,18 @@ Options are: | |||||||
| $ | $ | ||||||
| ``` | ``` | ||||||
|  |  | ||||||
|  | ## Embedding | ||||||
|  |  | ||||||
|  | The C API for Janet is not yet documented but coming soon. | ||||||
|  |  | ||||||
|  | Janet can be embedded in a host program very easily. There is a make target `make amalg` | ||||||
|  | which creates the file `build/janet.c`, which is a single C file that contains all the source | ||||||
|  | to Janet. This file, along with `src/include/janet/janet.h` can dragged into any C project | ||||||
|  | and compiled into the project. Janet should be compiled with `-std=c99` on most compilers, and | ||||||
|  | will need to be linked to the math library, `-lm`, and the dynamic linker, `-ldl`, if one wants | ||||||
|  | to be able to load dynamic modules. If there is no need for dynamic modules, add the define | ||||||
|  | `-DJANET_NO_DYNAMIC_MODULES` to the compiler options. | ||||||
|  |  | ||||||
| ## Compiling and Running | ## Compiling and Running | ||||||
|  |  | ||||||
| Janet only uses Make and batch files to compile on Posix and windows | Janet only uses Make and batch files to compile on Posix and windows | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Calvin Rose
					Calvin Rose