
Piston, a prototype video game engine written in Rust - kibwen
https://github.com/PistonDevelopers/piston-workspace/releases/tag/0.1
======
kibwen
Despite being in such an immature state, Rust has an encouragingly large
community of game development enthusiasts (107 users in the #rust-gamedev IRC
channel as we speak). I'm very excited to see engines like this emerge from
community efforts!

~~~
Arelius
To be fair, Rust may be the first modern language seemingly designed around
the same set of problems that we encounter in Game Development. I'm actually
pretty surprised that it's as little known in GameDev as it is. That is
perhaps due to it's immaturity.

~~~
teamonkey
Genuinely curious: what makes it especially appropriate for gamedev?

~~~
pcwalton
The AAA game developers we've talked to are universally in agreement that the
lack of garbage collection and the fine-grained control over memory that Rust
provides are extremely important for game development.

~~~
teamonkey
For sure that'd be useful for AAA dev, but unless the console manufacturers
are willing to incorporate it into the official toolchains it's dead in the
water.

~~~
hornetblack
Rust and the PS4 toolchain are both LLVM. So I can see some possibility there.
Rust currently runs on it's own patchset now, but the intention is to be fully
working with mainline LLVM.

~~~
Arelius
Does Rust's patches affect codegen? Hypothetically, if not, you should be able
to just feed the IL files into the PS4 toolchain.

~~~
hornetblack
As dbaupp said it's only an optimisation. So you should be able to use
mainline LLVM now. Therefore using PS4 with Rust wouldn't be too complicated.

------
mitchmindtree
Absolutely love this rusty community. It's refreshing being surrounded by so
many people consistently passionate about the language and its potential.
Really looking forward to what this turns into!

------
erickt
If anyone is interested in a meetup about Rust's growing gaming
infrastructure, we are having a meetup on 6/26 ([http://www.meetup.com/Rust-
Bay-Area/events/171111672/](http://www.meetup.com/Rust-Bay-
Area/events/171111672/)) and a hackathon on 6/28 ([http://www.meetup.com/Rust-
Bay-Area/events/183377112/](http://www.meetup.com/Rust-Bay-
Area/events/183377112/)). If you can't make it in person, we will be streaming
the meetup over [https://air.mozilla.org](https://air.mozilla.org), where you
can watch it live.

------
_random_
I did not know that Rust had C#-style attributes (annotations)! Will they
allow creating custom ones and reflecting on them at runtime?

~~~
pcwalton
Like type information, attributes are generally boiled away during the build
in order to save space in the executable. So you can't reflect on them at
runtime.

However, you can make custom attributes expand to arbitrary generated code via
the macro system, allowing something similar. This is how we do fast JSON
serialization, for instance: the #[deriving(Encodable)] attribute expands to
optimized, type-specialized code at compile time, avoiding costly reflection
at runtime. (Note that this is an experimental feature, so it may change post
1.0.)

~~~
_random_
Reflection is not possible in Rust?

~~~
pcwalton
It is somewhat supported at the moment, but it's experimental and we may
remove the support for it. Reflection always carries an overhead in terms of
binary size and as a result many of us feel that it's inappropriate for a low-
level systems language like Rust.

~~~
Arelius
In theory, given the attribute, and macro system, it should be possible to
implement this as a library in the language, correct? I think that is vastly
preferred over a constant runtime always hanging around.

