Rimu Markup for the JVM
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
gradle/wrapper
src
.editorconfig
.gitignore
LICENSE
README.md
build.gradle
gradle.properties
gradlew
gradlew.bat
settings.gradle

README.md

Rimu Markup for the JVM

rimu-kt is a port of the Rimu Markup language for the Java platform written in Kotlin.

Features

  • Functionally identical to the JavaScript implementation version 11.1.0 with the following exceptions:

    • Does not support deprecated Expression macro values.
    • Does not support deprecated Imported Layouts.
    • Because the Go regexp package uses RE2 regular expressions there are some limitations on the regular expressions used in Replacements definitions and Inclusion/Exclusion macro invocations.

Details:

Using the Rimu library

To use the rimu-kt library in a Gradle based project you need to include the JCenter repository and the rimu-kt dependency e.g.

repositories {
    jcenter()
}

dependencies {
    compile "org.rimumarkup:rimu-kt:11.1.0"
}

Example code:

Rimu compiler command

The executable is named rimukt and is functionally identical to the JavaScript rimuc command.

The rimu-kt binary distribution can be downloaded from Bintray. Unzip the binary distribution and run the rimukt executable located in the ./bin folder.

Building Rimu

To build from source:

  1. Install the Git repository from Github.

     git clone git@github.com:srackham/rimu-kt.git
    
  2. Build and test:

     ./gradlew test
    

Implementation

The largely one-to-one correspondence between the canonical TypeScript code and the Kotlin code eased porting and debugging. This will also make it easier to cross-port new features and bug-fixes.

Both the Kotlin and JavaScript implementations share the same JSON driven test suites comprising over 300 compatibility checks.