Add skeleton of exported api

This commit is contained in:
Mark McCaskey 2020-03-23 17:53:01 -07:00
parent 9829d97d7d
commit d8bd258ef2
5 changed files with 15 additions and 5 deletions

8
Cargo.lock generated
View File

@ -1842,6 +1842,13 @@ dependencies = [
[[package]]
name = "wasmer"
version = "0.16.2"
dependencies = [
"wasmer-runtime-core",
]
[[package]]
name = "wasmer-bin"
version = "0.16.2"
dependencies = [
"atty",
"byteorder",
@ -1854,6 +1861,7 @@ dependencies = [
"structopt",
"typetag",
"wabt",
"wasmer",
"wasmer-clif-backend",
"wasmer-dev-utils",
"wasmer-emscripten",

View File

@ -1,5 +1,5 @@
[package]
name = "wasmer"
name = "wasmer-bin"
version = "0.16.2"
authors = ["The Wasmer Engineering Team <engineering@wasmer.io>"]
edition = "2018"
@ -27,6 +27,7 @@ fern = { version = "0.5", features = ["colored"], optional = true }
log = "0.4"
structopt = "0.3"
wabt = { version = "0.9.1", optional = true }
wasmer = { path = "lib/api" }
wasmer-clif-backend = { path = "lib/clif-backend", optional = true }
wasmer-singlepass-backend = { path = "lib/singlepass-backend", optional = true }
wasmer-middleware-common = { path = "lib/middleware-common" }
@ -44,6 +45,7 @@ wasmer-wasi-experimental-io-devices = { path = "lib/wasi-experimental-io-devices
[workspace]
members = [
"lib/api",
"lib/clif-backend",
"lib/singlepass-backend",
"lib/runtime",

View File

@ -2,13 +2,13 @@
#[macro_use]
extern crate libfuzzer_sys;
extern crate wasmer;
extern crate wasmer_bin;
extern crate wasmer_runtime_core;
use wasmer_runtime_core::backend::Features;
fuzz_target!(|data: &[u8]| {
let _ = wasmer::utils::is_wasm_binary(data);
let _ = wasmer_bin::utils::is_wasm_binary(data);
let _ = wasmer_runtime_core::validate_and_report_errors_with_features(
&data,
Features {

View File

@ -50,7 +50,7 @@ fn handle_client(mut stream: UnixStream) {
let mut wasm_binary: Vec<u8> = Vec::with_capacity(binary_size as usize);
unsafe { wasm_binary.set_len(binary_size as usize) };
stream.read_exact(&mut wasm_binary).unwrap();
use wasmer::webassembly;
use wasmer_bin::webassembly;
use wasmer_runtime_core::{
backend::{CompilerConfig, MemoryBoundCheckMode},
loader::Instance,

View File

@ -22,7 +22,7 @@ use std::str::FromStr;
use structopt::{clap, StructOpt};
use wasmer::*;
use wasmer_bin::*;
#[cfg(feature = "backend-cranelift")]
use wasmer_clif_backend::CraneliftCompiler;
#[cfg(feature = "backend-llvm")]