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
--- a/crates/jrsonnet-evaluator/src/builtin/stdlib.rs
+++ b/crates/jrsonnet-evaluator/src/builtin/stdlib.rs
@@ -5,15 +5,6 @@
 	/// To avoid parsing again when issued from the same thread
 	#[allow(unreachable_code)]
 	static PARSED_STDLIB: LocExpr = {
-		#[cfg(feature = "codegenerated-stdlib")]
-		{
-			#[allow(clippy::all)]
-			return {
-				use jrsonnet_parser::*;
-				include!(concat!(env!("OUT_DIR"), "/stdlib.rs"))
-			};
-		}
-
 		#[cfg(feature = "serialized-stdlib")]
 		{
 			// Should not panic, stdlib.bincode is generated in build.rs