Repository navigation
Shrink MvtStyle 15x, stop tracking build products, 0.1.1 - #3
Merged
Merged
Conversation
With "rlib" alongside "staticlib", rustc cannot run LTO for the static library, so libmvt_style_ffi.a carried std, core and the crate as separate objects with their LLVM bitcode embedded: 14 MB a slice, 10 MB zipped in the v0.1.0 release. Nothing depends on the rlib. As a staticlib only it is 0.94 MB a slice, like MvtRender and TilePng, and exports the same four mvt_style_* functions.
The SDKs now take these from a release. A copy here is overwritten by every local build, and already disagreed with what v0.1.0 shipped.
react-sdk no longer has vectorstyle/ and vectortile/ workspaces (MapConductor/react-sdk#25): react-vectorstyle and react-vectortile unpack a release into their own vendor/. sync-sdk.sh now copies a local build there and stamps it as local, so the next plain fetch puts the pinned release back.
Contributor
Author
|
Added: |
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.
The iOS style compiler was 14 MB a slice
MvtStyle.xcframework.zipin v0.1.0 is 10 MB, whileMvtRenderis 4 MB.mvt-style-ffideclaredcrate-type = ["staticlib", "rlib"]. With an rlib alongside the staticlib, rustc does not run LTO for the static library.libmvt_style_ffi.atherefore keptstd,coreand the crate as separate objects, each with its LLVM bitcode still embedded (5 MB instdalone).staticlibonly.ios-arm64slicecargo test -p mvt-style-ffipasses: 5 tests.mvt_style_*functions inmvt_style.hare still exported.The bitcode does not reach an app binary, but it is what SDK users download.
Stop tracking the native build products
The android
core/stylejniLibs and theios-core/ios-stylexcframeworks andlib/were committed. The SDKs now take these from a release, so the committed copies only drift: every local build overwrites them, and the committed MvtStyle already differed from v0.1.0. They are untracked and gitignored, likebindings/ios/MvtRender.xcframeworkalready was.0.1.1
The Cargo workspace,
bindings/jsandbindings/js-styleversions move together, asrelease.ymlchecks.