sqlite-zstd icon indicating copy to clipboard operation
sqlite-zstd copied to clipboard

Add rust lib option, update zstd, and extern rusqlite

Open kodeschreiber opened this issue 1 year ago • 0 comments

Good Evening,

This PR edits the following:

  1. Adds the "lib" flag to the "[lib]" section to make crate usable as a Cargo library
  2. Updated the version of the "zstd" to fix a bug in version "0.11.2" (see below for details)
  3. Wrapped a parameter with "Some()" to make compatible with updated zstd API
  4. Added an "pub extern crate rusqlite" to help resolve compilation issues

Most of these changes are based on existing issues and issues that I also encountered with the current 3.2.0 release. The zstd error I was running into was:

error[E0432]: unresolved import `zstd_sys::ZSTD_cParameter::ZSTD_c_experimentalParam6`
   --> <USER>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/zstd-safe-5.0.2+zstd.1.5.2/src/lib.rs:467:13
    |
467 |             ZSTD_c_experimentalParam6 as ZSTD_c_targetCBlockSize,
    |             -------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |             |
    |             no `ZSTD_c_experimentalParam6` in `ZSTD_cParameter`
    |             help: a similar name exists in the module: `ZSTD_c_experimentalParam1`

For more information about this error, try `rustc --explain E0432`.
error: could not compile `zstd-safe` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...

Feel free to suggest any edits to this patch. Thanks!

kodeschreiber avatar May 17 '24 01:05 kodeschreiber