Struct pyoxidizerlib::py_packaging::binary::EmbeddedPythonContext [−][src]
pub struct EmbeddedPythonContext<'a> { pub config: PyembedPythonInterpreterConfig, pub linking_info: PythonLinkingInfo, pub pending_resources: Vec<(CompiledResourcesCollection<'a>, PathBuf)>, pub extra_files: FileManifest, pub host_triple: String, pub target_triple: String, }
Holds context necessary to embed Python in a binary.
Fields
config: PyembedPythonInterpreterConfig
The configuration for the embedded interpreter.
linking_info: PythonLinkingInfo
Information on how to link against Python.
pending_resources: Vec<(CompiledResourcesCollection<'a>, PathBuf)>
Python resources that need to be serialized to a file.
extra_files: FileManifest
Extra files to install next to produced binary.
host_triple: String
Rust target triple for the host we are running on.
target_triple: String
Rust target triple for the target we are building for.
Implementations
impl<'a> EmbeddedPythonContext<'a>
[src]
impl<'a> EmbeddedPythonContext<'a>
[src]pub fn interpreter_config_rs_path(&self, dest_dir: impl AsRef<Path>) -> PathBuf
[src]
pub fn interpreter_config_rs_path(&self, dest_dir: impl AsRef<Path>) -> PathBuf
[src]Obtain the filesystem of the generated Rust source file containing the interpreter configuration.
pub fn python_config_library_path(
&self,
dest_dir: impl AsRef<Path>
) -> Option<PathBuf>
[src]
pub fn python_config_library_path(
&self,
dest_dir: impl AsRef<Path>
) -> Option<PathBuf>
[src]Obtain path to a compiled library containing content of a compiled config.c
file.
This file contains global data structures for libpython defining extension modules.
pub fn libpython_path(&self, dest_dir: impl AsRef<Path>) -> PathBuf
[src]
pub fn libpython_path(&self, dest_dir: impl AsRef<Path>) -> PathBuf
[src]Resolve path to library containing libpython.
pub fn cargo_metadata_path(&self, dest_dir: impl AsRef<Path>) -> PathBuf
[src]
pub fn cargo_metadata_path(&self, dest_dir: impl AsRef<Path>) -> PathBuf
[src]Resolve the filesystem path to the file containing cargo: lines.
The cargo:
lines will enabling linking with the appropriate libpython.
pub fn cargo_metadata_lines(&self, dest_dir: impl AsRef<Path>) -> Vec<String>
[src]
pub fn cargo_metadata_lines(&self, dest_dir: impl AsRef<Path>) -> Vec<String>
[src]Obtain lines constituting cargo metadata.
These should be printed from a build script. The printed lines enable linking with our libpython.
pub fn write_packed_resources(&self, dest_dir: impl AsRef<Path>) -> Result<()>
[src]
pub fn write_packed_resources(&self, dest_dir: impl AsRef<Path>) -> Result<()>
[src]Ensure packed resources files are written.
pub fn write_libpython(&self, dest_dir: impl AsRef<Path>) -> Result<()>
[src]
pub fn write_libpython(&self, dest_dir: impl AsRef<Path>) -> Result<()>
[src]Ensure files required by libpython are written.
pub fn write_interpreter_config_rs(
&self,
dest_dir: impl AsRef<Path>
) -> Result<()>
[src]
pub fn write_interpreter_config_rs(
&self,
dest_dir: impl AsRef<Path>
) -> Result<()>
[src]Write the file containing the default interpreter configuration Rust struct.
pub fn write_cargo_metadata(&self, dest_dir: impl AsRef<Path>) -> Result<()>
[src]
pub fn write_cargo_metadata(&self, dest_dir: impl AsRef<Path>) -> Result<()>
[src]Write file containing cargo metadata lines.
pub fn write_files(&self, dest_dir: &Path) -> Result<()>
[src]
pub fn write_files(&self, dest_dir: &Path) -> Result<()>
[src]Write out files needed to build a binary against our configuration.
Auto Trait Implementations
impl<'a> RefUnwindSafe for EmbeddedPythonContext<'a>
impl<'a> Send for EmbeddedPythonContext<'a>
impl<'a> Sync for EmbeddedPythonContext<'a>
impl<'a> Unpin for EmbeddedPythonContext<'a>
impl<'a> UnwindSafe for EmbeddedPythonContext<'a>
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
pub fn vzip(self) -> V
impl<T> SendSyncUnwindSafe for T where
T: Send + Sync + UnwindSafe + ?Sized,
[src]
T: Send + Sync + UnwindSafe + ?Sized,