Rholang is a concurrent programming language, with a focus on message-passing and formally modeled by the ρ-calculus, a reflective, higher-order extension of the π-calculus. It is designed to be used to implement protocols and "smart contracts" on a general-purpose blockchain, but could be used in other settings as well.
The language is still in the early stages of development, but for those who are interested, more information can be found in the RChain Platform Architecture.
Currently we have a working interpreter for the language. It should be considered an early preview of the language.
Building and Running
Building from source
- Clone the repository
- Configure/fetch dependencies
sbt rholang/bnfc:generateto generate the lexer/parser. Re-run whenever you modify the grammar
sbt rholang/compileto compile classes
sbt rholangCLI/assemblyto build a stand-alone
$ java -jar rholang-cli/target/scala-2.12/rholangCLI-assembly-0.1.0-SNAPSHOT.jar rholang/tests/mercury-tut/coat_check_test.rho <interpreter output follows.>
The interpereter can also be run as a REPL. Currently it won't accept multiline input, so each line must be a fully formed term.
What's working, what's broken:
See the bugtracker for an up-to-date list of known issues.
- Guarded patterns for channel receive (e.g.
for (@x <- y if x > 0)) don't work.
- 0-arity send and receive is currently broken.
- We don't pre-evaluate match cases. So matching 7 + 8 as a pattern currently doesn't work. Instead, you must match against 15.
Several working examples have been included in the examples directory, and the examples in the Rholang tutorial also work. If you run into something that doesn't work, check the bugtracker to see if it's a known issue, and if not, feel free to file a bug. We want Rholang to be a useful programming environment.