Created
November 19, 2014 00:56
-
-
Save adamhjk/3efdd5a60d36bc5d519c to your computer and use it in GitHub Desktop.
Chef in rust
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extern crate chef; | |
use chef::{client}; | |
use chef::resource::{Package, Service, Template}; | |
// Total Strawman | |
fn main() { | |
let mut chef = client.new(); | |
chef.r( | |
Package{ | |
name: "apache2" | |
} | |
); | |
} | |
// With Macros | |
fn main() { | |
r!(Package{ | |
name: "apache2" | |
}); | |
} | |
// Even shorter | |
fn main() { | |
package!(name: "apache2"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment