Git Product home page Git Product logo

Comments (7)

LucaCappelletti94 avatar LucaCappelletti94 commented on August 25, 2024 4

I think it is a rust analyzer issue, which currently does not seem to support the config files for subcrates.

from yewdux.

TaoVonQi avatar TaoVonQi commented on August 25, 2024 1

Yes, trunk builds fine but rust analyzer complains.

from yewdux.

intendednull avatar intendednull commented on August 25, 2024

Global context is disabled for non-wasm targets. If you don't need SSR support, you can set the default build target for your project.

If you do need SSR support, please review the docs

from yewdux.

accorded-jay avatar accorded-jay commented on August 25, 2024

We ran into the same issue even with targeting wasm32-unknown-unkown. We had to turn on the doctests feature to get it to work. Adding yewdux = { version = "0.10.0", features = ['doctests']} got us past this issue, but it does seem odd that it's gated behind that particular feature.

from yewdux.

intendednull avatar intendednull commented on August 25, 2024

@accorded-jay that feature is for internal use, and shouldn't be necessary. Can you share your project, or a minimal reproduction?

Using global in non-wasm targets can introduce unexpected behavior, and is not recommended.

from yewdux.

LucaCappelletti94 avatar LucaCappelletti94 commented on August 25, 2024

I have encountered the same issue while writing a very much WASM yew lil thing.

from yewdux.

intendednull avatar intendednull commented on August 25, 2024

@LucaCappelletti94 This might be happening when building the whole project, which probably defaults to your native target. You should be able to compile by specifying the target for your wasm crate only. However, I can see how this might get cumbersome.

Will see about a qol improvement here

from yewdux.

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.