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

Remove backend features. Add a crate for each backend. Add a cargo workspace to the top level. Update dependencies. #1223

Merged
merged 17 commits into from
Dec 26, 2018

Conversation

mitchmindtree
Copy link
Contributor

@mitchmindtree mitchmindtree commented Dec 5, 2018

This is a follow on from @Abendstolz's work in #1203 that makes a lot of small tweaks and creates a cargo workspace.

This is an important step for #754 as it moves conrod's core slightly closer to being publishable as a 1.0, as most of the instability these days lies within the backend specific code. That said, my primary motivation is so that I may go ahead with rebasing, tweaking and merging @Abendstolz's following PR #1204 that adds support for vulkano as I will be needing it for a downstream project.

All features have been removed. Instead, we now have conrod_core, conrod_gfx, conrod_glium, conrod_piston and conrod_winit crates.

The examples are now in each of the backend crates for which they were created. Although they are slightly less visible now, this has simplified them a lot as we no longer need a lot of scary feature-checking code in them. It also makes it a little clearer which backend is used by each of the examples. Chapter 2 of the guide has been updated in accordance with the change in how examples are now run.

This also applies the dependency version updates by @bvssvni from #1214 along with updates for winit and glium.

Merging is currently pending glium/glium#1715 as the latest published version of glium uses a version of winit that is 2 versions behind and is incompatible with the conrod_winit event conversion code.

Related to #754.
Closes #1183.
Closes #1203.
Closes #1214.
Closes #1217.
Closes #1219.

Thedancingbard and others added 16 commits December 4, 2018 20:54
Also begins removing the feature-related code from the glium backend but
I'm thinking it might make more sense to move all these examples to the
root of the repo for better visibility. Going to rebase and then try
this.
Also updates conrod_derive to 0.2 in preparation for publishing.
Removes use of feature flags throughout example that used to be
necessary when backends where added via features.

The conrod_example_shared crate is a local crate (not intended to be
published) in which a GUI displaying (almost) all widgets can be
instantiated to edit a basic demo app. This same GUI is re-used by the
`all_*.rs` example for each of the backends to ensure they all behave
the same.
This commit also temporarily switches the glium dependency to a git
branch of mine pending glium/glium#1715.
@bvssvni
Copy link
Member

bvssvni commented Dec 5, 2018

This will make maintenance much easier! Also makes it easier to iterate on the backends without having to release new versions of Conrod.

@Abendstolz
Copy link

Great stuff, thanks for taking this up again. To be quite frank it felt (and to some extent still feels) as if Conrod was dead.

@OtaK
Copy link
Contributor

OtaK commented Dec 5, 2018

Amazing! I've been holding back publishing some of my work on Conrod for this exact reason; the inability to make a small crate that would make use of the core without pushing a whole PR to conrod itself was really really putting me off (also meant bringing optional deps, features and all the complexity that was going with that).

Cheers!

(Also, on another note, we were really successful in making our embedded prototype with Conrod, and I'm currently exploring the likes of Azul & co. At least I know conrod does the job for GUI stuff, so if the others don't fit our use case, I might come back to Conrod :) )

@mitchmindtree mitchmindtree mentioned this pull request Dec 6, 2018
@mitchmindtree
Copy link
Contributor Author

@OtaK thanks for sharing! In case you're interested, there's still a small amount of room for further crate separation, namely:

  1. Splitting out all non-primitive widgets into a conrod_widgets crate. This is another source of instability as the widgets constantly need tweaking and slight behaviour changes in order to satisfy different folks' needs.
  2. Split the guide out into a conrod_guide crate (while ensuring all examples can still compile with when running cargo test).

mitchmindtree added a commit to mitchmindtree/conrod that referenced this pull request Dec 8, 2018
This rebases work by @Kurble and @Abendstolz onto PistonDevelopers#1223, ready to land a
working conrod vulkano backend once the crate split lands. I have made
some small tweaks to deduplicate some code and make the `conrod_vulkano`
crate a little more modular so that it does not require consuming the
`AutoCommandBufferBuilder`.

Closes PistonDevelopers#1052.
@mitchmindtree mitchmindtree merged commit 413742a into PistonDevelopers:master Dec 26, 2018
@mitchmindtree mitchmindtree deleted the crate_split branch December 26, 2018 07:36
mitchmindtree added a commit to mitchmindtree/conrod that referenced this pull request Dec 26, 2018
This rebases work by @Kurble and @Abendstolz onto PistonDevelopers#1223, ready to land a
working conrod vulkano backend once the crate split lands. I have made
some small tweaks to deduplicate some code and make the `conrod_vulkano`
crate a little more modular so that it does not require consuming the
`AutoCommandBufferBuilder`.

Closes PistonDevelopers#1052.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants