Skip to content
forked from ark-lang/ark

Ark, a compiled systems programming language written in Go using the LLVM framework

License

Notifications You must be signed in to change notification settings

gitter-badger/ark

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ark Programming Language

Build Status ![Gitter](https://badges.gitter.im/Join Chat.svg)

Ark is a systems programming language somewhere in-between C and C++.

Example

A small example program written in Ark.

[c] func printf(fmt: str, ...);
func main(): int {
    mut i := 0;
    for i < 5 {
        C::printf("i: %d\n", i);
        i = i + 1;
    }
    return 0;
}

Resources

Installing

Installing Ark should be relatively easy, you'll need a few dependencies before you get started:

Dependencies

Building

Replace RELEASE_360 with the version of LLVM you have installed. For example, version 3.6.1 becomes RELEASE_361. You can find out your version of llvm by running llvm-config --version.

$ svn co https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_360/final \
> $GOPATH/src/llvm.org/llvm
$ export CGO_CPPFLAGS="`llvm-config --cppflags`"
$ export CGO_LDFLAGS="`llvm-config --ldflags --libs --system-libs all`"
$ export CGO_CXXFLAGS=-std=c++11
$ go install -tags byollvm llvm.org/llvm/bindings/go/llvm
$ go get github.com/ark-lang/ark
$ go install github.com/ark-lang/ark

Make sure $GOPATH/bin is in your $PATH.

To see the current state of the compiler, try running the test script.

Usage

For detailed usage information, run ark help. For information on specific commands, use ark help <command>.

Compiling Ark Code

ark build tests/big_test.ark -o out_name

If the -o option is not specified, the outputted binary will be names main.

Docgen

ark docgen tests/big_test.ark --dir some_output_dir

If the --dir option is not specified, the generated documentation will be placed in docgen.

Utilities

make gen and make fmt

The targets gen and fmt are included for the convenience of the developers. They run go generate and go fmt respectively on all the modules in Ark. Please run make fmt before creating a pull request.

Testing

Requires $GOPATH/bin to be in your $PATH and Python 2.4 or newer.

$ ./test.py

License

Ark is licensed under the MIT License.

About

Ark, a compiled systems programming language written in Go using the LLVM framework

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 97.9%
  • Python 2.0%
  • Makefile 0.1%