You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

wit-bindgen-rust

Package Overview
Dependencies
Maintainers
0
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wit-bindgen-rust - cargo Package Compare versions

Comparing version
0.50.0
to
0.51.0
+1
-1
.cargo_vcs_info.json
{
"git": {
"sha1": "6f8b8e75254174353fc27c269827c4c239d51eff"
"sha1": "0c39eee9f23d0530ed81bdf68bdd91fcc09ae08f"
},
"path_in_vcs": "crates/rust"
}

@@ -75,5 +75,5 @@ # This file is automatically @generated by Cargo.

name = "clap"
version = "4.5.53"
version = "4.5.54"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c9e340e012a1bf4935f5282ed1436d1489548e8f72308207ea5df0e23d2d03f8"
checksum = "c6e6ff9dcd79cff5cd969a17a545d79e84ab086e444102a591e288a8aa3ce394"
dependencies = [

@@ -86,5 +86,5 @@ "clap_builder",

name = "clap_builder"
version = "4.5.53"
version = "4.5.54"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d76b5d13eaa18c901fd2f7fca939fefe3a0727a953561fefdf3b2922b8569d00"
checksum = "fa42cf4d2b7a41bc8f663a7cab4031ebafa1bf3875705bfaf8466dc60ab52c00"
dependencies = [

@@ -251,5 +251,5 @@ "anstream",

name = "indexmap"
version = "2.12.1"
version = "2.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0ad4bb2b565bca0645f4d68c5c9af97fba094e9791da685bf83cb5f3ce74acf2"
checksum = "7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017"
dependencies = [

@@ -270,5 +270,5 @@ "equivalent",

name = "itoa"
version = "1.0.15"
version = "1.0.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c"
checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2"

@@ -283,5 +283,5 @@ [[package]]

name = "log"
version = "0.4.28"
version = "0.4.29"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432"
checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897"

@@ -324,5 +324,5 @@ [[package]]

name = "proc-macro2"
version = "1.0.103"
version = "1.0.105"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5ee95bc4ef87b8d5ba32e8b7714ccc834865276eab0aed5c9958d00ec45f49e8"
checksum = "535d180e0ecab6268a3e718bb9fd44db66bbbc256257165fc699dadf70d16fe7"
dependencies = [

@@ -334,5 +334,5 @@ "unicode-ident",

name = "quote"
version = "1.0.42"
version = "1.0.43"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a338cc41d27e6cc6dce6cefc13a0729dfbb81c262b1f519331575dd80ef3067f"
checksum = "dc74d9a594b72ae6656596548f56f667211f8a97b3d4c3d467150794690dc40a"
dependencies = [

@@ -343,8 +343,2 @@ "proc-macro2",

[[package]]
name = "ryu"
version = "1.0.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f"
[[package]]
name = "semver"

@@ -387,11 +381,11 @@ version = "1.0.27"

name = "serde_json"
version = "1.0.145"
version = "1.0.149"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c"
checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86"
dependencies = [
"itoa",
"memchr",
"ryu",
"serde",
"serde_core",
"zmij",
]

@@ -413,5 +407,5 @@

name = "syn"
version = "2.0.111"
version = "2.0.114"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "390cc9a294ab71bdb1aa2e99d13be9c753cd2d7bd6560c77118597410c4d2e87"
checksum = "d4d107df263a3013ef9b1879b0df87d706ff80f65a86ea879bd9c31f9b307c2a"
dependencies = [

@@ -443,5 +437,5 @@ "proc-macro2",

name = "wasm-encoder"
version = "0.243.0"
version = "0.244.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c55db9c896d70bd9fa535ce83cd4e1f2ec3726b0edd2142079f594fc3be1cb35"
checksum = "990065f2fe63003fe337b932cfb5e3b80e0b4d0f5ff650e6985b1048f62c8319"
dependencies = [

@@ -454,5 +448,5 @@ "leb128fmt",

name = "wasm-metadata"
version = "0.243.0"
version = "0.244.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eae05bf9579f45a62e8d0a4e3f52eaa8da518883ac5afa482ec8256c329ecd56"
checksum = "bb0e353e6a2fbdc176932bbaab493762eb1255a7900fe0fea1a2f96c296cc909"
dependencies = [

@@ -467,5 +461,5 @@ "anyhow",

name = "wasmparser"
version = "0.243.0"
version = "0.244.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f6d8db401b0528ec316dfbe579e6ab4152d61739cfe076706d2009127970159d"
checksum = "47b807c72e1bac69382b3a6fb3dbe8ea4c0ed87ff5629b8685ae6b9a611028fe"
dependencies = [

@@ -495,5 +489,5 @@ "bitflags",

name = "wit-bindgen-core"
version = "0.50.0"
version = "0.51.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6ee98d5747ec63897e51101c8cafad569cc639346332c0378772ef4baeea8ed2"
checksum = "ea61de684c3ea68cb082b7a88508a8b27fcc8b797d738bfc99a82facf1d752dc"
dependencies = [

@@ -509,3 +503,3 @@ "anyhow",

name = "wit-bindgen-rust"
version = "0.50.0"
version = "0.51.0"
dependencies = [

@@ -529,5 +523,5 @@ "anyhow",

name = "wit-component"
version = "0.243.0"
version = "0.244.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "36f9fc53513e461ce51dcf17a3e331752cb829f1d187069e54af5608fc998fe4"
checksum = "9d66ea20e9553b30172b5e831994e35fbde2d165325bec84fc43dbf6f4eb9cb2"
dependencies = [

@@ -549,5 +543,5 @@ "anyhow",

name = "wit-parser"
version = "0.243.0"
version = "0.244.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "df983a8608e513d8997f435bb74207bf0933d0e49ca97aa9d8a6157164b9b7fc"
checksum = "ecc8ac4bc1dc3381b7f59c34f00b67e18f910c2c0f50015669dde7def656a736"
dependencies = [

@@ -565,1 +559,7 @@ "anyhow",

]
[[package]]
name = "zmij"
version = "1.0.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2fc5a66a20078bf1251bde995aa2fdcc4b800c70b5d92dd2c62abc5c60f679f8"

@@ -16,3 +16,3 @@ # THIS FILE IS AUTOMATICALLY GENERATED BY CARGO

name = "wit-bindgen-rust"
version = "0.50.0"
version = "0.51.0"
authors = ["Alex Crichton <alex@alexcrichton.com>"]

@@ -82,10 +82,10 @@ build = "build.rs"

[dependencies.wasm-metadata]
version = "0.243.0"
version = "0.244.0"
default-features = false
[dependencies.wit-bindgen-core]
version = "0.50.0"
version = "0.51.0"
[dependencies.wit-component]
version = "0.243.0"
version = "0.244.0"

@@ -100,1 +100,16 @@ [dev-dependencies.bytes]

version = "1"
[lints.clippy]
allow_attributes_without_reason = "warn"
clone_on_copy = "warn"
manual_strip = "warn"
map_clone = "warn"
uninlined_format_args = "warn"
unnecessary_cast = "warn"
unnecessary_fallible_conversions = "warn"
unnecessary_mut_passed = "warn"
unnecessary_to_owned = "warn"
[lints.clippy.all]
level = "allow"
priority = -1

@@ -76,3 +76,3 @@ use crate::{

let tmp = self.tmp();
let res = format!("result{}", tmp);
let res = format!("result{tmp}");
self.push_str("let ");

@@ -87,3 +87,3 @@ self.push_str(&res);

for i in 0..n {
let arg = format!("result{}_{}", tmp, i);
let arg = format!("result{tmp}_{i}");
self.push_str(&arg);

@@ -112,3 +112,3 @@ self.push_str(",");

let name = to_rust_ident(&field.name);
let arg = format!("{}{}", name, tmp);
let arg = format!("{name}{tmp}");
self.push_str(&name);

@@ -148,3 +148,3 @@ self.push_str(":");

for i in 0..tuple.types.len() {
let arg = format!("t{}_{}", tmp, i);
let arg = format!("t{tmp}_{i}");
self.push_str(&arg);

@@ -256,3 +256,3 @@ self.push_str(", ");

}
format!("ptr{}", tmp)
format!("ptr{tmp}")
}

@@ -284,3 +284,3 @@

Instruction::GetArg { nth } => results.push(self.params[*nth].clone()),
Instruction::I32Const { val } => results.push(format!("{}i32", val)),
Instruction::I32Const { val } => results.push(format!("{val}i32")),
Instruction::ConstZero { tys } => {

@@ -676,5 +676,5 @@ for ty in tys.iter() {

let tmp = self.tmp();
let val = format!("vec{}", tmp);
let ptr = format!("ptr{}", tmp);
let len = format!("len{}", tmp);
let val = format!("vec{tmp}");
let ptr = format!("ptr{tmp}");
let len = format!("len{tmp}");
let vec = self.r#gen.path_to_vec();

@@ -686,10 +686,9 @@ if realloc.is_none() {

self.push_str(&format!(
"let {} = <_ as Into<{vec}<_>>>::into({}).into_boxed_slice();\n",
val, op0
"let {val} = <_ as Into<{vec}<_>>>::into({op0}).into_boxed_slice();\n"
));
}
self.push_str(&format!("let {} = {}.as_ptr().cast::<u8>();\n", ptr, val));
self.push_str(&format!("let {} = {}.len();\n", len, val));
self.push_str(&format!("let {ptr} = {val}.as_ptr().cast::<u8>();\n"));
self.push_str(&format!("let {len} = {val}.len();\n"));
if realloc.is_some() {
self.push_str(&format!("::core::mem::forget({});\n", val));
self.push_str(&format!("::core::mem::forget({val});\n"));
}

@@ -702,3 +701,3 @@ results.push(format!("{ptr}.cast_mut()"));

let tmp = self.tmp();
let len = format!("len{}", tmp);
let len = format!("len{tmp}");
self.push_str(&format!("let {} = {};\n", len, operands[1]));

@@ -715,5 +714,5 @@ let vec = self.r#gen.path_to_vec();

let tmp = self.tmp();
let val = format!("vec{}", tmp);
let ptr = format!("ptr{}", tmp);
let len = format!("len{}", tmp);
let val = format!("vec{tmp}");
let ptr = format!("ptr{tmp}");
let len = format!("len{tmp}");
if realloc.is_none() {

@@ -723,8 +722,8 @@ self.push_str(&format!("let {} = {};\n", val, operands[0]));

let op0 = format!("{}.into_bytes()", operands[0]);
self.push_str(&format!("let {} = ({}).into_boxed_slice();\n", val, op0));
self.push_str(&format!("let {val} = ({op0}).into_boxed_slice();\n"));
}
self.push_str(&format!("let {} = {}.as_ptr().cast::<u8>();\n", ptr, val));
self.push_str(&format!("let {} = {}.len();\n", len, val));
self.push_str(&format!("let {ptr} = {val}.as_ptr().cast::<u8>();\n"));
self.push_str(&format!("let {len} = {val}.len();\n"));
if realloc.is_some() {
self.push_str(&format!("::core::mem::forget({});\n", val));
self.push_str(&format!("::core::mem::forget({val});\n"));
}

@@ -738,3 +737,3 @@ results.push(format!("{ptr}.cast_mut()"));

let tmp = self.tmp();
let len = format!("len{}", tmp);
let len = format!("len{tmp}");
uwriteln!(self.src, "let {len} = {};", operands[1]);

@@ -960,3 +959,3 @@ uwriteln!(

let tmp = self.tmp();
let result = format!("result{}", tmp);
let result = format!("result{tmp}");
uwriteln!(self.src, "let {result} = {};", operands[i]);

@@ -963,0 +962,0 @@ results.push(result);

@@ -1705,16 +1705,16 @@ use crate::interface::InterfaceGenerator;

Bitcast::None => operand.to_owned(),
Bitcast::I32ToI64 => format!("i64::from({})", operand),
Bitcast::F32ToI32 => format!("({}).to_bits() as i32", operand),
Bitcast::F64ToI64 => format!("({}).to_bits() as i64", operand),
Bitcast::I64ToI32 => format!("{} as i32", operand),
Bitcast::I32ToF32 => format!("f32::from_bits({} as u32)", operand),
Bitcast::I64ToF64 => format!("f64::from_bits({} as u64)", operand),
Bitcast::F32ToI64 => format!("i64::from(({}).to_bits())", operand),
Bitcast::I64ToF32 => format!("f32::from_bits({} as u32)", operand),
Bitcast::I32ToI64 => format!("i64::from({operand})"),
Bitcast::F32ToI32 => format!("({operand}).to_bits() as i32"),
Bitcast::F64ToI64 => format!("({operand}).to_bits() as i64"),
Bitcast::I64ToI32 => format!("{operand} as i32"),
Bitcast::I32ToF32 => format!("f32::from_bits({operand} as u32)"),
Bitcast::I64ToF64 => format!("f64::from_bits({operand} as u64)"),
Bitcast::F32ToI64 => format!("i64::from(({operand}).to_bits())"),
Bitcast::I64ToF32 => format!("f32::from_bits({operand} as u32)"),
// Convert an `i64` into a `MaybeUninit<u64>`.
Bitcast::I64ToP64 => format!("::core::mem::MaybeUninit::new({} as u64)", operand),
Bitcast::I64ToP64 => format!("::core::mem::MaybeUninit::new({operand} as u64)"),
// Convert a `MaybeUninit<u64>` holding an `i64` value back into
// the `i64` value.
Bitcast::P64ToI64 => format!("{}.assume_init() as i64", operand),
Bitcast::P64ToI64 => format!("{operand}.assume_init() as i64"),

@@ -1726,6 +1726,5 @@ // Convert a pointer value into a `MaybeUninit<u64>`.

let mut t = ::core::mem::MaybeUninit::<u64>::uninit();
t.as_mut_ptr().cast::<*mut u8>().write({});
t.as_mut_ptr().cast::<*mut u8>().write({operand});
t
}}",
operand
}}"
)

@@ -1736,19 +1735,19 @@ }

Bitcast::P64ToP => {
format!("{}.as_ptr().cast::<*mut u8>().read()", operand)
format!("{operand}.as_ptr().cast::<*mut u8>().read()")
}
// Convert an `i32` or a `usize` into a pointer.
Bitcast::I32ToP | Bitcast::LToP => {
format!("{} as *mut u8", operand)
format!("{operand} as *mut u8")
}
// Convert a pointer or length holding an `i32` value back into the `i32`.
Bitcast::PToI32 | Bitcast::LToI32 => {
format!("{} as i32", operand)
format!("{operand} as i32")
}
// Convert an `i32`, `i64`, or pointer holding a `usize` value back into the `usize`.
Bitcast::I32ToL | Bitcast::I64ToL | Bitcast::PToL => {
format!("{} as usize", operand)
format!("{operand} as usize")
}
// Convert a `usize` into an `i64`.
Bitcast::LToI64 => {
format!("{} as i64", operand)
format!("{operand} as i64")
}

@@ -1755,0 +1754,0 @@ Bitcast::Sequence(sequence) => {

@@ -1,5 +0,9 @@

#![allow(unused_macros)]
#![allow(dead_code, unused_variables)]
#![allow(unused_macros, reason = "testing codegen, not functionality")]
#![allow(
dead_code,
unused_variables,
reason = "testing codegen, not functionality"
)]
#[allow(unused)]
#[allow(unused, reason = "testing codegen, not functionality")]
mod multiple_paths {

@@ -20,3 +24,3 @@ wit_bindgen::generate!({

#[allow(unused)]
#[allow(unused, reason = "testing codegen, not functionality")]
mod inline_and_path {

@@ -36,3 +40,3 @@ wit_bindgen::generate!({

#[allow(unused)]
#[allow(unused, reason = "testing codegen, not functionality")]
mod newtyped_list {

@@ -143,3 +147,3 @@ use std::ops::Deref;

}
#[allow(unused)]
#[allow(unused, reason = "testing codegen, not functionality")]
mod retyped_list {

@@ -146,0 +150,0 @@ use std::ops::Deref;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display