Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
95 changes: 74 additions & 21 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 3 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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'





16 changes: 12 additions & 4 deletions examples/json.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
//: --static
use serde_json::json;

println!("{}",
json! ({
"hello": 42,
println!(
"{}",
json!({
"code": 200,
"success": true,
"payload": {
"features": [
"awesome",
"easyAPI",
"lowLearningCurve"
]
}
})
);
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
8 changes: 6 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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()
Expand All @@ -436,4 +441,3 @@ fn main() {
process::exit(status.code().unwrap_or(-1));
}
}