Skip to content

Commit

Permalink
Try to fix the wasm codec export
Browse files Browse the repository at this point in the history
  • Loading branch information
juntyr committed Aug 22, 2024
1 parent de1d3c1 commit edbcd58
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/numcodecs-wasm-guest/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,18 +74,18 @@ pub mod bindings {
/// export_codec!(MyCodec);
/// ```
macro_rules! export_codec {
($codec:ty) => {{
($codec:ty) => {
type Codec = $codec;

const _: () = {
const fn can_only_export_static_codec<T: $crate::numcodecs::StaticCodec>() {}

can_only_export_static_codec::<$codec>()
can_only_export_static_codec::<Codec>()
};

#[cfg(target_arch = "wasm32")]
$crate::bindings::export!(Codec with_types_in $crate::bindings);
}};
};
}

#[cfg(target_arch = "wasm32")]
Expand Down

0 comments on commit edbcd58

Please sign in to comment.