#tk #gui-applications #bindings #toolkit #graphics #graphical

rstk

A Rust binding for the Tk graphics toolkit. Tk is suitable for creating simple GUI programs or interactive graphical displays. This library supports a large portion of the Tk API, in a generally rust-like style.

3 releases (breaking)

0.3.0 Nov 23, 2023
0.2.0 Nov 10, 2023
0.1.0 Jul 25, 2021

#928 in GUI

Download history 1/week @ 2024-07-21 26/week @ 2024-07-28 13/week @ 2024-08-11 5/week @ 2024-08-18 14/week @ 2024-08-25 12/week @ 2024-09-01 1/week @ 2024-09-08 4/week @ 2024-09-15 26/week @ 2024-09-22 60/week @ 2024-09-29 2/week @ 2024-10-06

137 downloads per month
Used in 4 crates

MIT license

320KB
7K SLoC

rstk

A Rust binding for the Tk graphics toolkit.

Overview

rstk opens and communicates with Tk's wish program as a separate process. The library provides:

  • low-level functions to directly communicate with wish, suitable for writing additional extensions
  • high-level API to write GUI applications with minimal knowledge of Tk.

Example

A simple hello-world example:

use rstk::*;

fn main() {
  let root = rstk::start_wish().unwrap();

  let hello = rstk::make_label(&root);
  hello.text("Hello from Rust/Tk");

  hello.grid().layout();

  rstk::mainloop();
}

MIT Licence

Copyright (c) 2021-23, Peter Lane peterlane@gmx.com

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Dependencies