Skip to main content

Arch

Enum Arch 

Source
pub enum Arch {
    X86_64,
    I386,
    Aarch64,
}
Expand description

The architecture of the program a process runs, which is that of its main executable.

Wine itself, the unix side with ntdll.so and this library, is built for arm64 and runs natively; x86 code is emulated inside the process.

Variants§

§

X86_64

A 64-bit x86 program. It runs in an ARM64EC process with its x86 code emulated.

§

I386

A 32-bit x86 program, run through wow64 with its x86 code emulated.

§

Aarch64

A native ARM64 program.

Implementations§

Source§

impl Arch

Source

pub const fn pe_dir(self) -> &'static str

The <arch>-windows builtin directory name. The builtins of an x86_64 process load from aarch64-windows, as upstream Wine does on an arm64 host: they are ARM64X modules that serve the process’s ARM64EC side.

Source

pub const fn of_process(wow64: bool, machine: Option<u16>) -> Self

The arch of the current process. wow64 says whether it is a wow64 (32-bit) process; machine is the Machine field of its main image’s COFF header, when it could be read.

The bundle only runs x86 programs under wow64, so a wow64 process is i386. A 64-bit process is always native from Wine’s side (ARM64EC for an x86_64 program), so the main image decides: IMAGE_FILE_MACHINE_ARM64 is a native ARM64 program, and anything else, an unreadable header included, counts as x86_64. An ARM64EC executable carries the AMD64 machine in its header and so also counts as x86_64, which is what it presents itself as.

Trait Implementations§

Source§

impl Clone for Arch

Source§

fn clone(&self) -> Arch

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for Arch

Source§

impl Debug for Arch

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for Arch

Source§

impl PartialEq for Arch

Source§

fn eq(&self, other: &Arch) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Arch

Auto Trait Implementations§

§

impl Freeze for Arch

§

impl RefUnwindSafe for Arch

§

impl Send for Arch

§

impl Sync for Arch

§

impl Unpin for Arch

§

impl UnsafeUnpin for Arch

§

impl UnwindSafe for Arch

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

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>,

Source§

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.