Track A.8: re-vendor shim from ca355e5; UniversalFileSystem→microStore;

relocate shim to lib/; pyxis lib API renames

Compile-tier graft progress on top of 40e561f. Key changes:

- Re-vendor lib/microreticulum-shim/ (was src-shim/) from the *actual*
  ca355e5 commit content rather than the stale "feat/t-deck HEAD"
  /tmp clone the previous commit pulled from. Recovers process_sync()
  on LXMRouter and MEMORY_MONITOR_POLL macro that were missing.
- Move src-shim/ → lib/microreticulum-shim/ + add library.json so
  PlatformIO discovers the .cpp files and links them. Was previously
  only on the include path; the .cpps weren't in the build.
  (This unblocks the 30+ undefined-reference linker errors for LXMF
  and Instrumentation symbols.)
- Drop -Isrc-shim/Utilities (/Cryptography/Instrumentation) from
  build_flags — they were over-broad and put our Stream.h on the
  GLOBAL header path, breaking Arduino's Wire.cpp which has
  `class TwoWire: public Stream`. -Ilib/microreticulum-shim alone
  resolves subdir lookups via <Cryptography/X.h>, <Utilities/Y.h>.

- UniversalFileSystem migrated to microStore::Adapters::SPIFFSFileSystem
  (activated by -DUSTORE_USE_SPIFFS). Vanilla upstream microReticulum
  @ 0.3.0 deleted RNS::FileSystem in favor of microStore. Pyxis's
  lib/universal_filesystem/ is now dead code on this build path.

- pyxis lib API renames for the post-graft world:
    SDLogger.cpp:        RNS::setLogCallback -> RNS::set_log_callback
    AnnounceListScreen:  Transport::get_destination_table ->
                         Transport::get_path_table
                         Transport::DestinationEntry ->
                         RNS::Persistence::DestinationEntry
    UIManager.cpp:       _lxst_destination ctor explicit RNS::Type::NONE
                         (vanilla Destination has no default ctor)
                         Identity::mark_persistent calls disabled w/
                         restoration TODO
    ConversationListScreen: Interface::get_rssi/get_stats calls
                            disabled (the methods are non-virtual
                            on BLEInterface/SX1262Interface post
                            de-virtualization in a0ff631)

Compile is clean against the fixed-cryptography submodule pin; current
failure layer is fork-only Type::Channel constants referenced by the
vendored shim's Buffer/ChannelData files. That's the next session's
problem — see pyxis_microReticulum_graft_spike_findings.md for the
plan options (most likely: remove Channel/Buffer/ChannelData/Ratchet
from the shim, since LXMF doesn't use Channel anyway per the 2026-05-04
investigation).
This commit is contained in:
torlando-tech
2026-05-05 01:39:44 -04:00
parent 40e561f444
commit 02ceeda75b
44 changed files with 724 additions and 269 deletions
+15 -4
View File
@@ -18,7 +18,10 @@
#include <Utilities/OS.h>
// Filesystem
#include <UniversalFileSystem.h>
// Was: <UniversalFileSystem.h> (pyxis-provided RNS::FileSystem wrapper).
// Post-graft: microStore ships its own SPIFFS adapter, activated via
// -DUSTORE_USE_SPIFFS in platformio.ini.
#include <microStore/Adapters/SPIFFSFileSystem.h>
#include <Identity.h>
#include <Destination.h>
#include <Transport.h>
@@ -620,9 +623,17 @@ void setup_wifi() {
void setup_hardware() {
INFO("\n=== Hardware Initialization ===");
// Initialize SPIFFS for persistence via UniversalFileSystem
// NOTE: Do NOT call SPIFFS.begin() here - UniversalFileSystem::init() handles it
static RNS::FileSystem fs = new UniversalFileSystem();
// Initialize SPIFFS for persistence.
//
// Pre-graft: pyxis used its own RNS::FileSystem(new UniversalFileSystem())
// wrapper. Vanilla upstream microReticulum @ 0.3.0 deleted RNS::FileSystem
// entirely and replaced it with microStore (an out-of-tree dep). microStore
// ships an SPIFFS adapter activated by -DUSTORE_USE_SPIFFS that does the
// exact same thing pyxis's UniversalFileSystem did, so we use it directly.
//
// Pyxis's lib/universal_filesystem/ is now dead code on this build path and
// can be deleted once the graft lands.
static microStore::Adapters::SPIFFSFileSystem fs;
if (!fs.init()) {
ERROR("FileSystem mount failed!");
} else {