Skip to content

Implement Crate Feature to Disable SSL on Windows for ScyllaDB Node.js Driver #21

@Daniel-Boll

Description

@Daniel-Boll

The driver is currently facing a build issue on Windows due to problems encountered with OpenSSL configuration. To work around this issue and re-establish Windows support, this task proposes the introduction of a crate feature that will disable SSL on Windows platforms. This will simplify the build process and ensure functionality, albeit without SSL support for the time being.

Here's a breakdown of the task:

  1. Feature Flag Creation:
    • Create a new feature flag, e.g., disable-ssl, in the Cargo.toml file.
    • Ensure this feature is conditional for Windows platforms only.
[features]
disable-ssl = ["cfg(windows)"]
  1. Conditional Compilation and Dependency Exclusion:
    • Use Rust's conditional compilation attributes to disable the SSL-related code and dependencies when the disable-ssl feature is enabled.
    • Adjust the dependency declarations in Cargo.toml to exclude SSL dependencies on Windows.
#[cfg(not(feature = "disable-ssl"))]
extern crate openssl;
[dependencies]
scylla = { version = "0.10.1", features = ["ssl"], optional = true }
openssl = { version = "0.10", features = ["vendored"], optional = true }

[target.'cfg(windows)'.dependencies]
scylla = { version = "0.10.1", default-features = false } # There might be more things necessary
  1. Documentation:

    • Update the project documentation to explain the new feature flag and its implications.
    • Include clear instructions for Windows users on how to use this feature to build the project, while making them aware of the temporary lack of SSL support.
  2. Testing:

    • Ensure that the project builds successfully on Windows with the disable-ssl feature enabled.
    • Test the functionality of the driver on Windows to ensure it operates as expected without SSL.
  3. Future Work:

    • Mention that this is a temporary workaround, and that a more robust solution to fix the OpenSSL issue on Windows and re-enable SSL support is in the pipeline.

This issue serves as a call for contributions to implement this feature, and invites discussion on any alternative solutions or potential implications. By addressing the OpenSSL configuration problem in a phased manner, we can promptly restore Windows compatibility for the ScyllaDB Node.js driver while working towards a complete solution.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions