Skip to content

Latest commit

 

History

History
91 lines (67 loc) · 3.02 KB

File metadata and controls

91 lines (67 loc) · 3.02 KB

Building And Installation

Requirements

  • Apple Silicon Mac running macOS 12 or later.
  • Xcode Command Line Tools.
  • Rustup. The repository pins Rust 1.77.1 and the aarch64-apple-darwin target in rust-toolchain.toml.
  • The Rustfmt and Clippy components for the pinned toolchain.
  • GitHub CLI for the clone command shown in the main README.

Deno, Node.js, Svelte, and a web-view toolchain are not required for the native application.

Install the verification components after cloning:

rustup component add rustfmt clippy --toolchain 1.77.1-aarch64-apple-darwin

Verify The Native Code

cargo test --locked --manifest-path native/Cargo.toml
cargo clippy --locked --manifest-path native/Cargo.toml --all-targets -- -D warnings
cargo fmt --manifest-path native/Cargo.toml --check

These commands exercise native unit tests, report Clippy findings, and verify Rust formatting.

Package The App

./scripts/package-rust.sh

The packaging script:

  1. Builds the locked release binary for Apple Silicon with a macOS 12 deployment target and verifies the Mach-O metadata.
  2. Assembles dist/Async Link.app.
  3. Generates the app icon and copies the native Info.plist and resources.
  4. Applies the identity in ASYNC_LINK_CODESIGN_IDENTITY, or an ad-hoc signature when the variable is unset.
  5. Verifies the property list and code signature.

The result can be launched directly from dist/Async Link.app for testing.

Install Locally

./scripts/install-rust.sh

The install script packages the current checkout, stops a running Async Link instance, installs /Applications/Async Link.app, registers it with LaunchServices, and attempts to set it as the default handler for supported URL schemes. When a code-signing identity is available in the login keychain, the script uses it automatically so macOS Accessibility access survives application updates. Set ASYNC_LINK_CODESIGN_IDENTITY to select a specific identity. The script falls back to ad-hoc signing when no identity is available.

macOS can reject a programmatic default-browser change. When that happens, select Async Link using the default web browser control in System Settings.

The script records the previous handler status in ~/.async/link/rollback.json. It also verifies that an existing ~/.async/link/settings.json remains unchanged during installation.

Smoke Test

After installation:

  1. Open Async Link from Spotlight and confirm that Settings appears.
  2. Select Make Default, or choose Async Link in System Settings.
  3. Open a web link from another application and confirm that only the picker appears.
  4. Select a browser choice and confirm that it receives the link.
  5. Test Escape, the close button, the cog button, and a keyboard shortcut.
  6. Repeat on each display and on another Space.

Remove The Installed App

pkill -x "Async Link" 2>/dev/null || true
rm -rf "/Applications/Async Link.app"

Choose another default browser before removal. User settings remain in ~/.async/link/ so a later installation can reuse them.