Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
A High-Performance, Procedural GUI Designed for Rapid, Creative Development
Sagebox is a set of GUI tools that let you add windows, graphic controls, and graphical output to your Rust programs using linear, procedural code, without any boilerplate, or the overhead of an event-driven framework.
As a persistent (i.e. retained — but with no need to redraw) set of GUI tools, Sagebox was built from scratch as a platform-agnostic, comprehensive GUI — supporting everything from high-performance, cross-platform applications, fun-with-graphics programs, and console-mode-only projects using GUI controls for development or release.
Sagebox drops cleanly into existing code or new projects when rapidly prototyping or exploring creative ideas.
Tools and Controls in Sagebox start simple and can scale as you want to do more. Additional options for more complexity can be added in as needed through the use of keywords in the function call.
Sagebox manages its own environment, so you don't have to keep track of any of the controls or widgets that are launched, unless you want to.
Features
- Procedural, linear programming style
- No macros or boilerplate
- Console-mode support with add-on GUI-Control integration
- Compatible with other GUI libraries
- Accepts all Rust native types for all functions
- Designed to stay out of the way of your code
note: This initial beta is released as the Windows version to showcase Sagebox’s core architecture ahead of the Linux release and gather community feedback. See Sagebox Roadmap and About This Release for details.
Click here to see examples on Youtube • Github project: https://github.com/Sagebox/Sagebox-rs
Entire Program Example
use *;
Controls Without a Window — Program Example
use *;
Simple and Powerful
By adding just a few more lines of code, more tools can be created.
The above examples show using Sagebox functions as easy library calls, from basic controls (left), to graphics with and without controls (right) – all with just simple function calls without event-driven or GUI programming, representing a small amount of the overall code that stays out of the way and doesn't require any programming or GUI environment.
The middle image, for example, is a one-line function call:
;
image_view_before_after
This can be called as a single function call, with no prior Sagebox initalization. Keyword elements can be added to extend its functionality, and the returned object can be kept by the program to manage the new window, or simply discarded to let Sagebox manage it on your program's behalf while the code continues on.
Using Sagebox in Console Mode
Sagebox can be used for traditional graphics programs with pure graphics and GUI-based controls — or pure Console-Mode applications.
In Console Mode, you can use Sagebox functions to help with the program user-interface, such as simple sliders, buttons, or other controls. You can also bring up entry boxes, quick dialogs, before & after graphics windows, color selectors, or other widgets.
Because these are just simple function calls, you can put them into your existing code without changing your structure or interfering with the rest of your code.
Sagebox requires no program initialization, so you can just drop in any GUI control or other Sagebox function anyhwere and it will work.
Even if your end-product code doesn’t use any GUI-based graphic controls, Sagebox can still be useful during development, helping with user input and visualizing program flow while you’re developing and debugging.
Examples with Source Code, Screenshots, and Videos
Below are some of the examples included in the Github main page.
These range from simple Hello World programs demonstrating handling events, to pure graphics programs, and medium and realtime large-scale programs as examples of personal, fun-with graphics, educational/research, or industry-related use.
Sagebox has been used professionally in the tech industry by companies like Pentair and Pioneer, and most recently in the semiconductor field at ASML, where it was called “that magic program.”
click on the example project names to go directly to the project directory with example code and screenshots.
Example | Applicable Uses | Description (see below for more details on each example) |
---|---|---|
handle_events |
Learning Basics. | A 10-line example demonstrating one method of using events when using controls and drawing graphics.See this Example on Youtube |
console_sine_wave |
Console-Mode Programs with Graphics Controls. Easily Adding onto Existing Code. | Three short examples showing how to add GUI controls to a Console-Mode-only app in just a few lines (5-7 lines each).See this Example on Youtube |
double_pendulum |
Teaching, Hobbyist, Fun-with-Graphics. Medium-sized projects. Non-GPU realtime graphics. | Three graphical Double Pendulum examples, from simple graphics to comprehensive controls and abilities.See this Example on Youtube |
image_view_sobel |
One-Line Quick Functions. Industry, Research, Hobbyist. | Two examples using one-line Saegbox ImageView calls to display bitmap and image data in a GUI window. See this Example on Youtube |
marching_squares_realtime |
Larger projects. Multi-threading. Industry, Teaching, Research. Non-GPU realtime graphics. | A comprehensive 1500+ line real-time 60fps demo showing Sagebox in large-scale applications. See this Example on Youtube |
meta_ball_explorer |
Graphics Programming. Multi-threading. Larger Projects. Education, Industry. Non-GPU realtime graphics. | A comprehensive, real-time 60fps Metaball Explorer featuring fully animated, melting and merging 3D metaballs rendered in a 2D graphics space — with continuous visual output, dynamic display styles, and a full set of graphic controls to play with.See this Example on Youtube |
plug_in_widgets |
Industry, Embedded, Personslized Widgets, Arduino. | Demonstrates user-created plug-in widgets to emulate embedded systems graphically. |
smooth_mandelbrot |
Fun-with-Graphics, education. | A small, pure-graphics demo showing a smooth-colored Mandelbrot set with title text. |
Support Active Development
Sagebox is actively developed and welcomes early support from developers and contributors.
Sagebox was developed as a powerful and comprehensive GUI that is also very easy to use. It is free to use in personal and commercial Rust projects. Contributions keep it free and also keep it growing. (See Sagebox Roadmap)
Your support helps add new features, documentation, and to continue to provide Sagebox free to the Rust community.
See more examples and documentation visit:
https://github.com/Sagebox/Sagebox-rs