Slint is an open-source declarative GUI toolkit to build native user interfaces for Rust, C++, JavaScript, or Python apps.
Find a file
Jocelyn Turcotte 93c28d12db wasm32: Fix reentrancy issues with invoke_from_event_loop
If it's called on top of the an event processed on the event loop,
it might be that GLOBAL_PROXY is already borrowed further down
the stack.
2021-12-13 15:51:28 +01:00
.cargo Apply pre-commit hooks to all files 2021-08-17 22:38:16 +02:00
.github/workflows Re-enable the use of Rust nightly for the docs 2021-12-13 09:01:20 +01:00
.vscode Move resources to the website repo 2020-11-25 11:56:10 +01:00
api Improve timer docs 2021-12-12 09:29:16 +01:00
docker Add missing riscv docker file for cross 2021-09-10 13:21:38 +02:00
docs Apply suggestions from code review 2021-12-10 11:28:09 +01:00
examples Bump version number to 0.1.6 2021-11-24 14:19:09 +00:00
helper_crates Fix warnings when generting documentation 2021-12-12 14:33:37 +01:00
scripts Avoid the use of symlinks for source files 2021-12-13 15:51:10 +01:00
sixtyfps_compiler Avoid the use of symlinks for source files 2021-12-13 15:51:10 +01:00
sixtyfps_runtime wasm32: Fix reentrancy issues with invoke_from_event_loop 2021-12-13 15:51:28 +01:00
tests Fix the tests after the change to the key codes 2021-12-10 11:28:09 +01:00
tools Allow to access color names form the Colors namespace 2021-12-08 16:35:11 +01:00
vscode_extension Bump version number to 0.1.6 2021-11-24 14:19:09 +00:00
xtask Bump version number to 0.1.6 2021-11-24 14:19:09 +00: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 Clean up generated C++ include directory handling 2021-09-18 07:32:53 +02:00
.pre-commit-config.yaml Add .pre-commit-config.yaml 2021-08-17 22:38:16 +02:00
Cargo.toml Avoid the use of symlinks for source files 2021-12-13 15:51:10 +01:00
CHANGELOG.md Add a Keys namespace in the .60 language with all the string constant for special keys 2021-12-10 11:28:09 +01:00
CMakeLists.txt C++: fix compilation of example when the Qt feature is disabled 2021-11-24 13:32:39 +01:00
CONTRIBUTING.md Document pre-commit setup in CONTRIBUTING.md 2021-08-17 22:38:16 +02:00
Cross.toml Add a RISC-V config to Cross.toml 2021-09-10 13:36:03 +02:00
cspell.json Bump cSpell version 2021-09-10 14:01:24 +02:00
FAQ.md Update the commercial licensing section with new information 2021-12-13 13:43:16 +01:00
LICENSE.md README changes 2020-10-21 15:48:07 +02:00
README.md Link to the template repos from the README 2021-09-27 10:47:37 +02:00
rustfmt.toml Initial commit laying out the structure 2020-05-04 10:49:58 +02:00

SixtyFPS

Build Status Discussions

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.

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

SixtyFPS is in active development. Its state of development depends on the kind of application.

  • Embedded: Ready! SixtyFPS is already happily used by customers on embedded devices (running on an Arm processor with Linux). We are also looking into supporting microcontrollers.
  • Desktop: In Progress. SixtyFPS is usable on Windows, Linux and Mac. We plan on building up the desktop support in subsequent releases to reach the level of integration we're aiming for.
  • Mobile (Android/iOS): Todo. We haven't started supporting mobile platforms yet, but it is our intention to do so in the future.
  • Web: Our focus is on Embedded and Desktop applications. We do not intend to compete in the web space as a primary platform. That said, SixtyFPS can compile to WebAssembly and the demos are running in a web browser. But the web support is currently limited to demo purposes.

Documentation

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 familiar 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, optimization, and finally code generation. It provides different back-ends 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 back-ends:

  • 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.

Tooling

We have a few tools to help with the development of .60 files:

  • A LSP Server that adds things like auto-complete and live preview of the .60 files to many editors
  • It is bundled in a Visual Studio Code Extension accessible from the market place
  • A sixtyfps-viewer tool which display the .60 files. With the --auto-reload argument, makes it easy to preview your UI as you are working it (when using the LSP preview is not possible)
  • An online editor to try out .60 syntax without installing anything (sources)
  • An updater to convert the .60 files from previous version to the newer version
  • An experimental Figma importer

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:

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