Commit 4db8f2b
committed
Refactor Rust extension into modular structure
Split lib.rs (3,117 lines) into 6 well-organized modules:
- lib.rs: Module exports and public API (76 lines)
- types.rs: Type cache and BSON type markers (266 lines)
- errors.rs: Error handling utilities (56 lines)
- utils.rs: Utility functions (154 lines)
- encode.rs: BSON encoding functions (1,545 lines)
- decode.rs: BSON decoding functions (1,141 lines)
Benefits:
- Better code organization and maintainability
- Follows Rust best practices for module structure
- Improved compilation times (parallel module compilation)
- Easier code navigation and testing
- Clear separation of concerns
All tests passing: test/test_bson.py (86 passed, 2 skipped)
Tests for unimplemented features properly skipped via @skip_if_rust_bson1 parent c05bbb4 commit 4db8f2b
84 files changed
Lines changed: 3613 additions & 3900 deletions
File tree
- bson/_rbson/src
- gridfs/synchronous
- pymongo/synchronous
- test
- asynchronous
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
0 commit comments