https://github.com/rodrigocfd/winsafe-examples
Examples of native Windows applications written in Rust with WinSafe.
https://github.com/rodrigocfd/winsafe-examples
directx ffi gui native rust win32 windows
Last synced: 9 months ago
JSON representation
Examples of native Windows applications written in Rust with WinSafe.
- Host: GitHub
- URL: https://github.com/rodrigocfd/winsafe-examples
- Owner: rodrigocfd
- License: mit
- Created: 2021-03-30T20:00:56.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2025-03-01T13:59:54.000Z (over 1 year ago)
- Last Synced: 2025-04-09T15:07:11.687Z (about 1 year ago)
- Topics: directx, ffi, gui, native, rust, win32, windows
- Language: Rust
- Homepage: https://crates.io/crates/winsafe
- Size: 1.29 MB
- Stars: 74
- Watchers: 3
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# WinSafe examples
This repo contains several examples of native Win32 applications written in [Rust](https://www.rust-lang.org) with [WinSafe](https://github.com/rodrigocfd/winsafe). All examples follow the same program structure, which is the recommended way to build a WinSafe application.
Each directory is a full application, with is own `Cargo.toml`.
## Resources
Each example has a `.res` file with its [application resources](https://en.wikipedia.org/wiki/Resource_(Windows)) (manifests, icons, dialogs and so on). You can edit the `.res` file with any resource editor, or even generate your own `.res` by compiling a `.rc` script.
The `.res` file is linked into the final `.exe` by the `build.rs`, which is a [Cargo build script](https://doc.rust-lang.org/cargo/reference/build-scripts.html).
## Examples list
Note that the order can change with new examples being added.
| Example | Screenshot |
| - | - |
| 01 [Button click](01_button_click/) |  |
| 02 [Native controls](02_native_controls/) |  |
| 03 [Dialog resources](03_dialog_resources/) |  |
| 04 [Custom control](04_custom_control/) |  |
| 05 [Resizable layout](05_resizable_layout/) |  |
| 06 [Tabs](06_tabs/) |  |
| 07 [Video playback](07_video_playback/) |  |
## License
Licensed under [MIT license](https://opensource.org/licenses/MIT), see [LICENSE.md](LICENSE.md) for details.