git.delta.rocks / jrsonnet / refs/commits / 4ad9956e5f9b

difftreelog

source

crates/jrsonnet-stdlib/src/expr.rs547 Bsourcehistory
1use std::borrow::Cow;23use jrsonnet_parser::{LocExpr, ParserSettings, Source};45pub const STDLIB_STR: &str = include_str!("./std.jsonnet");67pub fn stdlib_expr() -> LocExpr {8	#[cfg(feature = "serialized-stdlib")]9	{10		// Should not panic, stdlib.bincode is generated in build.rs11		return bincode::deserialize(include_bytes!(concat!(env!("OUT_DIR"), "/stdlib.bincode")))12			.unwrap();13	}1415	jrsonnet_parser::parse(16		STDLIB_STR,17		&ParserSettings {18			file_name: Source::new_virtual(Cow::Borrowed("<std>"), STDLIB_STR.into()),19		},20	)21	.unwrap()22}