pub enum CodegenTarget {
Native,
Wasm32,
}Expand description
Codegen target for the object-emit path (S3.X).
The SAME relon-IR → LLVM-IR emitter feeds both variants — only the
TargetMachine construction (triple + DataLayout + CPU/features +
reloc/code model) differs. mem.rs already lays out the arena via
i32-offset GEPs (zext-i64 + i8* base), so the lowered body is
pointer-width agnostic and needs no per-target change.
Variants§
Native
Host x86-64 ELF object (the historical default). Triple +
CPU/features come from TargetMachine::get_default_triple /
get_host_cpu_*, reloc = PIC.
Wasm32
wasm32-wasi object (\0asm magic). Uses the WebAssembly LLVM
backend with the canonical wasm32 DataLayout. Emitted object is
consumed by wasmtime (see crate::wasm_run).
Trait Implementations§
Source§impl Clone for CodegenTarget
impl Clone for CodegenTarget
Source§fn clone(&self) -> CodegenTarget
fn clone(&self) -> CodegenTarget
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for CodegenTarget
Source§impl Debug for CodegenTarget
impl Debug for CodegenTarget
impl Eq for CodegenTarget
Source§impl PartialEq for CodegenTarget
impl PartialEq for CodegenTarget
Source§fn eq(&self, other: &CodegenTarget) -> bool
fn eq(&self, other: &CodegenTarget) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CodegenTarget
Auto Trait Implementations§
impl Freeze for CodegenTarget
impl RefUnwindSafe for CodegenTarget
impl Send for CodegenTarget
impl Sync for CodegenTarget
impl Unpin for CodegenTarget
impl UnsafeUnpin for CodegenTarget
impl UnwindSafe for CodegenTarget
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more