Awesome
Rkernel
Rkernel is a program responsible for handling various types of requests: code execution, code completions, debugging, and so on. Is also provides a response from the R interpreter.
The idea of Rkernel is pretty similar to gdb or Jupyter kernel but it aimed for R.
Building
1 Build gRPC
- On Windows:
build_grpc.bat
- On GNU/Linux or MacOS:
build_grpc.sh
2 Use cmake
with your toolchain to build the project
Ensure that the cmake R_HOME
variable is defined or suitable R
version
is present in the PATH
variable.
Use the following toolchains:
- On Windows: MSVS 2017 and ninja (you probably have to use
dll2lib.R
for generatinglib
files and apply patches fromRcpp-patches
) - On MacOS: clang 8+ and make
- On GNU/Linux: gcc 7.0+ and make
To use other configurations, you may need to edit the CMakeLists.txt
file.
Running
Rkernel consists of:
- Rwrapper: responsible for running gRPC server and handling interaction with R interpreter.
- R files: files that are located in the
R
directory of the project root.
For interacting with Rwrapper you should implement a gRPC client for the protocol defined in Rkernel-proto
To start interacting with Rwrapper:
- Run the Rwrapper
- Connect using gRPC protocol
- Send the init message. The init messages contains your project directory and the location of R files.
- Once the Rwrapper receives the init message, it will source the R files.
- Use the message from the protocol for communication.
For more details about the protocol, see the
Rkernel-proto
project. You could find an example of the client implementation here.
Licensing
Rkernel-proto
is covered by Apache License 2.0R/RSession
is covered by AGPL-3.0- the rest of the project is covered by GPL-3.0