Slint is an open-source declarative GUI toolkit to build native user interfaces for Rust, C++, JavaScript, or Python apps.
Find a file
2021-04-17 08:57:42 +02:00
.cargo Update license header to mention that commertial option are available 2020-08-26 13:23:42 +02:00
.github/workflows Prospective cross build fix 2021-04-16 15:52:21 +02:00
.vscode Move resources to the website repo 2020-11-25 11:56:10 +01:00
api Add an Opacity element that does nothing 2021-04-15 10:17:52 +02:00
docker Remove gperf from the docker images 2020-10-07 11:27:29 +02:00
docs Document the opacity 2021-04-15 15:13:19 +02:00
examples Fit the printer demo's home buttons easily on the raspberry pi screen 2021-04-16 13:55:28 +02:00
helper_crates C++ API to put a model in the interpreter::Value 2021-03-18 12:17:01 +01:00
scripts Abort the nightly prepare script if there are local modifications 2021-04-15 14:57:15 +02:00
sixtyfps_compiler LSP: completion in second level of expressions 2021-04-17 08:31:17 +02:00
sixtyfps_runtime Properly combine the alpha in the GL backend 2021-04-15 15:55:14 +02:00
tests Add support for opacity property 2021-04-15 15:05:09 +02:00
tools LSP: Improvements on complete ergonomics 2021-04-17 08:57:42 +02:00
vscode_extension Try to include arm linux binaries in the vs code extension 2021-04-16 15:42:20 +02:00
xtask Add an Opacity element that does nothing 2021-04-15 10:17:52 +02:00
.clang-format Reformat public header with Qt's clang-format 2020-05-11 15:20:17 +02:00
.gitattributes Add a .gitattributes to rust diff looks better 2020-12-08 16:40:55 +01:00
.gitignore Ignore the build and default output of the figma importer 2021-02-10 15:22:10 +01:00
Cargo.toml Load custom fonts from disk only once 2021-04-13 10:06:46 +02:00
CHANGELOG.md Add Window.default-font-weight 2021-04-14 11:16:22 +02:00
CMakeLists.txt Add a qt_viewer example that uses QWidget 2021-03-23 17:13:41 +01: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 Clarify the License FAQ regarding permissive licenses 2021-03-04 08:51:22 +01:00
LICENSE.md README changes 2020-10-21 15:48:07 +02:00
README.md Mention our Mattermost instance in the Readme 2021-03-11 11:39:49 +01: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 Slide Puzzle Todo Widget Gallery
Screenshot of the Printer Demo Screenshot of the Slide Puzzle Screenshot of the Todo 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, and now based in Berlin, 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

For chat, we also have our Mattermost instance