Back to Slint

Viewer for Slint

tools/viewer/README.md

1.17.11.2 KB
Original Source

Viewer for Slint

This program is a viewer for .slint files from the Slint project.

Installation

Install the binary from crates.io:

bash
cargo install slint-viewer

Pre-built binaries for Linux and Windows are attached to each release.

Usage

bash
slint-viewer path/to/myfile.slint

See the Slint Viewer documentation for live reload, screenshots, command-line options, callback handlers, dialogs, exit codes, and the remote viewer.

Building for iOS

On iOS the viewer previews .slint files from your editor on an iPhone, iPad, or the simulator.

Prerequisites

  • A computer running macOS with an up-to-date installation of Xcode.
  • XcodeGen (e.g. brew install xcodegen).
  • Rust with the iOS toolchains: rustup target add aarch64-apple-ios aarch64-apple-ios-sim.

Build and run

Generate the Xcode project and open it:

bash
cd tools/viewer
xcodegen generate --spec ios-project.yml
open "Slint Viewer.xcodeproj"

From Xcode, build and run on the simulator or a device.