[ANN] Fennel 0.4.1 released!

Message ID
DKIM signature
Download raw message
Hello everybody.

I just pushed out the release of Fennel 0.4.1. Most of it is fixing
small bugs that we found in the 0.4.0 release:

* Fix a bug where included modules could get included twice (#278)
* Fix a 0.4.0 bug where macros can't expand to string/boolean/number primitives (#279)
* Fix a bug in macros returning forms of a different length from their input (#276)
* Support shebang in all contexts, not just dofile.
* Pinpoint source in compile errors even when loading from a string

We snuck in one new feature in, and while it's something quite
experimental, I'm excited about the possibilities it opens up. In Fennel
0.4.0, we made it so Fennel itself is compiled to a single all-in-one
script which only relies on having Lua installed to run. This uses the
--require-as-include flag to bundle all required libraries into the
output during compile time, whether they are Fennel or Lua.

In Fennel 0.4.1 we've added the --compile-binary command which takes
this even further by taking that all-in-one Lua code and embedding it in
a C program which links in the Lua runtime. This allows us to create
binaries which can be distributed and run without even having Lua on the
target system. The binary for Fennel itself is 527kb on Debian Linux
using Lua 5.3, but smaller programs are closer to 270kb.

You can see a demo of it here:


I want to emphasize that this is still very rough around the edges and
lightly tested. It is likely to change in the future in breaking ways,
so please don't rely on it for anything. However, we're interested in
getting feedback from folks about it. You can build a Fennel binary for
your own system by running `make fennel-bin' from a checkout of
Fennel. This requires having a C compiler and Lua's dev headers
installed, and you may have to set the STATIC_LUA_LIB and LUA_INCLUDE_DIR
options since the Makefile assumes they are in the standard Debian
location for Lua 5.3.

I'm looking forward to seeing what people make with this new ability.

Thanks to everyone who contributed to make this release happen.

Export thread (mbox)