| /wasmtime-44.0.1/crates/wiggle/tests/ |
| H A D | wasi.rs | 47 ) -> Result<(types::Size, types::Size)> { in args_sizes_get() 63 ) -> Result<(types::Size, types::Size)> { in environ_sizes_get() 87 _fd: types::Fd, in fd_advise() 98 _fd: types::Fd, in fd_allocate() 116 _fd: types::Fd, in fd_fdstat_get() 124 _fd: types::Fd, in fd_fdstat_set_flags() 133 _fd: types::Fd, in fd_fdstat_set_rights() 143 _fd: types::Fd, in fd_filestat_get() 151 _fd: types::Fd, in fd_filestat_set_size() 160 _fd: types::Fd, in fd_filestat_set_times() [all …]
|
| H A D | variant.rs | 9 impl_errno!(types::Errno); 33 u: &types::Reason, in get_tag() 34 ) -> Result<types::Excuse, types::Errno> { in get_tag() 37 types::Reason::DogAte { .. } => Ok(types::Excuse::DogAte), in get_tag() 38 types::Reason::Traffic { .. } => Ok(types::Excuse::Traffic), in get_tag() 39 types::Reason::Sleeping { .. } => Ok(types::Excuse::Sleeping), in get_tag() 45 u: &types::ReasonMut, in reason_mult() 80 fn reason_tag(r: &types::Reason) -> types::Excuse { in reason_tag() 82 types::Reason::DogAte { .. } => types::Excuse::DogAte, in reason_tag() 83 types::Reason::Traffic { .. } => types::Excuse::Traffic, in reason_tag() [all …]
|
| H A D | pointers.rs | 9 impl_errno!(types::Errno); 15 input1: types::Excuse, in pointers_and_enums() 19 ) -> Result<(), types::Errno> { in pointers_and_enums() 23 types::Errno::InvalidArg in pointers_and_enums() 30 types::Errno::InvalidArg in pointers_and_enums() 37 types::Errno::InvalidArg in pointers_and_enums() 44 types::Errno::InvalidArg in pointers_and_enums() 75 pub input1: types::Excuse, 76 pub input2: types::Excuse, 78 pub input3: types::Excuse, [all …]
|
| H A D | flags.rs | 9 impl_errno!(types::Errno); 15 old_config: types::CarConfig, in configure_car() 16 other_config_ptr: GuestPtr<types::CarConfig>, in configure_car() 17 ) -> Result<types::CarConfig, types::Errno> { in configure_car() 20 types::Errno::InvalidArg in configure_car() 27 (1u8..=types::CarConfig::all().into()) in car_config_strat() 36 old_config: types::CarConfig, 37 other_config: types::CarConfig, 109 let one_flag = format!("{}", types::CarConfig::AWD); in flags_fmt() 111 let two_flags = format!("{}", types::CarConfig::AUTOMATIC | types::CarConfig::SUV); in flags_fmt() [all …]
|
| H A D | ints.rs | 9 impl_errno!(types::Errno); 15 init_cookie: types::Cookie, in cookie_cutter() 16 ) -> Result<types::Bool, types::Errno> { in cookie_cutter() 17 let res = if init_cookie == types::COOKIE_START { in cookie_cutter() 18 types::Bool::True in cookie_cutter() 20 types::Bool::False in cookie_cutter() 26 fn cookie_strat() -> impl Strategy<Value = types::Cookie> { in cookie_strat() 34 cookie: types::Cookie, 60 assert_eq!(res, types::Errno::Ok as i32, "cookie cutter errno"); in test() 67 if is_cookie_start == types::Bool::True { in test() [all …]
|
| H A D | lists.rs | 9 impl_errno!(types::Errno); 15 excuses: types::ConstExcuseArray, in reduce_excuses() 16 ) -> Result<types::Excuse, types::Errno> { in reduce_excuses() 32 excuses: types::ExcuseArray, in populate_excuses() 33 ) -> Result<(), types::Errno> { in populate_excuses() 48 excuse_values: Vec<types::Excuse>, 136 Just(types::Excuse::DogAte), in excuse_strat() 137 Just(types::Excuse::Traffic), in excuse_strat() 228 ) -> Result<i32, types::Errno> { in sum_of_element() 256 impl types::PairInts { impl [all …]
|
| H A D | errors.rs | 31 impl_errno!(types::Errno); 33 impl From<RichError> for types::ErrnoT { 34 fn from(rich: RichError) -> types::ErrnoT { in from() 37 types::ErrnoT::from(types::Errno::InvalidArg).context(s) in from() 40 types::ErrnoT::from(types::Errno::PicketLine).context(s) in from() 69 types::Errno::Ok as i32, in one_error_conversion_test() 78 types::Errno::PicketLine as i32, in one_error_conversion_test() 86 types::Errno::InvalidArg as i32, in one_error_conversion_test() 129 impl_errno!(types::Errno); 130 impl_errno!(types::Errno2); [all …]
|
| H A D | handles.rs | 11 impl_errno!(types::Errno); 14 fn fd_create(&mut self, _memory: &mut GuestMemory<'_>) -> Result<types::Fd, types::Errno> { in fd_create() 15 Ok(types::Fd::from(FD_VAL)) in fd_create() 20 fd: types::Fd, in fd_consume() 21 ) -> Result<(), types::Errno> { in fd_consume() 23 if fd == types::Fd::from(FD_VAL) { in fd_consume() 26 Err(types::Errno::InvalidArg) in fd_consume() 45 assert_eq!(e, types::Errno::Ok as i32, "fd_create error"); in test() 55 assert_eq!(e, types::Errno::Ok as i32, "fd_consume error"); in test() 61 types::Errno::InvalidArg as i32, in test() [all …]
|
| H A D | records.rs | 9 impl_errno!(types::Errno); 15 an_pair: &types::PairInts, in sum_of_pair() 16 ) -> Result<i64, types::Errno> { in sum_of_pair() 23 an_pair: &types::PairIntPtrs, in sum_of_pair_of_ptrs() 24 ) -> Result<i64, types::Errno> { in sum_of_pair_of_ptrs() 38 ) -> Result<i64, types::Errno> { in sum_of_int_and_ptr() 49 ) -> Result<types::PairInts, types::Errno> { in return_pair_ints() 50 Ok(types::PairInts { in return_pair_ints() 61 ) -> Result<types::PairIntPtrs, types::Errno> { in return_pair_of_ptrs() 94 pub input: types::PairInts, [all …]
|
| /wasmtime-44.0.1/crates/wasi/src/ |
| H A D | p1.rs | 632 ) -> Result<types::Size, types::Error> { in fd_write_impl() 1218 ) -> Result<(types::Size, types::Size), types::Error> { in args_sizes_get() 1267 ) -> Result<(types::Size, types::Size), types::Error> { in environ_sizes_get() 1671 ) -> Result<types::Size, types::Error> { in fd_read() 1751 ) -> Result<types::Size, types::Error> { in fd_pread() 1795 ) -> Result<types::Size, types::Error> { in fd_write() 1808 ) -> Result<types::Size, types::Error> { in fd_pwrite() 1950 ) -> Result<types::Size, types::Error> { in fd_readdir() 2170 ) -> Result<types::Fd, types::Error> { in path_open() 2665 ) -> Result<types::Fd, types::Error> { in sock_accept() [all …]
|
| H A D | p0.rs | 6 use crate::p0::types::Error; 89 ) -> Result<(types::Size, types::Size), Error> { in args_sizes_get() 107 ) -> Result<(types::Size, types::Size), Error> { in environ_sizes_get() 590 ) -> Result<(types::Size, types::Roflags), Error> { in sock_recv() 676 types::Errno, 756 types::Clockid, 765 types::Advice, 789 types::Signal, 851 types::Fdstat, 937 types::Oflags, [all …]
|
| /wasmtime-44.0.1/crates/wasi-common/src/snapshots/ |
| H A D | preview_0.rs | 20 use types::Error; 131 types::Errno, 211 types::Clockid, 220 types::Advice, 270 types::Fdstat, 322 types::Fdflags, 343 types::Oflags, 351 types::Rights, 400 ) -> Result<(types::Size, types::Size), Error> { in args_sizes_get() 418 ) -> Result<(types::Size, types::Size), Error> { in environ_sizes_get() [all …]
|
| H A D | preview_1.rs | 57 ) -> Result<(types::Size, types::Size), Error> { in args_sizes_get() 73 ) -> Result<(types::Size, types::Size), Error> { in environ_sizes_get() 122 fd: types::Fd, in fd_advise() 138 fd: types::Fd, in fd_allocate() 156 fd: types::Fd, in fd_close() 180 fd: types::Fd, in fd_datasync() 193 fd: types::Fd, in fd_fdstat_get() 218 fd: types::Fd, in fd_fdstat_set_flags() 537 Ok(types::Prestat::Dir(types::PrestatDir { pr_name_len })) in fd_prestat_get() 1206 ) -> Result<(types::Size, types::Roflags), Error> { in sock_recv() [all …]
|
| /wasmtime-44.0.1/crates/fuzzing/src/generators/gc_ops/ |
| H A D | mutator.rs | 21 types: &mut Types, in add_struct() 26 || types.type_defs.len() in add_struct() 69 types: &mut Types, in swap_within_group() 71 if types.rec_groups.is_empty() || types.type_defs.len() <= 2 { in swap_within_group() 128 types: &mut Types, in move_between_groups() 139 if types in move_between_groups() 153 let Some(tid) = types in move_between_groups() 183 types: &mut Types, in duplicate_group() 210 types in duplicate_group() 314 types: &mut Types, in split_group() [all …]
|
| H A D | tests.rs | 4 types::{RecGroupId, TypeId, Types}, 23 types: Types::new(), in empty_test_ops() 51 types: Types::new(), in test_ops() 64 t.types in test_ops() 310 types.insert_rec_group(ga); in sort_types_by_supertype_orders_supertype_before_subtype_across_rec_groups() 311 types.insert_rec_group(gb); in sort_types_by_supertype_orders_supertype_before_subtype_across_rec_groups() 312 types.insert_rec_group(gc); in sort_types_by_supertype_orders_supertype_before_subtype_across_rec_groups() 313 types.insert_rec_group(gd); in sort_types_by_supertype_orders_supertype_before_subtype_across_rec_groups() 343 types.insert_rec_group(g); in fixup_preserves_subtyping_within_same_rec_group() 361 types.fixup(&limits); in fixup_preserves_subtyping_within_same_rec_group() [all …]
|
| /wasmtime-44.0.1/crates/wasi-nn/src/ |
| H A D | witx.rs | 246 impl From<generated::types::ExecutionTarget> for crate::wit::types::ExecutionTarget { 249 generated::types::ExecutionTarget::Cpu => crate::wit::types::ExecutionTarget::Cpu, in from() 255 impl From<generated::types::GraphEncoding> for crate::wit::types::GraphEncoding { 259 generated::types::GraphEncoding::Onnx => crate::wit::types::GraphEncoding::Onnx, in from() 273 impl From<generated::types::TensorType> for crate::wit::types::TensorType { 276 generated::types::TensorType::F16 => crate::wit::types::TensorType::Fp16, in from() 277 generated::types::TensorType::F32 => crate::wit::types::TensorType::Fp32, in from() 278 generated::types::TensorType::U8 => crate::wit::types::TensorType::U8, in from() 279 generated::types::TensorType::I32 => crate::wit::types::TensorType::I32, in from() 280 generated::types::TensorType::I64 => crate::wit::types::TensorType::I64, in from() [all …]
|
| /wasmtime-44.0.1/crates/wasi/src/p2/host/ |
| H A D | filesystem.rs | 46 offset: types::Filesize, in advise() 47 len: types::Filesize, in advise() 48 advice: types::Advice, in advise() 82 size: types::Filesize, in set_size() 92 atim: types::NewTimestamp, in set_times() 93 mtim: types::NewTimestamp, in set_times() 105 len: types::Filesize, in read() 106 offset: types::Filesize, in read() 143 offset: types::Filesize, in write() 734 use types::DescriptorType; in descriptortype_from() [all …]
|
| /wasmtime-44.0.1/crates/environ/src/compile/ |
| H A D | module_types.rs | 38 types: ModuleTypes, field 80 self.types.reserve(amt); in reserve_wasm_signatures() 254 self.types.next_ty(), in end_rec_group() 364 self.types in finish() 378 self.types.wasm_types() in wasm_types() 475 &self.types[sig] in index() 481 types: &'a ModuleTypesBuilder, field 493 types, in new() 527 if let Some(ty) = self.types.types.get(interned) { in lookup_heap_type() 568 if let Some(ty) = self.types.types.get(interned) { in lookup_heap_type() [all …]
|
| /wasmtime-44.0.1/crates/wasi/src/p3/filesystem/ |
| H A D | mod.rs | 5 use crate::p3::bindings::filesystem::{preopens, types}; 9 pub type FilesystemError = TrappableError<types::ErrorCode>; 77 impl From<std::io::Error> for types::ErrorCode { 85 types::ErrorCode::from(error).into() in from() 123 types::ErrorCode::from(error).into() in from() 134 fn from(advice: types::Advice) -> Self { in from() 136 types::Advice::Normal => Self::Normal, in from() 138 types::Advice::Random => Self::Random, in from() 141 types::Advice::NoReuse => Self::NoReuse, in from() 147 fn from(flags: types::OpenFlags) -> Self { in from() [all …]
|
| /wasmtime-44.0.1/crates/environ/src/component/ |
| H A D | types_builder.rs | 18 use wasmparser::types::TypesRef; 242 types: TypesRef<'_>, in convert_component_func_type() 246 let ty = &types[id]; in convert_component_func_type() 369 &types, in register_abstract_component_entity_type() 560 let types = ty in tuple_type() localVariable 561 .types in tuple_type() 570 types in new_tuple_type() 1058 for (t32, t64) in types.memory32.iter().zip(types.memory64) { in build_record() 1107 Some(types) => types, in build_variant() 1158 self.build_record(ty.types.iter().map(|t| types.type_information(t))); in tuples() [all …]
|
| /wasmtime-44.0.1/examples/min-platform/embedding/src/ |
| H A D | wasi.rs | 663 _: wasi::filesystem::types::Advice, in advise() 676 … ) -> Result<Result<wasi::filesystem::types::DescriptorFlags, wasi::filesystem::types::ErrorCode>> in get_flags() 683 ) -> Result<Result<wasi::filesystem::types::DescriptorType, wasi::filesystem::types::ErrorCode>> in get_type() 746 ) -> Result<Result<wasi::filesystem::types::DescriptorStat, wasi::filesystem::types::ErrorCode>> in stat() 753 _: wasi::filesystem::types::PathFlags, in stat_at() 755 ) -> Result<Result<wasi::filesystem::types::DescriptorStat, wasi::filesystem::types::ErrorCode>> in stat_at() 762 _: wasi::filesystem::types::PathFlags, in set_times_at() 787 Result<Resource<wasi::filesystem::types::Descriptor>, wasi::filesystem::types::ErrorCode>, in open_at() 840 Result<wasi::filesystem::types::MetadataHashValue, wasi::filesystem::types::ErrorCode>, in metadata_hash() 850 Result<wasi::filesystem::types::MetadataHashValue, wasi::filesystem::types::ErrorCode>, in metadata_hash_at() [all …]
|
| /wasmtime-44.0.1/crates/wasi/src/p3/sockets/ |
| H A D | conv.rs | 1 use crate::p3::bindings::sockets::types; 10 impl From<IpAddr> for types::IpAddress { 19 impl From<types::IpAddress> for IpAddr { 20 fn from(addr: types::IpAddress) -> Self { in from() 28 impl From<types::IpSocketAddress> for SocketAddr { 29 fn from(addr: types::IpSocketAddress) -> Self { in from() 37 impl From<SocketAddr> for types::IpSocketAddress { 83 impl ToSocketAddrs for types::IpSocketAddress { 91 impl ToSocketAddrs for types::Ipv4SocketAddress { 176 impl From<Errno> for types::ErrorCode { [all …]
|
| /wasmtime-44.0.1/crates/wasi-http/src/p2/ |
| H A D | http_impl.rs | 7 types::{self, Scheme}, 22 options: Option<Resource<types::RequestOptions>>, in handle() 42 types::Method::Get => Method::GET, in handle() 43 types::Method::Head => Method::HEAD, in handle() 44 types::Method::Post => Method::POST, in handle() 45 types::Method::Put => Method::PUT, in handle() 46 types::Method::Delete => Method::DELETE, in handle() 47 types::Method::Connect => Method::CONNECT, in handle() 48 types::Method::Options => Method::OPTIONS, in handle() 49 types::Method::Trace => Method::TRACE, in handle() [all …]
|
| /wasmtime-44.0.1/crates/wiggle/test-helpers/examples/ |
| H A D | tracing.rs | 35 impl_errno!(types::Errno); 39 impl<'a> types::UserErrorConversion for WasiCtx<'a> { 40 fn errno_from_rich_error(&mut self, e: RichError) -> Result<types::Errno> { in errno_from_rich_error() 50 RichError::InvalidArg { .. } => Ok(types::Errno::InvalidArg), in errno_from_rich_error() 51 RichError::PicketLine { .. } => Ok(types::Errno::PicketLine), in errno_from_rich_error() 61 _s: &types::S, in foo() 62 ) -> Result<types::T, RichError> { in foo() 66 0 => Ok(types::T { in foo() 100 types::Errno::Ok as i32, in main() 109 types::Errno::PicketLine as i32, in main() [all …]
|
| /wasmtime-44.0.1/crates/wasmtime/src/runtime/component/ |
| H A D | matching.rs | 5 use crate::component::types::{FutureType, StreamType}; 7 use crate::types::matching; 19 pub types: &'a Arc<ComponentTypes>, field 27 pub types: &'a Arc<ComponentTypes>, field 45 None => self.instance(&self.types[t], None), in definition() 63 let i = self.types[i].unwrap_concrete_ty(); in definition() 171 types: self.types, in func() 192 types: instance.component().types(), in new() 198 match self.types[index] { in resource_type() 209 FutureType::from(self.types[index].ty, self) in future_type() [all …]
|