Skip to content

Commit

Permalink
add bookmark bar in readme example
Browse files Browse the repository at this point in the history
  • Loading branch information
LegitCamper committed Oct 11, 2024
1 parent 4b38e5f commit 142b7cb
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
3 changes: 1 addition & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ opt-level = "s"
lto = "thin"

[features]
default = ["webkit", "native-tls", "ultralight-resources"]
webkit = ["ultralight"]
default = ["ultralight", "native-tls"]
ultralight = ["ul-next"]
ultralight-resources = []
native-tls = ["reqwest/native-tls"]
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

### Examples
#### basic_browser.rs
`cargo run --example basic_browser --features ultralight-resources`
<img src="https://github.com/LegitCamper/icy_browser/blob/main/assets/basic_browser.png?raw=true" width=50%>

``` Rust
Expand Down
Binary file modified assets/basic_browser.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 5 additions & 2 deletions build.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
#[cfg(feature = "ultralight-resources")]
use std::env::var;
#[cfg(feature = "ultralight-resources")]
use std::fs::{self, DirEntry};
#[cfg(feature = "ultralight-resources")]
use std::path::Path;

fn main() {
// ensure runtime resources exist - for examples & local tests
#[cfg(feature = "ultralight-resources")]
{
let mut possible_directories = Vec::new();
let out = var("OUT_DIR").unwrap();
// This allows it to work in this project but also other projects too
let path = Path::new(&out)
Expand All @@ -20,8 +24,6 @@ fn main() {
.parent()
.unwrap();

let mut possible_directories = Vec::new();

let target = Path::new(path).join("target");
let debug_path = target.clone().join("debug");
let release_path = target.clone().join("release");
Expand Down Expand Up @@ -78,6 +80,7 @@ fn main() {
println!("cargo:rerun-if-changed=Cargo.lock");
}

#[cfg(feature = "ultralight-resources")]
fn get_paths(possible_paths: &mut Vec<fs::DirEntry>, path_str: String) {
let mut paths: Vec<DirEntry> = fs::read_dir(path_str)
.expect("Could not read dir")
Expand Down
2 changes: 1 addition & 1 deletion src/engines/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use url::Url;

use crate::ImageInfo;

#[cfg(feature = "webkit")]
#[cfg(feature = "ultralight")]
pub mod ultralight;

pub enum PixelFormat {
Expand Down

0 comments on commit 142b7cb

Please sign in to comment.