mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-04-25 06:02:13 +00:00
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!
This commit is contained in:
parent
090109dea7
commit
c564eb72b1
@ -12,7 +12,7 @@ fn main() -> Result<()> {
|
||||
let dir = env::current_dir()?.join("tests/interface-types");
|
||||
for entry in dir.read_dir()? {
|
||||
let path = entry?.path();
|
||||
if path.extension().and_then(|s| s.to_str()) != Some("wit") {
|
||||
if path.extension().and_then(|s| s.to_str()) != Some("wat") {
|
||||
continue;
|
||||
}
|
||||
if let Some(filter) = &filter {
|
||||
|
@ -109,8 +109,8 @@ fn runtest(test: &Path) -> Result<()> {
|
||||
if interface_types {
|
||||
let wasm = td.path().join("reference_test.wasm");
|
||||
wit_validator::validate(&fs::read(&wasm)?)?;
|
||||
let wit = sanitize_wasm(&wasm)?;
|
||||
assert_same(&wit, &test.with_extension("wit"))?;
|
||||
let wat = sanitize_wasm(&wasm)?;
|
||||
assert_same(&wat, &test.with_extension("wat"))?;
|
||||
} else {
|
||||
let js = fs::read_to_string(td.path().join("reference_test.js"))?;
|
||||
assert_same(&js, &test.with_extension("js"))?;
|
||||
|
Loading…
x
Reference in New Issue
Block a user