55
66#[ macro_use]
77extern crate rustpython_derive;
8+
89extern crate alloc;
910
1011#[ macro_use]
@@ -20,8 +21,10 @@ mod cmath;
2021mod compression; // internal module
2122mod contextvars;
2223mod csv;
24+
2325#[ cfg( not( any( target_os = "android" , target_arch = "wasm32" ) ) ) ]
2426mod lzma;
27+
2528mod zlib;
2629
2730mod blake2;
@@ -41,59 +44,77 @@ mod json;
4144mod locale;
4245
4346mod _opcode;
47+
4448#[ path = "_tokenize.rs" ]
4549mod _tokenize;
50+
4651mod math;
52+
4753#[ cfg( all( feature = "host_env" , any( unix, windows) ) ) ]
4854mod mmap;
55+
4956mod pyexpat;
5057mod pystruct;
5158mod random;
5259mod statistics;
5360mod suggestions;
61+
5462// TODO: maybe make this an extension module, if we ever get those
5563// mod re;
5664#[ cfg( all( feature = "host_env" , not( target_arch = "wasm32" ) ) ) ]
5765pub mod socket;
66+
5867#[ cfg( all( feature = "host_env" , unix, not( target_os = "redox" ) ) ) ]
5968mod syslog;
69+
6070mod unicodedata;
6171
6272#[ cfg( feature = "host_env" ) ]
6373mod faulthandler;
74+
6475#[ cfg( all( feature = "host_env" , any( unix, target_os = "wasi" ) ) ) ]
6576mod fcntl;
77+
6678#[ cfg( all( feature = "host_env" , not( target_arch = "wasm32" ) ) ) ]
6779mod multiprocessing;
80+
6881#[ cfg( all(
6982 feature = "host_env" ,
7083 unix,
7184 not( target_os = "redox" ) ,
7285 not( target_os = "android" )
7386) ) ]
7487mod posixshmem;
88+
7589#[ cfg( all( feature = "host_env" , unix) ) ]
7690mod posixsubprocess;
91+
7792// libc is missing constants on redox
7893#[ cfg( all(
7994 feature = "sqlite" ,
8095 not( any( target_os = "android" , target_arch = "wasm32" ) )
8196) ) ]
8297mod _sqlite3;
98+
8399#[ cfg( all( feature = "host_env" , windows) ) ]
84100mod _testconsole;
101+
85102#[ cfg( all(
86103 feature = "host_env" ,
87104 unix,
88105 not( any( target_os = "android" , target_os = "redox" ) )
89106) ) ]
90107mod grp;
108+
91109#[ cfg( all( feature = "host_env" , windows) ) ]
92110mod overlapped;
111+
93112#[ cfg( all( feature = "host_env" , unix, not( target_os = "redox" ) ) ) ]
94113mod resource;
114+
95115#[ cfg( all( feature = "host_env" , target_os = "macos" ) ) ]
96116mod scproxy;
117+
97118#[ cfg( all( feature = "host_env" , any( unix, windows, target_os = "wasi" ) ) ) ]
98119mod select;
99120
@@ -103,14 +124,16 @@ mod select;
103124 feature = "ssl-openssl"
104125) ) ]
105126mod openssl;
127+
106128#[ cfg( all(
107129 feature = "host_env" ,
108130 not( target_arch = "wasm32" ) ,
109131 feature = "ssl-rustls"
110132) ) ]
111133mod ssl;
112- #[ cfg( all( feature = "ssl-openssl" , feature = "ssl-rustls" ) ) ]
113- compile_error ! ( "features \" ssl-openssl\" and \" ssl-rustls\" are mutually exclusive" ) ;
134+
135+ #[ cfg( all( feature = "ssl-openssl" , feature = "ssl-rustls" , not( clippy) ) ) ]
136+ compile_error ! ( r#"features "ssl-openssl" and "ssl-rustls" are mutually exclusive"# ) ;
114137
115138#[ cfg( all(
116139 feature = "host_env" ,
@@ -119,6 +142,7 @@ compile_error!("features \"ssl-openssl\" and \"ssl-rustls\" are mutually exclusi
119142 not( target_os = "ios" )
120143) ) ]
121144mod termios;
145+
122146#[ cfg( all(
123147 feature = "host_env" ,
124148 not( any(
0 commit comments