Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not compiling #20

Open
soupslurpr opened this issue Dec 13, 2023 · 10 comments
Open

Not compiling #20

soupslurpr opened this issue Dec 13, 2023 · 10 comments

Comments

@soupslurpr
Copy link

Hi, I'm getting this when I'm trying to compile. Please help.

Caused by:
failed to read C:\Users\user\projects\pathfinder_rasterize\Cargo.toml

@soupslurpr
Copy link
Author

removing the patch lines, and cargo update, now getting:

error[E0433]: failed to resolve: use of undeclared crate or module `winit`
 --> C:\Users\user\.cargo\git\checkouts\pathfinder_view-e3bb902cdb8b6e4b\4c3b70b\src\view.rs:3:9
  |
3 | pub use winit::{event::{ElementState, KeyEvent}, keyboard::{ModifiersState, KeyCode}};
  |         ^^^^^ use of undeclared crate or module `winit`

error[E0412]: cannot find type `Emitter` in this scope
  --> C:\Users\user\.cargo\git\checkouts\pathfinder_view-e3bb902cdb8b6e4b\4c3b70b\src\view.rs:33:51
   |
33 |     fn init(&mut self, ctx: &mut Context, sender: Emitter<Self::Event>) {}
   |                                                   ^^^^^^^ not found in this scope

error[E0412]: cannot find type `Emitter` in this scope
  --> C:\Users\user\.cargo\git\checkouts\pathfinder_view-e3bb902cdb8b6e4b\4c3b70b\src\view.rs:41:51
   |
41 |     fn init(&mut self, ctx: &mut Context, sender: Emitter<Self::Event>) {
   |                                                   ^^^^^^^ not found in this scope

error[E0412]: cannot find type `Backend` in this scope
  --> C:\Users\user\.cargo\git\checkouts\pathfinder_view-e3bb902cdb8b6e4b\4c3b70b\src\lib.rs:92:14
   |
92 |     backend: Backend,
   |              ^^^^^^^ not found in this scope

error[E0412]: cannot find type `Backend` in this scope
  --> C:\Users\user\.cargo\git\checkouts\pathfinder_view-e3bb902cdb8b6e4b\4c3b70b\src\lib.rs:97:41
   |
97 |     pub fn new(config: Config, backend: Backend) -> Self {
   |                                         ^^^^^^^ not found in this scope

   Compiling globalcache v0.2.2
   Compiling globalcache v0.2.2 (https://github.com/s3bk/cachelib#cb512b9b)
Some errors have detailed explanations: E0412, E0433.                                                                                                
For more information about an error, try `rustc --explain E0412`.
error: could not compile `pathfinder_view` (lib) due to 5 previous errors
warning: build failed, waiting for other jobs to finish...

@s3bk
Copy link
Contributor

s3bk commented Dec 13, 2023

you need to add windows support to pathfinder_view. I only use linux, so i cant test that.

@soupslurpr
Copy link
Author

soupslurpr commented Dec 13, 2023

Is pdf_render necessary for converting a pdf to svg or can I just use https://github.com/pdf-rs/pdf? I want to try that

@s3bk
Copy link
Contributor

s3bk commented Dec 13, 2023

pdf_render is required, but not pdf_view.
if you cd into the render directory it should build.

@soupslurpr
Copy link
Author

when I run cargo run in the render directory it says there are no bins to run

@s3bk
Copy link
Contributor

s3bk commented Dec 13, 2023

That is correct. It is a library.

@s3bk
Copy link
Contributor

s3bk commented Dec 13, 2023

You can move view/src/bin/convert.rs into a separate crate. It does not depend on the view crate.

@s3bk
Copy link
Contributor

s3bk commented Dec 13, 2023

I should note that the SVG and PDF generated contain the text as outlines, so they are quite large.

@soupslurpr
Copy link
Author

Hmm ok thanks. I'll try that.

@boredsquirrel
Copy link

those are 2 issues, right? It is pretty confusing.

Is that a dependency of servos pathfinder?

[email protected]:servo/pathfinder.git

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants