This repository contains source code to some example projects in win32. I'm learning rust at the moment and this is a catalogue of my journey. Hopefully it will be useful to you dear reader.
I'd recommend using chocolatey as your package manager.
To install rust,
- Run Powershell or Cmd with administrator privileges.
- Run
choco install rust
to install rust. - Then, run
choco install rustup.install
to install rustup. It installsrustfmt
which is a code formatter for rust.
vscode
If you are using vscode, I'd recommend installing the rust-analyzer
extension.
vim
If you are running vim, I'd recommend installing the [rust-lang/rust.vim](https://github.com/rust-lang/rust.vim)
plugin
The examples are organised in their self-contained folder. All files needed to build and run the examples are in that folder.
To build an example, navigate to the folder in powershell / cmd and type
cargo build
To run the example, type
cargo run
For instance, to run the messagebox example,
PS C:\Code\rust-win32\examples\messagebox> cargo build
Compiling messagebox v0.1.0 (C:\Code\rust-win32\examples\messagebox)
Finished dev [unoptimized + debuginfo] target(s) in 1.04s
PS C:\Code\rust-win32\examples\messagebox> cargo run
Finished dev [unoptimized + debuginfo] target(s) in 0.01s
Running `target\debug\messagebox.exe`
PS C:\Code\rust-win32\examples\messagebox>
If you have any questions, please open an issue.