You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The project uses procedural macros (in `tonbo_macros/`) to provide a type-safe API where users define their key-value schema using Rust structs.
84
90
@@ -89,38 +95,35 @@ The project uses procedural macros (in `tonbo_macros/`) to provide a type-safe A
89
95
2.**Feature Flags**: Important features include:
90
96
-`tokio`: Async filesystem operations (default)
91
97
-`wasm`: WebAssembly support with OPFS backend
92
-
-`datafusion`: SQL query support
93
-
-`aws`: S3 storage backend
94
-
-`bench`: Enables comparison benchmarks
98
+
-`datafusion`: SQL query support via Apache DataFusion
99
+
-`aws`: S3 storage backend support
100
+
-`bench`: Enables comparison benchmarks against RocksDB, Sled, and Redb
101
+
-`bytes`: Bytes type support (default)
95
102
96
-
3.**Type System**: Records must derive from `tonbo::Record` trait. The macro generates necessary serialization and Arrow schema implementations.
103
+
3.**Type System**: Records must derive from `tonbo::Record` trait. The macro generates necessary serialization and Arrow schema implementations. Dynamic records are also supported for runtime-defined schemas.
97
104
98
-
4.**Testing**: Tests should cover both sync and async APIs when applicable. Integration tests go in `tests/` directory.
105
+
4.**Testing**:
106
+
- Unit tests use `#[tokio::test]` for async code
107
+
- Integration tests in `tests/` directory
108
+
- Macro correctness tests using trybuild in `tests/success/` and `tests/fail/`
109
+
- WASM-specific tests in `tests/wasm.rs`
99
110
100
-
5.**Error Handling**: Uses custom error types defined in `src/error.rs`. Always propagate errors appropriately using `?`.
1.**Adding New Features**: Check feature flags in `Cargo.toml` and ensure proper conditional compilation with `#[cfg(feature = "...")]`.
105
116
106
-
2.**Modifying Storage Layer**: Changes to on-disk format should maintain backward compatibility or increment version numbers appropriately.
117
+
2.**Modifying Storage Layer**: Changes to on-disk format should maintain backward compatibility or increment version numbers appropriately. The magic number in `src/magic.rs` helps identify file format versions.
107
118
108
-
3.**Performance**: Run benchmarks before and after changes that might impact performance. Compare against baseline using `cargo bench`.
119
+
3.**Performance**: Run benchmarks before and after changes that might impact performance. Use `cargo bench --features bench` to compare against other embedded databases.
109
120
110
-
4.**Documentation**: Update both inline documentation and the guide (in `guide/` directory) for user-facing changes.
111
-
112
-
5.**Cross-Platform**: Ensure changes work across all supported platforms (Linux, macOS, Windows) and targets (native, WASM).
113
-
114
-
## Current Development Focus
115
-
116
-
Based on recent commits, the project is actively developing:
117
-
- Date/time type support (date32/date64/time32/time64)
118
-
- Dynamic record implementation
119
-
- Enhanced type system flexibility
121
+
4.**Cross-Platform**: Ensure changes work across all supported platforms (Linux, macOS, Windows) and targets (native, WASM).
120
122
121
123
## Important Notes
122
124
123
125
- Rust toolchain version is pinned to 1.85 in `rust-toolchain.toml`
124
-
- The project uses specific git revisions for fusio-* dependencies
126
+
- The project uses fusio crates (v0.4.0) for pluggable I/O and storage backends
125
127
- Formatting is strict - always run `cargo +nightly fmt` before committing
126
-
- The project follows semantic versioning (currently at 0.3.2)
128
+
- The project follows semantic versioning (currently at 0.3.2)
129
+
- Default features include: aws, bytes, tokio, tokio-http, async-trait
0 commit comments