cjordan / hip-sys

Rust bindings for HIP
Apache License 2.0
5 stars 3 forks source link

Allow use of this library without a libamdhip installation #2

Open pwrbob opened 11 months ago

pwrbob commented 11 months ago

I would like to use this library for building an adapter crate for a C code that defines structs involving HIP types. Since I'm not actually using HIP functionality, and just want to have the memory layout be correct, it would be nice to be able to just import the struct definitions.

Would it be possible to separate those out into something like hip-headers-sys, with hip-runtime-sys importing from there and then linking with the actual C library?

Currently I just deleted the build.rs script and removed the links = "amdhip64" entry in the hip-runtime-sys crate, and everything works for me. The above solution would of course be more elegant.

cjordan commented 4 months ago

Hi @pwrbob - sorry for this very delayed reply! I don't think GitHub was watching the repo for me, or something.

I'd like to help with this issue, but I'll need some time to think about it. I hope to get back to you in a weekend or two.