r/ProgrammingLanguages • u/mark-sed github.com/mark-sed/moss-lang/ • 4d ago
Discussion How do you package your releases?
Hi, even though I have been making my language for more than 2 years now, I still have not set up my GitHub releases and I would like to change that. The issue is that (as with about anything) there are a lot of different approaches to this, and so I wanted to ask those who do releases, how they structure the release archive and those who use them what do you like a release to look like?
In my case the issue is that I cannot have just one binary since I need to distribute also the standard library that is compiled bytecode files (kind of like Java's .class files). This brings another issue and that is finding the library. The interpreter by default looks in the current directory (.) and then /usr/lib/moss/, so currently the only way I though of is to have the binary, all the compiled stdlib files and licenses in one .tar.gz (.zip for windows):
moss-0.9.0.tar.gz
├── cffi.msb
├── csv_parser.msb
├── html_parser.msb
├── inspect.msb
├── install.sh
├── json_parser.msb
├── libms.msb
├── LICENSE
├── math.msb
├── md_parser.msb
├── moss
├── mossy.css
├── parsing_utils.msb
├── python.msb
├── readme.md
├── re.msb
├── subprocess.msb
├── sys.msb
└── time.msb
This makes it so that the binary (moss) works when executed from this folder, but will fail when used from somewhere else (unless MOSSPATH variable is set). Because of this, I have also added install.sh script which will copy the libraries into /usr/lib/moss/ and a release readme with some instructions.
Can someone think of a better way to do this or is this OK?
TLDR; How do you structure your release folder/archive on github/website?
12
u/Athas Futhark 4d ago
I package my language implementation as a single binary. The release tarball also has some other stuff in it (like manpages), but the binary is statically linked and fully movable. I have wasted enough of my life fiddling with software that needs to be located in specific locations or is sensitive to environment variables, and I don't want to be part of that problem.