Code Monkey home page Code Monkey logo

Comments (5)

lenscas avatar lenscas commented on July 18, 2024

looks like the path is icon_path: "static/maze.png" try it without the static so it becomes /maze.png.

from quicksilver.

bwinton avatar bwinton commented on July 18, 2024

When I changed it, I get:

$ ls static/maze.png
static/maze.png
$ cargo run
    Finished dev [unoptimized + debuginfo] target(s) in 0.19s
     Running `target/debug/mazes`
thread 'main' panicked at 'Failed to load image: IoError(Os { code: 2, kind: NotFound, message: "No such file or directory" })', /Users/bwinton/.cargo/registry/src/github.com-1ecc6299db9ec823/blinds-0.1.6/src/window.rs:116:37
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

from quicksilver.

ryanisaacg avatar ryanisaacg commented on July 18, 2024

Regarding desktop icons, winit (the library quicksilver uses for windowing) does not support window icons on macOS. If upstream support is added, then it will work fine.

Regarding the path to the icon on desktop, I think that's definitely a bug.

I think that the path is wrong on the web, which is your problem there. Try just 'maze.png' and compile for the web.

from quicksilver.

bwinton avatar bwinton commented on July 18, 2024

I get the same Error loading Rust wasm module 'mazes': RuntimeError: unreachable executed as in the original report.

(Is it trying to load the image from the filesystem in the web version? Is there some sort of "resource bundle" task I need to run first? Or maybe a config file I need to write?)

from quicksilver.

lenscas avatar lenscas commented on July 18, 2024

you don't need to bundle it, as cargo web just allows you to reference everything inside the static folder as if that was the root. (So, maze.png instead of static/maze.png).

However, a browser already automatically asks for the icon file at favicon.ico, so just having an .ico file inside the static directory should probably be enough to get it to work for browsers?
`

from quicksilver.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.