Skip to content

Commit

Permalink
Update wasm-tools crates (#908)
Browse files Browse the repository at this point in the history
Mainly a few internal changes of `Float32` naming to `F32` for example.
Not all guest generators are updated to remove the "float" terminology
entirely yet.
  • Loading branch information
alexcrichton authored Mar 27, 2024
1 parent f4851bb commit e5b72e4
Show file tree
Hide file tree
Showing 10 changed files with 125 additions and 87 deletions.
116 changes: 77 additions & 39 deletions Cargo.lock

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

10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ pulldown-cmark = { version = "0.9", default-features = false }
clap = { version = "4.3.19", features = ["derive"] }
indexmap = "2.0.0"

wasmparser = "0.201.0"
wasm-encoder = "0.201.0"
wasm-metadata = "0.201.0"
wit-parser = "0.201.0"
wit-component = "0.201.0"
wasmparser = "0.202.0"
wasm-encoder = "0.202.0"
wasm-metadata = "0.202.0"
wit-parser = "0.202.0"
wit-component = "0.202.0"

wit-bindgen-core = { path = 'crates/core', version = '0.22.0' }
wit-bindgen-c = { path = 'crates/c', version = '0.22.0' }
Expand Down
12 changes: 6 additions & 6 deletions crates/c/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -560,8 +560,8 @@ impl C {
Type::S32 => dst.push_str("int32_t"),
Type::U64 => dst.push_str("uint64_t"),
Type::S64 => dst.push_str("int64_t"),
Type::Float32 => dst.push_str("float"),
Type::Float64 => dst.push_str("double"),
Type::F32 => dst.push_str("float"),
Type::F64 => dst.push_str("double"),
Type::String => {
dst.push_str(&self.world.to_snake_case());
dst.push_str("_");
Expand Down Expand Up @@ -731,8 +731,8 @@ pub fn push_ty_name(resolve: &Resolve, ty: &Type, src: &mut String) {
Type::S32 => src.push_str("s32"),
Type::U64 => src.push_str("u64"),
Type::S64 => src.push_str("s64"),
Type::Float32 => src.push_str("float32"),
Type::Float64 => src.push_str("float64"),
Type::F32 => src.push_str("float32"),
Type::F64 => src.push_str("float64"),
Type::String => src.push_str("string"),
Type::Id(id) => {
let ty = &resolve.types[*id];
Expand Down Expand Up @@ -1617,8 +1617,8 @@ impl InterfaceGenerator<'_> {
| Type::S32
| Type::U64
| Type::S64
| Type::Float32
| Type::Float64
| Type::F32
| Type::F64
| Type::Char => {}
}
}
Expand Down
Loading

0 comments on commit e5b72e4

Please sign in to comment.