TheDan64 / inkwell

It's a New Kind of Wrapper for Exposing LLVM (Safely)
https://thedan64.github.io/inkwell/
Apache License 2.0
2.22k stars 217 forks source link

Solution: Inkwell Rust LLVM_SYS not set VSCODE #478

Closed lantos1618 closed 4 months ago

lantos1618 commented 4 months ago

for anyone trying to run inkwell via vs code and using the run/debug in rust_analyzer

Setting this in your user settings will fix this

error: No suitable version of LLVM was found system-wide or pointed
              to by LLVM_SYS_170_PREFIX.

              Consider using `llvmenv` to compile an appropriate copy of LLVM, and
              refer to the llvm-sys documentation for more information.

              llvm-sys: https://crates.io/crates/llvm-sys
              llvmenv: https://crates.io/crates/llvmenv

to find LLVM_SYS_170_PREFIX run llvm-config --prefix

    "rust-analyzer.runnables.extraEnv": {
        "LLVM_SYS_170_PREFIX": "/opt/homebrew/Cellar/llvm/17.0.6"
    }