diff --git a/Cargo.lock b/Cargo.lock index 5b6c746..fb9c383 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,5 +1,7 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. +version = 3 + [[package]] name = "argon2rs" version = "0.2.5" @@ -125,8 +127,8 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea1063915fd7ef4309e222a5a07cf9c319fb9c7836b1f89b85458672dbb127e1" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 0.4.30", + "quote 0.6.3", "syn 0.15.34", "synstructure", ] @@ -148,6 +150,12 @@ dependencies = [ "winapi", ] +[[package]] +name = "itoa" +version = "1.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" + [[package]] name = "json" version = "0.11.12" @@ -193,13 +201,31 @@ dependencies = [ "unicode-xid", ] +[[package]] +name = "proc-macro2" +version = "1.0.78" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" +dependencies = [ + "unicode-ident", +] + [[package]] name = "quote" version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e44651a0dc4cdd99f71c83b561e221f714912d11af1a4dff0631f923d53af035" dependencies = [ - "proc-macro2", + "proc-macro2 0.4.30", +] + +[[package]] +name = "quote" +version = "1.0.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +dependencies = [ + "proc-macro2 1.0.78", ] [[package]] @@ -272,6 +298,7 @@ dependencies = [ "semver", "serde", "serde_derive", + "serde_json", "shlex", "toml", ] @@ -282,6 +309,12 @@ version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ccc78bfd5acd7bf3e89cffcf899e5cb1a52d6fafa8dec2739ad70c9577a57288" +[[package]] +name = "ryu" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" + [[package]] name = "scoped_threadpool" version = "0.1.9" @@ -305,19 +338,33 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.66" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9a2d9a9ac5120e0f768801ca2b58ad6eec929dc9d1d616c162f208869c2ce95" +checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" +dependencies = [ + "serde_derive", +] [[package]] name = "serde_derive" -version = "1.0.66" +version = "1.0.197" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" +dependencies = [ + "proc-macro2 1.0.78", + "quote 1.0.35", + "syn 2.0.52", +] + +[[package]] +name = "serde_json" +version = "1.0.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a90213fa7e0f5eac3f7afe2d5ff6b088af515052cc7303bd68c7e3b91a3fb79" +checksum = "c5f09b1bd632ef549eaa9f60a1f8de742bdbc698e6cee2095fc84dde5f549ae0" dependencies = [ - "proc-macro2", - "quote", - "syn 0.14.2", + "itoa", + "ryu", + "serde", ] [[package]] @@ -328,24 +375,24 @@ checksum = "7fdf1b9db47230893d76faad238fd6097fd6d6a9245cd7a4d90dbd639536bbd2" [[package]] name = "syn" -version = "0.14.2" +version = "0.15.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c67da57e61ebc7b7b6fff56bb34440ca3a83db037320b0507af4c10368deda7d" +checksum = "a1393e4a97a19c01e900df2aec855a29f71cf02c402e2f443b8d2747c25c5dbe" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 0.4.30", + "quote 0.6.3", "unicode-xid", ] [[package]] name = "syn" -version = "0.15.34" +version = "2.0.52" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1393e4a97a19c01e900df2aec855a29f71cf02c402e2f443b8d2747c25c5dbe" +checksum = "b699d15b36d1f02c3e7c69f8ffef53de37aefae075d8488d4ba1a7788d574a07" dependencies = [ - "proc-macro2", - "quote", - "unicode-xid", + "proc-macro2 1.0.78", + "quote 1.0.35", + "unicode-ident", ] [[package]] @@ -354,8 +401,8 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73687139bf99285483c96ac0add482c3776528beac1d97d444f6e91f203a2015" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 0.4.30", + "quote 0.6.3", "syn 0.15.34", "unicode-xid", ] @@ -369,6 +416,12 @@ dependencies = [ "serde", ] +[[package]] +name = "unicode-ident" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" + [[package]] name = "unicode-xid" version = "0.1.0" diff --git a/Cargo.toml b/Cargo.toml index 4187c65..4aede6f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,15 +26,11 @@ semver = "0.9" json = "0.11" isatty = "0.1.8" toml = "0.4.5" -serde_derive = "1.0.27" -serde = "1.0.27" +serde_derive = "1.0.197" +serde_json = "1.0.114" +serde = "1.0.197" shlex = "0.1.1" dirs = "1.0" [profile.release] panic = 'abort' - - - - - diff --git a/examples/json.rs b/examples/json.rs index 063de97..90ebb89 100644 --- a/examples/json.rs +++ b/examples/json.rs @@ -1,8 +1,16 @@ -//: --static use serde_json::json; -println!("{}", - json! ({ - "hello": 42, +println!( + "{}", + json!({ + "code": 200, + "success": true, + "payload": { + "features": [ + "awesome", + "easyAPI", + "lowLearningCurve" + ] + } }) ); diff --git a/readme.md b/readme.md index 59cf845..c78f7b4 100644 --- a/readme.md +++ b/readme.md @@ -168,7 +168,7 @@ It is now possible to simply invoke using `runner json.rs`. It's better to keep instructions in the file itself, and it means that an editor run action bound to `runner FILE` can be made to work in all cases. -`runner` provides various utilities for managing the static cache. +`runner` provides various utilities for managing the static cache. You can say `runner --edit` to edit the static cache `Cargo.toml`, and `runner --build` to rebuild the cache afterwards. `runner update` will update all the dependencies in the cache, and `runner update package` will update a _particular_ package - follow this @@ -376,7 +376,7 @@ $ runner -xuniverse -e "universe::answer()" This provides a way to get to play with big predefined strings: ``` -$ cat > text.rs +$ cat text.rs pub const TEXT: &str = "possibly very long string"; $ runner -C text.rs building crate 'text' at text.rs diff --git a/src/main.rs b/src/main.rs index 38c9102..c117cc5 100644 --- a/src/main.rs +++ b/src/main.rs @@ -103,7 +103,7 @@ fn main() { None }; - args.parse_env_args().or_die("bad command line"); + args.parse_env_args().or_die("bad command line"); let program_contents = if let Ok(program) = args.get_string_result("program") { let prog = Path::new(&program); @@ -427,6 +427,11 @@ fn main() { // whereas POSIX requires LD_LIBRARY_PATH builder.env("LD_LIBRARY_PATH",format!("{}:{}",*RUSTUP_LIB,ch.display())); } + builder.env( + "DYLD_FALLBACK_LIBRARY_PATH", + format!("{}:{}", ch.display(), *RUSTUP_LIB), + ); + } let status = builder.args(&program_args) .status() @@ -436,4 +441,3 @@ fn main() { process::exit(status.code().unwrap_or(-1)); } } -