Skip to content

Commit 9a29b07

Browse files
committed
Clear up confusions around installing LLVM/clang in doc
1 parent a9b573c commit 9a29b07

File tree

1 file changed

+14
-18
lines changed

1 file changed

+14
-18
lines changed

guide/src/overview.md

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,35 +3,31 @@
33
`emacs-module-rs` provides high-level Rust binding and tools to write Emacs's dynamic modules. It is easy to use if you know either Rust or Emacs.
44

55
It currently supports:
6-
- Stable Rust 1.38+.
6+
- Stable Rust 1.45+.
77
- Emacs 25 or above, built with module support.
88
- macOS, Linux, Windows.
99

10-
## Known Issues
11-
12-
There is a bug (see [issue #1](https://github.com/ubolonton/emacs-module-rs/issues/1)) with Emacs 26 on Linux that prevents it from loading any dynamic modules (even those written in C), if:
13-
- Emacs is built without thread support.
14-
- The OS is Ubuntu 16.04 (Xenial).
15-
1610
## Setting up
1711

1812
- Install the Rust toolchain with [rustup](https://www.rustup.rs/).
19-
- Install `clang`. This is needed to generate the raw binding from `emacs-module.h`.
2013
- Make sure that your Emacs was compiled with module support. Check that `module-file-suffix` is not `nil`, and the function `module-load` is defined.
2114
+ On macOS, the recommended installation method is MacPorts (`emacs-app` and `emacs-mac-app`).
2215
+ On Windows, the recommended installation method for older Emacs versions (before 27.2) is `pacman -S mingw-w64-x86_64-emacs` (msys2), as the archives on GNU FTP's server were built without module support.
2316

24-
### Windows
25-
This was only tested with Rust's `msvc` toolchain, not the `gnu` toolchain.
17+
### Notes
2618

27-
For older versions of the crate (before 0.18.0), or when the optional feature `bindgen` is enabled, you will also need to install LLVM and set `LIBCLANG_PATH` accordingly.
19+
- On Windows, only Rust's `msvc` toolchain was confirmed to work, not the `gnu` toolchain.
20+
- When the optional feature `bindgen` is enabled, the raw binding will be generated from `emacs-module.h` at build time. Therefore you will also need to install `clang`. (This is recommended only for troubleshooting, though.) For example, on Windows:
21+
```powershell
22+
# In Powershell
23+
scoop install llvm
2824
29-
```powershell
30-
# In Powershell
31-
scoop install llvm
25+
$env:LIBCLANG_PATH = "$(scoop prefix llvm)\bin"
26+
cargo build --all
27+
```
3228
33-
$env:LIBCLANG_PATH = "$(scoop prefix llvm)\bin"
34-
cargo build --all
29+
## Known Issues
3530
36-
.\bin\test.ps1
37-
```
31+
There is a bug (see [issue #1](https://github.com/ubolonton/emacs-module-rs/issues/1)) with Emacs 26 on Linux that prevents it from loading *any dynamic modules* (even those written in C), if:
32+
- Emacs is built without thread support.
33+
- The OS is Ubuntu 16.04 (Xenial).

0 commit comments

Comments
 (0)