Can't seem to compile #1
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: rafaelcaricio/lvgl-rs-wasm#1
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Rust newbie here. 🙂
I figured out that
cargo-web
needs to be installed, based on the presence ofWeb.toml
. However, when I runcargo web build
, I get this error:@embeddedt Hey!
Try this command:
I forgot to include that you need the nightly version of Rust.
Also you need to clone this version of lvgl-rs: https://github.com/rafaelcaricio/lvgl-rs/pull/31 next to this repo, because of this https://github.com/rafaelcaricio/lvgl-rs-wasm/blob/master/Cargo.toml#L15
Ok, I've updated the code here to make it easier. Please follow the README to install emscripten compiler and then run:
It went further this time. I did need to run
rustup target add wasm32-unknown-emscripten --toolchain nightly
first.You need to set this environment variable:
For that, you can run:
In the
/lvgl-rs-wasm
project root.Okay; that got it even further. Now I get:
I've seen this error before on a non-Rust project; I often have to fight Emscripten/Clang to get standard headers to appear properly. Hopefully I can figure it out.
Hey @embeddedt ! Please pull the latest version and try again. I have updated the README with more instructions, may be easier now.
Could you please share what commands you're running to get this error?
Unfortunately, it still doesn't work with the latest version. These are the commands I ran:
I get the same error as my last post.
When I was working on the Emscripten port of MicroPython, I ran into issues with needing to install Emscripten's Clang package as well. Newer Emscripten versions seemed to give me more trouble (I ended up sticking with a 1.38 version). Do you know what Emscripten version you have installed?
I'll give that version a try.
Alright; it works with Emscripten 2.0.4. That was the problem.
Awesome! 🥳