Upgraded everything to use webc v5

This commit is contained in:
Michael-F-Bryan
2023-02-24 22:47:14 +08:00
parent 489108de4e
commit 7d409f8b07
17 changed files with 377 additions and 330 deletions

View File

@@ -15,9 +15,10 @@ use std::process::Stdio;
use tar::Archive;
use wasmer::*;
use wasmer_object::{emit_serialized, get_object_for_target};
use wasmer_types::compilation::symbols::ModuleMetadataSymbolRegistry;
use wasmer_types::ModuleInfo;
use webc::{ParseOptions, WebCMmap};
use wasmer_types::{
compilation::symbols::ModuleMetadataSymbolRegistry, ModuleInfo, SymbolRegistry,
};
use webc::v1::{ParseOptions, WebCMmap};
const LINK_SYSTEM_LIBRARIES_WINDOWS: &[&str] = &["userenv", "Ws2_32", "advapi32", "bcrypt"];
@@ -520,7 +521,7 @@ impl PrefixMapCompilation {
// if prefixes are specified, have to match the atom names exactly
if prefixes.len() != atoms.len() {
println!(
"WARNING: invalid mapping of prefix and atoms: expected prefixes for {} atoms, got {} prefixes",
"WARNING: invalid mapping of prefix and atoms: expected prefixes for {} atoms, got {} prefixes",
atoms.len(), prefixes.len()
);
}

View File

@@ -85,7 +85,7 @@ impl CreateObj {
println!("Target: {}", target.triple());
let atoms = if let Ok(pirita) =
webc::WebCMmap::parse(input_path.clone(), &webc::ParseOptions::default())
webc::v1::WebCMmap::parse(input_path.clone(), &webc::v1::ParseOptions::default())
{
crate::commands::create_exe::compile_pirita_into_directory(
&pirita,

View File

@@ -5,7 +5,7 @@ use std::path::PathBuf;
use wasmer_compiler::Artifact;
use wasmer_types::compilation::symbols::ModuleMetadataSymbolRegistry;
use wasmer_types::{CpuFeature, MetadataHeader, Triple};
use webc::WebC;
use webc::v1::WebC;
#[derive(Debug, Parser)]
/// The options for the `wasmer gen-c-header` subcommand
@@ -57,7 +57,7 @@ impl GenCHeader {
None => crate::commands::PrefixMapCompilation::hash_for_bytes(&file),
};
if let Ok(pirita) = WebC::parse(&file, &webc::ParseOptions::default()) {
if let Ok(pirita) = WebC::parse(&file, &webc::v1::ParseOptions::default()) {
let atoms = pirita
.manifest
.atoms