9 releases

0.1.8 Dec 6, 2020
0.1.7 Dec 6, 2020
0.1.0 Nov 17, 2020

#1967 in Game dev

41 downloads per month
Used in 2 crates (via fna3d)

MIT license

3MB
79K SLoC

C 63K SLoC // 0.1% comments Rust 13K SLoC // 0.0% comments Python 2.5K SLoC // 0.4% comments OCaml 253 SLoC Visual Studio Project 240 SLoC Perl 151 SLoC // 0.0% comments Visual Studio Solution 51 SLoC Shell 8 SLoC // 0.2% comments

fna3d-sys

Rust FFI bindings to FNA3D generated with bindgen

Note

To compile FNA3D, we need to have mojoshader_version.h in FNA3D/MojoShader. It is generated when we run camke for MojoShader. However, crates.io doesn't allow us to generate the file when we build the crate. Therefore, we carefully publish this crate with cargo publish --allow-dirty, including mojoshader_version.h.

mojoshader_version.h is manually cached in wrappers directory and copied to FNA3D/MojoShader when building.


lib.rs:

Rust FFI bindings to FNA3D generated with bindgen

WARNING: Probablly it doesn't compile on Window. I need to buy one.

I'm using bindgen with default settings, but if you're interested, see the API documentation of Builder to configure enum generation.

MojoShader types

These types are concrete while mojoshader types under crate:: don't tell the field types.

Dependencies