Skip to content

Commit a784d2f

Browse files
committed
Add a std feature to vm
1 parent bf1e983 commit a784d2f

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

vm/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,14 @@ edition = "2018"
99
include = ["src/**/*.rs", "Cargo.toml", "build.rs", "Lib/**/*.py"]
1010

1111
[features]
12-
default = ["compile-parse", "threading"]
12+
default = ["compile-parse", "threading", "std"]
1313
vm-tracing-logging = []
1414
flame-it = ["flame", "flamer"]
1515
freeze-stdlib = ["rustpython-pylib"]
1616
jit = ["rustpython-jit"]
1717
threading = ["rustpython-common/threading"]
1818
compile-parse = ["rustpython-parser", "rustpython-compiler"]
19+
std = ["rustpython-compiler/std"] # enables compiler-core/std, parser/std, etc
1920

2021
ssl = ["openssl", "openssl-sys", "openssl-probe"]
2122

vm/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#![allow(clippy::module_inception)]
1313
#![doc(html_logo_url = "https://raw.githubusercontent.com/RustPython/RustPython/master/logo.png")]
1414
#![doc(html_root_url = "https://docs.rs/rustpython-vm/")]
15+
#![cfg_attr(not(feature = "std"), no_std)]
1516

1617
#[cfg(feature = "flame-it")]
1718
#[macro_use]

0 commit comments

Comments
 (0)