swift
swift copied to clipboard
Code size optimizations
Motivation
Code size is a critical part of reducing initial (un-cached) startup time as it affects download size and compilation time inside Wasm engine.
Sub-tasks
- [ ] https://github.com/swiftwasm/swift/issues/5601
- [ ] Explore if we can use archive link instead of object link in SwiftPM
- [x] Provide a way to strip a part of ICU data embedded through http://github.com/swiftlang/swift-foundation-icu
- See https://github.com/GoodNotes/swift-icudata-slim
Hi @kateinoigakukun and thanks for the great work!
I'd like to provide some additional data points, from this brief exploration:
- an hello world program currently compiles to a ~6.8M wasm file
- using
wasm-opton the resulting binary strip it down to half the size 3.3-3.4Mb