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

wasm-encoder

Package Overview
Dependencies
Maintainers
0
Versions
120
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wasm-encoder - cargo Package Compare versions

Comparing version
0.240.0
to
0.241.2
+1
-1
.cargo_vcs_info.json
{
"git": {
"sha1": "dafe42f8f543ca76429d5ef7b5e84f41ae8e73fe"
"sha1": "a1712da0354bea5a38275d7ddf30f707b5757a68"
},
"path_in_vcs": "crates/wasm-encoder"
}

@@ -155,3 +155,3 @@ # This file is automatically @generated by Cargo.

name = "wasm-encoder"
version = "0.240.0"
version = "0.241.2"
dependencies = [

@@ -167,5 +167,5 @@ "anyhow",

name = "wasmparser"
version = "0.240.0"
version = "0.241.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b722dcf61e0ea47440b53ff83ccb5df8efec57a69d150e4f24882e4eba7e24a4"
checksum = "46d90019b1afd4b808c263e428de644f3003691f243387d30d673211ee0cb8e8"
dependencies = [

@@ -179,5 +179,5 @@ "bitflags",

name = "wasmprinter"
version = "0.240.0"
version = "0.241.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a84d6e25c198da67d0150ee7c2c62d33d784f0a565d1e670bdf1eeccca8158bc"
checksum = "68832d23d180e4b8774103c2992b48a1b4d1b62474fd5807efa2e38c7914c4e2"
dependencies = [

@@ -184,0 +184,0 @@ "anyhow",

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

name = "wasm-encoder"
version = "0.240.0"
version = "0.241.2"
authors = ["Nick Fitzgerald <fitzgen@gmail.com>"]

@@ -54,3 +54,3 @@ build = "build.rs"

[dependencies.wasmparser]
version = "0.240.0"
version = "0.241.2"
features = [

@@ -70,3 +70,3 @@ "simd",

[dev-dependencies.wasmprinter]
version = "0.240.0"
version = "0.241.2"
default-features = false

@@ -73,0 +73,0 @@

@@ -710,3 +710,3 @@ use crate::component::*;

/// Declares a new `thread.new_indirect` intrinsic.
/// Declares a new `thread.new-indirect` intrinsic.
pub fn thread_new_indirect(&mut self, func_ty_idx: u32, table_index: u32) -> u32 {

@@ -713,0 +713,0 @@ self.canonical_functions()

@@ -525,3 +525,3 @@ use crate::{ComponentSection, ComponentSectionId, ComponentValType, Encode, encode_section};

/// Declare a new `thread.new_indirect` intrinsic, used to create a new
/// Declare a new `thread.new-indirect` intrinsic, used to create a new
/// thread by invoking a function indirectly through a `funcref` table.

@@ -528,0 +528,0 @@ pub fn thread_new_indirect(&mut self, ty_index: u32, table_index: u32) -> &mut Self {

@@ -356,2 +356,3 @@ use super::CORE_TYPE_SORT;

pub struct ComponentFuncTypeEncoder<'a> {
async_encoded: bool,
params_encoded: bool,

@@ -364,4 +365,4 @@ results_encoded: bool,

fn new(sink: &'a mut Vec<u8>) -> Self {
sink.push(0x40);
Self {
async_encoded: false,
params_encoded: false,

@@ -373,2 +374,24 @@ results_encoded: false,

/// Indicates whether this is an `async` function or not.
///
/// If this function is not invoked then the function type will not be
/// `async`.
///
/// # Panics
///
/// This method will panic if parameters or results have already been
/// encoded.
pub fn async_(&mut self, is_async: bool) -> &mut Self {
assert!(!self.params_encoded);
assert!(!self.results_encoded);
assert!(!self.async_encoded);
self.async_encoded = true;
if is_async {
self.sink.push(0x43);
} else {
self.sink.push(0x40);
}
self
}
/// Defines named parameters.

@@ -389,2 +412,5 @@ ///

assert!(!self.params_encoded);
if !self.async_encoded {
self.async_(false);
}
self.params_encoded = true;

@@ -409,2 +435,3 @@ let params = params.into_iter();

pub fn result(&mut self, ty: Option<ComponentValType>) -> &mut Self {
assert!(self.async_encoded);
assert!(self.params_encoded);

@@ -411,0 +438,0 @@ assert!(!self.results_encoded);

@@ -734,2 +734,3 @@ use crate::reencode::{Error, Reencode, RoundtripReencoder};

) -> Result<(), Error<T::Error>> {
func.async_(ty.async_);
func.params(

@@ -736,0 +737,0 @@ Vec::from(ty.params)