@@ -13,6 +13,8 @@ use std::path::Path;
1313
1414use crate :: errors:: * ;
1515
16+ pub static IFRAME : & [ u8 ] = include_bytes ! ( "iframe.html" ) ;
17+ pub static WASM_ENTRY_MJS : & [ u8 ] = include_bytes ! ( "wasm-entry.mjs" ) ;
1618pub static INDEX : & [ u8 ] = include_bytes ! ( "index.hbs" ) ;
1719pub static HEAD : & [ u8 ] = include_bytes ! ( "head.hbs" ) ;
1820pub static REDIRECT : & [ u8 ] = include_bytes ! ( "redirect.hbs" ) ;
@@ -62,6 +64,8 @@ pub struct Theme {
6264 pub ayu_highlight_css : Vec < u8 > ,
6365 pub highlight_js : Vec < u8 > ,
6466 pub clipboard_js : Vec < u8 > ,
67+ pub iframe_html : Vec < u8 > ,
68+ pub wasm_entry_mjs : Vec < u8 > ,
6569}
6670
6771impl Theme {
@@ -79,6 +83,8 @@ impl Theme {
7983 // Check for individual files, if they exist copy them across
8084 {
8185 let files = vec ! [
86+ ( theme_dir. join( "iframe.html" ) , & mut theme. iframe_html) ,
87+ ( theme_dir. join( "wasm-entry.mjs" ) , & mut theme. wasm_entry_mjs) ,
8288 ( theme_dir. join( "index.hbs" ) , & mut theme. index) ,
8389 ( theme_dir. join( "head.hbs" ) , & mut theme. head) ,
8490 ( theme_dir. join( "redirect.hbs" ) , & mut theme. redirect) ,
@@ -161,6 +167,8 @@ impl Default for Theme {
161167 ayu_highlight_css : AYU_HIGHLIGHT_CSS . to_owned ( ) ,
162168 highlight_js : HIGHLIGHT_JS . to_owned ( ) ,
163169 clipboard_js : CLIPBOARD_JS . to_owned ( ) ,
170+ iframe_html : IFRAME . to_owned ( ) ,
171+ wasm_entry_mjs : WASM_ENTRY_MJS . to_owned ( ) ,
164172 }
165173 }
166174}
@@ -248,6 +256,8 @@ mod tests {
248256 ayu_highlight_css : Vec :: new ( ) ,
249257 highlight_js : Vec :: new ( ) ,
250258 clipboard_js : Vec :: new ( ) ,
259+ iframe_html : Vec :: new ( ) ,
260+ wasm_entry_mjs : Vec :: new ( ) ,
251261 } ;
252262
253263 assert_eq ! ( got, empty) ;
0 commit comments