Coder Social home page Coder Social logo

Comments (11)

messense avatar messense commented on August 23, 2024

Can you try use git dep for both mupdf & mupdf-sys crates?

[patch.crates-io]
mupdf = { git = "https://github.com/messense/mupdf-rs.git" }
mupdf-sys = { git = "https://github.com/messense/mupdf-rs.git" }

from mupdf-rs.

Sherlock-Holo avatar Sherlock-Holo commented on August 23, 2024
mupdf = "0"

[patch.crates-io]
mupdf = { git = "https://github.com/messense/mupdf-rs.git" }
mupdf-sys = { git = "https://github.com/messense/mupdf-rs.git" }

cargo fetch report

    Updating git repository `https://github.com/messense/mupdf-rs.git`
    Updating git submodule `../thirdparty-curl.git`
warning: spurious network error (2 tries remaining): unsupported URL protocol; class=Net (12)
warning: spurious network error (1 tries remaining): unsupported URL protocol; class=Net (12)
error: failed to resolve patches for `https://github.com/rust-lang/crates.io-index`

Caused by:
  failed to load source for dependency `mupdf`

Caused by:
  Unable to update https://github.com/messense/mupdf-rs.git

Caused by:
  failed to update submodule `mupdf-sys/mupdf`

Caused by:
  failed to update submodule `thirdparty/curl`

Caused by:
  failed to fetch submodule `thirdparty/curl` from ../thirdparty-curl.git

Caused by:
  network failure seems to have happened
  if a proxy or similar is necessary `net.git-fetch-with-cli` may help here
  https://doc.rust-lang.org/cargo/reference/config.html#netgit-fetch-with-cli

Caused by:
  unsupported URL protocol; class=Net (12)

I run cargo fetch in another project and it runs well

from mupdf-rs.

messense avatar messense commented on August 23, 2024

It seems that cargo fetch didn't handle relative git submodule path properly.

from mupdf-rs.

messense avatar messense commented on August 23, 2024

rust-lang/cargo#7992

from mupdf-rs.

messense avatar messense commented on August 23, 2024

Try clone this repository to your local path and use path dependency instead.

git clone --recursive https://github.com/messense/mupdf-rs.git
[patch.crates-io]
mupdf = { path = "../mupdf-rs" }
mupdf-sys = { path = "../mupdf-rs" }

Replace ../mupdf-rs with your local clone path.

from mupdf-rs.

messense avatar messense commented on August 23, 2024

Or you can add this repository as a submodule of your git repository, then use a path dependency.

from mupdf-rs.

Sherlock-Holo avatar Sherlock-Holo commented on August 23, 2024

I see you update a new version 0.4.0, does it fixed this problem?

from mupdf-rs.

Sherlock-Holo avatar Sherlock-Holo commented on August 23, 2024

Try clone this repository to your local path and use path dependency instead.

git clone --recursive https://github.com/messense/mupdf-rs.git
[patch.crates-io]
mupdf = { path = "../mupdf-rs" }
mupdf-sys = { path = "../mupdf-rs" }

Replace ../mupdf-rs with your local clone path.

it works!

could you release a version to fix this prblem?

from mupdf-rs.

messense avatar messense commented on August 23, 2024

@Sherlock-Holo Just tried it, it doesn't work, because of the crate file size limit of crates.io, I can't package all mupdf's fonts into mupdf-sys crate.

from mupdf-rs.

Sherlock-Holo avatar Sherlock-Holo commented on August 23, 2024

@Sherlock-Holo Just tried it, it doesn't work, because of the crate file size limit of crates.io, I can't package all mupdf's fonts into mupdf-sys crate.

maybe you can try to create some new crates call mupdf-xx-font, the mupdf-sys import them as optional dependency and create some font features, and then the mupdf add some feature like xx-font, which it depend on mupdf-sys font features, at the end mupdf can enable all font in default feature

from mupdf-rs.

messense avatar messense commented on August 23, 2024

v0.0.5 on crates.io now compiles and runs fine.

from mupdf-rs.

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.