Skip to main content

lux_lib/lua_rockspec/build/
rust_mlua.rs

1use std::{collections::HashMap, path::PathBuf};
2
3#[derive(Debug, PartialEq, Default, Clone)]
4pub struct RustMluaBuildSpec {
5    /// Keys are module names in the format normally used by the `require()` function.
6    /// values are the library names in the target directory (without the `lib` prefix).
7    pub modules: HashMap<String, PathBuf>,
8    /// Set if the cargo `target` directory is not in the source root.
9    pub target_path: PathBuf,
10    /// If set to `false` pass `--no-default-features` to cargo.
11    pub default_features: bool,
12    /// Pass additional features
13    pub features: Vec<String>,
14    /// Additional flags to be passed in the cargo invocation.
15    pub cargo_extra_args: Vec<String>,
16    /// Copy additional files to the `lua` directory.
17    /// Keys are the sources, values the destinations (relative to the `lua` directory).
18    pub include: HashMap<PathBuf, PathBuf>,
19}