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 d1b86fd commit 1c9b549Copy full SHA for 1c9b549
crates/numcodecs-wasm-guest/src/lib.rs
@@ -80,16 +80,15 @@ pub mod bindings {
80
/// ```
81
macro_rules! export_codec {
82
($codec:ty) => {
83
- type Codec = $codec;
84
-
85
const _: () = {
86
- const fn can_only_export_static_codec<T: $crate::numcodecs::StaticCodec>() {}
+ type Codec = $codec;
+
+ #[cfg(target_arch = "wasm32")]
87
+ $crate::bindings::export!(Codec with_types_in $crate::bindings);
88
89
+ const fn can_only_export_static_codec<T: $crate::numcodecs::StaticCodec>() {}
90
can_only_export_static_codec::<Codec>()
91
};
- #[cfg(target_arch = "wasm32")]
92
- $crate::bindings::export!(Codec with_types_in $crate::bindings);
93
94
}
95
0 commit comments