MCPcopy Index your code
hub / github.com/dtolnay/argv

github.com/dtolnay/argv @0.1.13

Chat with this repo
repository ↗ · DeepWiki ↗ · release 0.1.13 ↗ · + Follow
10 symbols 12 edges 3 files 2 documented · 20%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Command line arguments by reference

github crates.io docs.rs build status

The standard library's [std::env::args_os] iterator produces an owned string (OsString) for each argument. In some use cases it can be more convenient for the arguments to be produced by static reference (&'static OsStr).

[dependencies]
argv = "0.1"

Example

fn main() {
    for arg in argv::iter() {
        // arg is a &'static OsStr.
        println!("{}", arg.to_string_lossy());
    }
}

Portability

This crate is intended to be used on Linux and macOS, on which command line arguments naturally live for the duration of the program. This crate implements the same API on other platforms as well, such as Windows, but leaks memory on platforms other than Linux and macOS.

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Core symbols most depended-on inside this repo

iter
called by 1
src/lib.rs
len
called by 1
src/lib.rs
next
called by 0
src/lib.rs
size_hint
called by 0
src/lib.rs
capture
called by 0
src/lib.rs
assert_send
called by 0
src/lib.rs
assert_sync
called by 0
src/lib.rs
main
called by 0
examples/print.rs

Shape

Function 6
Method 3
Class 1

Languages

Rust100%

Modules by API surface

src/lib.rs8 symbols
tests/test.rs1 symbols
examples/print.rs1 symbols

For agents

$ claude mcp add argv \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact