Skip to content

Commit 55b967b

Browse files
committed
Limit FFI to supported architectures
The C-compatible shard library is really only useful on architectures which support hardware acceleration (aarch64, x86_64, x86). In particular, this enables building for wasm32 targets, which don’t have libc and don’t support FFI.
1 parent 297705d commit 55b967b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/ffi.rs

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
//! This module provides a C-compatible interface for the Rust library, allowing
66
//! C programs to use the library's functionality.
77
8+
#![cfg(any(target_arch = "aarch64", target_arch = "x86_64", target_arch = "x86"))]
9+
810
use crate::CrcAlgorithm;
911
use crate::{get_calculator_target, Digest};
1012
use std::ffi::CStr;

0 commit comments

Comments
 (0)