News for hackers. Stuff that matters.
Re:Pixar, Adobe, Apple, Autodesk, and Nvidia Form Alliance f... by kevthecoder on Wednesday August 02, 2023 @05:53AM (#36968867)
Yeah, working with OpenUSD in Rust is difficult. There's been a bit of work on Rust bindings but it's not ready at the moment (https://github.com/vfx-rs/usd-bind). I believe you need the c++ code base locally for the bindings, which adds an extra barrier for development.

A full Rust port of OpenUSD would be very ambitious. It's quite complicated (e.g. the OpenUSD composition rules) and depends on other vfx c++ libraries.

I've been experimenting with implementating a subset of OpenUSD in Rust, but there's lots of challenges given the original codebase. E.g. the c++ code uses lots of base classes, downcasting and there's no lifetime information. It's possible to port these across, but gets ugly in the details (e.g. trying to avoid non-static downcasting in Rust). It would take a lot of effort to do a total idiomatic rewrite given the size of the codebase and how interconnected the pieces are in OpenUSD. I still think it's worth pursuing though, OpenUSD is great.

There are no comments on this comment yet.