fennel-cljlib
fennel-cljlib copied to clipboard
Port of clojure.core namespace to Fennel (mirror)
Fennel Cljlib
Experimental library for Fennel language, that adds many functions from Clojure's standard library.
This is not a one to one port of Clojure core
, because many Clojure functions require certain guarantees, like immutability and laziness, which are hard to efficiently implement on top of Lua.
Some semantics like concurrency, or dynamic scope is not supported by Lua runtime at all.
Therefore certain functions were altered to better suit the domain.
Installation
Clone library into your project or put it as a git submodule:
$ git clone --recursive https://gitlab.com/andreyorst/fennel-cljlib cljlib
Now you can require :cljlib
from Fennel:
(local clj (require :cljlib))
(import-macros cljm :cljlib)
Optionally precompile the library to make it load slightly faster:
$ cd cljlib; COMPILEFLAGS="--require-as-include" make
This will compile init.fnl
into init.lua
, with all dependencies included, so require
should honor Lua files over Fennel files.
It is also possible to use this library from Lua this way.
Documentation
Documentation is auto-generated with Fenneldoc and can be found here.
Contributing
Please make sure you've read contribution guidelines.