ip-macro 0.1.0

Macros for writing literal IP addresses
Documentation

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

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

extern crate ip_macro;
use ip_macro::ip;

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