# Examples
All the examples in this directory can be tried out locally running this command:
```bash
cargo build --example example_name && luajit examples/example_name.lua
```
(Replace `example_name` with the name of the example to try.)
## simple
Simple example of a generic module that returns a table containing three example functions.
Might be a good template to base off most modules.
## num_vector
A more specialized and complex example of a module that introduces a specific userdata to Lua (in this case, Rust's `Vec<f64>`).
Instead of returning a table, the module returns the function that constructs a vector whenever called
(from which the rest of the functions can be accessed).
This example could be a good reference (and showcase) for Lua userdata using Rust.