pub struct CoreBridgeLauncher<'a> { /* private fields */ }
Expand description

A mechanism for launching bridged FFI code.

Implementations§

source§

impl<'a> CoreBridgeLauncher<'a>

source

pub fn new( hooks: &'a mut dyn DriverHooks, status: &'a mut dyn StatusBackend ) -> Self

Set up a new context for launching bridged FFI code.

This function uses the default security stance, which disallows all known-insecure engine features. Use Self::new_with_security to provide your own security settings that can attempt to allow the use of such features.

source

pub fn new_with_security( hooks: &'a mut dyn DriverHooks, status: &'a mut dyn StatusBackend, security: SecuritySettings ) -> Self

Set up a new context for launching bridged FFI code.

source

pub fn with_expose_absolute_paths( &mut self, expose_absolute_paths: bool ) -> &mut Self

While absolute paths are useful (for SyncTeX and external tools that resolve paths to TeX sources), we can disable them for reproducibility.

source

pub fn with_mtime_override(&mut self, mtime_override: Option<i64>) -> &mut Self

Ditto for file modification timestamps. In deterministic mode, we return the configured build time (i.e. SOURCE_DATE_EPOCH) instead of the modification timestamp reported by the IO subsystem.

source

pub fn with_global_lock<F, T>(&mut self, callback: F) -> Result<T>
where F: FnOnce(&mut CoreBridgeState<'_>) -> Result<T>,

Invoke a function to launch a bridged FFI engine with a global mutex held.

This function must be used when invoking C code that makes use of the global core bridge state functions. Unfortunately, because our error reporting is based on setjmp/longjmp and it is Undefined Behavior to setjmp/longjmp across FFI boundaries, we cannot provide a more foolproof API.

The invoked code must call the functions ttbc_global_engine_enter and ttbc_global_engine_exit according to the pattern described in tectonic_bridge_core.h. If an abort is detected, the callback function should return Err(EngineAbortedError::new_abort_indicator()).

Auto Trait Implementations§

§

impl<'a> !RefUnwindSafe for CoreBridgeLauncher<'a>

§

impl<'a> !Send for CoreBridgeLauncher<'a>

§

impl<'a> !Sync for CoreBridgeLauncher<'a>

§

impl<'a> Unpin for CoreBridgeLauncher<'a>

§

impl<'a> !UnwindSafe for CoreBridgeLauncher<'a>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

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

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

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

Performs the conversion.
source§

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

§

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

The type returned in the event of a conversion error.
source§

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

Performs the conversion.