ruabmbua / hidapi-rs

Rust bindings for the hidapi C library
MIT License
165 stars 79 forks source link

Reduce package size #144

Closed uklotzde closed 5 months ago

uklotzde commented 5 months ago

The crate package does not need to include all files. Especially not everything in /etc/hidapi.

Before

Packaged 276 files, 2.2MiB (384.3KiB compressed)

After

Packaged 65 files, 472.4KiB (116.4KiB compressed)

uklotzde commented 5 months ago

Unsure about which tasks in the GitHub CI workflow actually need to include the cargo package step for verification.

ruabmbua commented 5 months ago

Lets try it on CI.

ruabmbua commented 5 months ago

Ah I am pretty sure you forgot the --no-default-features flag a few times.

uklotzde commented 5 months ago

Ah I am pretty sure you forgot the --no-default-features flag a few times.

I have force pushed after adding all --no-default-features arguments.

uklotzde commented 5 months ago

With the manual dispatch enabled everyone would be able to run the CI workflow on demand on development branches.

uklotzde commented 5 months ago

Now it should work: https://github.com/uklotzde/hidapi-rs/actions/runs/7682363490

ruabmbua commented 5 months ago

Thx for the contribution. To be honest I actually learned something new about cargo this time. I had no idea you could manually control what files were included when it packages source files. I always thought it did something weird specific to VCS system like git (which would be strange), but now I know better.