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#![no_std]
6
7// windows needs to read the symlink out of `Lib` as git turns it into a text file,
8// so build.rs sets this env var
9pub const LIB_PATH: &str = match option_env!("win_lib_path") {
10 Some(s) => s,
11 None => concat!(env!("CARGO_MANIFEST_DIR"), "/Lib"),
12};
13
14#[cfg(feature = "freeze-stdlib")]
15pub const FROZEN_STDLIB: &rustpython_compiler_core::frozen::FrozenLib =
16 rustpython_derive::py_freeze!(dir = "../Lib", crate_name = "rustpython_compiler_core");