
About
The Biscuit Language (BL) is simple imperative programming language using LLVM backend implemented in C. Language syntax and all it's features are still in development and not ready for "real" use yet. Biscuit is designed to be simple, fast and explicit.
Contact email: biscuitlang@gmail.com
Goals
- manual memory management
- pointers
- no exceptions
- fast compilation
- full compile-time execution (integrated interpreter)
- no OOP
- types as values in compile-time
- use of the LLVM backend
- multiplatform
Example
main :: fn () s32 { return fib(10); }; fib :: fn (n: s32) s32 { if n == 0 || n == 1 { return n; } else { return fib(n-1) + fib(n-2); } };
Made with Biscuit
- Sky Shooter - Simple SDL game.
- PoissonDisk - Unity C# poisson disk generator tool.
YouTube videos
- Introduction - Introduction to the language.
Installation from source code
Requirements
- git
- CMake
- LLVM 8 or 10
- GCC/CLANG/Visual Studio compiler
Linux
Install LLVM dev packages with your favourite package manager.
sudo apt install llvm-dev
Download and compile bl.
git clone --recurse-submodules https://github.com/travisdoor/bl.git cd bl mkdir build cd build cmake .. make
For installation use:
[sudo] make install
Run bl.conf file generation
[sudo] blc -configure
MacOS
Install command line tools.
xcode-select --install
Install LLVM dev packages with your favourite package manager. Brew:
brew install llvm
Download and compile bl.
git clone --recurse-submodules https://github.com/travisdoor/bl.git cd bl mkdir build cd build cmake .. make
For installation use:
[sudo] make install
Run bl.conf file generation
[sudo] blc -configure
Windows
You will need Visual Studio 2019 installed on your machine. Everything needs to be compiled with the same Visual Studio version.
- Run
cmd
as an administrator. Compile and install LLVM tool set. full guide
git clone --config core.autocrlf=false https://github.com/llvm/llvm-project.git cd llvm-project mkdir build cd build cmake ../llvm -G "Visual Studio 16 2019" -Thost=x64 cmake --build . --config Release --target Install
Download and compile bl.
git clone --recurse-submodules https://github.com/travisdoor/bl.git cd bl mkdir build cd build cmake .. -G "Visual Studio 16 2019" -Thost=x64
Now you should be able to compile the
bl
target from the Visual Studio or from the terminal with following command.cmake --build . --config Release
Use this for installation into
Program Files
cmake --build . --config Release --target Install
- You could add installed
bin
folder to your system PATH. Run bl.conf file generation
blc.exe -configure
Configuration
Compiler config file bl.conf
can be found in etc
directory. This file can be generated by blc -configure
command. It's usually a good idea to regenerate configuration after platform tool-set updates. Compiler installed into the common GNU locations on UNIX systems or in Program Files
on Windows require super user profile login to run configuration properly.
Run Tests
Run compiler test cases included in repository:
cd tests blc -no-bin -force-test-to-llvm -run-tests -no-warning src/main.bl
Releases
0.5.1 - BETA (Dec 1, 2019) current
- Binaries
- Change log
- Complete rework of compile-time value representation.
- Command line arguments are now presented in
command_line_arguments
global. - Custom executable startup (removed dependency on crt on macos and linux).
- Structure inheritance.
- Switch statement.
- No need to write semicolons after functions and typedefs in global scope.
- Structure members are now separated by semicolon.
- Enum variants are now separated by semicolon.
- Bugfixes: #65, #62, #63, #57, #64, #39, #61, #68, #67
0.5.0 - BETA (Oct 1, 2019)
- Statical runtime type info.
- Fix global immutables.
- Configuration file generation.
- Improve documentation.
- Defer statement.
- DWARF generation.
- Basic STD functions.
- Experimental wrappers for SDL2, SDL2_Image and Vulkan.
- Two new demos.
- Vim syntax highlighter.
0.3.1 - First steps (Aug 26, 2018)
- basic features
- LLVM backend