Dynamic types

Dynamic types are types which can be defined and used solely within a Rune script. They provide the ability to structure data and associate functions with it.

The following is a quick example of a struct:

struct Person {

impl Person {
    fn greet(self) {
        println!("Greetings from {}, and good luck with this section!", self.name);

pub fn main() {
    let person = Person { name: "John-John Tedro" };

$> cargo run --bin rune -- run scripts/book/dynamic_types/greeting.rn
Greetings from John-John Tedro, and good luck with this section!