Apply suggestions from code review

Co-authored-by: nlewycky <nick@wasmer.io>
This commit is contained in:
Syrus Akbary
2020-06-12 13:01:27 -07:00
committed by GitHub
parent c65949260c
commit a0dcbca5f2
4 changed files with 7 additions and 7 deletions

View File

@@ -70,7 +70,7 @@ impl FileSystemCache {
/// Set the extension for this cached file.
///
/// This is needed for loading native files from Windows, as otherwise
/// loadding the library will fail (it requires to have a `.dll` extension)
/// loading the library will fail (it requires a `.dll` extension)
pub fn set_cache_extension(&mut self, ext: Option<impl ToString>) {
self.ext = ext.map(|ext| ext.to_string());
}

View File

@@ -15,4 +15,4 @@ systems where fast and consistent compilation times are very critical.
## Requirements
At the moment, this crate depends on Rust nightly to be compiled, as it uses
`dynasm-rs` which can only be compiled in Nigthly.
`dynasm-rs` which can only be compiled in Nightly.

View File

@@ -6,7 +6,7 @@ Code (PIC).
After the compiler generates the machine code for the functions, the
Native Engine generates a shared object file and links it via `dlsym`
so it can be usable by the `wasmer` api.
so it can be usable by the `wasmer` API.
This allows Wasmer to achieve *blazing fast* native startup times.
@@ -15,7 +15,7 @@ This allows Wasmer to achieve *blazing fast* native startup times.
The `wasmer-engine-native` crate requires a linker available on your
system to generate the shared object file.
We recommend having installed `gcc` or `clang`.
We recommend having `gcc` or `clang` installed.
> Note: when cross-compiling to other targets, `clang` will be the
> default command used for compiling.

View File

@@ -65,9 +65,9 @@ impl NativeArtifact {
#[allow(dead_code)]
const MAGIC_HEADER_ELF_64: &'static [u8] = &[0x7f, b'E', b'L', b'F', 2];
// Coff Magic heaer for Windows (64 bit)
// COFF Magic header for Windows (64 bit)
#[allow(dead_code)]
const MAGIC_HEADER_COFF_64: &'static [u8] = &[0x4d, 0x5a];
const MAGIC_HEADER_COFF_64: &'static [u8] = &[b'M', b'Z'];
/// Check if the provided bytes look like `NativeArtifact`.
///
@@ -186,7 +186,7 @@ impl NativeArtifact {
Ok(Endianness::Big) => object::Endianness::Big,
Err(e) => {
return Err(CompileError::Codegen(format!(
"Can't detect the endianess for the target: {:?}",
"Can't detect the endianness for the target: {:?}",
e
)))
}