git.delta.rocks / jrsonnet / refs/commits / fbae06992f5c

difftreelog

Merge pull request #54 from messense/rm-codegenereated-stdlib-ref

Yaroslav Bolyukin2021-07-13parents: #b6223e5 #bf70e2e.patch.diff
in: master
Remove remainder of `codegenerated-stdlib`

2 files changed

modifiedcrates/jrsonnet-evaluator/README.mddiffbeforeafterboth
88
9- `serialized-stdlib`9- `serialized-stdlib`
10 - serializes standard library AST using serde10 - serializes standard library AST using serde
11 - slower than `codegenerated-stdlib` at runtime, but have no compilation speed penality11 - used by default
12- none12- none
13 - leaves only stdlib source code in binary, processing them same way as user supplied data13 - leaves only stdlib source code in binary, processing them same way as user supplied data
14 - slowest (as it involves parsing of standard library source code)14 - slowest (as it involves parsing of standard library source code)
1515
16Because of `codegenerated-stdlib` compilation slowdown, `serialized-stdlib` is used by default
17
18### Benchmark16### Benchmark
1917
20Can also be run via `cargo bench`18Can also be run via `cargo bench`
modifiedcrates/jrsonnet-evaluator/src/builtin/stdlib.rsdiffbeforeafterboth
5 /// To avoid parsing again when issued from the same thread5 /// To avoid parsing again when issued from the same thread
6 #[allow(unreachable_code)]6 #[allow(unreachable_code)]
7 static PARSED_STDLIB: LocExpr = {7 static PARSED_STDLIB: LocExpr = {
8 #[cfg(feature = "codegenerated-stdlib")]
9 {
10 #[allow(clippy::all)]
11 return {
12 use jrsonnet_parser::*;
13 include!(concat!(env!("OUT_DIR"), "/stdlib.rs"))
14 };
15 }
16
17 #[cfg(feature = "serialized-stdlib")]8 #[cfg(feature = "serialized-stdlib")]
18 {9 {