Skip to content

t3rm1n4l/alloy

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Resources

Example

Here's a 3d cube being rendered using SDL and OpenGL in Alloy. You can check out the source code for this here

Disclaimer?

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.

Building

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.

Requirements:

You will need:

  • GNU Make
  • Clang/GCC (we're not sure about other compilers support)
  • Python 2.4 or above (optional, for the tests)

Compiling

$ 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

Testing

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

Status

Alloy is still constantly being worked on. At the moment it compiles, however some aspects of the language are unimplemented or broken.

Just show me what it looks like already

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;
}

License

Alloy is licensed under the MIT License.

About

Alloy Programming Language

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 93.5%
  • C++ 4.9%
  • Python 1.2%
  • Makefile 0.4%