-
-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: asciidoc'ify all md's except for the generated one
- Loading branch information
1 parent
609e5ef
commit df40515
Showing
8 changed files
with
153 additions
and
125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
= jrsonnet | ||
|
||
image:https://img.shields.io/github/v/tag/CertainLach/jrsonnet?color=%23fb4934&label=latest%20release&style=for-the-badge[alt=release, link=https://github.com/CertainLach/jrsonnet/releases] | ||
image:https://img.shields.io/github/license/CertainLach/jrsonnet?color=%2383a598&label=license&style=for-the-badge[alt=license, ./LICENSE] | ||
image:https://img.shields.io/opencollective/all/jrsonnet?color=%238ec07c&style=for-the-badge[alt=opencollective, link=https://opencollective.com/jrsonnet] | ||
|
||
== What is it | ||
|
||
https://jsonnet.org/[Jsonnet] is a data templating language | ||
|
||
This Rust crate implements both jsonnet library and an alternative `jsonnet` executable based on it. | ||
For more information see [bindings](#Bindings). | ||
|
||
== Install | ||
|
||
=== NixOS | ||
|
||
jrsonnet is packaged in nixpkgs and maintained by @CertainLach | ||
|
||
[source,sh] | ||
---- | ||
nix-env -iA nixpkgs.jrsonnet | ||
---- | ||
|
||
=== MacOS | ||
|
||
jrsonnet is packaged to brew and maintained by @messense | ||
|
||
[source,sh] | ||
---- | ||
brew install jrsonnet | ||
---- | ||
|
||
=== Windows/other linux distributions | ||
|
||
You can get latest build of jrsonnet in https://github.com/CertainLach/jrsonnet/releases[releases]. | ||
|
||
=== Build from sources | ||
|
||
jrsonnet should build on latest stable Rust version (probally on olders, but there is no MSRV policy provided) | ||
|
||
Debug build will work too, but it is much slower than release | ||
|
||
[source] | ||
---- | ||
cargo build --release | ||
---- | ||
|
||
== Why? | ||
|
||
There already are multiple implementations of this standard implemented in different languages: | ||
|
||
* https://github.com/google/jsonnet[C++]; | ||
* https://github.com/google/go-jsonnet/[Go]; | ||
* https://github.com/databricks/sjsonnet[Scala]. | ||
|
||
This implementation shows performance better than all existing implementations. | ||
For more information see link:./docs/benchmarks.md[benchmarks] | ||
|
||
Also, I wanted to experiment on new syntax features, and jrsonnet implements some of them. For more information see [features](./docs/features.md) | ||
|
||
In the end, it's always fun to implement something in Rust. | ||
|
||
== Bindings | ||
|
||
=== Rust | ||
|
||
image:https://img.shields.io/crates/v/jrsonnet-evaluator[alt=crates.io, link=https://crates.io/crates/jrsonnet-evaluator] | ||
image:https://docs.rs/jrsonnet-evaluator/badge.svg[alt=docs.rs, link=https://docs.rs/jrsonnet-evaluator] | ||
|
||
Jrsonnet is written in rust itself, so just add it as dependency | ||
|
||
=== Python | ||
|
||
image:https://img.shields.io/pypi/v/rjsonnet[alt=crates.io, link=https://pypi.org/project/rjsonnet/] | ||
|
||
Bindings are created and maintained by @messense | ||
|
||
=== C/C++ | ||
|
||
Jrsonnet provides a standard `libjsonnet.so` shared library and should work as drop-in replacement for it | ||
|
||
=== Other | ||
|
||
WASM bingings are also available, Java bindings (Both JNI and WASM compiled to .class) are in progress | ||
|
||
See link:./bindings/[bindings] for more information. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,18 @@ | ||
# Native bindings | ||
= Native bindings | ||
|
||
Bindings are implemented in form of standard libjsonnet.so implementation | ||
Bindings are implemented in form of standard libjsonnet.so implementation. | ||
|
||
Headers are described in `c/libjsonnet.h`, this file is exact copy from `C` implementation of jsonnet, plus additional jrsonnet-specific methods | ||
Headers are described in `c/libjsonnet.h`, this file is exact copy from `C` implementation of jsonnet, | ||
plus additional jrsonnet-specific methods. | ||
|
||
Bindings should work as drop-in replacement for standard impl | ||
Bindings should work as drop-in replacement for standard impl. | ||
|
||
## Building Linux .so library on MacOS | ||
== Building Linux .so library on MacOS | ||
|
||
You can use `cross-rs` to do so: | ||
|
||
```console | ||
[source,console] | ||
---- | ||
cargo install cross --git https://github.com/cross-rs/cross | ||
cross build --release -p libjsonnet --target x86_64-unknown-linux-gnu | ||
``` | ||
---- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
= libjsonnet.so implemented in Rust |
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
crates/jrsonnet-evaluator/README.md → crates/jrsonnet-evaluator/README.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# jrsonnet-evaluator | ||
= jrsonnet-evaluator | ||
|
||
Interpreter for parsed jsonnet tree |
2 changes: 1 addition & 1 deletion
2
crates/jrsonnet-parser/README.md → crates/jrsonnet-parser/README.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# jrsonnet-parser | ||
= jrsonnet-parser | ||
|
||
Parser for jsonnet language |
Oops, something went wrong.