Skip to content

Commit c564eb7

Browse files
authored
Use *.wat instead of *.wit for text files (#1901)
The `*.wit` extension is actually intended to mean "WebAssembly Instance Type", not "WebAssembly Interface Types". The `*.wat` text format already will have support for annotations, and wasm interface types are just an extension of that!
1 parent 090109d commit c564eb7

14 files changed

+3
-3
lines changed

crates/cli/tests/interface-types.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ fn main() -> Result<()> {
1212
let dir = env::current_dir()?.join("tests/interface-types");
1313
for entry in dir.read_dir()? {
1414
let path = entry?.path();
15-
if path.extension().and_then(|s| s.to_str()) != Some("wit") {
15+
if path.extension().and_then(|s| s.to_str()) != Some("wat") {
1616
continue;
1717
}
1818
if let Some(filter) = &filter {

crates/cli/tests/reference.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ fn runtest(test: &Path) -> Result<()> {
109109
if interface_types {
110110
let wasm = td.path().join("reference_test.wasm");
111111
wit_validator::validate(&fs::read(&wasm)?)?;
112-
let wit = sanitize_wasm(&wasm)?;
113-
assert_same(&wit, &test.with_extension("wit"))?;
112+
let wat = sanitize_wasm(&wasm)?;
113+
assert_same(&wat, &test.with_extension("wat"))?;
114114
} else {
115115
let js = fs::read_to_string(td.path().join("reference_test.js"))?;
116116
assert_same(&js, &test.with_extension("js"))?;

0 commit comments

Comments
 (0)