We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3baf9c4 commit de1d3c1Copy full SHA for de1d3c1
crates/numcodecs-wasm-guest/src/lib.rs
@@ -74,16 +74,18 @@ pub mod bindings {
74
/// export_codec!(MyCodec);
75
/// ```
76
macro_rules! export_codec {
77
- ($codec:ident) => {
+ ($codec:ty) => {{
78
+ type Codec = $codec;
79
+
80
const _: () = {
81
const fn can_only_export_static_codec<T: $crate::numcodecs::StaticCodec>() {}
82
83
can_only_export_static_codec::<$codec>()
84
};
85
86
#[cfg(target_arch = "wasm32")]
- $crate::bindings::export!($codec with_types_in $crate::bindings);
- };
87
+ $crate::bindings::export!(Codec with_types_in $crate::bindings);
88
+ }};
89
}
90
91
0 commit comments