Skip to content

Commit

Permalink
chore: add install and usage instructions to README
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardosm committed Apr 26, 2024
1 parent 296c9a5 commit dce389f
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .markdownlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
MD013:
code_blocks: false
47 changes: 47 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,53 @@ This project provides three crates:
* [rsjsonnet-front](rsjsonnet-front/README.md): a library built on top of
rsjsonnet-lang and provides easy source loading and error printing.

## Command line program

### Pre-built binaries

You can download binaries of the command line for Linux and Windows from the
[GitHub releases page](https://github.com/eduardosm/rsjsonnet/releases).

### Build from source

If you have a Rust toolchain installed on your system, you can build the
latest version with:

```sh
cargo install --locked rsjsonnet
```

### Usage

rsjsonnet provides a command line interface similar to the one of the official
implementation.

```text
Usage: rsjsonnet [OPTIONS] <filename>
Arguments:
<filename>
Options:
-e, --exec Treat filename as code
-J, --jpath <dir> Specify an additional library search dir (right-most wins)
-o, --output-file <file> Write to the output file rather than stdout
-m, --multi <dir> Write multiple files to the directory, list files on stdout
-y, --yaml-stream Write output as a YAML stream of JSON documents
-S, --string Expect a string, manifest as plain text
-s, --max-stack <n> Number of allowed stack frames
-t, --max-trace <n> Max length of stack trace before cropping
-V, --ext-str <var=[val]>
--ext-str-file <var=file>
--ext-code <var[=code]>
--ext-code-file <var=file>
-A, --tla-str <var[=val]>
--tla-str-file <var=file>
--tla-code <var[=code]>
--tla-code-file <var=file>
-h, --help Print help
```

## License

Licensed under either of
Expand Down

0 comments on commit dce389f

Please sign in to comment.