Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add edition = "2018" to the Cargo.toml #1039

Open
hfiguiere opened this issue Jan 18, 2021 · 11 comments
Open

Add edition = "2018" to the Cargo.toml #1039

hfiguiere opened this issue Jan 18, 2021 · 11 comments

Comments

@hfiguiere
Copy link
Contributor

When updating the crate, either -sys or not, with gir, gir should make sure edition = "2018" is in the Cargo.toml, otherwise the crate won't build.

@sdroege
Copy link
Member

sdroege commented Jan 18, 2021

Good idea, do you want to make a PR?

gir is only touching the -sys Cargo.toml though, never the non-sys one. So that would require some new code.

@hfiguiere
Copy link
Contributor Author

I'll see what I can do. Indeed the non-sys Cargo isn't changed.

@gabbyprecious
Copy link

@bilelmoussaoui would love to also take on this

@bilelmoussaoui
Copy link
Member

It should actually use edition=2022 nowadays.

@bilelmoussaoui
Copy link
Member

is this issue is still relevent then?

Yes it is. Currently the generated Cargo.toml doesn't contain any edition specified.

@bilelmoussaoui
Copy link
Member

That is for the gir project, not for the projects generated with gir itself which is what this issue is about

@bilelmoussaoui
Copy link
Member

Please have a look at how to generate the bindings using gir first. E.g https://gtk-rs.org/gir/book/tutorial/sys_library.html

@hfiguiere
Copy link
Contributor Author

It should actually use edition=2022 nowadays.

There is a 2022 edition?
I know that Debian Bullseye still doesn't recognize 2021 with the distro provided rust toolchain...

@bilelmoussaoui
Copy link
Member

Oh sorry, it is 2021.

@sdroege
Copy link
Member

sdroege commented Apr 4, 2022

I know that Debian Bullseye still doesn't recognize 2021 with the distro provided rust toolchain...

Also distro versions of the toolchain are meant to build distro packages, not for development/etc purposes. Same as for many other languages that move faster than a new version every decade or so.

@Semeyian
Copy link

Semeyian commented Nov 4, 2022

Hello @bilelmoussaoui,
I am Mercy Semeyian from the Outreachy program. I've been going through the tutorial you provided above on how to generate Rust bindings using Gir. The gir-files directory doesn't contain a GtkSource-3.0.gir file for the sourceview crate. Could it have been replaced with Git-3.0.gir, or is it just missing entirely? If so, how should I proceed to create the Gir.toml library option and build?
Thank you. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants