#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

#992 in GUI

Download history 1/week @ 2024-07-09 5/week @ 2024-07-16 13/week @ 2024-07-23 13/week @ 2024-07-30 1/week @ 2024-08-06 15/week @ 2024-08-13 5/week @ 2024-08-20 17/week @ 2024-08-27 7/week @ 2024-09-03 2/week @ 2024-09-10 6/week @ 2024-09-17 34/week @ 2024-09-24 49/week @ 2024-10-01 1/week @ 2024-10-08

60 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