#jrsonnet #jsonnet #macro #boilerplate #language #reduce #jrsonnet-evaluator

jrsonnet-macros

用于减少jrsonnet-evaluator使用中的模板代码宏

9个版本

0.5.0-pre952023年8月13日
0.5.0-pre942023年7月26日
0.5.0-pre92023年5月15日
0.5.0-pre82023年4月18日
0.5.0-pre62023年1月8日

#1975 in 过程宏

Download history 3965/week @ 2024-03-14 2482/week @ 2024-03-21 1265/week @ 2024-03-28 2776/week @ 2024-04-04 2601/week @ 2024-04-11 1901/week @ 2024-04-18 1373/week @ 2024-04-25 1539/week @ 2024-05-02 1403/week @ 2024-05-09 1651/week @ 2024-05-16 2077/week @ 2024-05-23 1445/week @ 2024-05-30 823/week @ 2024-06-06 1053/week @ 2024-06-13 590/week @ 2024-06-20 484/week @ 2024-06-27

每月下载量3,113

MIT 许可证

19KB
709

jrsonnet

++++

jrsonnet logo

release license opencollective

++++

// Github sucks: I can't center those images the normal way: https://github.com/github/markup/issues/984 // [.text-center] // Interactive,470, alt=jrsonnet logo // // [.text-center] // -- // alt=release, link=https://github.com/CertainLach/jrsonnet/releases // alt=license, ./LICENSE // alt=opencollective, link=https://opencollective.com/jrsonnet // --

这是什么

Jsonnet 是一种数据模板语言

此Rust crate实现了Jsonnet库及其基于它的替代 jsonnet 可执行文件。更多详细信息请参阅 绑定,绑定

安装

NixOS

jrsonnet被打包在nixpkgs中,由@CertainLach维护

[source,sh]

nix-env -iA nixpkgs.jrsonnet

MacOS

jrsonnet被打包到brew中,由@messense维护

[source,sh]

brew install jrsonnet

Windows/其他Linux发行版

您可以从 发布版 获取jrsonnet的最新构建版本。

从源码构建

jrsonnet应该在最新稳定版Rust上构建(可能是在最旧的版本上,但未提供MSRV策略)

调试构建也可以工作,但比发布版本慢得多

[来源]

cargo build --release

为什么?

已经有多个不同语言实现了这个标准的多个实现

这个实现显示了比所有现有实现更好的性能。更多信息请见链接:./docs/benchmarks.md[基准测试]

此外,我想尝试新的语法特性,jrsonnet实现了其中一些。更多信息请见链接:./docs/features.adoc[特性]

最终,在Rust中实现一些东西总是很有趣的。

绑定 [[bindings]]

Rust

alt=crates.io, link=https://crates.io/crates/jrsonnet-evaluator alt=docs.rs, link=https://docs.rs/jrsonnet-evaluator

Jrsonnet是用Rust编写的,所以只需将其作为依赖项添加即可

Python

alt=crates.io, link=https://pypi.ac.cn/project/rjsonnet/

绑定由@messense创建和维护

C/C++

Jrsonnet提供标准libjsonnet.so共享库,并应该作为其直接替换品工作

其他

也提供了WASM绑定,Java绑定(JNI和编译为.class的WASM)正在开发中

更多信息请见链接:./bindings/[bindings]

依赖项

~1.5MB
~35K SLoC