Different Ways To Get/Use RIDDL
There are several ways to get riddl software on to your computer, depending on how you want to work.
This is the simplest way to get riddlc. It should run on Windows, Mac
and Linux. Follow these steps:
- Go to the riddlc downloads page
- Click on the release title you want to install
- Scroll down to the “Assets” section
- Download the riddlc-{version}.zip file
- Unzip that file on your computer
- Place the riddlc-{version}/bin directory in your path
To use riddlc locally and be able to update it with new changes without a
large download, use this approach:
git clone https://github.com/ossuminc/riddl.gitcd riddl- Put the
./riddlc/target/universal/stage/bindirectory in your PATH variable using a full path instead of “.” - Run
sbt stageto build the program - To update, run
git pullfrom theriddlcloned repository directory and rerunsbt stageto rebuild.
This allows you to both make local changes and pull in changes from others to
keep your local copy of riddlc up to date.
TBD.
To use the sdt-plugin you must first have installed riddlc by one of the above
methods. This approach allows you to run riddlc commands from a sbt based
project. The command you configure will run first when you use the compile
command in sbt. Follow these steps:
- In your
plugins.sbtfile, add: `addSbtPlugin(“com.ossuminc” % “sbt-riddl” % “{version}”). You can find the latest available version here - In your
build.sbtfile, useenablePlugins(SbtRiddlPlugin)on your project - Set the following sbt settings:
riddlcPath := file("...")This defaults to “riddlc” which is appropriate if the right version is in your path; otherwise specify the full path to theriddlccommandriddlcOptions := Seq("from", "path/to/config/file", "hugo")This is just an example, you can put any command or options you want in that sequence. Useriddlc helpto find out what commands you can use.
- To run a translator in this way, put a
riddlc.conffile next to the top level.riddlfile you want to translate. The content of that file can specify common options and the commands you want to support fromsbt-riddl, like the example below, taken from theriddl-examplesproject. These files use Human-Oriented-CONfiguration
common {
show-times = true
verbose = true
quiet = false
dry-run = false
show-warnings = true
show-missing-warnings = false
show-style-warnings = false
}
hugo {
input-file = "ReactiveBBQ.riddl"
output-dir = "target/hugo/ReactiveBBQ"
project-name = "Reactive BBQ"
site-title = "Reactive BBQ Generated Specification"
site-description = "This site provides a specification for the Reactive BBQ application as generated by riddlc"
site-logo-path = "images/RBBQ.png"
erase-output = true
base-url = "https://bbq.riddl.tech"
source-url = "https://github.com/ossuminc/riddl"
edit-path = "/-/blob/main/src/riddl/ReactiveBBQ"
}
validate {
input-file = "ReactiveBBQ.riddl"