Trying to compile rust library on Windows

This page summarizes the projects mentioned and recommended in the original post on /r/rust

Our great sponsors
  • InfluxDB - Collect and Analyze Billions of Data Points in Real Time
  • Onboard AI - Learn any GitHub repo in 59 seconds
  • SaaSHub - Software Alternatives and Reviews
  • community

    Central repository for issues and recipes (by bincrafters)

    The missing symbols look very much like these: Do you have the Crypt32 lib in the list of libraries to be linked?

  • cross

    “Zero setup” cross compilation and “cross testing” of Rust crates

    Why not use cross? It manages all these dependencies in containers, no effort needed on your part.

  • InfluxDB

    Collect and Analyze Billions of Data Points in Real Time. Manage all types of time series data in a single, purpose-built database. Run at any scale in any environment in the cloud, on-premises, or at the edge.

  • Warframe-OCR

    A relic inventory recognition system for Warframe, based on experimental Rust bindings to Tesseract OCR. Supports detection in real-time. Very much WIP.

    Yes, you can link them statically. Here's a Python script I wrote to install and build a Python module in Rust. It will install the required development libraries on Linux and build a static build of tesseract on Windows (it also downloads the LLVM based clang compiler, I forgot why). Then it set up two environment variables VCPKG_ROOT to discover the tesseract library and RUSTFLAGS -Ctarget-feature=+crt-static (this forces the vpkg crate to link tesseract:x64-windows-static and not the dynamic version).

  • winapi-rs

    Rust bindings to Windows API

    Is winapi = { version = "0.3.9", features = ["winuser"] } in [target.'cfg(windows)'.dependencies]? All the missing symbols are functions in module winapi::um::wincrypt (see ) and the crate's Git repo at contains all the import libs and export defs for the corresponding DLLs in directory x86_64. As crypt32.dll ships with windows by default, I think this is all that would be needed for building on a windows PC.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts