Skip to content

Publishing on Crates.io? #28

Closed
Closed
@sagebind

Description

@sagebind

This is more of a question than a feature request. Currently MesaLink is not available on crates.io, which makes it difficult to use within a Rust application. I know that native Rust code is better to use Rustls directly, but I'm in a bit of a unique situation.

I am interested in adding to the curl-sys crate on crates.io the ability to statically link to MesaLink as the TLS implementation; this would allow Rust applications to use a statically linked libcurl that in turn uses a statically linked MesaLink for its TLS implementation. This would be a pretty big win for Rust applications that make use of curl (including cargo itself) as it eliminates the OpenSSL dependency and gains the safety of MesaLink + Rustls.

Doing this as-is is a challenge for several reasons:

  • curl-sys cannot be published to crates.io if it depends on crates that are not also on crates.io
  • We need to be careful to ensure that libraries are not duplicated (like libstd) when linking to MesaLink. Having Cargo aware of the mesalink crate is the best way to avoid this.

I see only a few ways of making this possible:

  • Publish mesalink to crates.io along with its forked dependencies (as mesalink-rustlsand so on).
  • Absorb all of mesalink's forked dependencies inside the mesalink crate (under modules or something) and publish that.
  • Pre-compile MesaLink without libstd for every platform, and ship that as a wrapper crate. (yuck)
  • Create a mesalink-sys crate that builds MesaLink inside a build script. (Awkward running Cargo inside a build script inside Cargo...)
  • Fork MesaLink and do one of the above.

I am interested to hear of better solutions, or if there is any interest in publishing to crates.io.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions