size: 573 B
| 1 | # libdjot |
| 2 | |
| 3 | Some experiments in creating a C library that embeds the djot lua code. |
| 4 | |
| 5 | `make` builds a static library `libdjot.a` and an executable |
| 6 | `tests`, then runs the tests. |
| 7 | |
| 8 | Note: you may need to adjust the paths in the Makefile pointing |
| 9 | to your lua library installation. |
| 10 | |
| 11 | For documentation, see the comments in `djot.h`. |
| 12 | |
| 13 | For an example of the use of the library, see `tests.c`. |
| 14 | |
| 15 | If you have emscripten installed (`emcc`), you can compile to |
| 16 | wasm/js and run djot in the browser: |
| 17 | |
| 18 | ``` |
| 19 | $ make wasm |
| 20 | $ cd web/dist |
| 21 | $ python3 -m http.server |
| 22 | $ open http://localhost:8000/ |
| 23 | ``` |
| 24 |