diff --git a/cranelift/Cargo.toml b/cranelift/Cargo.toml index d0da28f918..06eed706e9 100644 --- a/cranelift/Cargo.toml +++ b/cranelift/Cargo.toml @@ -16,8 +16,9 @@ path = "src/cton-util.rs" cretonne = { path = "lib/cretonne" } cretonne-reader = { path = "lib/reader" } filecheck = { path = "lib/filecheck" } -docopt = "0.6.86" -rustc-serialize = "0.3.19" -num_cpus = "1.1.0" +docopt = "0.8.0" +serde = "1.0.8" +serde_derive = "1.0.8" +num_cpus = "1.5.1" [workspace] diff --git a/cranelift/src/cton-util.rs b/cranelift/src/cton-util.rs index 70fcbc3c84..28b4b90de0 100644 --- a/cranelift/src/cton-util.rs +++ b/cranelift/src/cton-util.rs @@ -2,7 +2,9 @@ extern crate cretonne; extern crate cton_reader; extern crate docopt; -extern crate rustc_serialize; +extern crate serde; +#[macro_use] +extern crate serde_derive; extern crate filecheck; extern crate num_cpus; @@ -34,7 +36,7 @@ Options: "; -#[derive(RustcDecodable, Debug)] +#[derive(Deserialize, Debug)] struct Args { cmd_test: bool, cmd_cat: bool, @@ -49,12 +51,12 @@ pub type CommandResult = Result<(), String>; /// Parse the command line arguments and run the requested command. fn cton_util() -> CommandResult { - // Parse comand line arguments. + // Parse command line arguments. let args: Args = Docopt::new(USAGE) .and_then(|d| { d.help(true) .version(Some(format!("Cretonne {}", VERSION))) - .decode() + .deserialize() }) .unwrap_or_else(|e| e.exit());