Skip to content

connorpower/directx

Repository files navigation

directx

CI Status Rustdocs

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

Requirements

  • Windows 11+ or newer
  • DirectX 10 capable graphics card

Usage

To build and run the example, a simple cargo run suffices:

cargo run

Tracing Support

Both the ::win32 library and the example binary are instrumented with tokio's excellent ::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:

$env:RUST_LOG = "trace"
cargo run --features stdio

Example

tracing example

License

This project is licensed under the MIT 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.

About

A toy DirectX project in Rust

Topics

Resources

License

Stars

Watchers

Forks

Languages