Skip to content

Extract safe reusable Pushstr Rust bindings #1

Description

@tidley

Problem

Pushstr Rust code is copied into multiple consumers. The copies have diverged, while the current FFI crate combines reusable protocol helpers with process-global Nostr client state, relay lifecycle, FIPS integration, and secret access.

Scope

Extract only stateless protocol helpers into a reusable Rust crate and expose selected safe functions through the existing Flutter Rust Bridge bindings. Keep secret reads, client globals, relay lifecycle, queueing, FIPS APIs, and generated bindings outside the reusable crate.

Acceptance criteria

  • A reusable crate contains only stateless identifier and protocol helpers.
  • The Flutter FFI retains only selected safe bindings to those helpers.
  • The reusable crate exposes no nsec getter, process-global client/key state, relay lifecycle, or FIPS API.
  • Focused Rust tests cover exported helper behaviour and invalid input.
  • Existing mobile bindings remain compatible.

Status: Blocked

Blocker: /home/tom/code/pushstr/.git/refs/heads is read-only, preventing creation of the required issue branch and isolated worktree. The canonical checkout also has unrelated uncommitted changes, so it cannot be modified safely.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions