| /wasmtime-44.0.1/crates/cache/src/ |
| H A D | worker.rs | 179 path: PathBuf, 184 path: PathBuf, 317 path in handle_on_cache_get() 324 path in handle_on_cache_get() 331 path in handle_on_cache_get() 519 } => (fs::remove_file(path), path, "file"), in handle_on_cache_update() 521 (fs::remove_dir_all(path), path, "directory") in handle_on_cache_update() 555 path: $path.to_path_buf(), in list_cache_contents() 601 let path = entry.path(); in list_cache_contents() localVariable 815 let path = entry.path(); in acquire_task_fs_lock() localVariable [all …]
|
| /wasmtime-44.0.1/tests/all/ |
| H A D | intrinsics.rs | 20 let path = Path::new(&path); in native_loads_and_stores() localVariable 167 let path = Path::new(&path); in ref_func_of_intrinsic() localVariable 228 let path = Path::new(&path); in table_element_segment_with_intrinsic() localVariable 288 let path = Path::new(&path); in intrinsics_not_listed_in_imports() localVariable 320 let path = Path::new(&path); in unknown_intrinsic_function() localVariable 353 let path = Path::new(&path); in bad_extra_param() localVariable 389 let path = Path::new(&path); in bad_missing_param() localVariable 425 let path = Path::new(&path); in bad_missing_return() localVariable 461 let path = Path::new(&path); in bad_extra_return() localVariable 497 let path = Path::new(&path); in bad_param_type() localVariable [all …]
|
| /wasmtime-44.0.1/tests/ |
| H A D | wasi.rs | 11 use std::path::Path; 115 for entry in path.read_dir()? { in find_tests() 117 let path = entry.path(); in find_tests() localVariable 130 let path = path.clone(); in find_tests() localVariable 165 let path = if componentize { in run_test() localVariable 183 path.to_path_buf() in run_test() 214 cmd.arg(path); in run_test() 259 for entry in path.read_dir()? { in cp_r() 261 let path = entry.path(); in cp_r() localVariable 264 cp_r(&path, &dst)?; in cp_r() [all …]
|
| H A D | disas.rs | 49 use std::path::{Path, PathBuf}; 96 for file in path in find_tests() 101 let path = file.path(); in find_tests() localVariable 103 find_tests(&path, dst)?; in find_tests() 105 dst.push(path); in find_tests() 112 let mut test = Test::new(path)?; in run_test() 148 path: PathBuf, field 185 path: path.to_path_buf(), in new() 231 self.path.display() in compile() 245 .path() in compile() [all …]
|
| /wasmtime-44.0.1/crates/component-macro/tests/ |
| H A D | expanded.rs | 1 use std::path::Path; 6 ($id:ident $name:tt $path:tt) => { 7 process_expanded($path, "", wasmtime::component::bindgen!({ 8 path: $path, 12 process_expanded($path, "_async", wasmtime::component::bindgen!({ 13 path: $path, 19 process_expanded($path, "_concurrent", wasmtime::component::bindgen!({ 20 path: $path, 27 path: $path, 35 fn process_expanded(path: &str, suffix: &str, src: &str) -> Result<()> { in process_expanded() [all …]
|
| /wasmtime-44.0.1/cranelift/src/ |
| H A D | interpret.rs | 9 use std::path::PathBuf; 35 println!("{}", runner.path()); in run() 40 println!("{}: {}", runner.path(), e.to_string()); in run() 64 path: Option<PathBuf>, field 70 pub fn from_path(path: impl Into<PathBuf>) -> Result<Self, io::Error> { in from_path() 71 let path = path.into(); in from_path() localVariable 73 let contents = fs::read_to_string(&path)?; in from_path() 75 path: Some(path), in from_path() 85 path: None, in from_inline_code() 91 pub fn path(&self) -> String { in path() method [all …]
|
| H A D | utils.rs | 6 use std::path::{Path, PathBuf}; 10 pub fn read_to_string<P: AsRef<Path>>(path: P) -> anyhow::Result<String> { in read_to_string() 12 let path = path.as_ref(); in read_to_string() localVariable 13 if path == Path::new("-") { in read_to_string() 20 let mut file = File::open(path)?; in read_to_string() 22 .with_context(|| format!("failed to read {} to string", path.display()))?; in read_to_string()
|
| /wasmtime-44.0.1/benches/ |
| H A D | instantiation.rs | 3 use std::path::Path; 30 fn bench_sequential(c: &mut Criterion, path: &Path) { in bench_sequential() 36 path.file_name().unwrap().to_str().unwrap(), in bench_sequential() 69 fn bench_parallel(c: &mut Criterion, path: &Path) { in bench_parallel() 97 path.file_name().unwrap().to_str().unwrap(), in bench_parallel() 161 (engine, bytes, tmpfile.path()) in bench_deserialize_module() 170 let (engine, _, path) = &*state; in bench_deserialize_module() 210 let path = file.unwrap().path(); in bench_instantiation() localVariable 211 bench_sequential(c, &path); in bench_instantiation() 212 bench_parallel(c, &path); in bench_instantiation() [all …]
|
| H A D | compile.rs | 9 use std::path::Path; 65 fn compile(group: &mut BenchmarkGroup<WallTime>, path: &Path, scenario: Scenario) { in compile() 66 let filename = path.file_name().unwrap().to_str().unwrap(); in compile() 68 let bytes = std::fs::read(path).expect("failed to read file"); in compile() 80 let path = file.unwrap().path(); in bench_compile() localVariable 81 let extension = path.extension().and_then(|s| s.to_str()); in bench_compile() 82 if path.is_file() && matches!(extension, Some("wasm") | Some("wat")) { in bench_compile() 83 compile(&mut group, &path, scenario); in bench_compile()
|
| /wasmtime-44.0.1/crates/environ/src/component/types_builder/ |
| H A D | resources.rs | 199 path: &mut Vec<&'a str>, in register_component_entity_type() 202 self.register_component_entity_type_(types, ty, path, &mut |path| { in register_component_entity_type() 203 ResourceIndexKind::Concrete(register(path)) in register_component_entity_type() 213 path: &mut Vec<&'a str>, in register_abstract_component_entity_type() 216 self.register_component_entity_type_(types, ty, path, &mut |path| { in register_abstract_component_entity_type() 217 ResourceIndexKind::Abstract(register(path)) in register_abstract_component_entity_type() 225 path: &mut Vec<&'a str>, in register_component_entity_type_() 240 .or_insert_with(|| register(path)); in register_component_entity_type_() 249 path.push(name); in register_component_entity_type_() 250 self.register_component_entity_type_(types, *ty, path, register); in register_component_entity_type_() [all …]
|
| /wasmtime-44.0.1/cranelift/filetests/src/ |
| H A D | runone.rs | 15 use std::path::{Path, PathBuf}; 23 path: &Path, in run() 28 info!("---\nFile: {}", path.to_string_lossy()); in run() 31 fs::read_to_string(path).with_context(|| format!("failed to read {}", path.display()))?; in run() 46 path, in run() 87 let file_path = path.to_string_lossy(); in run() 149 path: PathBuf, field 155 fn new(path: &Path) -> FileUpdate { in new() 157 path: path.to_path_buf(), in new() 200 self.path, in update_at() [all …]
|
| H A D | lib.rs | 11 use std::path::Path; 46 for path in files.iter().map(Path::new) { in run() 47 if path.is_file() { in run() 48 runner.push_test(path); in run() 50 runner.push_dir(path); in run() 72 let path = Path::new(file); in run_passes() localVariable 73 if path == Path::new("-") || path.is_file() { in run_passes() 74 runner.push_test(path); in run_passes() 76 runner.push_dir(path); in run_passes()
|
| H A D | runner.rs | 11 use std::path::{Path, PathBuf}; 21 path: PathBuf, field 40 pub fn path(&self) -> &Path { in path() method 41 self.path.as_path() in path() 47 let p = self.path.to_string_lossy(); in fmt() 112 path: file.into(), in push_test() 158 let path = entry.path(); in scan_dirs() localVariable 164 None => self.push_dir(path), in scan_dirs() 181 fn path_error<E: Error>(&mut self, path: &PathBuf, err: &E) { in path_error() 183 println!("{}: {}", path.to_string_lossy(), err); in path_error() [all …]
|
| /wasmtime-44.0.1/crates/test-util/src/ |
| H A D | wast.rs | 5 use std::path::Path; 6 use std::path::PathBuf; 63 test.path in find_tests() 82 let path = entry.path(); in add_tests() localVariable 101 FindConfig::Infer(f) => f(&path), in add_tests() 104 path, in add_tests() 234 pub path: PathBuf, field 242 .field("path", &self.path) in fmt() 437 spec_proposal_from_path(&self.path) in spec_proposal() 722 fn spec_proposal_from_path(path: &Path) -> Option<&str> { in spec_proposal_from_path() [all …]
|
| /wasmtime-44.0.1/crates/wasi-common/src/tokio/ |
| H A D | dir.rs | 8 use std::path::PathBuf; 26 path: &str, in open_file() 46 async fn create_dir(&self, path: &str) -> Result<(), Error> { in create_dir() 47 block_on_dummy_executor(|| self.0.create_dir(path)) in create_dir() 68 async fn remove_dir(&self, path: &str) -> Result<(), Error> { in remove_dir() 69 block_on_dummy_executor(move || self.0.remove_dir(path)) in remove_dir() 72 async fn unlink_file(&self, path: &str) -> Result<(), Error> { in unlink_file() 73 block_on_dummy_executor(move || self.0.unlink_file(path)) in unlink_file() 76 block_on_dummy_executor(move || self.0.read_link(path)) in read_link() 83 path: &str, in get_path_filestat() [all …]
|
| /wasmtime-44.0.1/cranelift/isle/isle/src/ |
| H A D | files.rs | 5 use std::path::{Path, PathBuf}; 61 fn replace_prefixes(prefixes: &[Prefix], path: String) -> String { in from_paths() 63 if path.starts_with(prefix) { in from_paths() 64 return path.replacen(prefix, name, 1); in from_paths() 67 path in from_paths() 74 for path in paths { in from_paths() 75 let path = path.as_ref(); in from_paths() localVariable 77 std::fs::read_to_string(path).map_err(|err| (path.to_path_buf(), err))?; in from_paths() 78 let name = replace_prefixes(prefixes, path.display().to_string()); in from_paths()
|
| /wasmtime-44.0.1/src/ |
| H A D | common.rs | 5 use std::{fs::File, path::Path, time::Duration}; 178 path: &Path, in load_module() 181 let path = match path.to_str() { in load_module() localVariable 184 _ => path, in load_module() 189 path, in load_module() 220 path, in load_module() 231 path, in load_module() 245 path: &Path, in load_module_contents() 289 let _ = (path, engine); in load_module_contents() 478 path: path.to_string(), in parse() [all …]
|
| /wasmtime-44.0.1/fuzz/ |
| H A D | Cargo.toml | 56 path = "fuzz_targets/compile.rs" 62 path = "fuzz_targets/instantiate.rs" 68 path = "fuzz_targets/differential.rs" 74 path = "fuzz_targets/wast_tests.rs" 86 path = "fuzz_targets/instantiate-many.rs" 92 path = "fuzz_targets/component_api.rs" 98 path = "fuzz_targets/cranelift-icache.rs" 104 path = "fuzz_targets/call_async.rs" 110 path = "fuzz_targets/misc.rs" 117 path = "fuzz_targets/exception_ops.rs" [all …]
|
| /wasmtime-44.0.1/crates/c-api/include/wasmtime/ |
| H A D | wasi.hh | 64 [[nodiscard]] bool stdin_file(const std::string &path) { in stdin_file() argument 65 return wasi_config_set_stdin_file(ptr.get(), path.c_str()); in stdin_file() 74 [[nodiscard]] bool stdout_file(const std::string &path) { in stdout_file() argument 75 return wasi_config_set_stdout_file(ptr.get(), path.c_str()); in stdout_file() 84 [[nodiscard]] bool stderr_file(const std::string &path) { in stderr_file() argument 85 return wasi_config_set_stderr_file(ptr.get(), path.c_str()); in stderr_file() 93 [[nodiscard]] bool preopen_dir(const std::string &path, in preopen_dir() argument 96 return wasi_config_preopen_dir(ptr.get(), path.c_str(), guest_path.c_str(), in preopen_dir()
|
| /wasmtime-44.0.1/crates/wasi-nn/src/registry/ |
| H A D | in_memory.rs | 6 use std::{collections::HashMap, path::Path}; 21 pub fn load(&mut self, backend: &mut dyn BackendFromDir, path: &Path) -> wasmtime::Result<()> { in load() 22 if !path.is_dir() { in load() 25 path.display() in load() 28 let name = path in load() 33 let graph = backend.load_from_dir(path, ExecutionTarget::Cpu)?; in load()
|
| /wasmtime-44.0.1/examples/wasip2-plugins/src/ |
| H A D | main.rs | 5 use std::path::{Path, PathBuf}; 72 path: PathBuf, in load_plugin() 74 println!("Loading plugin from file {:?}", path); in load_plugin() 77 let component = Component::from_file(engine, &path)?; in load_plugin() 105 let path = entry?.path(); in load_plugins() localVariable 106 if path.is_file() && path.extension().and_then(OsStr::to_str) == Some("wasm") { in load_plugins() 107 load_plugin(state, &engine, &linker, path)?; in load_plugins()
|
| /wasmtime-44.0.1/cranelift/isle/veri/veri_engine/ |
| H A D | Cargo.toml | 13 path = "src/lib.rs" 17 path = "src/main.rs" 20 cranelift-isle = { path = "../../isle" } 21 cranelift-codegen = { path = "../../../codegen", features = ["all-arch"] } 22 cranelift-codegen-meta = { path = "../../../codegen/meta" } 23 veri_ir = { path = "../veri_ir" }
|
| /wasmtime-44.0.1/ |
| H A D | Cargo.toml | 42 path = "src/bin/wasmtime.rs" 131 wasmtime-test-macros = { path = "crates/test-macros" } 261 wasmtime-wast = { path = "crates/wast", version = "=44.0.1" } 287 wasmtime-wizer = { path = "crates/wizer", version = "44.0.1" } 295 pulley-interpreter = { path = 'pulley', version = "=44.0.1" } 296 pulley-macros = { path = 'pulley/macros', version = "=44.0.1" } 307 cranelift-filetests = { path = "cranelift/filetests" } 310 cranelift-fuzzgen = { path = "cranelift/fuzzgen" } 322 wasmtime-fuzzing = { path = "crates/fuzzing" } 324 wasmtime-test-util = { path = "crates/test-util" } [all …]
|
| /wasmtime-44.0.1/crates/c-api/src/ |
| H A D | wasi.rs | 7 use std::path::Path; 18 CStr::from_ptr(path).to_str().map(Path::new).ok() in cstr_to_path() 26 File::open(cstr_to_path(path)?).ok() in open_file() 30 File::create(cstr_to_path(path)?).ok() in create_file() 106 path: *const c_char, in wasi_config_set_stdin_file() 108 let file = match open_file(path) { in wasi_config_set_stdin_file() 138 path: *const c_char, in wasi_config_set_stdout_file() 140 let file = match create_file(path) { in wasi_config_set_stdout_file() 266 path: *const c_char, in wasi_config_set_stderr_file() 268 let file = match create_file(path) { in wasi_config_set_stderr_file() [all …]
|
| /wasmtime-44.0.1/crates/wiggle/macro/src/ |
| H A D | lib.rs | 166 use std::path::Path; in from_witx() 171 let path = root.join(format!("wiggle{n}.rs")); in from_witx() localVariable 173 std::fs::write(&path, ret.to_string()).unwrap(); in from_witx() 178 .arg(&path) in from_witx() 183 let path = path.to_str().unwrap(); in from_witx() localVariable 184 ret = quote!(include!(#path);); in from_witx()
|