

A high-performance, bindless graphics API for Rust - cjfont
https://github.com/gfx-rs/gfx-rs

======
bjz_
Hey there HN! I am one of the authors of this library - if you have any
questions, feel free to ask. Kvark, one of our key contributors recently did a
talk at the Toronto meetup[0] (starts from ~53:00) discussing some of the
design of the API.

Bear in mind that the API still could use more work, and could be documented
better, but it is already pretty promising. We currently only support OpenGL
as a back-end, but hope to support more APIs in the future. This support is
currently blocked on a some language features being fully implemented.

The biggest project built using gfx-rs to date is hematite[1] - a re-
implementation of Minecraft. Colin Sherratt is also doing some neat work with
it in his engine, snowmew[2], which is more graphics intensive.

If you are interested in having a chat with us, feel free to hop on our gitter
room[1] or #rust-gamedev (irc.mozilla.org).

\- [0]: [https://air.mozilla.org/toronto-rust-meetup-
october-2014/](https://air.mozilla.org/toronto-rust-meetup-october-2014/)

\- [1]:
[https://github.com/PistonDevelopers/hematite](https://github.com/PistonDevelopers/hematite)

\- [2]:
[https://github.com/csherratt/snowmew/](https://github.com/csherratt/snowmew/)

\- [3]: [https://gitter.im/gfx-rs/gfx-rs](https://gitter.im/gfx-rs/gfx-rs)

~~~
mackwic
Can you tell us a bit more about the history of the project ? Are you a game
developer ? Why did you put so much work in such a huge project ? (thanks for
that ! That's wonderful)

~~~
bjz_
> Can you tell us a bit more about the history of the project?

I wrote an outline of my wishes for a graphics API in a README at the end of
last year, then pushed it to an empty Github repo. Nothing really happened for
eight months as I worked on other projects in the Rust ecosystem. Out of the
blue kvark contacted me wishing to collaborate. He has similar gripes to me
with respect to graphics APIs, but unlike me he has had a large amount of
experience in professional game development. It is thanks to him that we are
where we are today.

We still have a long way to go towards making gfx-rs a polished and production
ready. A great deal of the ugliness stems from us lacking a few key language
features. Thankfully those are slated to be finished by Rust 1.0, so things
will get better soon!

> Are you a game developer?

No, I'm a CS student who is interested in computer graphics and procedural
generation. I come from an art and illustration background and my original
goal for Rust was to generate my art[0] algorithmically in real-time.
Unfortunately most of my time over the last couple of years has been spent
helping to build up the Rust ecosystem to a stage where it is a viable choice
for game developers.

> Why did you put so much work in such a huge project?

I could sit around battling with clunky tools like C++, but if everyone did
that then nothing would change. Instead I have chosen to sacrifice some of my
'project time' towards helping to make Rust look like a viable choice for my
peers. I may struggle to ever finish my actual project, but if I can help
other people create wonderful stuff in the future then I will consider my time
well spent.

\- [0]: [http://voyager3.tumblr.com/](http://voyager3.tumblr.com/)

~~~
twic
> Unfortunately most of my time over the last couple of years has been spent
> helping to build up the Rust ecosystem to a stage where it is a viable
> choice for game developers.

Unfortunate for you, but fortunate for a great many other people. Thank you
for doing this.

~~~
bjz_
No worries! I'm glad to be of service. At any rate, my work has certainly
helped me land a couple of sweet internships. Doing work on interesting
projects always looks good on your resume. :)

------
cmrx64
Another gfx-rs contributor here. It still has a long way to go, but we've made
some solid progress, but some in-progress language changes will enable to next
iteration of our API, with a lot of simplification to our public interface.
It's still a WIP!

~~~
twic
What language changes are you waiting for?

~~~
bjz_
Associated types mainly: [https://github.com/rust-
lang/rust/issues/17307](https://github.com/rust-lang/rust/issues/17307)

------
tree_of_item
Anyone know a nice Rust audio library to go with this? Should we be wrapping
PortAudio or something?

~~~
FreeFull
[http://rust-ci.org/projects/#audio](http://rust-ci.org/projects/#audio)
Here's a list of audio libraries which have travis integration. This includes
bindings to SDL_mixer, portaudio, OpenAL, alsa and libao.

