← All ideas
  • Published 21 Jun 2021

Add-ons in Rust language

Wanted to suggest RUST as a possible language for add-ons. The reason would be performance oriented, and the idea is basically that a rust add-on would be a complete rust library project's source. Upon being loaded first time, blender would compile it, then load resulting library file, and call the expected methods. Rust requires "Extern C" interface for calling into C++ code - so, likely some work there, but overall, I see this as something valuable and beneficial to blender project - though likely not as priority as other things. I see rust as that nice spot between scripting languages, and the headaches of tracking memory related bugs coding in C++. Just a thought, but long term, I think it would be a big thing for blender.

Here's a link to FFI info for rust for some tech details on integrations.

doc.rust-lang.org/nomicon/ffi.html

55.6%

Development Status: Open

Upvote 5 Downvote 4
JeffG
21 Jun 2021

5 Comments

JeffG Author

Just wanted to add another comment here with regards to Web Assembly being used as plugins, using Wasmtime, or similar wasm host. The WASI interface is basically how plugins interact with the host. There's a wasmtime-c++ project for embedding in C++ app, and also a project called "wit-bindgen" that will eventually include a C++ hostable wasm container. WebAssembly has the benefits of security and performance. Plugins could be "compiled" (and not readable in any useful manner), which would vastly enhance the plugin market as then you could maintain some competitive advantage, which is something that most would want, and incentivizes decent size companies to create more plugins. Lots of languages compile to wasm, and thus someone could use C# for instance (any language that can compile to wasm) Just a thought.

1
thinsoldier

You can compile the majority of your code written in any language and then have a simple python bridge that speaks to blender.

1
testure

not going to happen, just learn python.

wiki.blender.org/wiki/Reference/AntiFeatures

1
ManBlender

Recompile blender from cpp to Rust..

JeffG Author

wasmtime-C++ could be an alternative for plugins if they're willing to integrate it.