Skip to content

Instantly share code, notes, and snippets.

@CGMossa
Created February 27, 2023 23:06
Show Gist options
  • Save CGMossa/db2aa109d6fc1f3209dffb95676f74d8 to your computer and use it in GitHub Desktop.
Save CGMossa/db2aa109d6fc1f3209dffb95676f74d8 to your computer and use it in GitHub Desktop.
Working with libR-sys requires files like these
[env]
LIBCLANG_PATH = "C:/Users/angus/scoop/apps/llvm/current/lib"
RUST_BACKTRACE = "full"
LIBRSYS_BINDINGS_OUTPUT_PATH = "mybindings"
R_HOME = "C:/Users/angus/scoop/apps/R/current"
[build]
target-dir = "target"
# target = "x86_64-pc-windows-msvc"
# target = "x86_64-pc-windows-gnu"
[term]
quiet = false
verbose = true
# [target.x86_64-pc-windows-gnu]
# linker = "x86_64-w64-mingw32.static.posix-gcc.exe"
# [target.x86_64-pc-windows-msvc]
# linker = "rust-lld"
{
"rust-analyzer.checkOnSave": false,
"rust-analyzer.cargo.features": [
"use-bindgen"
],
"rust-analyzer.runnableEnv": {
"LIBCLANG_PATH": "C:/Users/angus/scoop/apps/llvm/current/lib",
"R_HOME": "C:/Users/angus/scoop/apps/R/current",
"PATH": "${env:R_HOME}/bin/x64;${env:RTOOLS40_HOME}/x86_64-w64-mingw32.static.posix/bin;${env:RTOOLS40_HOME}/usr/bin;${env:PATH}"
// "LIBCLANG_PATH": "C:/Users/angus/scoop/apps/llvm/current/lib"
},
"rust-analyzer.cargo.extraEnv": {
"LIBCLANG_PATH": "C:/Users/angus/scoop/apps/llvm/current/lib",
// "R_HOME": "C:/Program Files/R/R-4.2.2",
"R_HOME": "C:/Users/angus/scoop/apps/R/current",
// "RTOOLS40_HOME": "C:/Users/angus/scoop/apps/rtools/current",
"PATH": "${env:R_HOME}/bin/x64;${env:RTOOLS40_HOME}/x86_64-w64-mingw32.static.posix/bin;${env:RTOOLS40_HOME}/usr/bin;${env:PATH}"
},
"terminal.integrated.env.windows": {
"LIBCLANG_PATH": "C:/Users/angus/scoop/apps/llvm/current/lib",
// "R_HOME": "C:/Program Files/R/R-4.2.2",
"R_HOME": "C:/Users/angus/scoop/apps/R/current",
// "RTOOLS40_HOME": "C:/Users/angus/scoop/apps/rtools/current",
"PATH": "${env:R_HOME}/bin/x64;${env:RTOOLS40_HOME}/x86_64-w64-mingw32.static.posix/bin;${env:RTOOLS40_HOME}/usr/bin;${env:PATH}"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment