Skip to content
This repository has been archived by the owner on May 27, 2020. It is now read-only.

lambda-fairy/ip-macro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ip-macro

Build status Cargo

Macros for writing literal IP addresses.

See rust-lang/rfcs#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"));
}