mirror of
https://github.com/tursodatabase/limbo.git
synced 2025-08-04 10:08:20 +00:00
Feature flag vfs for fs feature/prevent wasm
This commit is contained in:
parent
8e2c9367c0
commit
2cc72ed9ab
5 changed files with 19 additions and 11 deletions
|
@ -1,13 +1,16 @@
|
|||
mod types;
|
||||
mod vfs_modules;
|
||||
pub use limbo_macros::{register_extension, scalar, AggregateDerive, VTabModuleDerive, VfsDerive};
|
||||
#[cfg(not(target_family = "wasm"))]
|
||||
pub use limbo_macros::VfsDerive;
|
||||
pub use limbo_macros::{register_extension, scalar, AggregateDerive, VTabModuleDerive};
|
||||
use std::{
|
||||
fmt::Display,
|
||||
os::raw::{c_char, c_void},
|
||||
};
|
||||
pub use types::{ResultCode, Value, ValueType};
|
||||
use vfs_modules::RegisterVfsFn;
|
||||
pub use vfs_modules::{VfsExtension, VfsFile, VfsFileImpl, VfsImpl};
|
||||
pub use vfs_modules::{RegisterVfsFn, VfsFileImpl, VfsImpl};
|
||||
#[cfg(not(target_family = "wasm"))]
|
||||
pub use vfs_modules::{VfsExtension, VfsFile};
|
||||
|
||||
pub type ExtResult<T> = std::result::Result<T, ResultCode>;
|
||||
|
||||
|
|
|
@ -21,7 +21,6 @@ pub trait VfsExtension: Default + Send + Sync {
|
|||
chrono::Local::now().format("%Y-%m-%d %H:%M:%S").to_string()
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(not(target_family = "wasm"))]
|
||||
pub trait VfsFile: Send + Sync {
|
||||
fn lock(&mut self, _exclusive: bool) -> ExtResult<()> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue