Open sdobz opened 5 years ago
It is normal that cargo build
doesn't work. (: You should always use cargo web build
to build your project.
If you execute cargo build
then cargo
will build your project using whatever the default target it is configured with, which in your case is x86_64-unknown-linux-gnu
. This doesn't really make any sense as both stdweb
and yew
are Web frameworks, and x86_64-unknown-linux-gnu
is a native, non-Web target. stdweb
only supports asmjs-unknown-emscripten
, wasm32-unknown-emscripten
and wasm32-unknown-unknown
as targets.
Why are you using cargo build
anyway? If I know your use case I might be able to help you better.
Hello kind people!
I wanted to build a function that validates javascript, which is part of a post body. However, the target I am building this for is not a web build. That service MUST support validating a reduced set of javascript instructions, before processing them.
Obviously an insecure thing I am working with here, ..
my questions:
cargo build web
build?I thought that there must be macro to create javascript code in rust. Like the macro that constructs html in yew e.g. And so I am looking here :)
Hello koute, I've been following your progress on the new js macro closely, thanks for getting debug builds working! Well, maybe.
I'm using the yew library and recently it started having a linker error during
cargo build
. My intuition points to the issue being in this project as it has the most drastic recent changes, andcargo web build
finishes without error, though I will happily cross post this if relevant.Platform: Windows Subsystem for Linux (ubuntu)
Tooling Versions:
cargo web --version: cargo-web 0.6.22
Here is a minimum repository to reproduce the problem (a mini-pro-repro-repo) : https://github.com/sdobz/cargo-web-yew-linker-issue
Here is a truncated
cargo build
output (full output in the readme above):