Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check in usd-sys bindings #3

Closed
Jasper-Bekkers opened this issue Oct 15, 2021 · 6 comments
Closed

Check in usd-sys bindings #3

Jasper-Bekkers opened this issue Oct 15, 2021 · 6 comments

Comments

@Jasper-Bekkers
Copy link

Jasper-Bekkers commented Oct 15, 2021

Right now when doing a clean checkout of this repository and building the rust project you're faced with this error:

error: failed to load manifest for workspace member `/home/jasper/vfx-rs/usd-bind/usd-rs/crates/usd`

Caused by:
  failed to load manifest for dependency `usd-cppstd`

Caused by:
  failed to load manifest for dependency `usd-sys`

Caused by:
  failed to read `/home/jasper/vfx-rs/usd-bind/build/usd-sys/Cargo.toml`

Caused by:
  No such file or directory (os error 2)

For most of the Rust projects that we've maintained, we've checked in the -sys crate so that it's a lot easier for people to get up and running with the crate, and one can do a local checkout pretty easily without having to have a complex build environment.

Another implication of the way it's set up now, is that one can't easily patch the published crate with a local one through the [patch.crates-io] in Cargo.toml and quickly iterate / do fixes.

Usually what we do is we automate the process of generating the bindings through a simple Rust project that's manually invoked. Examples include https://github.com/MaikKlein/ash and https://github.com/gfx-rs/rspirv

@scott-wilson
Copy link
Member

scott-wilson commented Oct 15, 2021 via email

@Jasper-Bekkers
Copy link
Author

Jasper-Bekkers commented Oct 15, 2021

Having a docker container is a nice workaround and potentially a decent workflow for manually updating the -sys bindings - but it still deviates quite a bit from the regular cargo build workflow that is ubiquitous amongst rust projects and I see very little reason to deviate from this for this particular case tbh.

@scott-wilson
Copy link
Member

scott-wilson commented Oct 15, 2021 via email

@Jasper-Bekkers
Copy link
Author

Would you accept a PR to make it more in line with conical rust build steps?

@anderslanglands
Copy link
Contributor

anderslanglands commented Oct 15, 2021 via email

@luke-titley
Copy link
Collaborator

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants