Skip to content

Commit 36d6c33

Browse files
committed
docs: Document build issues in README
1 parent d02df79 commit 36d6c33

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@
77
*.tar.gz
88
inst/doc
99
.Rbuildignore
10+
tmp

README.md

+14-1
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,23 @@ devtools::install_github("danieledler/swigr")
1717
Binary bundle can be installed from R by running
1818

1919
```R
20-
devtools::install_url("https://github.com/danieledler/swigr/releases/download/v0.0.1/swigr_0.0.1.tgz")
20+
devtools::install_url("https://github.com/danieledler/swigr/releases/download/v0.0.1/swigr_0.0.1b.tgz")
2121
```
2222

23+
## Issues
2324

25+
R packages can be in [five different states](https://r-pkgs.org/package-structure-state.html):
26+
* source
27+
* bundled
28+
* binary
29+
* installed
30+
* in-memory
31+
32+
`devtools::build()` creates a bundled package and can be installed with `devtools::install_github("danieledler/swigr")`. However, the C++ source code is included in a `src` directory and will be compiled on the user's computer, which creates problems for many Windows users.
33+
34+
`devtools::build(binary = T)` creates a binary package that instead of a `src` folder has a `libs` folder with the C++ code compiled to a shared library. This is required for `devtools::install_url("...")` to work, but `install_url` also require a `man` folder which is not present when building a binary package.
35+
36+
CRAN makes binaries available from bundles and includes a man folder.
2437
## TODO
2538

2639
* Add `zzz.R` with `.onUnload()` to clean SWIG?

0 commit comments

Comments
 (0)