ip-macro

Build status Cargo

Macros for writing literal IP addresses.

See https://github.com/rust-lang/rfcs/issues/1926 for the background behind this crate.

Rust nightly

This crate uses the recently implemented [procedural macros] feature, and so requires a nightly version of the compiler.

If you use rustup (recommended), then you can install Rust nightly using these instructions.

Example

```rust

![feature(proc_macro)] // <- Don't forget this!!!

extern crate ipmacro; use ipmacro::ip;

fn main() { println!("There's no place like {}", ip!("127.0.0.1")); } ```