kdev-rust: Make kdev-rust compile out of the box
Closed, ResolvedPublic

Description

Currently the ast-redux Rust library is required to build kdev-rust. We need an automated way to fetch & build this Rust library for kdev-rust.

Possible solutions:
a) Add ast-redux as an CMake ExternalProject (probably very easy)
b) Add ast-redux as a Git submodule (bigger burden for the developer, since he needs to take care of updating the submodule)

I'de vote for solution (a). Additional, I'd keep a way to be able to use your local build of ast-redux. I.e. by introducing a CMake option in kdev-rust, such as -DAST_REDUX_ROOT=/path/to/ast-redux/target/debug which will disable the ExternalProject build and just the ast-redux library as specified.

kfunk created this task.Jul 10 2017, 10:04 PM

I'll look into this over the next week or so. Currently the need for a nightly rust compiler and the need to have libsyntax in the library search path for kdev-rust might be a hassle to compile and use kdev-rust. The rust devs are looking to make libsyntax buildable on stable (rustfmt needs it for example), so I'll relay with them and see what's the progress there.

egospodinova closed this task as Resolved.Aug 30 2017, 2:14 PM

ast-redux is now part of the build process for kdev-rust. Alternatively, if the library is found on the CMAKE_PREFIX_PATH, that is used.

A nightly Rust compiler is still required, but if none is found, a more useful error message is printed.