Skip to content

Commit 3ee26e3

Browse files
committed
disable rocksdb storage in wasm, take 2
1 parent e9c6d4f commit 3ee26e3

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/core/src/storage/mod.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -141,12 +141,10 @@ pub struct MemStorage {
141141
sigs: Arc<RwLock<HashMap<String, SigStore>>>,
142142
}
143143

144-
#[cfg(not(all(target_arch = "wasm32", target_os = "unknown")))]
145-
#[cfg(feature = "branchwater")]
144+
#[cfg(all(feature = "branchwater", not(target_arch = "wasm32")))]
146145
pub mod rocksdb;
147146

148-
#[cfg(not(all(target_arch = "wasm32", target_os = "unknown")))]
149-
#[cfg(feature = "branchwater")]
147+
#[cfg(all(feature = "branchwater", not(target_arch = "wasm32")))]
150148
pub use self::rocksdb::RocksDBStorage;
151149

152150
pub type Metadata<'a> = BTreeMap<&'a OsStr, &'a piz::read::FileMetadata<'a>>;
@@ -169,7 +167,7 @@ impl InnerStorage {
169167
let path = x.split("://").last().expect("not a valid path");
170168

171169
cfg_if! {
172-
if #[cfg(feature = "branchwater")] {
170+
if #[cfg(all( feature = "branchwater", not(target_arch = "wasm32")))] {
173171
InnerStorage::new(RocksDBStorage::from_path(path))
174172
} else {
175173
return Err(StorageError::MissingFeature("branchwater".into(), path.into()).into())

0 commit comments

Comments
 (0)