Benign crates 7,982,007 installs Download

wasmtime-wit-bindgen 25.0.1

“Internal `*.wit` support for the `wasmtime` crate's macros”

Contains an unbounded block loopConstructs a Rust child-process command
SHA-256eb1596caa67b31ac675fd3da61685c4260f8b10832021db42c85d227b7ba8133

Evidence

imports std::process::Command lib.rs · lines 1–19
1use crate::rust::{to_rust_ident, to_rust_upper_camel_case, RustGenerator, TypeMode};
2use crate::types::{TypeInfo, Types};
3use anyhow::bail;
4use heck::*;
5use indexmap::{IndexMap, IndexSet};
6use std::collections::{BTreeMap, BTreeSet, HashMap, HashSet};
7use std::fmt::Write as _;
8use std::io::{Read, Write};
9use std::mem;
10use std::process::{Command, Stdio};
11use wit_parser::*;
12
13macro_rules! uwrite {
⋯6 lines
Rust invokes the rustfmt source formatter lib.rs · lines 1074–1080
1074:44… rc);
1075 if self.opts.rustfmt {
1076 let mut child = Command::new("rustfmt")
1077 .arg("--edition=2018")
1078 .stdin(Stdio::piped())
1079 .stdout(Stdio::piped())
1080 …
References a write-all buffer helper lib.rs · lines 1084–1090
1084:4… .take()
1085 .unwrap()
1086 .write_all(src.as_bytes())
1087 .unwrap();
1088 src.as_mut_string().truncate(0);
1089 child
1090 .stdou …
Contains an unbounded block loop lib.rs · lines 1225–1230
1225:4… let mut projection = Vec::new();
1226 let mut ret = Vec::new();
1227 loop {
1228 let lookup = name.lookup_key(resolve);
1229 ret.push((lookup, projection.clone()));
1230 if !name.pop(resolve, &m …
imports super::Source source.rs · lines 75–93
⋯4 lines
79}
80
81#[cfg(test)]
82mod tests {
83 use super::Source;
84
85 #[test]
86 fn simple_append() {
87 let mut s = Source::default();
88 s.push_str("x");
89 assert_eq!(s.s, "x");
90 s.push_str("y");
91 assert_eq!(s.s, "xy");
92 s.push_str("z ");
93 …

No evidence locations were recorded for this file. Raw result

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.