Building SFTP Client using Thrussh

I'm trying to get started with Thrussh and am following the client example at:

Thrussh Docs

My code is just copied from the example there but when I build on Windows 10 I get:

   Compiling foreign-types v0.3.2
   Compiling backtrace-sys v0.1.35                                                                                                                                                                  
   Compiling openssl-sys v0.9.55
   Compiling num_cpus v1.13.0
error: failed to run custom build command for `thrussh-libsodium v0.1.4`

I have added the Thrussh library to my Cargo.toml file.

Anyone have some thoughts on what I'm missing? Thanks!

This is the build script that failed:

use std::env;
extern crate pkg_config;

fn main() {
    if let Ok(lib_dir) = env::var("SODIUM_LIB_DIR") {
        println!("cargo:rustc-link-search=native={}", lib_dir);

        let mode = match env::var_os("SODIUM_STATIC") {
            Some(_) => "static",
            None => "dylib",
        println!("cargo:rustc-link-lib={}=sodium", mode);
    } else {

Try installing libsodium, or if you already have, try setting the SODIUM_LIB_DIR environment variable. Additionally, it's not obvious if this is the case, but are you sure the library is compatible with windows?

No, I'm not sure if this is compatible with Windows or not. I'm new to the rust environment, how would I determine that?

Hopefully they would document it somewhere if that's the case.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.