2. Getting Started¶
You can either download a binary distribution of Bangra from the website or build Bangra from source.
How to build Bangra on Linux:
- You need build-essentials, clang 3.9, libclang 3.9 and LLVM 3.9 installed
llvm-configin your path OR extract the clang distro into the repo folder and rename it to
- You also need the latest source distribution of libffi.
- build libffi using
./configure --enable-shared=no --enable-static=yes && makeand softlink the generated build folder (e.g.
libffiin the repo folder.
How to build Bangra on Windows:
- Install MSYS2 and
both llvm and clang 3.9 for
x86_64. The packages are named
- You also need to install the
clang++in your path OR make sure msys2 resides in
makebangra.batand change the path accordingly.
libffi-6.dllfrom the msys2 installation into the repo folder.
bangra.exewill depend on them.
There should now be a
bangra executable in your root folder.
You can verify that everything works by running:
Bangra has a built-in console that can be launched from the command-line by
passing no arguments to the
To execute a Bangra program, pass the source file as first argument to the
2.3. Hello World¶
A simple “Hello World” program in Bangra looks as follows:
print "Hello world!"
Note that in order to be valid, a Bangra program must not contain any tabs, and each sub-block must be indented by four spaces.