Skip to content

Commit

Permalink
Remove wasmer_engine_universal{,_artifact} and merge into wasmer_comp…
Browse files Browse the repository at this point in the history
…iler
  • Loading branch information
epilys committed Jun 14, 2022
1 parent 45f162b commit f768704
Show file tree
Hide file tree
Showing 73 changed files with 164 additions and 367 deletions.
42 changes: 7 additions & 35 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 0 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ wasmer-compiler-cranelift = { version = "=2.3.0", path = "lib/compiler-cranelift
wasmer-compiler-singlepass = { version = "=2.3.0", path = "lib/compiler-singlepass", optional = true }
wasmer-compiler-llvm = { version = "=2.3.0", path = "lib/compiler-llvm", optional = true }
wasmer-emscripten = { version = "=2.3.0", path = "lib/emscripten", optional = true }
wasmer-engine-universal = { version = "=2.3.0", path = "lib/engine-universal", optional = true }
wasmer-wasi = { version = "=2.3.0", path = "lib/wasi", optional = true }
wasmer-wast = { version = "=2.3.0", path = "tests/lib/wast", optional = true }
wasi-test-generator = { version = "=2.3.0", path = "tests/wasi-wast", optional = true }
Expand All @@ -38,7 +37,6 @@ members = [
"lib/compiler-llvm",
"lib/derive",
"lib/emscripten",
"lib/engine-universal",
"lib/object",
"lib/vfs",
"lib/vm",
Expand Down Expand Up @@ -80,16 +78,12 @@ tracing-subscriber = { version = "0.3", default-features = false, features = ["e
default = [
"wat",
"wast",
"universal",
"cache",
"wasi",
"emscripten",
"middlewares",
]
engine = []
universal = [
"wasmer-engine-universal",
]
cache = ["wasmer-cache"]
wast = ["wasmer-wast"]
wasi = ["wasmer-wasi"]
Expand All @@ -98,7 +92,6 @@ wat = ["wasmer/wat"]
compiler = [
"wasmer/compiler",
"wasmer-compiler/translator",
"wasmer-engine-universal/compiler",
]
singlepass = [
"wasmer-compiler-singlepass",
Expand Down Expand Up @@ -126,7 +119,6 @@ test-llvm = [
]

test-universal = [
"universal",
"test-generator/test-universal",
]

Expand Down
2 changes: 1 addition & 1 deletion examples/compiler_cranelift.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
//! Ready?
use wasmer::{imports, wat2wasm, Instance, Module, Store, Value};
use wasmer_compiler::Universal;
use wasmer_compiler_cranelift::Cranelift;
use wasmer_engine_universal::Universal;

fn main() -> Result<(), Box<dyn std::error::Error>> {
// Let's declare the Wasm module with the text representation.
Expand Down
2 changes: 1 addition & 1 deletion examples/compiler_llvm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
//! Ready?
use wasmer::{imports, wat2wasm, Instance, Module, Store, Value};
use wasmer_compiler::Universal;
use wasmer_compiler_llvm::LLVM;
use wasmer_engine_universal::Universal;

fn main() -> Result<(), Box<dyn std::error::Error>> {
// Let's declare the Wasm module with the text representation.
Expand Down
2 changes: 1 addition & 1 deletion examples/compiler_singlepass.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
//! Ready?
use wasmer::{imports, wat2wasm, Instance, Module, Store, Value};
use wasmer_compiler::Universal;
use wasmer_compiler_singlepass::Singlepass;
use wasmer_engine_universal::Universal;

fn main() -> Result<(), Box<dyn std::error::Error>> {
// Let's declare the Wasm module with the text representation.
Expand Down
2 changes: 1 addition & 1 deletion examples/early_exit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
use anyhow::bail;
use std::fmt;
use wasmer::{imports, wat2wasm, Function, Instance, Module, Store, TypedFunction};
use wasmer_compiler::Universal;
use wasmer_compiler_cranelift::Cranelift;
use wasmer_engine_universal::Universal;

// First we need to create an error type that we'll use to signal the end of execution.
#[derive(Debug, Clone, Copy)]
Expand Down
2 changes: 1 addition & 1 deletion examples/engine_cross_compilation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
use std::str::FromStr;
use wasmer::{wat2wasm, Module, RuntimeError, Store};
use wasmer_compiler::Universal;
use wasmer_compiler::{CpuFeature, Target, Triple};
use wasmer_compiler_cranelift::Cranelift;
use wasmer_engine_universal::Universal;

fn main() -> Result<(), Box<dyn std::error::Error>> {
// Let's declare the Wasm module with the text representation.
Expand Down
2 changes: 1 addition & 1 deletion examples/engine_headless.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ use wasmer::Instance;
use wasmer::Module;
use wasmer::Store;
use wasmer::Value;
use wasmer_compiler::Universal;
use wasmer_compiler_cranelift::Cranelift;
use wasmer_engine_universal::Universal;

fn main() -> Result<(), Box<dyn std::error::Error>> {
// First step, let's compile the Wasm module and serialize it.
Expand Down
6 changes: 3 additions & 3 deletions examples/engine_universal.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! Defining an engine in Wasmer is one of the fundamental steps.
//!
//! This example illustrates how to use the `wasmer_engine_universal`,
//! This example illustrates how to use the `wasmer_compiler`,
//! aka the Universal engine. An engine applies roughly 2 steps:
//!
//! 1. It compiles the Wasm module bytes to executable code, through
Expand All @@ -19,8 +19,8 @@
//! Ready?
use wasmer::{imports, wat2wasm, Instance, Module, Store, Value};
use wasmer_compiler::Universal;
use wasmer_compiler_cranelift::Cranelift;
use wasmer_engine_universal::Universal;

fn main() -> Result<(), Box<dyn std::error::Error>> {
// Let's declare the Wasm module with the text representation.
Expand All @@ -47,7 +47,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
println!("Creating Universal engine...");
// Define the engine that will drive everything.
//
// In this case, the engine is `wasmer_engine_universal` which roughly
// In this case, the engine is `wasmer_compiler` which roughly
// means that the executable code will live in memory.
let engine = Universal::new(compiler_config).engine();

Expand Down
2 changes: 1 addition & 1 deletion examples/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
//! Ready?
use wasmer::{imports, wat2wasm, Instance, Module, Store};
use wasmer_compiler::Universal;
use wasmer_compiler_cranelift::Cranelift;
use wasmer_engine_universal::Universal;

fn main() -> Result<(), Box<dyn std::error::Error>> {
// Let's declare the Wasm module with the text representation.
Expand Down
2 changes: 1 addition & 1 deletion examples/exports_function.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
//! Ready?
use wasmer::{imports, wat2wasm, Instance, Module, Store, Value};
use wasmer_compiler::Universal;
use wasmer_compiler_cranelift::Cranelift;
use wasmer_engine_universal::Universal;

fn main() -> Result<(), Box<dyn std::error::Error>> {
// Let's declare the Wasm module with the text representation.
Expand Down
2 changes: 1 addition & 1 deletion examples/exports_global.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
//! Ready?
use wasmer::{imports, wat2wasm, Instance, Module, Mutability, Store, Type, Value};
use wasmer_compiler::Universal;
use wasmer_compiler_cranelift::Cranelift;
use wasmer_engine_universal::Universal;

fn main() -> Result<(), Box<dyn std::error::Error>> {
// Let's declare the Wasm module with the text representation.
Expand Down
2 changes: 1 addition & 1 deletion examples/exports_memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
//! Ready?
use wasmer::{imports, wat2wasm, Instance, Module, Store, WasmPtr};
use wasmer_compiler::Universal;
use wasmer_compiler_cranelift::Cranelift;
use wasmer_engine_universal::Universal;

fn main() -> Result<(), Box<dyn std::error::Error>> {
// Let's declare the Wasm module with the text representation.
Expand Down
2 changes: 1 addition & 1 deletion examples/features.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
//! Ready?
use wasmer::{imports, wat2wasm, Features, Instance, Module, Store, Value};
use wasmer_compiler::Universal;
use wasmer_compiler_cranelift::Cranelift;
use wasmer_engine_universal::Universal;

fn main() -> anyhow::Result<()> {
// Let's declare the Wasm module with the text representation.
Expand Down
2 changes: 1 addition & 1 deletion examples/hello_world.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
//! ```
use wasmer::{imports, wat2wasm, Function, Instance, Module, Store, TypedFunction};
use wasmer_compiler::Universal;
use wasmer_compiler_cranelift::Cranelift;
use wasmer_engine_universal::Universal;

fn main() -> anyhow::Result<()> {
// First we create a simple Wasm program to use with Wasmer.
Expand Down
2 changes: 1 addition & 1 deletion examples/imports_exports.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ use wasmer::{
imports, wat2wasm, Function, FunctionType, Global, Instance, Memory, Module, Store, Table,
Type, Value,
};
use wasmer_compiler::Universal;
use wasmer_compiler_cranelift::Cranelift;
use wasmer_engine_universal::Universal;

fn main() -> Result<(), Box<dyn std::error::Error>> {
// Let's declare the Wasm module.
Expand Down
2 changes: 1 addition & 1 deletion examples/imports_function.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
//! Ready?
use wasmer::{imports, wat2wasm, Function, FunctionType, Instance, Module, Store, Type, Value};
use wasmer_compiler::Universal;
use wasmer_compiler_cranelift::Cranelift;
use wasmer_engine_universal::Universal;

fn main() -> Result<(), Box<dyn std::error::Error>> {
// Let's declare the Wasm module with the text representation.
Expand Down
2 changes: 1 addition & 1 deletion examples/imports_function_env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
use std::sync::{Arc, Mutex};
use wasmer::{imports, wat2wasm, Function, Instance, Module, Store, WasmerEnv};
use wasmer_compiler::Universal;
use wasmer_compiler_cranelift::Cranelift;
use wasmer_engine_universal::Universal;

fn main() -> Result<(), Box<dyn std::error::Error>> {
// Let's declare the Wasm module with the text representation.
Expand Down
2 changes: 1 addition & 1 deletion examples/imports_global.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
//! Ready?
use wasmer::{imports, wat2wasm, Global, Instance, Module, Store, Value};
use wasmer_compiler::Universal;
use wasmer_compiler_cranelift::Cranelift;
use wasmer_engine_universal::Universal;

fn main() -> Result<(), Box<dyn std::error::Error>> {
// Let's declare the Wasm module with the text representation.
Expand Down
2 changes: 1 addition & 1 deletion examples/instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
//! Ready?
use wasmer::{imports, wat2wasm, Instance, Module, Store};
use wasmer_compiler::Universal;
use wasmer_compiler_cranelift::Cranelift;
use wasmer_engine_universal::Universal;

fn main() -> Result<(), Box<dyn std::error::Error>> {
// Let's declare the Wasm module.
Expand Down
2 changes: 1 addition & 1 deletion examples/memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
use std::mem;
use wasmer::{imports, wat2wasm, Bytes, Instance, Module, Pages, Store, TypedFunction};
use wasmer_compiler::Universal;
use wasmer_compiler_cranelift::Cranelift;
use wasmer_engine_universal::Universal;

// this example is a work in progress:
// TODO: clean it up and comment it https://github.com/wasmerio/wasmer/issues/1749
Expand Down
2 changes: 1 addition & 1 deletion examples/metering.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ use std::sync::Arc;
use wasmer::wasmparser::Operator;
use wasmer::CompilerConfig;
use wasmer::{imports, wat2wasm, Instance, Module, Store};
use wasmer_compiler::Universal;
use wasmer_compiler_cranelift::Cranelift;
use wasmer_engine_universal::Universal;
use wasmer_middlewares::{
metering::{get_remaining_points, set_remaining_points, MeteringPoints},
Metering,
Expand Down
2 changes: 1 addition & 1 deletion examples/table.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use wasmer::{
imports, wat2wasm, Function, Instance, Module, Store, TableType, Type, TypedFunction, Value,
};
use wasmer_compiler::Universal;
use wasmer_compiler_cranelift::Cranelift;
use wasmer_engine_universal::Universal;

/// A function we'll call through a table.
fn host_callback(arg1: i32, arg2: i32) -> i32 {
Expand Down
Loading

0 comments on commit f768704

Please sign in to comment.