Skip to content

js-just/JUSTC

Repository files navigation

Warning

JUSTC language is currently in development and is experimental!

Documentation is coming after release of new Just an Ultimate Site Tool update. Currently, you can use experimental JUSTC demo website.

JUSTC

JUSTC Logo JUSTC Compile

JUSTC (Just an Ultimate Site Tool Configuration language) is a powerful, small, safe, human-optimized, easy-to-use object notation (or configuration) language designed to replace JSON (JavaScript Object Notation) and also designed to be backwards compatible with JSON, with embeddable JavaScript and Luau.

Installation and usage

npm i -g justc

CLI:

justc --help

Note

You can remove -g flag if you don't want to install JUSTC globally.

npm i justc

CLI:

npx justc --help

JavaScript (Node.js):

const JUSTC = require("justc");

// example:
JUSTC.execute(`

    foo = "Hello ",
    bar = "World!",
    baz = value(foo)..value(bar),

    output specified,
    return [baz] as ['output'].

`).then(result => console.log(result));

JavaScript (Browsers):

await JUSTC.initialize()

// example
const result = JUSTC.execute(`

    foo = "Hello ",
    bar = "World!",
    baz = value(foo)..value(bar),

    output specified,
    return [baz] as ['output'].

`);
console.log(result);

Dependencies

JUSTC uses C++ as its implementation language. The entire project requires C++17. It should build (and compile to WebAssembly) without issues on Linux Ubuntu.1

JUSTC depends on:

Note

JUSTC WebAssembly module does not depend on QuickJS and/or QuickJS CMake. Instead, it uses JavaScript eval function.

License

JUSTC implementation is distributed under the terms of MIT License.

When JUSTC is integrated into external projects, we ask that you honor the license agreement and include JUSTC attribution into the user-facing product documentation. Attribution making use of the JUSTC logo is also encouraged when reasonable.

Footnotes

  1. DOWNLOADING THE SOURCE CODE AND BUILDING IT ON YOUR MACHINE IS NOT RECOMMENDED AND IS AT YOUR OWN RISK. Instead, install the compiled JUSTC WebAssembly module as an NPM package.

  2. Luau is licensed under the MIT License: https://github.com/luau-lang/luau/blob/master/LICENSE.txt

  3. JSON by Niels Lohmann is licensed under the MIT License: https://github.com/nlohmann/json/blob/develop/LICENSE.MIT

  4. CPR is licensed under the MIT License: https://github.com/libcpr/cpr/blob/master/LICENSE

  5. QuickJS CMake is licensed under the MIT License: https://github.com/RobLoach/quickjs-cmake/blob/master/LICENSE

  6. QuickJS is licensed under the MIT License: https://github.com/bellard/quickjs/blob/master/LICENSE