feat(rust-provider): add cross-runtime Rust provider tests and docs; simplify bridge event handling and bump tstest

This commit is contained in:
2026-03-06 11:35:02 +00:00
parent 647cb5e92f
commit a90ae28321
8 changed files with 61 additions and 32 deletions

View File

@@ -15,8 +15,10 @@ For reporting bugs, issues, or security vulnerabilities, please visit [community
- 💾 **Transactions** — Atomic multi-file operations with automatic rollback on failure
- 👀 **File Watching** — Event-based filesystem monitoring with debounce, filters, and recursive watching
- 🔐 **Tree Hashing** — Deterministic SHA-256 directory hashing for cache-busting and change detection
- 📁 **Directory Copy & Move** — Full directory tree operations with conflict handling, filtering, and timestamp preservation
-**Async-Only** — Modern `async`/`await` patterns throughout — no sync footguns
- 🎨 **TypeScript-First** — Full type safety, IntelliSense, and exported interfaces
- 🌍 **Multi-Runtime** — Works on Node.js, Bun, and Deno
## Installation
@@ -480,16 +482,31 @@ SmartFS is fully typed. All interfaces and types are exported:
```typescript
import type {
// Provider interface
ISmartFsProvider,
IProviderCapabilities,
IFileStats,
IDirectoryEntry,
IWatchEvent,
ITransactionOperation,
ITreeHashOptions,
TWatchCallback,
IWatcherHandle,
// Core types
TEncoding, // 'utf8' | 'utf-8' | 'ascii' | 'base64' | 'hex' | 'binary' | 'buffer'
TFileMode, // number
IFileStats,
IDirectoryEntry,
// Watch types
TWatchEventType, // 'add' | 'change' | 'delete'
IWatchEvent,
IWatchOptions,
// Operation types
TTransactionOperationType, // 'write' | 'delete' | 'copy' | 'move' | 'append'
ITransactionOperation,
IReadOptions,
IWriteOptions,
IStreamOptions,
ICopyOptions,
IListOptions,
} from '@push.rocks/smartfs';
```