diff --git a/neurons/Cargo.lock b/neurons/Cargo.lock index 1cf8613..9549f35 100644 --- a/neurons/Cargo.lock +++ b/neurons/Cargo.lock @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "anyhow" @@ -50,6 +50,16 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" +[[package]] +name = "js-sys" +version = "0.3.77" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" +dependencies = [ + "once_cell", + "wasm-bindgen", +] + [[package]] name = "libc" version = "0.2.171" @@ -79,6 +89,7 @@ dependencies = [ "serde_repr", "uuid", "wasm-bindgen", + "web-sys", ] [[package]] @@ -259,6 +270,16 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "web-sys" +version = "0.3.77" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + [[package]] name = "wit-bindgen-rt" version = "0.39.0" diff --git a/neurons/Cargo.toml b/neurons/Cargo.toml index 800a892..01026ce 100644 --- a/neurons/Cargo.toml +++ b/neurons/Cargo.toml @@ -13,6 +13,7 @@ serde = { version = "1.0.197", features = ["derive"] } serde_json = "1.0.114" serde_repr = "0.1.18" wasm-bindgen = "0.2" +web-sys = { version = "0.3.77", features = ["console"] } [dev-dependencies] uuid = { version = "1.16.0", features = ["v4"] } diff --git a/neurons/rustfmt.toml b/neurons/rustfmt.toml index 5be1fdb..9aef6d8 100644 --- a/neurons/rustfmt.toml +++ b/neurons/rustfmt.toml @@ -1,3 +1,3 @@ -max_width = 100 +max_width = 120 fn_call_width = 100 chain_width = 100 diff --git a/neurons/src/assigned_reputation.rs b/neurons/src/assigned_reputation.rs index 4cd11fb..ab16337 100644 --- a/neurons/src/assigned_reputation.rs +++ b/neurons/src/assigned_reputation.rs @@ -119,28 +119,17 @@ mod tests { #[test] fn neuron_run() { - let users: Vec = vec![ - "user1".to_string(), - "user2".to_string(), - "user3".to_string(), - ]; + let users: Vec = vec!["user1".to_string(), "user2".to_string(), "user3".to_string()]; let mut users_reputation: HashMap = HashMap::new(); users_reputation.insert("user1".to_string(), ReputationTier::Navigator); users_reputation.insert("user2".to_string(), ReputationTier::Pilot); users_reputation.insert("user3".to_string(), ReputationTier::Verified); let mut users_discord_roles: HashMap> = HashMap::new(); - users_discord_roles.insert( - "user1".to_string(), - vec![ - "SDF".to_string(), - "SCF Project".to_string(), - "Moderator".to_string(), - ], - ); - users_discord_roles.insert("user2".to_string(), vec![]); users_discord_roles - .insert("user3".to_string(), vec!["Public Good Contributor".to_string()]); + .insert("user1".to_string(), vec!["SDF".to_string(), "SCF Project".to_string(), "Moderator".to_string()]); + users_discord_roles.insert("user2".to_string(), vec![]); + users_discord_roles.insert("user3".to_string(), vec!["Public Good Contributor".to_string()]); let neuron = AssignedReputationNeuron::from_data(users_reputation, users_discord_roles); let resut = neuron.calculate_result(&users); diff --git a/neurons/src/lib.rs b/neurons/src/lib.rs index a6ee65b..ca24044 100644 --- a/neurons/src/lib.rs +++ b/neurons/src/lib.rs @@ -30,62 +30,41 @@ pub fn run_neurons( Ok(users_base) => users_base, Err(err) => return Err(format!("users_base json parsing error {}", err.to_string())), }; - let previous_rounds_for_users: HashMap> = - match serde_json::from_str(previous_rounds_for_users) { - Ok(previous_rounds_for_users) => previous_rounds_for_users, - Err(err) => { - return Err(format!( - "previous_rounds_for_users json parsing error {}", - err.to_string() - )) - } - }; - let users_reputation: HashMap = - match serde_json::from_str(users_reputation) { - Ok(users_reputation) => users_reputation, - Err(err) => { - return Err(format!("users_reputation json parsing error {}", err.to_string())) - } - }; - let users_discord_roles: HashMap> = - match serde_json::from_str(users_discord_roles) { - Ok(users_discord_roles) => users_discord_roles, - Err(err) => { - return Err(format!("users_discord_roles json parsing error {}", err.to_string())) - } - }; + let previous_rounds_for_users: HashMap> = match serde_json::from_str(previous_rounds_for_users) { + Ok(previous_rounds_for_users) => previous_rounds_for_users, + Err(err) => return Err(format!("previous_rounds_for_users json parsing error {}", err.to_string())), + }; + let users_reputation: HashMap = match serde_json::from_str(users_reputation) { + Ok(users_reputation) => users_reputation, + Err(err) => return Err(format!("users_reputation json parsing error {}", err.to_string())), + }; + let users_discord_roles: HashMap> = match serde_json::from_str(users_discord_roles) { + Ok(users_discord_roles) => users_discord_roles, + Err(err) => return Err(format!("users_discord_roles json parsing error {}", err.to_string())), + }; println!("users_discord_roles: {:?}", users_discord_roles); let trusted_for_user_per_round: HashMap>> = match serde_json::from_str(trusted_for_user_per_round) { Ok(trusted_for_user_per_round) => trusted_for_user_per_round, - Err(err) => { - return Err(format!( - "trusted_for_user_per_round json parsing error {}", - err.to_string() - )) - } + Err(err) => return Err(format!("trusted_for_user_per_round json parsing error {}", err.to_string())), }; // create neurons - let prior_voting_history_neuron = - PriorVotingHistoryNeuron::from_data(previous_rounds_for_users); + let prior_voting_history_neuron = PriorVotingHistoryNeuron::from_data(previous_rounds_for_users); - let assigned_reputation_neuron = - AssignedReputationNeuron::from_data(users_reputation, users_discord_roles); + let assigned_reputation_neuron = AssignedReputationNeuron::from_data(users_reputation, users_discord_roles); // prepare and run trust neurons for previous rounds let mut trust_graph_neurons: Vec> = vec![]; trusted_for_user_per_round.iter().for_each(|(round, trusted_for_user)| { if *round == current_round || *round == current_round - 1 { - trust_graph_neurons - .push(Box::new(TrustGraphNeuron::from_data(trusted_for_user.clone(), *round))); + trust_graph_neurons.push(Box::new(TrustGraphNeuron::from_data(trusted_for_user.clone(), *round))); } }); let trust_graph_neurons_results: HashMap> = calculate_trust_neuron_results(&users_base, trust_graph_neurons); - let trust_history_neuron = - TrustHistoryNeuron::from_data(current_round as usize, trust_graph_neurons_results); + let trust_history_neuron = TrustHistoryNeuron::from_data(current_round as usize, trust_graph_neurons_results); // run all neurons let results = calculate_neuron_results( @@ -101,11 +80,7 @@ pub fn run_neurons( } #[wasm_bindgen] -pub fn run_votes_normalization( - votes: &str, - submissions: &str, - delegatees_for_user: &str, -) -> Result { +pub fn run_votes_normalization(votes: &str, submissions: &str, delegatees_for_user: &str) -> Result { let votes: HashMap> = match serde_json::from_str(votes) { Ok(votes) => votes, Err(err) => return Err(format!("votes json parsing error {}", err.to_string())), @@ -116,14 +91,10 @@ pub fn run_votes_normalization( Err(err) => return Err(format!("submissions json parsing error {}", err.to_string())), }; - let delegatees_for_user: HashMap = - match serde_json::from_str(delegatees_for_user) { - Ok(delegatees_for_user) => delegatees_for_user, - Err(err) => { - return Err(format!("delegatees_for_user json parsing error {}", err.to_string())) - } - }; - + let delegatees_for_user: HashMap = match serde_json::from_str(delegatees_for_user) { + Ok(delegatees_for_user) => delegatees_for_user, + Err(err) => return Err(format!("delegatees_for_user json parsing error {}", err.to_string())), + }; let normalized_votes = match normalize_votes(votes, &submissions, &delegatees_for_user) { Ok(normalized_votes) => normalized_votes, Err(err) => return Err(format!("error normalizing votes {}", err.to_string())), @@ -152,10 +123,8 @@ fn calculate_neuron_results( for neuron in neurons { println!("running {}", neuron.name()); let result = neuron.calculate_result(users); - let result: HashMap = result - .into_iter() - .map(|(key, value)| (key, to_fixed_point_decimal(value).to_string())) - .collect(); + let result: HashMap = + result.into_iter().map(|(key, value)| (key, to_fixed_point_decimal(value).to_string())).collect(); results.insert(neuron.name(), result); } results diff --git a/neurons/src/prior_voting_history.rs b/neurons/src/prior_voting_history.rs index b6e51e4..b6f5d08 100644 --- a/neurons/src/prior_voting_history.rs +++ b/neurons/src/prior_voting_history.rs @@ -11,22 +11,11 @@ pub struct PriorVotingHistoryNeuron { impl PriorVotingHistoryNeuron { pub fn from_data(users_round_history: HashMap>) -> Self { - Self { - users_round_history, - } + Self { users_round_history } } } -fn generalised_logistic_function( - a: f64, - k: f64, - c: f64, - q: f64, - b: f64, - nu: f64, - x_off: f64, - x: f64, -) -> f64 { +fn generalised_logistic_function(a: f64, k: f64, c: f64, q: f64, b: f64, nu: f64, x_off: f64, x: f64) -> f64 { a + (k - a) / (f64::powf(c + q * f64::exp(-b * (x - x_off)), 1.0 / nu)) } @@ -52,9 +41,7 @@ impl Neuron for PriorVotingHistoryNeuron { let mut result = HashMap::new(); for user in users { - let bonus = calculate_bonus( - &self.users_round_history.get(user).cloned().unwrap_or_else(Vec::new), - ); + let bonus = calculate_bonus(&self.users_round_history.get(user).cloned().unwrap_or_else(Vec::new)); result.insert(user.into(), bonus); } diff --git a/neurons/src/quorum.rs b/neurons/src/quorum.rs index 7bf9a79..170c35c 100644 --- a/neurons/src/quorum.rs +++ b/neurons/src/quorum.rs @@ -2,10 +2,12 @@ use crate::{types::SubmissionCategory, Submission, Vote}; use anyhow::{anyhow, bail, Result}; use serde::{Deserialize, Serialize}; use std::collections::HashMap; +// use wasm_bindgen::JsValue; +// use web_sys::{self, console}; const QUORUM_SIZE: u32 = 5; -const QUORUM_ABSOLUTE_PARTICIPATION_THRESHOLD: f64 = 1.0 / 2.0; -const QUORUM_RELATIVE_PARTICIPATION_THRESHOLD: f64 = 2.0 / 3.0; +const QUORUM_ABSOLUTE_PARTICIPATION_THRESHOLD: f64 = 1.0 / 4.0; +const QUORUM_RELATIVE_PARTICIPATION_THRESHOLD: f64 = 1.0 / 3.0; #[non_exhaustive] #[derive(Deserialize, Serialize, Debug, Clone, PartialEq)] @@ -33,12 +35,50 @@ impl DelegateesForUser { } } +// struct DelegatesStats { +// submission: String, +// delegatee_votes_yes: i32, +// delegatee_votes_no: i32, +// absolute_fail: i32, +// relative_fail: i32, +// pass: i32, +// } +// impl DelegatesStats { +// pub fn show(&self) { +// console::log_1(&JsValue::from_str(&format!( +// "{},{},{},{},{},{}", +// self.submission, +// self.delegatee_votes_yes, +// self.delegatee_votes_no, +// self.absolute_fail, +// self.relative_fail, +// self.pass, +// ))); +// } +// } +// impl Default for DelegatesStats { +// fn default() -> Self { +// Self { +// submission: "".to_string(), +// delegatee_votes_yes: 0, +// delegatee_votes_no: 0, +// absolute_fail: 0, +// relative_fail: 0, +// pass: 0, +// } +// } +// } + #[allow(clippy::implicit_hasher, clippy::missing_panics_doc)] pub fn normalize_votes( votes: HashMap>, submissions: &[Submission], delegatees_for_user: &HashMap, ) -> Result>> { + // console::log_1(&JsValue::from_str(&format!( + // "submission,delegatee_votes_yes,delegatee_votes_no,absolute_fail,relative_fail,pass", + // ))); + votes .into_iter() .map(|(submission_name, submission_votes)| { @@ -46,8 +86,7 @@ pub fn normalize_votes( .iter() .find(|sub| sub.name == submission_name) .expect(&format!("Missing details for submission: {}", submission_name)); - let submission_votes = - normalize_votes_for_submission(submission, &submission_votes, delegatees_for_user)?; + let submission_votes = normalize_votes_for_submission(submission, &submission_votes, delegatees_for_user)?; Ok((submission_name, submission_votes)) }) .collect::>() @@ -60,9 +99,7 @@ fn delegatees_for_category<'a>( match submission_category { SubmissionCategory::Applications => &delegatees_for_user.applications, SubmissionCategory::FinancialProtocols => &delegatees_for_user.financial_protocols, - SubmissionCategory::InfrastructureAndServices => { - &delegatees_for_user.infrastructure_and_services - } + SubmissionCategory::InfrastructureAndServices => &delegatees_for_user.infrastructure_and_services, SubmissionCategory::DeveloperTooling => &delegatees_for_user.developer_tooling, } } @@ -72,27 +109,35 @@ fn normalize_votes_for_submission( submission_votes: &HashMap, delegatees_for_user: &HashMap, ) -> Result> { - submission_votes + // let mut stats: DelegatesStats = DelegatesStats::default(); + // stats.submission = submission.name.clone(); + let r = submission_votes .clone() .into_iter() .map(|(user, vote)| { if vote == Vote::Delegate { - let delegatees = delegatees_for_user - .get(&user) - .ok_or_else(|| anyhow!("Delegatees missing for user {user}"))?; + let delegatees = + delegatees_for_user.get(&user).ok_or_else(|| anyhow!("Delegatees missing for user {user}"))?; let delegatees = delegatees_for_category(&submission.category, delegatees); - let normalized_vote = calculate_quorum_consensus(delegatees, submission_votes)?; + let normalized_vote = calculate_quorum_consensus( + delegatees, + submission_votes, + // &mut stats + )?; Ok((user, normalized_vote)) } else { Ok((user, vote)) } }) - .collect::>() + .collect::>(); + // stats.show(); + return r; } fn calculate_quorum_consensus( delegatees: &[String], submission_votes: &HashMap, + // stats: &mut DelegatesStats, ) -> Result { let valid_delegates: Vec<&String> = delegatees .iter() @@ -110,6 +155,9 @@ fn calculate_quorum_consensus( let mut quorum_size = 0; let mut agreement: i32 = 0; + // let mut y: i32 = 0; + // let mut n: i32 = 0; + for &delegatee in selected_delegatees { let delegatee_vote = submission_votes.get(delegatee).unwrap_or(&Vote::Abstain); @@ -119,33 +167,45 @@ fn calculate_quorum_consensus( quorum_size += 1; match delegatee_vote { - Vote::Yes => agreement += 1, - Vote::No => agreement -= 1, + Vote::Yes => { + agreement += 1; + // stats.delegatee_votes_yes += 1; + // y += 1; + } + Vote::No => { + agreement -= 1; + // stats.delegatee_votes_no += 1; + // n += 1; + } Vote::Abstain => {} Vote::Delegate => { bail!("Invalid delegatee operation"); } }; } - let absolute_agreement: f64 = f64::from(agreement) / f64::from(QUORUM_SIZE); let relative_agreement: f64 = if quorum_size > 0 { f64::from(agreement) / f64::from(quorum_size) } else { 0.0 }; - Ok(if absolute_agreement.abs() > QUORUM_ABSOLUTE_PARTICIPATION_THRESHOLD { if relative_agreement.abs() > QUORUM_RELATIVE_PARTICIPATION_THRESHOLD { + // stats.pass += 1; + // console::log_1(&JsValue::from_str(&format!("PASSED: yes {}, no {}", y, n))); if relative_agreement > 0.0 { Vote::Yes } else { Vote::No } } else { + // console::log_1(&JsValue::from_str(&format!("FAIL: yes {}, no {}", y, n))); + // stats.relative_fail += 1; Vote::Abstain } } else { + // console::log_1(&JsValue::from_str(&format!("FAIL: yes {}, no {}", y, n))); + // stats.absolute_fail += 1; Vote::Abstain }) } @@ -380,10 +440,8 @@ mod tests { submission_votes.insert(user2.clone(), Vote::Yes); submission_votes.insert(user3.clone(), Vote::Yes); - delegates_for_user.insert( - user1.clone(), - DelegateesForUser::new(vec![user2.clone(), user3.clone()], vec![], vec![], vec![]), - ); + delegates_for_user + .insert(user1.clone(), DelegateesForUser::new(vec![user2.clone(), user3.clone()], vec![], vec![], vec![])); let normalized_votes = normalize_votes_for_submission( &Submission::new("sub1".to_string(), SubmissionCategory::Applications), @@ -419,10 +477,8 @@ mod tests { submission_votes.insert(user5.clone(), Vote::Yes); submission_votes.insert(user6.clone(), Vote::No); - delegates_for_user.insert( - user1.clone(), - DelegateesForUser::new(vec![user2.clone(), user3.clone()], vec![], vec![], vec![]), - ); + delegates_for_user + .insert(user1.clone(), DelegateesForUser::new(vec![user2.clone(), user3.clone()], vec![], vec![], vec![])); let normalized_votes = normalize_votes_for_submission( &Submission::new("sub1".to_string(), SubmissionCategory::Applications), diff --git a/neurons/src/trust_graph.rs b/neurons/src/trust_graph.rs index 82fb398..b650a29 100644 --- a/neurons/src/trust_graph.rs +++ b/neurons/src/trust_graph.rs @@ -149,8 +149,7 @@ fn calculate_high_trust_value(trust_map: &HashMap, percent_threshol let mut trust_scores_sorted: Vec = trust_map.values().cloned().collect(); trust_scores_sorted.sort_by(|a, b| a.partial_cmp(b).unwrap()); - let target_index = - trust_scores_sorted.len() - ((trust_scores_sorted.len() * percent_threshold) / 100).max(1); + let target_index = trust_scores_sorted.len() - ((trust_scores_sorted.len() * percent_threshold) / 100).max(1); trust_scores_sorted.get(target_index).unwrap().to_owned() } @@ -196,10 +195,7 @@ mod tests { }; let result = trust_graph_neuron.handle_page_rank( - &["A", "B", "C", "D", "E"] - .into_iter() - .map(std::string::ToString::to_string) - .collect::>(), + &["A", "B", "C", "D", "E"].into_iter().map(std::string::ToString::to_string).collect::>(), ); let with_bonus = trust_graph_neuron.handle_highly_trusted_bonus(result, 1, 100.0); @@ -223,10 +219,7 @@ mod tests { }; let result = trust_graph_neuron.handle_page_rank( - &["A", "B", "C", "D", "E"] - .into_iter() - .map(std::string::ToString::to_string) - .collect::>(), + &["A", "B", "C", "D", "E"].into_iter().map(std::string::ToString::to_string).collect::>(), ); assert_f64_near!(result.get("A").unwrap(), &1.0); diff --git a/neurons/src/trust_history.rs b/neurons/src/trust_history.rs index f47d0c5..fc2434e 100644 --- a/neurons/src/trust_history.rs +++ b/neurons/src/trust_history.rs @@ -8,10 +8,7 @@ pub struct TrustHistoryNeuron { } impl TrustHistoryNeuron { - pub fn from_data( - round: usize, - trust_graph_neurons_results: HashMap>, - ) -> Self { + pub fn from_data(round: usize, trust_graph_neurons_results: HashMap>) -> Self { Self { round, trust_graph_neurons_results, @@ -19,16 +16,7 @@ impl TrustHistoryNeuron { } } -fn generalised_logistic_function( - a: f64, - k: f64, - c: f64, - q: f64, - b: f64, - nu: f64, - x_off: f64, - x: f64, -) -> f64 { +fn generalised_logistic_function(a: f64, k: f64, c: f64, q: f64, b: f64, nu: f64, x_off: f64, x: f64) -> f64 { a + (k - a) / (f64::powf(c + q * f64::exp(-b * (x - x_off)), 1.0 / nu)) } @@ -41,11 +29,8 @@ impl Neuron for TrustHistoryNeuron { let mut users_trust_history: HashMap> = HashMap::new(); for i in self.round - 1..=self.round { - let user_trust: HashMap = self - .trust_graph_neurons_results - .get(&format!("trust_graph_neuron_{}", i)) - .unwrap() - .clone(); + let user_trust: HashMap = + self.trust_graph_neurons_results.get(&format!("trust_graph_neuron_{}", i)).unwrap().clone(); user_trust.iter().for_each(|(user, trust)| match users_trust_history.get_mut(user) { Some(trust_vec) => { @@ -72,16 +57,7 @@ impl Neuron for TrustHistoryNeuron { } else if diff_percent.is_infinite() { result.insert(user.into(), current_trust); } else { - let log_fn_out = generalised_logistic_function( - 30.0, - 100.0, - 1.0, - 1.0, - 0.2, - 3.0, - 70.0, - diff_percent, - ); + let log_fn_out = generalised_logistic_function(30.0, 100.0, 1.0, 1.0, 0.2, 3.0, 70.0, diff_percent); let outcome = (log_fn_out * current_trust) / 100.0; result.insert(user.into(), outcome); } diff --git a/offchain/Cargo.lock b/offchain/Cargo.lock index 0dd73a6..acd0aed 100644 --- a/offchain/Cargo.lock +++ b/offchain/Cargo.lock @@ -737,10 +737,11 @@ checksum = "7a73e9fe3c49d7afb2ace819fa181a287ce54a0983eda4e0eb05c22f82ffe534" [[package]] name = "js-sys" -version = "0.3.72" +version = "0.3.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9" +checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" dependencies = [ + "once_cell", "wasm-bindgen", ] @@ -810,6 +811,7 @@ dependencies = [ "serde_json", "serde_repr", "wasm-bindgen", + "web-sys", ] [[package]] @@ -1023,6 +1025,12 @@ dependencies = [ "semver", ] +[[package]] +name = "rustversion" +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" + [[package]] name = "ryu" version = "1.0.18" @@ -1744,24 +1752,24 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.95" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" +checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" dependencies = [ "cfg-if", "once_cell", + "rustversion", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.95" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" +checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" dependencies = [ "bumpalo", "log", - "once_cell", "proc-macro2", "quote", "syn 2.0.106", @@ -1770,9 +1778,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.95" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" +checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -1780,9 +1788,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.95" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" +checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", @@ -1793,9 +1801,12 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.95" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" +checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" +dependencies = [ + "unicode-ident", +] [[package]] name = "wasmi_arena" @@ -1834,6 +1845,16 @@ dependencies = [ "indexmap-nostd", ] +[[package]] +name = "web-sys" +version = "0.3.77" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + [[package]] name = "windows-core" version = "0.52.0"