wa_proto/
lib.rs

1#![cfg_attr(not(feature = "std"), no_std)]
2
3#[cfg(not(feature = "std"))]
4extern crate alloc;
5
6mod protocol;
7
8#[cfg(all(any(feature = "hashmap", feature = "std"), feature = "map"))]
9use core::hash::BuildHasherDefault;
10#[cfg(all(not(feature = "std"), feature = "hashmap"))]
11use hashbrown::HashMap;
12#[cfg(all(any(feature = "hashmap", feature = "std"), feature = "map"))]
13use rustc_hash::FxHasher;
14#[cfg(feature = "std")]
15use std::collections::HashMap;
16
17pub use protocol::*;
18pub use wa_proto_macro::*;
19
20#[cfg(all(any(feature = "hashmap", feature = "std"), feature = "map"))]
21type FxBuildHasher = BuildHasherDefault<FxHasher>;
22
23#[cfg(all(any(feature = "hashmap", feature = "std"), feature = "map"))]
24type FxHashMap<K, V> = HashMap<K, V, FxBuildHasher>;