Skip to content

Make gcore a std library and remove std, alloc, and more unused features #2724

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

Merged
merged 2 commits into from
Jun 19, 2025

Conversation

Firestar99
Copy link
Collaborator

@Firestar99 Firestar99 commented Jun 16, 2025

Requires #2729

This PR contains the code changes, for bulk renames see #2735

Features removed:

  • std, alloc to make it std-only
    • std depends on reflections, spectra, rustybuzz, image and ctor
    • alloc depends on dyn-any and bezier_rs
  • gpu was for rust-gpu compiling
  • log, rand_chacha and kurbo are required for it to even compile

@@ -144,7 +141,7 @@ fn migrate_type_descriptor_names<'de, D: serde::Deserializer<'de>>(deserializer:
let name = String::deserialize(deserializer)?;
let name = match name.as_str() {
"f32" => "f64".to_string(),
"graphene_core::transform::Footprint" => "core::option::Option<alloc::sync::Arc<graphene_core::context::OwnedContextImpl>>".to_string(),
"graphene_core::transform::Footprint" => "std::option::Option<std::sync::Arc<graphene_core::context::OwnedContextImpl>>".to_string(),
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm unsure whether this will cause breakage or not. While core would still compile, alloc shouldn't since I removed the external crate alloc;. Even if this particular migration code may be fine to be changed, it could indicate trouble with other documents in the wild. At least the demo artworks are unaffected.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This only affects the debug output, a breakage here is fine.

@Firestar99 Firestar99 force-pushed the gcore_feature_removal branch from 66e683a to b7104e3 Compare June 16, 2025 16:21
@Firestar99 Firestar99 force-pushed the gcore_feature_removal branch from b7104e3 to 3f17504 Compare June 17, 2025 14:16
@Firestar99 Firestar99 changed the title make gcore a proper std-only library Make gcore a proper std-only library Jun 18, 2025
@Firestar99 Firestar99 changed the title Make gcore a proper std-only library Remove unused features from gcore Jun 18, 2025
@Firestar99 Firestar99 force-pushed the gcore_feature_removal branch from a6b9c4d to a916e5d Compare June 18, 2025 13:21
@Firestar99 Firestar99 changed the title Remove unused features from gcore Make gcore an std library, remove unused features Jun 18, 2025
@Firestar99 Firestar99 changed the title Make gcore an std library, remove unused features Make gcore a std library, remove std, alloc and more unused features Jun 18, 2025
@Firestar99 Firestar99 force-pushed the gcore_feature_removal branch from a916e5d to 1164fd1 Compare June 18, 2025 14:25
@Firestar99 Firestar99 marked this pull request as ready for review June 18, 2025 16:29
@Firestar99 Firestar99 changed the base branch from master to editor_gcore_splitup_prep June 18, 2025 16:31
@Firestar99 Firestar99 force-pushed the editor_gcore_splitup_prep branch from 8c7b22e to 812f64c Compare June 19, 2025 20:59
Base automatically changed from editor_gcore_splitup_prep to master June 19, 2025 21:13
@Firestar99 Firestar99 force-pushed the gcore_feature_removal branch from 1164fd1 to 1a3d5d8 Compare June 19, 2025 22:05
@Firestar99 Firestar99 enabled auto-merge (squash) June 19, 2025 22:05
@Firestar99 Firestar99 merged commit f37a05e into master Jun 19, 2025
4 checks passed
@Firestar99 Firestar99 deleted the gcore_feature_removal branch June 19, 2025 22:12
@Keavon Keavon changed the title Make gcore a std library, remove std, alloc and more unused features Make gcore a std library and remove std, alloc, and more unused features Jun 20, 2025
Keavon pushed a commit that referenced this pull request Jun 20, 2025
… features (#2724)

* gcore: remove features `std`, `alloc`, `gpu` and `reflections`, now always available

* gcore: remove non-working features `kurbo` and `log`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants