Skip to content

Conversation

etjones
Copy link
Contributor

@etjones etjones commented Sep 19, 2023

  • previously we had an issue where binaries were included in the built python wheel packages. Fixed this by making an explicit [lib] section in the Cargo.toml with crate-type = ["cdylib"]
  • linux build & publish are re-enabled in the python.yml file
  • Had to make some explicit imports in main.rs; adding an explicit [lib] caused the build to fail otherwise.

I believe PyPI publish should just work, but you'll have to try that out. The build worked for all platforms, and the wheels generated contain the correct dynamic library files.

…what was causing the executable to be put in wheels

- pyproject.toml: add "python-binding" to features for conditional compilation
- main.rs:  `cargo build` was failing for the vtracer executable; I think the previous import scheme had an implicit dependency on the library being built and called 'vtracer'. The other way to do this would have been to add an explicit dependency to the [[bin]], but making explicit imports here solves things directly
@tyt2y3
Copy link
Member

tyt2y3 commented Sep 22, 2023

Let me try

@tyt2y3 tyt2y3 merged commit fa1ab68 into visioncortex:master Sep 22, 2023
@linkmauve
Copy link
Contributor

This broke the Rust library usecase fyi, the compiler doesn’t find pub things from this crate due to the cdylib.

@tyt2y3
Copy link
Member

tyt2y3 commented Oct 22, 2023

@linkmauve can you elaborate what do you mean? If the cli binary crate can build, so should any downstream.

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

Successfully merging this pull request may close these issues.

3 participants