@@ -45,14 +45,60 @@ pub fn env_var(var: &str) -> Option<OsString> {
45
45
/// strategies are used to populate this type.
46
46
#[ cfg_attr( test, derive( Debug , PartialEq ) ) ]
47
47
pub struct InterpreterConfig {
48
+ /// The Python implementation flavor.
49
+ ///
50
+ /// Serialized to `implementation`.
48
51
pub implementation : PythonImplementation ,
52
+
53
+ /// Python `X.Y` version. e.g. `3.9`.
54
+ ///
55
+ /// Serialized to `version`.
49
56
pub version : PythonVersion ,
57
+
58
+ /// Whether link library is shared.
59
+ ///
60
+ /// Serialized to `shared`.
50
61
pub shared : bool ,
62
+
63
+ /// Whether linking against the stable/limited Python 3 API.
64
+ ///
65
+ /// Serialized to `abi3`.
51
66
pub abi3 : bool ,
67
+
68
+ /// The name of the link library defining Python.
69
+ ///
70
+ /// This effectively controls the `cargo:rustc-link-lib=<name>` value to
71
+ /// control how libpython is linked. Values should not contain the `lib`
72
+ /// prefix.
73
+ ///
74
+ /// Serialized to `lib_name`.
52
75
pub lib_name : Option < String > ,
76
+
77
+ /// The directory containing the Python library to link against.
78
+ ///
79
+ /// The effectively controls the `cargo:rustc-link-search=native=<path>` value
80
+ /// to add an additional library search path for the linker.
81
+ ///
82
+ /// Serialized to `lib_dir`.
53
83
pub lib_dir : Option < String > ,
84
+
85
+ /// Path of host `python` executable.
86
+ ///
87
+ /// This is a valid executable capable of running on the host/building machine.
88
+ /// For configurations derived by invoking a Python interpreter, it was the
89
+ /// executable invoked.
90
+ ///
91
+ /// Serialized to `executable`.
54
92
pub executable : Option < String > ,
93
+
94
+ /// Width in bits of pointers on the target machine.
95
+ ///
96
+ /// Serialized to `pointer_width`.
55
97
pub pointer_width : Option < u32 > ,
98
+
99
+ /// Additional relevant Python build flags / configuration settings.
100
+ ///
101
+ /// Serialized to `build_flags`.
56
102
pub build_flags : BuildFlags ,
57
103
}
58
104
0 commit comments