~repos /rust-embed

#rust#proc-macro#http

git clone https://pyrossh.dev/repos/rust-embed.git

rust macro which loads files into the rust binary at compile time during release and loads the file from the fs during dev.


ac35a268 pyros2097

7 years ago
fix registry problem
Files changed (1) hide show
  1. src/lib.rs +0 -17
src/lib.rs CHANGED
@@ -1,6 +1,3 @@
1
- #![crate_type = "dylib"]
2
- #![feature(plugin_registrar)]
3
-
4
1
  #[macro_use]
5
2
  extern crate log;
6
3
  extern crate walkdir;
@@ -70,20 +67,6 @@ macro_rules! embed {
70
67
  ($x:expr) => ( ::generate_assets($x) )
71
68
  }
72
69
 
73
- macro_rules! register_macros {
74
- ($reg:expr, $($n:expr => $f:ident),+) => (
75
- $($reg.register_macro($n, macros::$f);)+
76
- )
77
- }
78
-
79
- /// Compiler hook for Rust to register plugins.
80
- #[plugin_registrar]
81
- pub fn plugin_registrar(reg: &mut Registry) {
82
- register_macros!(reg,
83
- "embed" => embed
84
- );
85
- }
86
-
87
70
  #[cfg(test)]
88
71
  mod tests {
89
72
  #[test]