openssl with Rust

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

openssl with Rust

Ken Goldman-2
Environment is Windows, Visual Studio Code, the Shining Light openssl
build and the openssl crate.

Does anyone have experience getting this to link?

Environment variables?
cargo.toml
anything else?

Reply | Threaded
Open this post in threaded view
|

Re: openssl with Rust

Richard Levitte - VMS Whacker-2
I have very little knowledge of Rust...  however, there seems to exist
an openssl crate available already:  https://docs.rs/openssl/0.10.29/openssl/

Does that help?

Cheers,
Richard

On Tue, 23 Jun 2020 23:38:38 +0200,
Ken Goldman wrote:

>
> Environment is Windows, Visual Studio Code, the Shining Light openssl
> build and the openssl crate.
>
> Does anyone have experience getting this to link?
>
> Environment variables?
> cargo.toml
> anything else?
>
--
Richard Levitte         [hidden email]
OpenSSL Project         http://www.openssl.org/~levitte/
Reply | Threaded
Open this post in threaded view
|

Re: openssl with Rust

Jan Danielsson-3
On 2020-06-24 10:23, Richard Levitte wrote:
> I have very little knowledge of Rust...  however, there seems to exist
> an openssl crate available already:  https://docs.rs/openssl/0.10.29/openssl/
>
> Does that help?

   The OP mentioned using "the openssl crate", so I don't think that's
the problem.

   This is kind of a known issue.  On unixy platforms there are plenty
of common, known, ways to find libraries and headers (common locations,
pkg-config, etc).  Windows have no such common mechanisms[*].

   Some crate developers are aware of these issues so they support
building a static library stored locally for the crate.  For instance,
rusqlite supports building its own sqlite3 library, which helps a lot on
Windows.  The problem with OpenSSL is that the build system needs perl.
 This could in theory be solved by build.rs downloading a portable
version of perl, etc.

   Anyway -- this is an openssl crate issue, and not related to the
openssl project itself.


   But I will add:  I suspect the openssl project will be getting more
and more questions about the openssl Rust crate.  Probably a good idea
to have a nice copy/paste reply ready.  And regarding this:


   [*] There is one potential solution to this: vcpkg.  Some crates try
to use vcpkg to find dependencies.  I suggest the OP checks into whether
building openssl with vcpkg will help.  (The openssl crate would need to
be one of the crates that actually supports vcpkg, and I'm unsure if
that is the case.  If it isn't then someone should probably file an
issue with the crate owner about that).



>
> Cheers,
> Richard
>
> On Tue, 23 Jun 2020 23:38:38 +0200,
> Ken Goldman wrote:
>>
>> Environment is Windows, Visual Studio Code, the Shining Light openssl
>> build and the openssl crate.
>>
>> Does anyone have experience getting this to link?
>>
>> Environment variables?
>> cargo.toml
>> anything else?
>>


--
Kind Regards,
Jan