From fbae06992f5cbbca573aaad467fa514f9e9e35df Mon Sep 17 00:00:00 2001 From: Yaroslav Bolyukin Date: Tue, 13 Jul 2021 14:58:31 +0000 Subject: [PATCH] Merge pull request #54 from messense/rm-codegenereated-stdlib-ref Remove remainder of `codegenerated-stdlib` --- --- a/crates/jrsonnet-evaluator/README.md +++ b/crates/jrsonnet-evaluator/README.md @@ -8,12 +8,10 @@ - `serialized-stdlib` - serializes standard library AST using serde - - slower than `codegenerated-stdlib` at runtime, but have no compilation speed penality + - used by default - none - leaves only stdlib source code in binary, processing them same way as user supplied data - slowest (as it involves parsing of standard library source code) - -Because of `codegenerated-stdlib` compilation slowdown, `serialized-stdlib` is used by default ### Benchmark --- 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 -- gitstuff