teal-language/cyan

Add support for teal's `--keep-hashbang` compiler option in `build` and `gen`

Open

#70 opened on Feb 20, 2026

View on GitHub
 (0 comments) (0 reactions) (0 assignees)Lua (12 forks)auto 404
feature requestgood first issue

Repository metrics

Stars
 (125 stars)
PR merge metrics
 (PR metrics pending)

Description

Context

I'm building a Lua library to use with Redis Functions. The Lua script must start with a shebang to define metadata, such as the engine to use and the library's name. E.g.

#!lua name=mylib
redis.register_function(
  'knockknock',
  function() return 'Who\'s there?' end
)

which can be loaded in Redis with:

redis-cli  FUNCTION LOAD "$(cat ./build/main.lua)"

Problem

Teal's compiler options supports the --keep-hashbang flag to preserve the shebang at the top of the file. However, this option is missing in cyan's build and gen commands.

It would be nice to support this option in cyan, so we don't have to prepend it post build.

Appreciate all the work, enjoyed using cyan for the first time 🙏🏻

Contributor guide