extendr / libR-sys

Low level R bindgen interface
https://extendr.github.io/libR-sys/libR_sys/
MIT License
52 stars 23 forks source link

Update README, specifically Windows section #31

Closed Ilia-Kosenkov closed 3 years ago

Ilia-Kosenkov commented 3 years ago

The Windows section is particularly outdated providing recent developments in how we build on Windows. (see #9 and #29).

I suggest to also include powershell commands as it is the new standard, plus default shell is cumbersome and sometimes difficult to navigate. I tried to summarise Windows-related updates in libR-sys/readme-windows. This can be merged as PR if it seems reasonable.

Also, README lacks description of feature flags and how to build bindgen vs pre-compiled versions.

clauswilke commented 3 years ago

Yes, please prepare a PR. Thanks!

Ilia-Kosenkov commented 3 years ago

PR #32 updated README, mostly Windows-specific part. Now a few more lines should be added to describe how to generate bindings on MacOS/Linux.

clauswilke commented 3 years ago

In particular, I just noticed that we never explicitly state how to build bindings from source:

cargo build --features use-bindgen
Ilia-Kosenkov commented 3 years ago

@clauswilke, I put that into Windows description, simple version suggests to use precomputed bindings, advanced -- to build your own using --features use-bindgen. As I did not touch other OS' sections, there is no mention of that, unfortuantely.

Ilia-Kosenkov commented 3 years ago

After discussion in https://github.com/extendr/rextendr/issues/19, we need to revise the README, Windows section. Right now the instructions are incorrect, at least for pre-computed bindings. If we decided to use a single toolchain, stable-msvc, then to build for gnu targets we need linkers, which come from msys2. So msys2 with mingw toolchains are required in any case.