mirror of
https://github.com/janet-lang/janet
synced 2024-12-23 06:50:26 +00:00
Add description of embedding to README.md
This commit is contained in:
parent
00301ad26b
commit
0726de34ff
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
|
||||
* Parsing Expression Grammars built in to the core library
|
||||
* 300+ functions and macros in the core library
|
||||
* Embedding Janet in other programs
|
||||
* Interactive environment with detailed stack traces
|
||||
|
||||
## 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
|
||||
|
||||
Janet only uses Make and batch files to compile on Posix and windows
|
||||
|
Loading…
Reference in New Issue
Block a user