Crate split phase 1: stylo_build codegen crate + property IDs and small types into stylo_traits - #6
Draft
nicoburns wants to merge 3 commits into
Draft
Crate split phase 1: stylo_build codegen crate + property IDs and small types into stylo_traits#6nicoburns wants to merge 3 commits into
nicoburns wants to merge 3 commits into
Conversation
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Phase 1 of splitting the
stylocrate into smaller crates for compile-time (pipelining) wins. This PR moves the codegen pipeline and the "small types everything names" down below the main crate, keeping thestyle::API unchanged via re-exports.stylo_buildcrate: the mako/python property-codegen pipeline (build.py,data.py, templates, property TOMLs, vendored python) moves out ofstyle/into a shared[build-dependencies]crate exposinggenerate_properties(engine)and a newgenerate_property_ids(engine)target. Single source of truth for property data; multiple crates can now run codegen into their ownOUT_DIR.stylo_traits: a newproperty_ids.mako.rstemplate rendersLonghandId,ShorthandId,NonCustomPropertyId,AliasId,LogicalGroupId,PrioritaryPropertyId,CountedUnknownProperty,property_counts, and the ID-set machinery (LonghandIdSetetc.) intostyle_traits::property_ids.ToComputedValue/ToResolvedValuefor the ID enums are nowtrivial_to_computed_value!/trivial_to_resolved_value!in the main crate instead of derives.stylo_traits:Origin/OriginSet/PerOrigin(style_traits::origin),CssRuleType/CssRuleTypes/CorsMode(style_traits::rule_types). Old paths re-exported.gecko_bindingsstatic) is behind a runtime-installed function pointer (set_gecko_property_enabled_fn) sostylo_traitsdoesn't depend on the bindings.No behavior change intended;
style::properties::LonghandIdetc. remain available at their old paths.Later phases (stacked on this PR) will extract
stylo_common,stylo_values, andstylo_properties.Link to Devin session: https://app.devin.ai/sessions/5d2d6be20e724623bdc1bcf7e1687af1
Requested by: @nicoburns