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]

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]

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]

Resolve path to library containing libpython.

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]

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]

Ensure packed resources files are written.

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]

Write the file containing the default interpreter configuration Rust struct.

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]

Write out files needed to build a binary against our configuration.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T> Instrument for T[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]

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Err = <U as TryFrom<T>>::Err

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Err>

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]