Slint is an open-source declarative GUI toolkit to build native user interfaces for Rust, C++, JavaScript, or Python apps.
Find a file
Olivier Goffart 20cfb65e53 Bump version
2020-10-22 08:41:45 +02:00
.cargo Update license header to mention that commertial option are available 2020-08-26 13:23:42 +02:00
.github/workflows Bump version 2020-10-22 08:41:45 +02:00
.vscode Added a basic logo 2020-08-11 09:03:56 +02:00
api Bump version 2020-10-22 08:41:45 +02:00
docker Remove gperf from the docker images 2020-10-07 11:27:29 +02:00
docs Some more documentation for the rust backend 2020-10-21 10:35:42 +02:00
examples Remove dummy Rectangle from Gallery 2020-10-21 15:09:03 +02:00
helper_crates Normalize the spelling of SixtyFPS 2020-10-13 07:48:55 +02:00
resources Try to include screenshots of the gallery, tweak the layout a little and update the others 2020-09-11 17:38:35 +02:00
sixtyfps_compiler Bump version 2020-10-22 08:41:45 +02:00
sixtyfps_runtime Bump version 2020-10-22 08:41:45 +02:00
tests Bump version 2020-10-22 08:41:45 +02:00
tools Bump version 2020-10-22 08:41:45 +02:00
vscode_extension Bump version 2020-10-22 08:41:45 +02:00
xtask Update cargo-metadata dependency 2020-10-21 08:58:48 +02:00
.clang-format Reformat public header with Qt's clang-format 2020-05-11 15:20:17 +02:00
.gitignore Improve setup experience with VS code 2020-07-22 09:38:02 +02:00
Cargo.toml Rename sixtyfps-rs-macro to sixtyfps-macros 2020-10-13 11:10:26 +02:00
CHANGELOG.md Bump version 2020-10-22 08:41:45 +02:00
CMakeLists.txt Remove the test examples 2020-10-08 17:18:22 +02:00
CONTRIBUTING.md Mention GitHub discussions here, too. 2020-10-02 16:18:34 +02:00
Cross.toml Fix license header check 2020-10-06 22:03:11 +02:00
FAQ.md Added a FAQ 2020-10-16 15:24:17 +02:00
LICENSE.md README changes 2020-10-21 15:48:07 +02:00
README.md Minor README tweak 2020-10-21 22:02:26 +02:00
rustfmt.toml Initial commit laying out the structure 2020-05-04 10:49:58 +02:00

SixtyFPS

Build Status

SixtyFPS is a toolkit to efficiently develop fluid graphical user interfaces for any display: embedded devices and desktop applications. We support multiple programming languages, such as Rust, C++, and JavaScript.

Note: SixtyFPS is still in the early development stage. Some APIs may change as we are still in the midst of developing our key features. Consequently this code is not yet ready for use in production.

Our design goals are:

  • Lightweight: Fit into a few hundred kilobytes of RAM and require little processing power.
  • Straightforward: Programmers and designers should feel productive and be able to enjoy the design and development process. The APIs should be consistent, easy to use, and intuitive, no matter the target language. High-quality documentation should describe the APIs, teach concepts and how to use them.
  • Native: We support many different target platforms, from embedded devices to desktops including mobile and web. Both the user and the developer should feel at home on each platform. The look and feel and experience should match the users' expectations of a native application.

Current Status

It's possible to create user interfaces from C++, Rust, or NodeJS. These user interfaces can be compiled and shown on Linux, macOS, Windows, and in Web Browsers (using WebAssembly). You can also try out SixtyFPS using our experimental online editor.

We plan to support the development of this project through dual-licensing and services. We seek feedback from potential customers or users.

Table Of Contents

Reference

Refer to the README of each language directory in the api sub-folder:

The examples folder contains examples and demos. The docs folder contains build instructions and internal developer docs.

Demos running in WebAssembly Simulation

Click on the screenshots to run the WebAssembly simulation

Printer Demo Widget Gallery
Screenshot of the Printer Demo Screenshot of the Gallery Demo

Desktop Native Widgets

Windows macOS Linux
Screenshot of the Gallery on Windows Screenshot of the Gallery on macOS Screenshot of the Gallery on Linux

The .60 Markup Language

SixtyFPS comes with a markup language that is specifically designed for user interfaces. This language provides a powerful way to describe graphical elements, their placement, and the flow of data through the different states. It is a familar syntax to describe the hierarchy of elements and property bindings. Here's the obligatory "Hello World":

HelloWorld := Window {
    width: 400px;
    height: 400px;

    Text {
       y: parent.width / 2;
       x: parent.x + 200px;
       text: "Hello, world";
       color: blue;
    }
}

Check out the language reference for more details.

Architecture

An application is composed of the business logic written in Rust, C++, or JavaScript and the .60 user interface design markup, which is compiled to native code.

Architecture Overview

Compiler

The .60 files are compiled ahead of time. The expressions in the .60 are pure functions that the compiler can optimize. For example, the compiler could choose to "inline" properties and remove those that are constant or unchanged. In the future we hope to improve rendering time on low end devices by pre-processing images and text. The compiler could determine that a Text or an Image element is always on top of another Image in the same location. Consequently both elements could be rendered ahead of time into a single element, thus cutting down on rendering time.

The compiler uses the typical compiler phases of lexing, parsing, optimisation, and finally code generation. It provides different backends for code generation in the target language. The C++ code generator produces a C++ header file, the Rust generator produces Rust code, and so on. An interpreter for dynamic languages is also included.

Runtime

The runtime library consists of an engine that supports properties declared in the .60 language. Components with their elements, items, and properties are laid out in a single memory region, to reduce memory allocations.

Rendering backends and styles are configurable at compile time. Current there are two backends:

  • The gl backend uses OpenGL ES 2.0 for rendering.
  • The qt backend uses Qt's QStyle to achieve native looking widgets. In the future it could also use QPainter.

Contributions

We welcome your contributions: in the form of code, bug reports or feedback.

  • If you see an RFC tag on an issue, feel free to chime in.
  • For contribution guidelines see CONTRIBUTING.md. The dual-licensing requires the contributor to accept a CLA.

License

This software is provided under a dual licensing scheme:

  • GNU GPLv3: Open source license ideal for free software.
  • Commercial SixtyFPS license: More details to come.

See also the Licensing FAQ

Frequently Asked Questions

Please see our separate FAQ.

About us

Olivier and Simon started their open source journey in the KDE project, the popular Open Source Desktop Environment for Linux. Later they met while working together in a small company in Norway called Trolltech, on the Qt C++ toolkit. Here, they gained valuable experience in API design, cross-platform software development and user interface components. Simon continued in the Qt Company as one lead developer and maintainer of the QtQml engine, while Olivier co-founded Woboq, a software consulting company. Years later they are starting a new project. With SixtyFPS they aim to make developing user interfaces fun for everyone: from JavaScript, C++, or Rust developers all the way to UI/UX designers.

Contact us

Feel free to join Github discussions for general chat or questions. Use Github issues to report public suggestions or bugs.

To contact us privately send an email to info@sixtyfps.io