Closed dbohdan closed 8 years ago
Wren doesn't seem to actually be a library, just a standalone program.
The other two are probably ok (but TCL?!?!? -- just let it die!), if you submit a PR for either or both I'll merge it.
Actually, it looks like Picol also isn't embeddable, it's just a standalone program? But LIL is definitely embeddable.
it looks like Picol also isn't embeddable, it's just a standalone program
To embed Picol you need to strip off the main() function from picol.c and include both picol.h and picol.c in your application. Now that I think of it, Picol would definitely benefit from merging the header and the implementation into a single file with stb-style preprocessor conditionals. I'll submit it once I've done that.
Wren is much the same, though unlike Picol it introduces global variables. I am not up to working on it myself but I can ping the author about refactoring it.
TCL?!?!? -- just let it die!
As someone who has used Tcl rather a lot recently, I respectfully disagree. :-)
P.S.: I have also found, but haven't tried, tiny-js. Tell me if I should include it in the PR.
tiny-js is too many files (at least if you want the std lib, which everyone would)
which everyone would
Fair enough.
(PR #234)
On several occasions I thought it would be nice to have an interactive scripting language interpreter packaged as a drop-in pair of .c/.h files. Here are several interpreters I have looked at (ordered by how practically usable they are IMO):
There is also Duktape, a very capable JavaScript interpreter. However, much like SQLite its .c/.h distribution is an amalgamation of rather a lot of files totaling about 80 kLoC.
If this is something you'd be interested in including in other_libs.md I can create a pull request adding any or all of the above.