Struct faerie::artifact::Artifact[][src]

pub struct Artifact {
    pub name: String,
    pub target: Triple,
    pub is_library: bool,
    // some fields omitted
}

An abstract binary artifact, which contains code, data, imports, and relocations

Fields

The name of this artifact

The machine target this is intended for

Whether this is a static library or not

Methods

impl Artifact
[src]

Create a new binary Artifact, with target and optional name

Get an iterator over this artifact's imports

Declare and define a new symbolic reference with the given decl and given definition. This is sugar for declare and then define

Declare a new symbolic reference, with the given decl. Note: All declarations must precede their definitions.

Declare a sequence of name, Decl pairs

Defines a previously declared program object. NB: If you attempt to define an import, this will return an error. If you attempt to define something which has not been declared, this will return an error.

Declare import to be an import with kind. This is just sugar for declare("name", Decl::FunctionImport) or declare("data", Decl::DataImport)

Link a relocation at link.at from link.from to link.to NB: If either link.from or link.to is undeclared, then this will return an error. If link.from is an import you previously declared, this will also return an error.

A variant of link with a RelocOverride provided. Has all of the same invariants as link.

Get set of non-import declarations that have not been defined. This must be an empty set in order to emit the artifact.

Emit a blob of bytes representing the object file in the format specified in the target the Artifact was constructed with.

Emit a blob of bytes representing an object file in the given format.

Emit and write to disk a blob of bytes representing the object file in the format specified in the target the Artifact was constructed with.

Emit and write to disk a blob of bytes representing an object file in the given format.

Trait Implementations

impl Debug for Artifact
[src]

Formats the value using the given formatter. Read more

impl Clone for Artifact
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl Send for Artifact

impl Sync for Artifact