https://github.com/connorpower/directx
A toy DirectX project in Rust
https://github.com/connorpower/directx
directx rust win32 windows
Last synced: 3 months ago
JSON representation
A toy DirectX project in Rust
- Host: GitHub
- URL: https://github.com/connorpower/directx
- Owner: connorpower
- License: mit
- Created: 2022-10-21T10:46:24.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-12-09T04:02:20.000Z (over 3 years ago)
- Last Synced: 2025-10-09T19:55:28.267Z (9 months ago)
- Topics: directx, rust, win32, windows
- Language: Rust
- Homepage:
- Size: 659 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# directx


A small DirectX project in Rust. The project consists of a `::win32` library to
abstract FFI, together with a `::game` binary which serves as a simple test-bed.
[Documentation](http://connorpower.com/directx/)
## Requirements
- Windows 11+ or newer
- DirectX 10 capable graphics card
## Usage
To build and run the example, a simple cargo run suffices:
```powershell
cargo run
```
## Tracing Support
Both the `::win32` library and the example binary are instrumented with tokio's
excellent [`::tracing`](https://github.com/tokio-rs/tracing) library.
To enable tracing, the project must be built with the `stdio` feature. The
`stdio` feature flag changes the project from a Windows subsystem to a Console
subsystem and ensure that stdin/stdout/stderr are attached to the process.
Set the appropriate tracing level environment variable and execute the program
from the command line to view trace output:
```powershell
$env:RUST_LOG = "trace"
cargo run --features stdio
```
#### Example

## License
This project is licensed under the [MIT license](LICENSE).
### Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in this repository by you, shall be licensed as MIT, without any
additional terms or conditions.