slint/api/sixtyfps-rs
Simon Hausmann 6acfa53f3e Link to the sixtyfps interpreter crate from the Rust API crate
Our web site and READMEs direct to our Rust API crate, which makes sense as it provides
fundamental traits and types. However as pointed out in
#811 we should advertise the existence of the interpreter API.

Ideally we'd link to the crate documentation that

    (1) perfect matches the version number
    (2) uses sixtyfps.io for our built docs and docs.rs for the published crates

I could not find a way to do this (not without making the crate a dependency and adding features), so
this patch is a compromise that I've seen used in other
crates.
2022-01-11 11:24:18 +01:00
..
sixtyfps-build janitor: Sprinkle #[must_use] over the codebase 2022-01-09 13:46:33 +01:00
sixtyfps-macros Mass update copyright messages to be more REUSE compliant 2021-12-22 10:06:12 +01:00
tests Mass update copyright messages to be more REUSE compliant 2021-12-22 10:06:12 +01:00
Cargo.toml Add a bunch of categories and keywords in some of our Cargo.toml 2022-01-07 17:14:07 +01:00
compile_fail_tests.rs Mass update copyright messages to be more REUSE compliant 2021-12-22 10:06:12 +01:00
docs Remove trailing slash from docs symlink 2020-09-07 11:22:55 +02:00
docs.rs Mass update copyright messages to be more REUSE compliant 2021-12-22 10:06:12 +01:00
lib.rs Link to the sixtyfps interpreter crate from the Rust API crate 2022-01-11 11:24:18 +01:00
README.md Update version number in docs in preparation for the release 2021-11-24 14:10:16 +01:00

SixtyFPS-rs

Crates.io Docs.rs

A Rust UI toolkit

SixtyFPS is a UI toolkit that supports different programming languages. SixtyFPS-rs is the Rust API to interact with a SixtyFPS UI design from Rust.

The complete Rust documentation can be viewed online at https://sixtyfps.io/docs/rust/sixtyfps/.

Getting Started

The crate documentation shows how to use this crate.

Hello World

The most basic "Hello world" application can be achieved with a few lines of code:

In your Cargo.toml add:

[dependencies]
sixtyfps = "0.1.5"

And in your main.rs:

sixtyfps::sixtyfps!{
    HelloWorld := Window {
        Text {
            text: "hello world";
            color: green;
        }
    }
}
fn main() {
    HelloWorld::new().run();
}

The sixtyfps crate documentation contains more advanced examples and alternative ways to use this crate.

To quickly get started, you can use the Template Repository with the code of a minimal application using SixtyFPS that can be used as a starting point to your program.

cargo install cargo-generate
cargo generate --git https://github.com/sixtyfpsui/sixtyfps-rust-template

More examples

You can quickly try out the examples by cloning this repo and running them with cargo run

# Runs the "printerdemo" example
cargo run --release --bin printerdemo

Minimum Supported Rust Version

This crate's minimum supported rustc version is 1.54.0.