meta-rust / cargo-bitbake

cargo extension that can generate BitBake recipes utilizing the classes from meta-rust
Apache License 2.0
83 stars 57 forks source link

Edition 2021 not supported #46

Open ghost opened 2 years ago

ghost commented 2 years ago

cargo-bitbake doesn't support edition 2021 in Cargo.toml

$ cargo bitbake
error: failed to parse manifest at `/home/snke/git/xxx/Cargo.toml`

Caused by:
  failed to parse the `edition` key

Caused by:
  this version of Cargo is older than the `2021` edition, and only supports `2015` and `2018` editions.
$ cargo bitbake --version
cargo-bitbake 0.3.15
ghost commented 2 years ago

I'm running into the same problem.. Is there a workaround?

acz2022 commented 2 years ago

Yeah, me too. This actually is a show stopper for my rust project

GiorgioBertolotti commented 2 years ago

@cardoe Could you please take a look at this?

GiorgioBertolotti commented 2 years ago

@snke @Pan5ky @acz2022 as a workaround you can install the version with updated dependencies from PR #45. To do so you can run cargo install --locked --git https://github.com/otavio/cargo-bitbake. Please note that if you've previously installed the original version you should run cargo uninstall cargo-bitbake to remove it.

cletustboone commented 2 years ago

@GiorgioBertolotti worked for me. Hoping this can get merged and published soon.

acz2022 commented 2 years ago

@GiorgioBertolotti Thanks for the reply. There is unfortunately more to that. At the moment cargo-bitbake is not able to produce correct recipe (it creates almost correct) for rust app that uses gtk3. What needed to be added to my recipe after generating it via cargo bitbake:

  1. inherit pkgconfig
  2. DEPENDS = "glibc cairo gtk+3 gdk-pixbuf atk pango"

But I still think it is a great work and I'm sure it will only get better. Cheers