New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

wit-bindgen-core

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-core - cargo Package Compare versions

Comparing version
0.53.1
to
0.54.0
+1
-1
.cargo_vcs_info.json
{
"git": {
"sha1": "d61d3708fe4a90ab811b94e1fd608f2f05fa2513"
"sha1": "b858f8e0bfacf371dee1bbf7097b3022339feb93"
},
"path_in_vcs": "crates/core"
}

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

name = "wit-bindgen-core"
version = "0.53.1"
version = "0.54.0"
dependencies = [

@@ -321,0 +321,0 @@ "anyhow",

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

name = "wit-bindgen-core"
version = "0.53.1"
version = "0.54.0"
authors = ["Alex Crichton <alex@alexcrichton.com>"]

@@ -19,0 +19,0 @@ build = false

@@ -168,2 +168,3 @@ use std::fmt::Write;

fn type_list(&mut self, id: TypeId, name: &str, ty: &Type, docs: &Docs);
fn type_fixed_length_list(&mut self, id: TypeId, name: &str, ty: &Type, size: u32, docs: &Docs);
fn type_builtin(&mut self, id: TypeId, name: &str, ty: &Type, docs: &Docs);

@@ -203,3 +204,5 @@ fn type_future(&mut self, id: TypeId, name: &str, ty: &Option<Type>, docs: &Docs);

TypeDefKind::Handle(_) => panic!("handle types do not require definition"),
TypeDefKind::FixedLengthList(..) => todo!(),
TypeDefKind::FixedLengthList(t, size) => {
generator.type_fixed_length_list(id, name, t, *size, &ty.docs)
}
TypeDefKind::Map(..) => todo!(),

@@ -206,0 +209,0 @@ TypeDefKind::Unknown => unreachable!(),

@@ -98,4 +98,3 @@ use std::collections::HashMap;

/// Populates the return value of [`Types::get_representative_type`] with
/// the `resolve` passed in.
/// Identify all the structurally equal types reachable from the `world_id`.
///

@@ -113,5 +112,8 @@ /// The `may_alias_another_type` closure is used to determine whether the

resolve: &Resolve,
world_id: WorldId,
may_alias_another_type: &dyn Fn(TypeId) -> bool,
) {
for (i, (ty, _)) in resolve.types.iter().enumerate() {
let mut live_types = wit_parser::LiveTypes::default();
live_types.add_world(resolve, world_id);
for (i, ty) in live_types.iter().enumerate() {
if !may_alias_another_type(ty) {

@@ -121,3 +123,3 @@ continue;

// TODO: we could define a hash function for TypeDefKind to prevent the inner loop.
for (earlier, _) in resolve.types.iter().take(i) {
for earlier in live_types.iter().take(i) {
if self.equal_types.find(ty) == self.equal_types.find(earlier) {

@@ -127,3 +129,3 @@ continue;

// The correctness of is_structurally_equal relies on the fact
// that resolve.types.iter() is in topological order.
// that live_types.iter() is in topological order.
if self.is_structurally_equal(resolve, ty, earlier) {

@@ -130,0 +132,0 @@ self.equal_types.union(ty, earlier);