Git Product home page Git Product logo

Comments (7)

ndarilek avatar ndarilek commented on May 17, 2024

Did some digging. This, too, is related to the fact that I'm building a library crate. Cargo-web indicates that &last_build.target.source_directory is $crate_root/src/bin, not $crate_root/src.

I can probably refactor this crate from lib to bin I built it initially not knowing whether I could build all my native dependencies in Emscripten, so thinking I might need JNI. Still, though, might be good to fix this. I don't know if there's a struct member that points at $crate_root/src, but that's probably a better candidate for watching.

Thanks.

from cargo-web.

koute avatar koute commented on May 17, 2024

Wait... how did you do that? The start command explicitly looks for a bin crate and refuses to start when it doesn't find one.

from cargo-web.

ndarilek avatar ndarilek commented on May 17, 2024

from cargo-web.

koute avatar koute commented on May 17, 2024

Ah yes, now I understand the problem! What you have is a hybrid lib/bin crate, and it only monitors the bin part while the lib part is implicitly used.

I'll fix it.

from cargo-web.

koute avatar koute commented on May 17, 2024

This should be fixed now on master. As a bonus I've added tracking of dependencies and support for modifying Cargo.toml.

Can you try it out and tell me if it works for you?

from cargo-web.

ndarilek avatar ndarilek commented on May 17, 2024

from cargo-web.

koute avatar koute commented on May 17, 2024

I think this should be fixed now, so closing! If you'll have any further problems feel free to create a new issue.

from cargo-web.

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.