# Will there ever be processing library in Rust?

**URL:** <https://discourse.processing.org/t/will-there-ever-be-processing-library-in-rust/11336>\
**Category:** Processing\
**Created:** [May 17, 2019, 3:31pm UTC](https://discourse.processing.org/t/will-there-ever-be-processing-library-in-rust/11336 "2019-05-17T15:31:04Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![sloloo](https://avatars.discourse-cdn.com/v4/letter/s/a87d85/32.png) [@sloloo](https://discourse.processing.org/u/sloloo)\
**Post date:** [May 17, 2019, 3:31pm UTC](https://discourse.processing.org/t/will-there-ever-be-processing-library-in-rust/11336/1 "2019-05-17T15:31:04Z")

</div>

Among all others processing most intuitive and easy to learn lib for creative programming. Are there any plans to rewrite it in Rust for better speed and Wasm compatibility in the future?

---

<div class="post-metadata">

**Author:** ![neilcsmith](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/neilcsmith/32/144_2.png) [@neilcsmith](https://discourse.processing.org/u/neilcsmith)\
**Post date:** [May 17, 2019, 3:43pm UTC](https://discourse.processing.org/t/will-there-ever-be-processing-library-in-rust/11336/2 "2019-05-17T15:43:02Z")

</div>

No idea, but I’d doubt there’ll be a rewrite. The speed argument is seriously questionable - depends where the bottlenecks are. But Graal coming to the JVM brings up at least the possibility of writing a Rust mode for Java Processing that runs on the JVM, and compiling directly to native code, and targetting Wasm.

---

<div class="post-metadata">

**Author:** ![kokoo](https://avatars.discourse-cdn.com/v4/letter/k/7cd45c/32.png) [@kokoo](https://discourse.processing.org/u/kokoo)\
**Post date:** [May 31, 2019, 3:17am UTC](https://discourse.processing.org/t/will-there-ever-be-processing-library-in-rust/11336/3 "2019-05-31T03:17:05Z")

</div>

I think best to rewrite it in D. It’s very similar to java in syntax, 10 times faster and very readable

---

<div class="post-metadata">

**Author:** ![neilcsmith](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/neilcsmith/32/144_2.png) [@neilcsmith](https://discourse.processing.org/u/neilcsmith)\
**Post date:** [May 31, 2019, 6:07am UTC](https://discourse.processing.org/t/will-there-ever-be-processing-library-in-rust/11336/4 "2019-05-31T06:07:13Z")

</div>

@kokoo D is nice, but there’s no way it’s that much faster than Java in general. That would make it 5-10x faster than C! And most Processing sketches will not be CPU bound inside Java code anyway.

---

<div class="post-metadata">

**Author:** ![hamoid](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/hamoid/32/58_2.png) [@hamoid](https://discourse.processing.org/u/hamoid)\
**Post date:** [May 31, 2019, 7:24am UTC](https://discourse.processing.org/t/will-there-ever-be-processing-library-in-rust/11336/5 "2019-05-31T07:24:36Z")

</div>

Not a rewrite, but there’s an alternative:

> **[nannou-org/nannou](https://github.com/nannou-org/nannou)**
>
> A Creative Coding Framework for Rust. Contribute to nannou-org/nannou development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![gaocegege](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gaocegege/32/631_2.png) [@gaocegege](https://discourse.processing.org/u/gaocegege)\
**Post date:** [June 5, 2019, 3:23am UTC](https://discourse.processing.org/t/will-there-ever-be-processing-library-in-rust/11336/6 "2019-06-05T03:23:05Z")

</div>

Processing(Java) is based on JVM. If we want to ship Processing in Rust, we have to implement it natively, similar to p5.js and p5.py.

Or we can wait until there is a Rust interpreter in JVM. Then interprete Rust code in JVM (similar to [https://github.com/processing-r/Processing.R](https://github.com/processing-r/Processing.R)). The speed is low in this way.

BTW, nannou is really promising. Is it possible to port nannou on wasm?

---

<div class="post-metadata">

**Author:** ![neilcsmith](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/neilcsmith/32/144_2.png) [@neilcsmith](https://discourse.processing.org/u/neilcsmith)\
**Post date:** [June 5, 2019, 8:21am UTC](https://discourse.processing.org/t/will-there-ever-be-processing-library-in-rust/11336/7 "2019-06-05T08:21:57Z")

</div>

> [@gaocegege](#):
>
> Or we can wait until there is a Rust interpreter in JVM. … The speed is low in this way.

As I said above, Graal already allows running Rust (and other LLVM languages) on the JVM, and it is not slow! The overhead is ~10%.
