Skip to content

[Hooks] Implement Native OS Integration Hooks (File/Folder Dialogs & Clipboard) #121

Description

@rorychatt

Problem Statement

Applications built with rusty targeting native desktop environments require reactive hooks for invoking native OS dialogs and interacting with the system clipboard (use_file_dialog, use_folder_dialog, use_save_dialog, use_clipboard).

Missing Functionality

  • use_file_dialog: Hook to prompt native file open picker with file filters.
  • use_folder_dialog: Hook to prompt native directory/folder picker.
  • use_save_dialog: Hook to prompt native save file picker with default names and extensions.
  • use_clipboard: Asynchronous read/write hook for system clipboard text and data.

Proposed Architecture & Design

  1. Implement hooks in rusty/src/hooks/os.rs.
  2. For native desktop targets, delegate to rfd (Rust Native File Dialogs) and arboard (clipboard).
  3. For WebAssembly / browser targets, fallback to HTML5 Input/File API and navigator.clipboard.

Acceptance Criteria

  • use_file_dialog, use_folder_dialog, use_save_dialog trigger native file selection pickers on desktop targets.
  • use_clipboard provides reactive copy and paste operations across platforms.
  • Fallback behavior handles web browser environments gracefully.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions