10 releases
Uses old Rust 2015
0.1.0 | Oct 2, 2015 |
---|---|
0.0.8 | Jun 24, 2015 |
0.0.7 | Mar 6, 2015 |
0.0.5 | Feb 9, 2015 |
0.0.1-pre.1 | Nov 20, 2014 |
#1574 in Game dev
28 downloads per month
8KB
123 lines
This crate allows you to package several files in your executable.
This is similar to include_bin!
but easier to use when you have
a lot of files.
Usage:
#![feature(phase)]
#[phase(plugin)]
extern crate resources_package;
extern crate resources_package_package;
static package: resources_package_package::Package = resources_package!([
"path/to/resources",
"other/path/to/resources"
]);
fn main() {
for &(ref name, content) in package.iter() {
println!("{}", name.display());
}
}
lib.rs
:
This crate allows you to package several files in your executable.
This is similar to include_bytes!
but easier to use when you have
a lot of files.
Usage:
#![feature(phase)]
#[phase(plugin)]
extern crate resources_package;
extern crate resources_package_package;
static package: resources_package_package::Package = resources_package!([
"path/to/resources",
"other/path/to/other/resources"
]);
# fn main() {}
The type of the static variable is a resources_package_package::Package
. See the
documentation of resources_package_package
.
Arguments
- List of directories whose content is to be included.