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

Installing with cargo install? #1

Open
tombh opened this issue Jun 30, 2022 · 2 comments
Open

Installing with cargo install? #1

tombh opened this issue Jun 30, 2022 · 2 comments

Comments

@tombh
Copy link

tombh commented Jun 30, 2022

I like this project! I agree, I think this is the better way to compile shaders. Personally I think it makes it more intuitive when you're actually using a separate tool to do the SPIRV compiling.

I tried installing it with cargo install --git https://github.com/expenses/rust-gpu-cli-builder, but when running the global binary I get:

Could not find librustc_codegen_spirv.so in library path

I'm still relatively new to Rust, so maybe this is an easy fix, I'm not sure. Anyway, it works totally fine when just doing the normal git clone .. then cargo run ...

@expenses
Copy link
Owner

Hey! Glad you like it. So to my understanding, spirv-builder puts the librustc_codegen_spirv.so library in the rust-gpu-cli-builder target directory and dynamically links with it. This means that you can't currently use rust-gpu-cli-builder with cargo install because this librustc_codegen_spirv.so isn't there.

The way I've been using this crate is to cd into the rust-gpu-cli-builder directory to compile shaders. It's not very elegant but it does work. I would love to get cargo install working though. Perhaps this would be possible by copying librustc_codegen_spirv.so about?

I'm pretty busy at the moment, but I think I'll try and add a note to the readme about cargo install not currently working and when I have more time I'll look into this more. Thanks for filing the issue :)

@tombh
Copy link
Author

tombh commented Jul 1, 2022

Sure, that makes sense. And exactly, it still works perfectly for me just using cargo run, so no rush! 😊

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

2 participants