Skip to content

Milesq/include-url

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

include-url

This crate provides include_url macro, which works like include_str from std with 2 differences

  • Data is taken from URL, not local files
  • The data from given URL is treated as a Rust code, rather than raw data

Examples

use include_url::include_raw_url;

include_raw_url!("https://raw.githubusercontent.com/Milesq/include-url/main/assets/add.rs");

fn main() {
  println!("{}", add(2, 3)); // prints 5
}

About

Include Rust code from given URL

Topics

Resources

Stars

Watchers

Forks

Languages