hashcards icon indicating copy to clipboard operation
hashcards copied to clipboard

Windows build issues

Open monkeydust opened this issue 1 week ago • 3 comments

Getting following error any ideas? Thanks


C:\Users\Administrator\code\hashcards>cargo build --release
   Compiling hashcards v0.2.1 (C:\Users\Administrator\code\hashcards)
error: couldn't read `src\cmd\drill\../../../vendor/katex/katex.min.css`: The system cannot find the path specified. (os error 3)
  --> src\cmd\drill\katex.rs:28:17
   |
28 |     let bytes = include_bytes!("../../../vendor/katex/katex.min.css");
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: couldn't read `src\cmd\drill\../../../vendor/katex/katex.min.js`: The system cannot find the path specified. (os error 3)
  --> src\cmd\drill\katex.rs:40:17
   |
40 |     let bytes = include_bytes!("../../../vendor/katex/katex.min.js");
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: couldn't read `src\cmd\drill\../../../vendor/katex/contrib/auto-render.min.js`: The system cannot find the path specified. (os error 3)
  --> src\cmd\drill\katex.rs:53:17
   |
53 |     let bytes = include_bytes!("../../../vendor/katex/contrib/auto-render.min.js");
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: couldn't read `src\cmd\drill\../../../vendor/katex/fonts/KaTeX_AMS-Regular.woff2`: The system cannot find the path specified. (os error 3)
  --> src\cmd\drill\katex.rs:79:13
   |
79 |             include_bytes!("../../../vendor/katex/fonts/KaTeX_AMS-Regular.woff2")
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: couldn't read `src\cmd\drill\../../../vendor/katex/fonts/KaTeX_Caligraphic-Bold.woff2`: The system cannot find the path specified. (os error 3)
  --> src\cmd\drill\katex.rs:82:13
   |
82 |             include_bytes!("../../../vendor/katex/fonts/KaTeX_Caligraphic-Bold.woff2")
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: couldn't read `src\cmd\drill\../../../vendor/katex/fonts/KaTeX_Caligraphic-Regular.woff2`: The system cannot find the path specified. (os error 3)
  --> src\cmd\drill\katex.rs:85:13
   |
85 |             include_bytes!("../../../vendor/katex/fonts/KaTeX_Caligraphic-Regular.woff2")
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: couldn't read `src\cmd\drill\../../../vendor/katex/fonts/KaTeX_Fraktur-Bold.woff2`: The system cannot find the path specified. (os error 3)
  --> src\cmd\drill\katex.rs:88:13
   |
88 |             include_bytes!("../../../vendor/katex/fonts/KaTeX_Fraktur-Bold.woff2")
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: couldn't read `src\cmd\drill\../../../vendor/katex/fonts/KaTeX_Fraktur-Regular.woff2`: The system cannot find the path specified. (os error 3)
  --> src\cmd\drill\katex.rs:91:13
   |
91 |             include_bytes!("../../../vendor/katex/fonts/KaTeX_Fraktur-Regular.woff2")
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: couldn't read `src\cmd\drill\../../../vendor/katex/fonts/KaTeX_Main-Bold.woff2`: The system cannot find the path specified. (os error 3)
  --> src\cmd\drill\katex.rs:94:13
   |
94 |             include_bytes!("../../../vendor/katex/fonts/KaTeX_Main-Bold.woff2")
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: couldn't read `src\cmd\drill\../../../vendor/katex/fonts/KaTeX_Main-BoldItalic.woff2`: The system cannot find the path specified. (os error 3)
  --> src\cmd\drill\katex.rs:97:13
   |
97 |             include_bytes!("../../../vendor/katex/fonts/KaTeX_Main-BoldItalic.woff2")
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: couldn't read `src\cmd\drill\../../../vendor/katex/fonts/KaTeX_Main-Italic.woff2`: The system cannot find the path specified. (os error 3)
   --> src\cmd\drill\katex.rs:100:13
    |
100 |             include_bytes!("../../../vendor/katex/fonts/KaTeX_Main-Italic.woff2")
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: couldn't read `src\cmd\drill\../../../vendor/katex/fonts/KaTeX_Main-Regular.woff2`: The system cannot find the path specified. (os error 3)
   --> src\cmd\drill\katex.rs:103:13
    |
103 |             include_bytes!("../../../vendor/katex/fonts/KaTeX_Main-Regular.woff2")
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: couldn't read `src\cmd\drill\../../../vendor/katex/fonts/KaTeX_Math-BoldItalic.woff2`: The system cannot find the path specified. (os error 3)
   --> src\cmd\drill\katex.rs:106:13
    |
106 |             include_bytes!("../../../vendor/katex/fonts/KaTeX_Math-BoldItalic.woff2")
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: couldn't read `src\cmd\drill\../../../vendor/katex/fonts/KaTeX_Math-Italic.woff2`: The system cannot find the path specified. (os error 3)
   --> src\cmd\drill\katex.rs:109:13
    |
109 |             include_bytes!("../../../vendor/katex/fonts/KaTeX_Math-Italic.woff2")
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: couldn't read `src\cmd\drill\../../../vendor/katex/fonts/KaTeX_SansSerif-Bold.woff2`: The system cannot find the path specified. (os error 3)
   --> src\cmd\drill\katex.rs:112:13
    |
112 |             include_bytes!("../../../vendor/katex/fonts/KaTeX_SansSerif-Bold.woff2")
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: couldn't read `src\cmd\drill\../../../vendor/katex/fonts/KaTeX_SansSerif-Italic.woff2`: The system cannot find the path specified. (os error 3)
   --> src\cmd\drill\katex.rs:115:13
    |
115 |             include_bytes!("../../../vendor/katex/fonts/KaTeX_SansSerif-Italic.woff2")
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: couldn't read `src\cmd\drill\../../../vendor/katex/fonts/KaTeX_SansSerif-Regular.woff2`: The system cannot find the path specified. (os error 3)
   --> src\cmd\drill\katex.rs:118:13
    |
118 |             include_bytes!("../../../vendor/katex/fonts/KaTeX_SansSerif-Regular.woff2")
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: couldn't read `src\cmd\drill\../../../vendor/katex/fonts/KaTeX_Script-Regular.woff2`: The system cannot find the path specified. (os error 3)
   --> src\cmd\drill\katex.rs:121:13
    |
121 |             include_bytes!("../../../vendor/katex/fonts/KaTeX_Script-Regular.woff2")
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: couldn't read `src\cmd\drill\../../../vendor/katex/fonts/KaTeX_Size1-Regular.woff2`: The system cannot find the path specified. (os error 3)
   --> src\cmd\drill\katex.rs:124:13
    |
124 |             include_bytes!("../../../vendor/katex/fonts/KaTeX_Size1-Regular.woff2")
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: couldn't read `src\cmd\drill\../../../vendor/katex/fonts/KaTeX_Size2-Regular.woff2`: The system cannot find the path specified. (os error 3)
   --> src\cmd\drill\katex.rs:127:13
    |
127 |             include_bytes!("../../../vendor/katex/fonts/KaTeX_Size2-Regular.woff2")
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: couldn't read `src\cmd\drill\../../../vendor/katex/fonts/KaTeX_Size3-Regular.woff2`: The system cannot find the path specified. (os error 3)
   --> src\cmd\drill\katex.rs:130:13
    |
130 |             include_bytes!("../../../vendor/katex/fonts/KaTeX_Size3-Regular.woff2")
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: couldn't read `src\cmd\drill\../../../vendor/katex/fonts/KaTeX_Size4-Regular.woff2`: The system cannot find the path specified. (os error 3)
   --> src\cmd\drill\katex.rs:133:13
    |
133 |             include_bytes!("../../../vendor/katex/fonts/KaTeX_Size4-Regular.woff2")
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: couldn't read `src\cmd\drill\../../../vendor/katex/fonts/KaTeX_Typewriter-Regular.woff2`: The system cannot find the path specified. (os error 3)
   --> src\cmd\drill\katex.rs:136:13
    |
136 |             include_bytes!("../../../vendor/katex/fonts/KaTeX_Typewriter-Regular.woff2")
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: could not compile `hashcards` (bin "hashcards") due to 23 previous errors

monkeydust avatar Dec 15 '25 16:12 monkeydust

@monkeydust see the Makefile and/or README build section, it should be downloading the KaTeX dependency.

Although ideally if KaTeX could be replaced with a rust dependency (or downloaded via build.rs), hashcards would be much simpler to build and distribute. Instead of cloning the git repo and requiring sudo, a user could simply use cargo install hashcards.

hoxxep avatar Dec 15 '25 16:12 hoxxep

Thanks tries but wont donwload it and throws the error. Also tried what you suggested

C:\Users\Administrator\code\hashcards>cargo install hashcards
    Updating crates.io index
error: could not find `hashcards` in registry `crates-io` with version `*`

monkeydust avatar Dec 15 '25 16:12 monkeydust

Download KaTeX, unzip and place in vendor/katex

spidersouris avatar Dec 15 '25 21:12 spidersouris

Same issue on macOS when building with flake.nix. But in this case I can't just add a gtihub: flake ref and install the package. So manually downloading KaTeX is not an option.

I suspect KaTeX should be declared as build input somehow.

timka avatar Dec 19 '25 10:12 timka

@monkeydust Could you please rename the issue as it's actually not windows-specific? Maybe Build issues with KaTeX?

timka avatar Dec 19 '25 10:12 timka

Done and issue resolved, thanks

monkeydust avatar Dec 20 '25 09:12 monkeydust