Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docker script to turn ceu into a binary file. #151

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alochaus
Copy link

@alochaus alochaus commented Jul 12, 2023

Why

Compiling Céu on Fedora 38 can be problematic, especially because the required Lua version is not available in the repository. So I decided to make a docker script to compile Céu for me, but little did I know that Céu was actually a Lua script. ☠️

Solution

Recognizing that a static binary could simplify the execution of Céu, I started to look for a Graal-like VM for Lua until I stepped into a project that's been archived called srlua, which glues Lua scripts with a LuaVM into a single and static binary.

That said, I should also mention that the ceu-script is only 414.6 KiB while ceu-bin is 1.8 MiB, which is aproximately 4.5 times bigger but you should also take into account that in this way you won't need a LuaVM to run the code.

1b181a9: Add docker script to turn ceu into a binary file.

This commit adds the following rules to makefile:
	* docker-build: builds the docker container.
	* docker-install:
		- creates a shared directory called bin in the repository root;
		- installs srlua (project responsible for converting lua scripts into binary files);
		- builds the binary and outputs to `bin`.

How to build

make docker-build && make docker-install

This commit adds the following rules to makefile:
	* docker-build: builds the docker container.
	* docker-install:
		- creates a shared directory called bin in the repository root;
		- installs srlua (project responsible for converting lua scripts into binary files);
		- builds the binary and outputs to `bin`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant