Temporarily remove support for interface types (#1292)
* Temporarily remove support for interface types This commit temporarily removes support for interface types from the `wasmtime` CLI and removes the `wasmtime-interface-types` crate. An error is now printed for any input wasm modules that have wasm interface types sections to indicate that support has been removed and references to two issues are printed as well: * #677 - tracking work for re-adding interface types support * #1271 - rationale for removal and links to other discussions Closes #1271 * Update the python extension
This commit is contained in:
@@ -15,7 +15,6 @@ test = false
|
||||
doctest = false
|
||||
|
||||
[dependencies]
|
||||
wasmtime-interface-types = { path = "../../interface-types", version = "0.12.0" }
|
||||
wasmtime-rust-macro = { path = "./macro", version = "0.12.0" }
|
||||
wasmtime-wasi = { path = "../../wasi", version = "0.12.0" }
|
||||
wasmtime = { path = "../../api", version = "0.12.0" }
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
use wasmtime_rust::wasmtime;
|
||||
|
||||
#[wasmtime]
|
||||
trait WasmMarkdown {
|
||||
fn render(&mut self, input: &str) -> String;
|
||||
}
|
||||
|
||||
fn main() -> anyhow::Result<()> {
|
||||
let mut markdown = WasmMarkdown::load_file("markdown.wasm")?;
|
||||
println!("{}", markdown.render("# Hello, Rust!"));
|
||||
|
||||
Ok(())
|
||||
}
|
||||
@@ -5,23 +5,21 @@ pub use wasmtime_rust_macro::wasmtime;
|
||||
pub mod __rt {
|
||||
pub use anyhow;
|
||||
pub use wasmtime;
|
||||
pub use wasmtime_interface_types;
|
||||
pub use wasmtime_wasi;
|
||||
|
||||
use std::convert::{TryFrom, TryInto};
|
||||
use wasmtime_interface_types::Value;
|
||||
|
||||
pub trait FromVecValue: Sized {
|
||||
fn from(list: Vec<Value>) -> anyhow::Result<Self>;
|
||||
fn from(list: Vec<wasmtime::Val>) -> anyhow::Result<Self>;
|
||||
}
|
||||
|
||||
macro_rules! tuple {
|
||||
($(($($a:ident),*),)*) => ($(
|
||||
impl<$($a: TryFrom<Value>),*> FromVecValue for ($($a,)*)
|
||||
impl<$($a: TryFrom<wasmtime::Val>),*> FromVecValue for ($($a,)*)
|
||||
where $(anyhow::Error: From<$a::Error>,)*
|
||||
{
|
||||
#[allow(non_snake_case)]
|
||||
fn from(list: Vec<Value>) -> anyhow::Result<Self> {
|
||||
fn from(list: Vec<wasmtime::Val>) -> anyhow::Result<Self> {
|
||||
let mut iter = list.into_iter();
|
||||
$(
|
||||
let $a = iter.next()
|
||||
|
||||
Reference in New Issue
Block a user