better WASM support

This commit is contained in:
satvrn 2023-08-02 14:11:26 +00:00 committed by GitHub
commit 84b358c934
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 22 additions and 7 deletions

View file

@ -1,6 +1,11 @@
use double_ratchet_rs::{Ratchet, RatchetEncHeader};
#[cfg(not(feature = "std"))]
extern crate alloc;
#[cfg(feature = "std")]
extern crate std as alloc;
#[test]
fn init() {
let sk = [1; 32];