File tree 5 files changed +8
-5
lines changed
5 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -23,8 +23,7 @@ opt-level = "s"
23
23
lto = " thin"
24
24
25
25
[features ]
26
- default = [" webkit" , " native-tls" , " ultralight-resources" ]
27
- webkit = [" ultralight" ]
26
+ default = [" ultralight" , " native-tls" ]
28
27
ultralight = [" ul-next" ]
29
28
ultralight-resources = []
30
29
native-tls = [" reqwest/native-tls" ]
Original file line number Diff line number Diff line change 18
18
19
19
### Examples
20
20
#### basic_browser.rs
21
+ ` cargo run --example basic_browser --features ultralight-resources `
21
22
<img src =" https://github.com/LegitCamper/icy_browser/blob/main/assets/basic_browser.png?raw=true " width =50% >
22
23
23
24
``` Rust
Original file line number Diff line number Diff line change
1
+ #[ cfg( feature = "ultralight-resources" ) ]
1
2
use std:: env:: var;
3
+ #[ cfg( feature = "ultralight-resources" ) ]
2
4
use std:: fs:: { self , DirEntry } ;
5
+ #[ cfg( feature = "ultralight-resources" ) ]
3
6
use std:: path:: Path ;
4
7
5
8
fn main ( ) {
6
9
// ensure runtime resources exist - for examples & local tests
7
10
#[ cfg( feature = "ultralight-resources" ) ]
8
11
{
12
+ let mut possible_directories = Vec :: new ( ) ;
9
13
let out = var ( "OUT_DIR" ) . unwrap ( ) ;
10
14
// This allows it to work in this project but also other projects too
11
15
let path = Path :: new ( & out)
@@ -20,8 +24,6 @@ fn main() {
20
24
. parent ( )
21
25
. unwrap ( ) ;
22
26
23
- let mut possible_directories = Vec :: new ( ) ;
24
-
25
27
let target = Path :: new ( path) . join ( "target" ) ;
26
28
let debug_path = target. clone ( ) . join ( "debug" ) ;
27
29
let release_path = target. clone ( ) . join ( "release" ) ;
@@ -78,6 +80,7 @@ fn main() {
78
80
println ! ( "cargo:rerun-if-changed=Cargo.lock" ) ;
79
81
}
80
82
83
+ #[ cfg( feature = "ultralight-resources" ) ]
81
84
fn get_paths ( possible_paths : & mut Vec < fs:: DirEntry > , path_str : String ) {
82
85
let mut paths: Vec < DirEntry > = fs:: read_dir ( path_str)
83
86
. expect ( "Could not read dir" )
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ use url::Url;
8
8
9
9
use crate :: ImageInfo ;
10
10
11
- #[ cfg( feature = "webkit " ) ]
11
+ #[ cfg( feature = "ultralight " ) ]
12
12
pub mod ultralight;
13
13
14
14
pub enum PixelFormat {
You can’t perform that action at this time.
0 commit comments