Rename wasmtime-api to wasmtime.

This commit is contained in:
Dan Gohman
2019-11-08 06:41:07 -08:00
parent 22641de629
commit d9ca508f80
9 changed files with 16 additions and 14 deletions

View File

@@ -1,5 +1,5 @@
[package]
name = "wasmtime"
name = "wasmtime-cli"
authors = ["The Wasmtime Project Developers"]
version = "0.2.0"
description = "Command-line interface for Wasmtime"
@@ -15,7 +15,7 @@ cranelift-codegen = { version = "0.49", features = ["enable-serde"] }
cranelift-entity = { version = "0.49", features = ["enable-serde"] }
cranelift-wasm = { version = "0.49", features = ["enable-serde"] }
cranelift-native = { version = "0.49" }
wasmtime-api = { path = "crates/api" }
wasmtime = { path = "crates/api" }
wasmtime-debug = { path = "crates/debug" }
wasmtime-environ = { path = "crates/environ" }
wasmtime-interface-types = { path = "crates/interface-types" }

View File

@@ -45,13 +45,13 @@ Additional goals for Wasmtime include:
#### Including Wasmtime in your project
Wasmtime exposes an API for embedding as a library through the `wasmtime-api` subcrate,
Wasmtime exposes an API for embedding as a library through the `wasmtime` subcrate,
which contains both a [high-level and safe Rust API], as well as a C-compatible API
compatible with the [proposed WebAssembly C API].
For more information, see the [Rust API embedding chapter] of the Wasmtime documentation.
[high-level and safe Rust API]: https://docs.rs/wasmtime-api/
[high-level and safe Rust API]: https://docs.rs/wasmtime/
[proposed WebAssembly C API]: https://github.com/WebAssembly/wasm-c-api
[Rust API embedding chapter]: https://cranestation.github.io/wasmtime/embed-rust.html

View File

@@ -1,5 +1,5 @@
[package]
name = "wasmtime-api"
name = "wasmtime"
authors = ["The Wasmtime Project Developers"]
version = "0.1.0"
description = "High-level API to expose the Wasmtime runtime"

View File

@@ -41,7 +41,7 @@ wasmtime-runtime = { path = "../runtime" }
wasmtime-environ = { path = "../environ" }
wasmtime-jit = { path = "../jit" }
wasmtime-wasi = { path = "../wasi" }
wasmtime-api = { path = "../api" }
wasmtime = { path = "../api" }
cranelift-codegen = "0.49"
target-lexicon = "0.8.1"
pretty_env_logger = "0.3.0"

View File

@@ -28,9 +28,11 @@ We will be using the wasmtime engine/API to run the wasm file, so we will add th
```
[dependencies]
wasmtime-api = { git = "https://github.com/CraneStation/wasmtime" }
wasmtime = "<current version>"
```
where "<current version>" is the current version number of the `wasmtime` crate.
It is time to add code to the `src/main.rs`. First, the engine and storage need to be activated:
```rust

View File

@@ -49,7 +49,7 @@ use std::process;
use std::str;
use std::str::FromStr;
use target_lexicon::Triple;
use wasmtime::pick_compilation_strategy;
use wasmtime_cli::pick_compilation_strategy;
use wasmtime_debug::{emit_debugsections, read_debuginfo};
#[cfg(feature = "lightbeam")]
use wasmtime_environ::Lightbeam;
@@ -130,7 +130,7 @@ fn main() {
None
} else {
let prefix = "wasm2obj.dbg.";
wasmtime::init_file_per_thread_logger(prefix);
wasmtime_cli::init_file_per_thread_logger(prefix);
Some(prefix)
};

View File

@@ -43,7 +43,7 @@ use std::path::Component;
use std::path::Path;
use std::process::exit;
use wasi_common::preopen_dir;
use wasmtime::pick_compilation_strategy;
use wasmtime_cli::pick_compilation_strategy;
use wasmtime_api::{Config, Engine, HostRef, Instance, Module, Store};
use wasmtime_environ::{cache_create_new_config, cache_init};
use wasmtime_interface_types::ModuleData;
@@ -200,7 +200,7 @@ fn main() -> Result<()> {
None
} else {
let prefix = "wasmtime.dbg.";
wasmtime::init_file_per_thread_logger(prefix);
wasmtime_cli::init_file_per_thread_logger(prefix);
Some(prefix)
};

View File

@@ -33,7 +33,7 @@ use pretty_env_logger;
use serde::Deserialize;
use std::path::Path;
use std::process;
use wasmtime::pick_compilation_strategy;
use wasmtime_cli::pick_compilation_strategy;
use wasmtime_environ::{cache_create_new_config, cache_init};
use wasmtime_jit::{Compiler, Features};
use wasmtime_wast::WastContext;
@@ -93,7 +93,7 @@ fn main() {
None
} else {
let prefix = "cranelift.dbg.";
wasmtime::init_file_per_thread_logger(prefix);
wasmtime_cli::init_file_per_thread_logger(prefix);
Some(prefix)
};