clone

a self-hosted sync node for lofi apps: jazz sync over iroh, ticket-gated, with no static ip or cloud needed

release/0.3.0
lofi-node / native / iroh-js / UPSTREAM.md
UPSTREAM.md 3.4K rendered
1# Provenance: vendored from n0-computer/iroh-ffi (iroh-js)23- **Upstream**: https://github.com/n0-computer/iroh-ffi — `iroh-js/` crate4- **Tag**: `v1.1.0`5- **Commit**: `5e451092dba0c1a09ee83ff6e5be37b1152a5c58`6- **License**: MIT OR Apache-2.0 (both vendored alongside)78## Vendored files (byte-identical to upstream unless a `// lofi-node:` marker says otherwise)910| File | Status |11| ----------------- | ------------------------------------------------------------------------------------------------------- |12| `src/endpoint.rs` | 2 marked edits: `pub(crate)` on the SendStream/RecvStream tuple fields (needed by `lofi_ext`) |13| `src/key.rs` | identical |14| `src/net.rs` | identical |15| `src/path.rs` | identical |16| `src/relay.rs` | identical |17| `src/ticket.rs` | identical |18| `src/watch.rs` | identical (but see Known issues) |19| `src/lib.rs` | marked edits: services module/re-export dropped; `lofi_ext` module registered |20| `Cargo.toml` | marked edit: `iroh-services` dependency dropped |21| `build.rs` | identical |22| `index.d.ts` | upstream-generated, vendored as reference; services classes listed there are NOT exported by this build |2324## Dropped (not vendored)2526- `src/services.rs` + `iroh-services` dependency — lofi-node does not use iroh services.27- npm packaging (`npm/`, `package.json`, yarn) — lofi-node embeds its own artifacts.28- Android glue, test/, tsconfig/typedoc.2930## Not upstream3132- `src/lofi_ext.rs` — Buffer-based length-prefixed framing (`writeFrame`, `readFrame`, `maxFrame`).33 Justified at gate 0: upstream `Array<number>` stream I/O measured 7.1 MiB/s loopback round-trip.34 Deletes if upstream grows Buffer stream I/O.3536## Known issues (upstream, observed under Deno at v1.1.0)3738- **watch APIs abort the process**: `watchAddr`/`watchPaths`/… call `tokio::spawn` from the calling39 JS thread (`watch.rs:35`, "no reactor running") and the panic cannot unwind through napi → hard40 abort. The TS layer must never call watch APIs; poll instead. Candidate upstream report.4142## Update procedure (tag bump)43441. `git clone --depth 1 --branch <newtag> https://github.com/n0-computer/iroh-ffi`452. `diff -r <clone>/iroh-js/src native/iroh-js/src` — every diff hunk must be either upstream's46 change (take it) or a `// lofi-node:` marker (keep it).473. Re-check: does upstream now have Buffer stream I/O (delete `lofi_ext`)? Did the watch48 tokio-context bug get fixed (unblock watch APIs)?494. Update tag/commit here; `cargo build --release`; run the full Deno fixture suite50 (`deno task test`) — it is the regression gate.