Learn R Programming

hellorust (version 1.2.3)

hello: Hello Rust!

Description

Minimal examples of calling rust functions in R via C.

Usage

hello()

random()

runthreads()

Arguments

Value

a value generated in Rust (a string, random number, and NULL respectively).

Details

These functions call out to rust functions defined in the `myrustlib` cargo crate which is embedded in this package. They return values generated in Rust, such as a UTF-8 string or random number. In addition, `runthreads` is an example of a multi-threaded rust function.

Examples

Run this code
hello()
random()
runthreads()

Run the code above in your browser using DataLab