Skip to content

Conversation

@milesial
Copy link
Contributor

@milesial milesial commented Nov 6, 2025

In-between #477 and now, some refactor dropped the actual binding generation when using stubs, leading to an error

$ cargo build --features stub-api
...
warning: [email protected]: Building with stub API - NIXL functions will abort if called
error: couldn't read `/data/nixl/target/debug/build/nixl-sys-091d69c4bbf874e2/out/bindings.rs`: No such file or directory (os error 2)
  --> src/bindings/rust/src/lib.rs:39:5
   |
39 |     include!(concat!(env!("OUT_DIR"), "/bindings.rs"));
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: [email protected]: Building with stub API - NIXL functions will abort if called
error: could not compile `nixl-sys` (lib) due to 1 previous error

This PR fixes that.

Signed-off-by: Alexandre Milesi <[email protected]>
Copy link
Contributor

@jthomson04 jthomson04 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not for this PR, but we definitely need some CI test for the stub api

@roiedanino
Copy link
Contributor

roiedanino commented Nov 6, 2025

I think it can be a great idea to add

cargo build --features stub-api

in .gitlab/test_rust.sh

I think it can be added in this PR, it's just a single line of change

@gleon99
Copy link
Contributor

gleon99 commented Nov 6, 2025

I think it can be a great idea to add

cargo build --features stub-api

in .gitlab/test_rust.sh

I think it can be added in this PR, it's just a single line of change

+1

Signed-off-by: Alexandre Milesi <[email protected]>
@milesial
Copy link
Contributor Author

milesial commented Nov 6, 2025

I think it can be a great idea to add

cargo build --features stub-api

in .gitlab/test_rust.sh

I think it can be added in this PR, it's just a single line of change

Added

@milesial
Copy link
Contributor Author

milesial commented Nov 7, 2025

@roiedanino can this be merged?

@roiedanino
Copy link
Contributor

/build

@roiedanino roiedanino enabled auto-merge (squash) November 9, 2025 07:12
@roiedanino roiedanino merged commit 3995f17 into main Nov 9, 2025
22 checks passed
@roiedanino roiedanino deleted the alexandrem-fix-stubs branch November 9, 2025 08:08
e-ago pushed a commit to e-ago/nixl-doca-31 that referenced this pull request Nov 12, 2025
* Fix rust build with stubs

Signed-off-by: Alexandre Milesi <[email protected]>

* Add stub build test

Signed-off-by: Alexandre Milesi <[email protected]>

---------

Signed-off-by: Alexandre Milesi <[email protected]>
Co-authored-by: Raul Akhmetshin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants