Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/binary-compatible-builds/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
8 changes: 7 additions & 1 deletion .github/actions/binary-compatible-builds/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,6 @@ members = [

[profile.bench]
debug = true

[lints.rust]
unexpected_cfgs = { level = "allow", check-cfg = ['cfg(fuzzing)'] }
6 changes: 3 additions & 3 deletions ci/docker/x86_64-linux/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
ENV PATH=$PATH:/rust/bin
21 changes: 0 additions & 21 deletions src/snapshot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ pub struct Snapshot {

/// Segments of non-zero memory.
pub data_segments: Vec<DataSegment>,

/// Snapshots for each nested instantiation.
pub instantiations: Vec<Snapshot>,
}

/// A data segment initializer for a memory.
Expand Down Expand Up @@ -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,
}
}

Expand Down Expand Up @@ -273,19 +268,3 @@ fn remove_excess_segments(merged_data_segments: &mut Vec<DataSegment>) {
// deterministic.
merged_data_segments.sort_by_key(|s| (s.memory_index, s.offset));
}

fn snapshot_instantiations(
ctx: &mut impl AsContextMut,
instance: &wasmtime::Instance,
) -> Vec<Snapshot> {
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
}