Skip to content

Commit

Permalink
Merge branch 'master' into remove_dependabot
Browse files Browse the repository at this point in the history
  • Loading branch information
syrusakbary authored Nov 8, 2021
2 parents 98622e0 + e275bd4 commit afce066
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CHANGELOG.md merge=union
*.wast linguist-vendored
*.wat linguist-vendored
* -text
scene*.txt -text
1 change: 0 additions & 1 deletion .github/workflows/benchmark.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ jobs:
- build: linux
os: ubuntu-latest
env:
CARGO_SCCACHE_VERSION: 0.2.13
SCCACHE_AZURE_BLOB_CONTAINER: wasmerstoragesccacheblob
SCCACHE_AZURE_CONNECTION_STRING: ${{ secrets.SCCACHE_AZURE_CONNECTION_STRING }}
steps:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/test-sys.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ jobs:
use_sccache: false
container: ${{ matrix.container }}
env:
CARGO_SCCACHE_VERSION: 0.2.14-alpha.0-parity
SCCACHE_AZURE_BLOB_CONTAINER: wasmerstoragesccacheblob
SCCACHE_AZURE_CONNECTION_STRING: ${{ secrets.SCCACHE_AZURE_CONNECTION_STRING }}
TARGET: ${{ matrix.target }}
Expand Down Expand Up @@ -162,7 +161,7 @@ jobs:
if: matrix.use_sccache
run: |
if [ ! -f '${{ runner.tool_cache }}/cargo-sccache/bin/sccache' ]; then
cargo install sccache --git https://github.com/wasmerio/sccache.git --no-default-features --features=dist-client,azure --root '${{ runner.tool_cache }}/cargo-sccache'
cargo install sccache --no-default-features --features=dist-client,azure --root '${{ runner.tool_cache }}/cargo-sccache'
fi
shell: bash
- name: Setup Rust target
Expand Down
12 changes: 2 additions & 10 deletions lib/api/src/sys/tunables.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
use crate::sys::{MemoryType, Pages, TableType};
use loupe::MemoryUsage;
use std::cmp::min;
use std::ptr::NonNull;
use std::sync::Arc;
use target_lexicon::{OperatingSystem, PointerWidth};
use target_lexicon::PointerWidth;
use wasmer_compiler::Target;
use wasmer_engine::Tunables;
use wasmer_vm::MemoryError;
Expand Down Expand Up @@ -37,7 +36,7 @@ impl BaseTunables {
pub fn for_target(target: &Target) -> Self {
let triple = target.triple();
let pointer_width: PointerWidth = triple.pointer_width().unwrap();
let (mut static_memory_bound, mut static_memory_offset_guard_size): (Pages, u64) =
let (static_memory_bound, static_memory_offset_guard_size): (Pages, u64) =
match pointer_width {
PointerWidth::U16 => (0x400.into(), 0x1000),
PointerWidth::U32 => (0x4000.into(), 0x1_0000),
Expand All @@ -60,13 +59,6 @@ impl BaseTunables {
#[cfg(not(target_os = "windows"))]
let dynamic_memory_offset_guard_size: u64 = 0x1_0000;

if let OperatingSystem::Windows = triple.operating_system {
// For now, use a smaller footprint on Windows so that we don't
// outstrip the paging file.
static_memory_bound = min(static_memory_bound, 0x100.into());
static_memory_offset_guard_size = min(static_memory_offset_guard_size, 0x20000);
}

Self {
static_memory_bound,
static_memory_offset_guard_size,
Expand Down
2 changes: 1 addition & 1 deletion lib/wasi-types/src/file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ impl fmt::Debug for __wasi_filestat_t {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let convert_ts_into_time_string = |ts| {
let tspec = ::time::OffsetDateTime::from_unix_timestamp_nanos(ts);
format!("{} ({})", tspec.format("%a, %d %b %Y %T %Z"), ts)
format!("{} ({})", tspec.format("%a, %d %b %Y %T %z"), ts)
};
f.debug_struct("__wasi_filestat_t")
.field("st_dev", &self.st_dev)
Expand Down
2 changes: 1 addition & 1 deletion lib/wasi-types/src/versions/snapshot0.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ impl fmt::Debug for __wasi_filestat_t {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let convert_ts_into_time_string = |ts| {
let tspec = ::time::OffsetDateTime::from_unix_timestamp_nanos(ts);
format!("{} ({})", tspec.format("%a, %d %b %Y %T %Z"), ts)
format!("{} ({})", tspec.format("%a, %d %b %Y %T %z"), ts)
};
f.debug_struct("__wasi_filestat_t")
.field("st_dev", &self.st_dev)
Expand Down
2 changes: 1 addition & 1 deletion lib/wasi/src/syscalls/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2073,7 +2073,7 @@ pub fn path_rename(

let source_entry = match &mut state.fs.inodes[source_parent_inode].kind {
Kind::Dir { entries, .. } => {
wasi_try!(entries.remove(&source_entry_name), __WASI_EINVAL)
wasi_try!(entries.remove(&source_entry_name), __WASI_ENOENT)
}
Kind::Root { .. } => return __WASI_ENOTCAPABLE,
Kind::Symlink { .. } | Kind::File { .. } | Kind::Buffer { .. } => {
Expand Down

0 comments on commit afce066

Please sign in to comment.