Rustfmt and update docs
This commit is contained in:
@@ -6,14 +6,13 @@ This crate is structured as an optional layer on top of cranelift-codegen.
|
||||
It provides additional functionality, such as linking, however users that
|
||||
require greater flexibility don't need to use it.
|
||||
|
||||
A `Module` is a collection of functions and data objects that are linked
|
||||
together. `Backend` is a trait that defines an interface for backends
|
||||
that compile modules into various forms. Most users will use one of the
|
||||
following `Backend` implementations:
|
||||
A module is a collection of functions and data objects that are linked
|
||||
together. The `Module` trait that defines a common interface for various kinds
|
||||
of modules. Most users will use one of the following `Module` implementations:
|
||||
|
||||
- `SimpleJITBackend`, provided by [cranelift-simplejit], which JITs
|
||||
- `SimpleJITModule`, provided by [cranelift-simplejit], which JITs
|
||||
code to memory for direct execution.
|
||||
- `ObjectBackend`, provided by [cranelift-object], which emits native
|
||||
- `ObjectModule`, provided by [cranelift-object], which emits native
|
||||
object files.
|
||||
|
||||
[cranelift-simplejit]: https://crates.io/crates/cranelift-simplejit
|
||||
|
||||
@@ -50,7 +50,8 @@ pub struct DataDescription {
|
||||
pub data_relocs: Vec<(CodeOffset, ir::GlobalValue, Addend)>,
|
||||
/// Object file section
|
||||
pub custom_segment_section: Option<(String, String)>,
|
||||
/// Alignment
|
||||
/// Alignment in bytes. `None` means that the default alignment of the respective module should
|
||||
/// be used.
|
||||
pub align: Option<u64>,
|
||||
}
|
||||
|
||||
|
||||
@@ -142,7 +142,7 @@ impl FunctionDeclaration {
|
||||
}
|
||||
}
|
||||
|
||||
/// Error messages for all `Module` and `Backend` methods
|
||||
/// Error messages for all `Module` methods
|
||||
#[derive(Error, Debug)]
|
||||
pub enum ModuleError {
|
||||
/// Indicates an identifier was used before it was declared
|
||||
|
||||
Reference in New Issue
Block a user