Here's a 3d cube being rendered using SDL and OpenGL in Alloy. You can check out the source code for this here
Alloy is a somewhat experimental language, this means it can and probably will change at any point, be it a small change, or a complete re-write. We consider this to be unlikely, but it's still something to consider.
If you want to try out Alloy yourself, clone the repository, compile it, and add bin/alloyc
to your path. You can
also run the test script (you'll need python) test.py
to see if the tests work, though we can't guarantee they
will all run successfully if you're building the nightly.
You will need:
- GNU Make
- Clang/GCC (we're not sure about other compilers support)
- Python 2.4 or above (optional, for the tests)
$ git clone http://www.github.com/felixangell/alloy
$ cd alloy
$ make
To compile in support for the LLVM backend, pass ENABLE_LLVM=1 to make
, like so:
$ make ENABLE_LLVM=1
Note that python is required.
If alloyc is in your $PATH
:
$ ./test.py
If alloyc is not in your $PATH
:
$ PATH=$PATH:"./bin/" ./test.py
Alloy is still constantly being worked on. At the moment it compiles, however some aspects of the language are unimplemented or broken.
Sure, you can either see a small virtual machine implemented in Alloy here. Or you can just see a small Hello World example below:
// c binding for printf
// you have to do this for now, but soon
// we'll have a standard library for this
fn printf(format: str, _): int;
fn main(): int {
printf("Hello, World");
return 0;
}
Alloy is licensed under the MIT License.