diff --git a/.github/actions/binary-compatible-builds/action.yml b/.github/actions/binary-compatible-builds/action.yml index c2950d9..8abc72d 100644 --- a/.github/actions/binary-compatible-builds/action.yml +++ b/.github/actions/binary-compatible-builds/action.yml @@ -2,7 +2,7 @@ name: 'Set up a CentOS 6 container to build releases in' description: 'Set up a CentOS 6 container to build releases in' runs: - using: node12 + using: node20 main: 'main.js' inputs: name: diff --git a/.github/actions/binary-compatible-builds/main.js b/.github/actions/binary-compatible-builds/main.js index 378c5c2..6b72ebe 100755 --- a/.github/actions/binary-compatible-builds/main.js +++ b/.github/actions/binary-compatible-builds/main.js @@ -21,6 +21,12 @@ if (process.platform == 'win32') { return; } +// Android doesn't use a container as it's controlled by the installation of the +// SDK/NDK. +if (process.env.INPUT_NAME && process.env.INPUT_NAME.indexOf("android") >= 0) { + return; +} + // ... and on Linux we do fancy things with containers. We'll spawn an old // CentOS container in the background with a super old glibc, and then we'll run // commands in there with the `$CENTOS` env var. @@ -34,7 +40,7 @@ if (process.env.CENTOS !== undefined) { return; } -const name = process.env.INPUT_NAME; +const name = process.env.INPUT_NAME.replace(/-min$/, ''); child_process.execFileSync('docker', [ 'build', diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ac1707b..d3adbbb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -126,7 +126,7 @@ jobs: working-directory: ./npm/wizer run: npm install && npm version "${{ steps.tagname.outputs.val }}" --allow-same-version - name: Setup npm auth - run: npm config --global set '//registry.npmjs.org/:_authToken'='$NODE_AUTH_TOKEN' + run: sudo npm config --global set '//registry.npmjs.org/:_authToken'='$NODE_AUTH_TOKEN' - name: Publish npm packages if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') working-directory: ./npm diff --git a/Cargo.toml b/Cargo.toml index 0327e60..2bc0ae6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -66,3 +66,6 @@ members = [ [profile.bench] debug = true + +[lints.rust] +unexpected_cfgs = { level = "allow", check-cfg = ['cfg(fuzzing)'] } diff --git a/ci/docker/x86_64-linux/Dockerfile b/ci/docker/x86_64-linux/Dockerfile index 388eddf..b88812c 100644 --- a/ci/docker/x86_64-linux/Dockerfile +++ b/ci/docker/x86_64-linux/Dockerfile @@ -1,5 +1,5 @@ -FROM centos:7 +FROM almalinux:8 -RUN yum install -y git gcc +RUN dnf install -y git gcc make -ENV PATH=$PATH:/rust/bin \ No newline at end of file +ENV PATH=$PATH:/rust/bin diff --git a/src/snapshot.rs b/src/snapshot.rs index 9d69b6f..d3c5fcd 100644 --- a/src/snapshot.rs +++ b/src/snapshot.rs @@ -19,9 +19,6 @@ pub struct Snapshot { /// Segments of non-zero memory. pub data_segments: Vec, - - /// Snapshots for each nested instantiation. - pub instantiations: Vec, } /// A data segment initializer for a memory. @@ -83,13 +80,11 @@ pub fn snapshot(ctx: &mut impl AsContextMut, instance: &wasmtime::Instance) -> S let globals = snapshot_globals(&mut *ctx, instance); let (memory_mins, data_segments) = snapshot_memories(&mut *ctx, instance); - let instantiations = snapshot_instantiations(&mut *ctx, instance); Snapshot { globals, memory_mins, data_segments, - instantiations, } } @@ -273,19 +268,3 @@ fn remove_excess_segments(merged_data_segments: &mut Vec) { // deterministic. merged_data_segments.sort_by_key(|s| (s.memory_index, s.offset)); } - -fn snapshot_instantiations( - ctx: &mut impl AsContextMut, - instance: &wasmtime::Instance, -) -> Vec { - log::debug!("Snapshotting nested instantiations"); - let instantiations = vec![]; - loop { - let name = format!("__wizer_instance_{}", instantiations.len()); - match instance.get_export(&mut *ctx, &name) { - None => break, - Some(_) => unreachable!(), - } - } - instantiations -}