Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Thin DirectX wrappers for Rust.

License

Unknown and 2 other licenses found

Licenses found

Unknown
LICENSE.md
Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
NotificationsYou must be signed in to change notification settings

MaulingMonkey/thindx

Safer DirectX: Types, fns, lifetimes, tests, real docs, intellisense, examples, debug visualizers, ...

🦀WhenDirectX APIs
📦examplesrust ⮀ c++test coveragelib.rsdocs.rs
✔️Nowthindx::{d3d9,d3d::Compiler,xaudio2,xinput}
⚠️Soon™d3d11, d3d12, dxgi, dxcompiler, dinput
⚠️Eventuallyd2d, dcompute, dsound, dstorage, dwrite, dxr, xact3, uwp::input?
Never?d3d10, d3dx*, ddraw, dplay

GitHubBuild Statuscrates.iodocs.rsLicense

❌ This crate is probably unsound! ❌

I'm exposing a huge legacy C++ API to Rust. Mistakes will happen.

That said, soundnessis avery high priority goal.thindx will add things like extra bounds checks, parametervalidation, extra init, etc. if need be in order to ensure soundness in safe fns whenever possible. When it's notpossible to validate unsoundness away, the fns in question should be markedunsafe. This crate strives to be sounderthan whatever manual FFI you'd write yourself would be, and that's ahigh bar.

But there are some practical limits to this. If a background driver thread invokes UB if it fails to allocate memory,without any direct correlation to specific API misuse like a large integer overflowing, that's a bug I can't sanelymitigate via safe fns. I mean, theoretically I could write a pure-software clone of the entire DirectX runtime... but no.

Additionally, while I'm seeking to validate my APIs via testing, older implementations of the APIs in question may havemore bugs / unchecked parameters / ??? that I'll fail to mitigate due to being unable to trigger them myself. While I'mhappy to investigate, accept pull requests, expand test coverage, etc. it's worth assuming this crate is unsound onolder versions unless you've tested yourself.

⚠️ API major version churn⚠️

0.0.0-yyyy-mm-dd doesn't follow semver.Individualfns are likely to gain/loseunsafe, traits, etc. in a neverending attempt to make DirectX access sound.As such,thindx itself will likely always suffer from major version churn.This isn't too much of a problem until two crates wish to share / passthindx types between themselves.It might be possible to somewhat stabilize some types by exiling them into subcrates, but this has not yet been done.Additionally, individual extension traits / functions / methods will likely never get the same treatment (no need?)

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submittedfor inclusion in the work by you, as defined in the Apache-2.0 license, shall bedual licensed as above, without any additional terms or conditions.

About

Thin DirectX wrappers for Rust.

Topics

Resources

License

Unknown and 2 other licenses found

Licenses found

Unknown
LICENSE.md
Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Languages


[8]ページ先頭

©2009-2025 Movatter.jp