
Nannou: Creative Coding Toolkit for Rust - bpierre
https://nannou.cc/
======
bjz_
Nannou was recently bumped to 0.9 - they had a nice blog post here, with some
neat examples (some commercial) including laser projection:

[https://nannou.cc/posts/nannou_v0.9](https://nannou.cc/posts/nannou_v0.9)

Being a big Processing fan, and a bit of an artist too, this kind of creative
framework is something I have been hoping was available way back when I
started playing around with Rust in late 2012. Thanks goes to the Nannou team
for all their hard work over the years in making this possible!

~~~
mitchmindtree
Thanks for the kind words bjz, it means a lot coming from yourself!

I know you're busy with language design these days (and I would never stop
you, I think what you are doing is some of the most important work there is
right now!), but if you ever get the itch for some creative coding it'd be an
honour to see you give nannou a shot and get your thoughts on what's missing,
could be improved, etc :)

------
modernerd
An Instagram user I follow has a bunch of Nannou demos (unsure if this is also
the project's author):

[https://www.instagram.com/mactuitui/](https://www.instagram.com/mactuitui/)

Nannou has a pretty long initial setup and build time (about 15 minutes on
macOS for me) compared with Processing and similar, but it's worth exploring
for the scope and goals it has:
[https://guide.nannou.cc/why_nannou.html#goals](https://guide.nannou.cc/why_nannou.html#goals).

~~~
MacTuitui
Thanks for the link! I'm not directly involved in the project (yet), but the
team has been so nice to me over the last six months I've been using nannou
daily that when they wanted to feature my dailies on the site, of course I
said yes!

~~~
whytaka
Some of your art makes me think you've deciphered the genetic algorithm of
certain species. Very inspiring!

------
anreekoh
This looks really cool! Is it a coincidence that this has the same name as the
Aphex Twin song?

~~~
stefs
nah, it's named after the song (according to the docs -
[https://guide.nannou.cc/why_nannou.html](https://guide.nannou.cc/why_nannou.html))

------
cultofmetatron
Learning rust while doing the raytracer challenge. this Looks amazing! does it
work with wasm?

~~~
kvark
It has moved to Vulkan, so unlikely...

~~~
mitchmindtree
Hey kvark, I really appreciate all the work you're putting into the Rust
graphics ecosystem!

Just fyi, we are closely watching both wgpu-rs and rendy and will continue to
do so over the next couple of months. Vulkano has been a mission to use to say
the least, maintainership is dwindling (most of the recent PRs are from us),
and the Rust graphics landscape has changed quite a bit since we made the
decision to use it almost a year ago. Both wgpu and rendy seem like strong
contenders for the future of nannou's graphics, but we probably won't go down
that road for a couple more nannou releases at least while we focus on some
other areas.

We're particularly interested in rendy's render graph [1] approach to a
higher-level, near-zero-cost API. Are there plans for something similar in
wgpu?

Also, I realise that wgpu is web-first, but I'd be curious to get your
thoughts on its potential for use in native applications for installations and
projection mapping - e.g. will it be possible to spawn multiple swapchains for
multiple windows? Or will it be purely focused on a single window web
experience?

Anyway, we'll do another post soon about our thoughts on the future of
graphics in nannou, just wanted to let you know you're on our minds :)

[1]:
[https://github.com/amethyst/rendy#rendergraph](https://github.com/amethyst/rendy#rendergraph)

~~~
kvark
Wow, thanks for such a detail response!

Delaying with decision to adopt Rendy or wgpu-rs is reasonable: both are still
maturing, and are in the early adopter phase.

> We're particularly interested in rendy's render graph [1] approach to a
> higher-level, near-zero-cost API. Are there plans for something similar in
> wgpu?

No, this would not ever be in wgpu (or feasible on top of WebGPU in general),
since it's providing safety at lower level, and there is no way to get near-
zero-cost there.

Saying that, I'm not sure what the bottlenecks of your use-case are. Do you
plan on submitting a lot of different work on GPU, i.e. heavily use command
recording on CPU (as opposed to relying on GPU instances), to the point of
being sensitive to CPU performance? My expectation from a creative coding
framework would be that zero-cost is not the foremost priority.

> will it be possible to spawn multiple swapchains for multiple windows? Or
> will it be purely focused on a single window web experience?

Yes, I think this is already possible in wgpu-rs, although nobody tested
multi-windows yet. In general, we put heavy focus on native usage.

Looking forward to your post!

------
carlmr
Very cool, especially considering UI is still somewhat underserved in Rust.

------
mwill
What a coincidence, I've been using Clojure with Quil recently and bumping up
on the limits of what it can do easily, so I've been thinking about my
options.

I was going to settle in tonight and take a look at using Common Lisp and
OpenGL directly, but I'm interested in Cinder or openFrameworks but would
rather play around in something other than C++.

I'll add nannou to my list but does anyone have any other recommendations?

------
amelius
Speaking of creative coding, does Rust have an official GUI package yet?

~~~
nestorD
To my knowledge there is no clear dominant package but things are improving
quickly : [https://areweguiyet.com/](https://areweguiyet.com/)

------
num3ric
Is it likely that Rust will have support for hot reloading? I love the
language, but having a fast iteration cycle is essential for this type of
work.

~~~
whyever
Depending on what you mean, it does:
[https://github.com/phaazon/warmy](https://github.com/phaazon/warmy)

------
kkaranth
It would be nice to see some examples with code. The showcases section is
empty.

~~~
maccam94
The author talks about some of their projects, with videos, here:
[https://www.reddit.com/r/rust/comments/byyu30/vulkan_lasers_...](https://www.reddit.com/r/rust/comments/byyu30/vulkan_lasers_and_more_in_the_biggest_update_yet/eqohiis)

~~~
kkaranth
Thanks!

