Skip to content

xray-tech/xorc-oam-compiler

Repository files navigation

xorc-oam-compiler

This is Xorc implementation of Orc Language version 2.1.2 with some restrictions and extensions.

ORC resources

Requirements

OPAM

# macOS
brew install opam

# Debian 
apt-get install opam

opam switch 4.08.1
eval `opam config env`

opam install dune async async_interactive base benchmark core menhir msgpck mtime ppx_jane ppxlib sedlex sexplib stdio yojson

How to build

dune build bin/orc.exe

# builds in ./_build/default/bin/orc.exe

Compile & Exec

# compile
./_build/default/bin/orc.exe compile examples/par.orc -output examples/par.orc.bc

# execute
./_build/default/bin/orc.exe exec -bc examples/par.orc.bc

# or directly compile & execute
./_build/default/bin/orc.exe exec examples/par.orc

How to run tests

Tests are done using the TestKit protocol (TODO document TestKit)

dune build testkit/testkit.exe

How to run tests against the OCaml OAM

./_build/default/testkit/testkit.exe exec ./_build/default/bin/orc.exe -- tests-server

How to run tests against the Kotlin OAM

Build the Kotlin OAM

./_build/default/testkit/testkit.exe exec java -- -jar /path/to/kotlin-oam/bin/build/libs/jvm-oam-1.1-SNAPSHOT-all.jar repl

Austin TX's implementation

See the difference document for a description of the compability between xorc.io and Orc 2.1.2 from the Orc Project University of Texas at Austin.