rustpython_pylib/lib.rs
1//! This crate includes the compiled python bytecode of the RustPython standard library. The most
2//! common way to use this crate is to just add the `"freeze-stdlib"` feature to `rustpython-vm`,
3//! in order to automatically include the python part of the standard library into the binary.
4
5// windows needs to read the symlink out of `Lib` as git turns it into a text file,
6// so build.rs sets this env var
7pub const LIB_PATH: &str = match option_env!("win_lib_path") {
8 Some(s) => s,
9 None => concat!(env!("CARGO_MANIFEST_DIR"), "/Lib"),
10};
11
12#[cfg(feature = "freeze-stdlib")]
13pub const FROZEN_STDLIB: &rustpython_compiler_core::frozen::FrozenLib =
14 rustpython_derive::py_freeze!(dir = "./Lib", crate_name = "rustpython_compiler_core");