Commit 7faf8a1
committed
Expose tier storage configuration across the FFI boundary
Introduce FFI-safe abstractions and builder APIs to allow foreign
language targets to configure custom backup and ephemeral stores when
constructing nodes with a custom store.
Major changes include:
- Addition of FfiDynStoreTrait, an FFI-safe equivalent of DynStoreTrait,
working around uniffi's lack of support for Pin<Box<T>>
- Addition of FfiDynStore, a concrete wrapper for foreign language store
implementations
- Provision of FfiDynStoreTrait implementation for DynStoreWrapper to bridge
native Rust stores to FFI layer (useful in testing)
- Extension of ArcedNodeBuilder with methods for configuring backup and
ephemeral stores
- Exposure of build_with_store so foreign targets can build nodes with
custom store implementations
- Addition of build_node_with_store test helper to abstract uniffi-gated
store wrapping at build_with_store call sites
- Implementation of KVStoreSync for DynStoreRef to pass an FfiDynStore
(wrapped as Arc<DynStore>) directly as a DynStoreRef — which the builder
internally requires to satisfy both KVStore and KVStoreSync bounds.1 parent 585e14e commit 7faf8a1
File tree
7 files changed
+435
-33
lines changed- bindings
- src
- ffi
- tests
- common
7 files changed
+435
-33
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
| 36 | + | |
35 | 37 | | |
36 | 38 | | |
37 | 39 | | |
| |||
58 | 60 | | |
59 | 61 | | |
60 | 62 | | |
| 63 | + | |
| 64 | + | |
61 | 65 | | |
62 | 66 | | |
63 | 67 | | |
| |||
73 | 77 | | |
74 | 78 | | |
75 | 79 | | |
| 80 | + | |
| 81 | + | |
76 | 82 | | |
77 | 83 | | |
78 | 84 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
| 56 | + | |
55 | 57 | | |
56 | 58 | | |
57 | 59 | | |
| |||
639 | 641 | | |
640 | 642 | | |
641 | 643 | | |
642 | | - | |
643 | 644 | | |
644 | 645 | | |
645 | 646 | | |
| |||
653 | 654 | | |
654 | 655 | | |
655 | 656 | | |
656 | | - | |
657 | 657 | | |
658 | 658 | | |
659 | 659 | | |
| |||
1144 | 1144 | | |
1145 | 1145 | | |
1146 | 1146 | | |
| 1147 | + | |
| 1148 | + | |
| 1149 | + | |
| 1150 | + | |
| 1151 | + | |
| 1152 | + | |
| 1153 | + | |
| 1154 | + | |
| 1155 | + | |
| 1156 | + | |
| 1157 | + | |
| 1158 | + | |
| 1159 | + | |
| 1160 | + | |
| 1161 | + | |
| 1162 | + | |
| 1163 | + | |
| 1164 | + | |
| 1165 | + | |
| 1166 | + | |
| 1167 | + | |
| 1168 | + | |
| 1169 | + | |
1147 | 1170 | | |
1148 | 1171 | | |
1149 | 1172 | | |
| |||
1272 | 1295 | | |
1273 | 1296 | | |
1274 | 1297 | | |
1275 | | - | |
1276 | | - | |
1277 | | - | |
1278 | | - | |
| 1298 | + | |
| 1299 | + | |
| 1300 | + | |
| 1301 | + | |
| 1302 | + | |
| 1303 | + | |
| 1304 | + | |
| 1305 | + | |
| 1306 | + | |
| 1307 | + | |
1279 | 1308 | | |
1280 | | - | |
| 1309 | + | |
| 1310 | + | |
1281 | 1311 | | |
1282 | 1312 | | |
1283 | 1313 | | |
| |||
0 commit comments