openradtool ("ort") translates a data model (data layout and operations) into C, SQL (SQLite3), and TypeScript code. It also has a raft of related features, such as role-based access control, auditing, full documentation of generated sources, etc.
To keep up to date with the current stable release of openradtool, visit https://kristaps.bsd.lv/openradtool. The website also contains canonical installation, deployment, examples, and usage documentation.
Clone or update your sources. Configure with
make (BSD make, so it may be
bmake on your system), then
make install (or use
doas, if applicable).
To install in an alternative directory to
/usr/local, set the
variable when you run
./configure PREFIX=$HOME/.local make make install
If you plan on using
pkg-config with the above invocation, make sure
that ~/.local/lib/pkgconfig is recognised as a path to package
specifications. You'll also want to make sure that
man can access the
installed location of ~/.local/man, in this case.
It's useful to run the installed regression tests on the bleeding edge
sources. (Again, this uses BSD make, so it may be
bmake on your
system.) The full regression suite is extensive and may take several
minutes to run to completion.
None of the tests require an external network, though some will use an internal network connection to test client/server mode.
The TypeScript and Node.js regression tests will use Node.js tools if available, though it will not configure these for you. You'll need npm for this to work.
npm install make regress
If you're on OpenBSD (≥6.9), you may need to install a python2 interpreter from the ports tree and override newer versions:
PYTHON=/usr/local/bin/python2.7 \ npm install
Older versions of OpenBSD instead require overriding
CXX with the
ports-installed versions of clang.
This will use the package.json and package-lock.json files to
configure the node_modules subdirectory required for the regression
tests. You can safely remove the node_modules directory at any time,
though you will need to re-run
npm install to recreate it. Once
installed, the regression suite will automatically pick these up.
To enable picking up the Node.js tests, set the
to the ts-node script, usually node_modules/.bin/ts-node, in the
Makefile. Alternatively, drop it into a Makefile.local that will be
included by the Makefile.
To test JSON output, you'll need both the Node.js installation (as described above) and the py-jsonschema utilities installed for validating JSON against a schema.
To enable picking up the JSON tests, set the
TS_JSONSCHEMA variable to
the typescript-json-shema script, usually
node_modules/.bin/typescript-json-schema, in the Makefile.
Or alternatively, again, in a Makefile.local.
The XLIFF tests need xmllint to validate the XLIFF output. The XSD files are included in the regression suite, so no network connection is made to fetch them.
To enable picking up the XLIFF tests, set the
XMLLINT variable to
the xmllint program in the Makefile or a Makefile.local.
The rust tests need cargo to operate. Prior to running the tests, dependencies must be downloaded. Regression builds are all performed in offline mode.
cd rust cargo fetch cd .. make regress
As usual, you'll need a
CARGO variable in the Makefile or
Makefile.local set to the cargo binary.
All sources use the ISC (like OpenBSD) license. See the LICENSE.md file for details.