How to install Beef Language on GNU/Linux

🐮 A programming language for game developers and general productivity.


How to install Beef Language on GNU/Linux


Beef is an open-source, compiled, high-performance language specifically designed for real-time applications like games, combining performance with productivity.

• Syntax inspired by C#, with manual memory management from C and C++, and modern ergonomics inspired by Swift and Go.

  • Well-designed project with its own IDE (Windows);
  • CLI compiler (Linux/macOS);
  • Debugger;
  • Code assistants;
  • and Hot-compiling.

Beef is ideal for those who need rapid development and fine-grained resource control, especially:

  • Game and Game Engine Developers (console, desktop, WASM).
  • Projects requiring efficient debugging, hot-reload, and productivity-focused ergonomics.

Precompiled binaries are available for Windows—just download and run the .exe.

But on macOS and GNU/Linux distros, you’ll need to compile from source.

Below, we’ll cover the steps to compile and install on GNU/Linux distros.


Dependencies

First, you’ll need the following tools installed on your system:

Example of dependency installation using APT:

  
sudo apt install clang-18 llvm-18 build-essential cmake git \  
  libffi-dev libedit-dev zlib1g-dev zstd libcurlpp-dev libxml2-dev  

After that, just clone and build:

  
git clone https://github.com/beefytech/Beef  
cd Beef  
./bin/build.sh  

Before tests, you’ll see:

  
[******************************]  
TIMING: Beef compiling: 37.2s  
Frontend time: 23.48s  
Comptime execution time: 3.67s  
Linking BeefBuild_bootd...  
SUCCESS  
Building BeefBuild_d  
[******************************]  
Beef compilation time: 41.44s  
Frontend time: 21.56s  
Comptime execution time: 3.49s  
Executing Command: ReadFile("$(WorkspaceDir)/../IDE/dist/IDEHelper_libs_d.txt", "IDEHelperLibs")  
Testing IDEHelper/Tests in BeefBuild_d  

After compilation finishes, test a Hello, World! via command line:

  • Navigate to the binary folder:
  
cd IDE/dist  
  
./BeefBuild -new  

Output: Created new workspace in '/home/$USER/Beef/IDE/dist'

This will generate:

  • BeefProj.toml, with:
  
FileVersion = 1  

[Project]  
Name = "dist"  
StartupObject = "dist.Program"  
  • BeefSpace.toml, with:
  
FileVersion = 1  
Projects = {dist = {Path = "."}}  

[Workspace]  
StartupProject = "dist"  
  • src/ (empty folder)

To create a file in src/, run:

  
./BeefBuild -generate  

This will generate the build/ folder and Program.bf inside src/. However, it won’t contain a Hello, World! by default.

Edit the file: vim src/Program.bf and insert Console.WriteLine("Hello, world!"); inside the Main() function, like this:

  
using System;  

namespace dist;  

class Program  
{  
  public static int Main(String[] args)  
  {  
    Console.WriteLine("Hello, world!");  
    return 0;  
  }  
}  

Now run the file with -run:

  
./BeefBuild -run  

Output: Hello, world!.


Installation

Clean up generated files:

  
rm -rf src/ BeefSpace.toml build/ BeefProj.toml ../../.git ../../.gitignore  

Actually, you only need these directories:

  • 📁 BeefLibs/
  • 📁 IDE/
  • 📁 IDEHelper/
  • 📁 jbuild/
  • and 📁 jbuild_d/

But all of them total 1.4GB (or 1.6GB with extras). If you prefer, just remove the test files (Hello, World!) and Git files.

Move to /opt/:

  
cd ..  
sudo mv Beef/ /opt/  

Create symbolic links for the binary and libs:

  
sudo ln -sf /opt/Beef/IDE/dist/BeefBuild /usr/local/bin/beef  
sudo ln -sf /opt/Beef/jbuild/Release/bin/libhunspell.so /usr/local/lib/libhunspell.so  
sudo ln -sf /opt/Beef/jbuild/Release/bin/libBeefRT.a /usr/local/lib/libBeefRT.a  
sudo ln -sf /opt/Beef/jbuild/Release/bin/libBeefRT.a /opt/Beef/IDE/dist/libBeefRT.a  
sudo ldconfig  

Test:

  
beef -version  

BeefBuild 0.43.6

Test a new project:

  
mkdir MyGameBeef  
cd MyGameBeef/  
beef -new  
beef -generate  

Edit vim src/Program.bf:

For CSharp-like syntax highlighting in Vim: :set filetype=cs

  
using System;  

namespace MyGameBeef {  
  class Program {  
    static void Main() {  
      Console.WriteLine("My first game with Beef!");  
    }  
  }  
}  

Run:

  
beef -run  

I tested the performance of a million-loop for loop with this code:

  
for(int i = 0; i <= 1000000; ++i){  
  Console.Write(scope $"{i}Ok\r");  
}  

Result:

  
1000000Ok  
real	0m6,767s  
user	0m2,717s  
sys	0m3,292s  

For more info, visit the official site: https://www.beeflang.org/ and the repo: https://github.com/beefytech/Beef.


gamedev programming csharp cpp


Share


YouTube channel

Subscribe


Marcos Oliveira

Marcos Oliveira

Software developer
https://github.com/terroo

Related articles