Slide 1

Slide 1 text

2017/07/15 ABI҆ఆԽʹ͍ͭͯ SWWDC × AKIBA.swift in Sendai

Slide 2

Slide 2 text

About Me

Slide 3

Slide 3 text

• ాத ޹໌ (Takaaki Tanaka) • Ϋϥεϝιουגࣜձࣾ • @kongmingtrap • Swift / Objective-C / Scala / JavaScript … • GyazSquare / GitHub

Slide 4

Slide 4 text

Swift ϓϩάϥϚʹ͸ ຖ೥߃ྫͷΞϨͷ࣌ظ͕΍ͬͯ͘Δ

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

ʊਓਓਓਓਓਓਓਓਓʊ ʼɹ$POWFSU'BJMFEɹʻ ʉ:?:?:?:?:?:?:?:?:?ʉ

Slide 7

Slide 7 text

IUUQTUXJUUFSDPNLUBOBLBTUBUVT

Slide 8

Slide 8 text

SwiftͷABI͸ ະͩʹ҆ఆԽ͍ͯ͠ͳ͍

Slide 9

Slide 9 text

LLVMͷ఩ֶ ΋͏ͻͱͭɺLLVM Λܰྔͳ··ʹอͪଓ͚ ͍ͯΔେ͖ͳಛ௃͕͋Δ (ϥΠϒϥϦΛ࢖͏ ΫϥΠΞϯτଆ͔ΒݟΔͱࢍ൱྆࿦͕͋Δ)ɻ ͦΕ͸ɺաڈͷܾஅ΋ੵۃతʹݟ௚ͯ͠ɺա ڈ ͱͷޓ׵ੑΛؾʹͤͣʹ API Λେ͖͘ม ߋ͍ͯ͘͠ͱ͍͏͜ͱͩɻ 5IF"SDIJUFDUVSFPG0QFO4PVSDF"QQMJDBUJPOT೔ຊޠ༁

Slide 10

Slide 10 text

ͭΒ͍

Slide 11

Slide 11 text

Application Binary Interface

Slide 12

Slide 12 text

Application Binary Interface • ΦϒδΣΫτίʔυϨϕϧͷΠϯλʔϑΣʔ ε • ޓ׵ABIΛαϙʔτ͢ΔγεςϜؒͰɺಉ ࣮͡ߦϑΝΠϧΛมߋແ͠Ͱಈ࡞ͤ͞Δ

Slide 13

Slide 13 text

No content

Slide 14

Slide 14 text

No content

Slide 15

Slide 15 text

Swift ͷ ABI҆ఆԽ

Slide 16

Slide 16 text

4XJGU"#*4UBCJMJUZ.BOJGFTUPΛಡΉ

Slide 17

Slide 17 text

Swift ͷ ABI҆ఆԽ Swift ABI Stability Manifesto 4XJGU"#*4UBCJMJUZ.BOJGFTUP

Slide 18

Slide 18 text

جຊํ਑ • ΑΓ৽͍͠ίϯύΠϥ͕ݹ͍όʔδϣϯͷSwiftͰ ॻ͔ΕͨίʔυΛίϯύΠϧͰ͖Δ͜ͱ • ৽͍͠SwiftόʔδϣϯʹҠߦ͢ΔࡍʹSwift։ൃ ऀ͕௚໘͢ΔҠߦͷ௧ΈΛܰݮ͢Δ • ιʔεͷޓ׵ੑʹΑΓɺύοέʔδ࡞੒ऀ͸ɺ ෳ਺ͷSwiftόʔδϣϯʹΘͨͬͯ୯Ұͷίʔυ ϕʔεΛҡ࣋͠ͳ͕ΒɺϢʔβʔ͸৽͍͠όʔ δϣϯͷSwiftΛ࢖༻Ͱ͖ΔΑ͏ʹͳΔ

Slide 19

Slide 19 text

جຊํ਑ • όΠφϦϑϨʔϜϫʔΫͱϥϯλΠϜͷޓ׵ੑ ʹΑΓɺෳ਺ͷSwiftόʔδϣϯͰಈ࡞͢ΔόΠ φϦܗࣜͷϑϨʔϜϫʔΫΛ഑෍͢Δ • όΠφϦϑϨʔϜϫʔΫʹ͸ɺϑϨʔϜϫʔ ΫͷAPIͷιʔεϨϕϧͷ৘ใΛ఻ୡ͢Δ SwiftϞδϡʔϧϑΝΠϧͱɺ࣮ߦ࣌ʹϩʔυ ͞ΕΔίϯύΠϧࡁΈͷ࣮૷Λఏڙ͢Δڞ༗ ϥΠϒϥϦͷ྆ํؚ͕·ΕΔ

Slide 20

Slide 20 text

جຊํ਑ • ABI҆ఆޙͷ҆ఆੑʹ͓͍ͯɺΑΓੵۃతͳϨΠΞ΢τ վળ͕ൃ໌͞ΕΔՄೳੑ͕͋Γ·͢ɻͨͱ͑͹ɺ֎෦ λΠϓͷσʔλϝϯόʔΛ࢖༻ͯ͠ωετ͞ΕͨλΠϓ ͷσʔλϝϯόʔΛฒ΂ସ͑ͨΓɺύοΩϯάͨ͠Γ ͢Δ͜ͱ͕Ͱ͖·͢ɻͦͷΑ͏ͳվળ͸ɺల։λʔήο τ͓Αͼ/·ͨ͸࠷খόʔδϣϯνΣοΫΛհͯ͠ABI- additiveͳ΍ΓํͰߦΘΕͳ͚Ε͹ͳΒͳ͍ɻ͜Ε͸ɺ ϞδϡʔϧϑΝΠϧ͕λΠϓ͝ͱͷABIόʔδϣϯ৘ใ ΛτϥοΩϯά͢Δඞཁ͕͋Δ͜ͱΛҙຯ͠·͢ɻ

Slide 21

Slide 21 text

IUUQTTQFBLFSEFDLDPNVTSOBNFVTXJGUBCJTUBCJMJUZ NBOJGFTUPXPEVNV

Slide 22

Slide 22 text

Library Evolution • ͢΂ͯͷϢʔβʔ͕ͦͷϥΠϒϥϦͷ৽͍͠ όʔδϣϯΛ࢖༻ͯ͠࠶ίϯύΠϧ͢Δඞཁ ͕ͳ͘ɺϥΠϒϥϦ΍ίϯϙʔωϯτ͕࣌ ؒͷܦաͱͱ΋ʹมߋ͞Εʹ͘͘ͳΓ·͢ɻ • ϥΠϒϥϦͷ࡞੒ऀʹόΠφϦޓ׵ੑΛҡ ࣋͢ΔॊೈੑΛ༩͑Δ͜ͱΛ໨తͱͨ͠ͷ ͕Library Evolutionͷࢦ਑Ͱ͢ɻ

Slide 23

Slide 23 text

Library Evolution • ABIͷ҆ఆੑͷ໨తͷ1ͭ͸ɺઃܭεϖʔε Λ੍ݶ͢Δ͜ͱͳ͘ɺϥΠϒϥϦͷਐԽͷ มԽʹରԠͰ͖ΔॊೈੑΛҡ࣋͢Δ͜ͱͰ ͢ɻϥΠϒϥϦͷόʔδϣϯΞοϓͷݒ೦ ࣄ߲͸ݸʑͷηΫγϣϯͰऔΓ্͛ΒΕ· ͕͢ɺৄࡉ͸ະఆͰ͢ɻ

Slide 24

Slide 24 text

Library Evolution IUUQTHJUIVCDPNBQQMFTXJGUCMPCNBTUFSEPDT -JCSBSZ&WPMVUJPOSTU

Slide 25

Slide 25 text

҉ӢཱͪࠐΊΔࣄଶ

Slide 26

Slide 26 text

No content

Slide 27

Slide 27 text

No content

Slide 28

Slide 28 text

ѱԽ͢Δঢ়گ

Slide 29

Slide 29 text

No content

Slide 30

Slide 30 text

No content

Slide 31

Slide 31 text

Swift͸΋͏μϝͳͷ͔…

Slide 32

Slide 32 text

…͍΍ɺఘΊΔͷ͸·ͩૣ͍…!

Slide 33

Slide 33 text

…ͦ͏ͩʂ௚઀ฉ͜͏

Slide 34

Slide 34 text

ձࣾͷۚͰߦ͖ͬͯͨ 88%$ͰΫϦε͞Μʹ ձ͏ػձ͕͋ͬͨ

Slide 35

Slide 35 text

No content

Slide 36

Slide 36 text

No content

Slide 37

Slide 37 text

Swift Evolution • ΞϊςʔγϣϯͰSwiftͷόʔδϣϯΛࢦఆ ͢Δ͜ͱͰɺϞδϡʔϧ୯ҐͰͷSwift 3.0ɺ Swift 4.0ͷࠞࡏ͸Մೳͱͳͬͨ

Slide 38

Slide 38 text

Recap • Swift 4.0Ͱ΋ABI҆ఆԽ͸ݟૹΒΕͨ • Ϟδϡʔϧ୯ҐͰSwift 3.0ɺSwift 4.0ͷࢦఆ ͕Ͱ͖ΔͨΊɺࠞࡏ͸Մೳʹͳͬͨ • ABI҆ఆԽ೗ԿͰࠓޙͷൃలʹେ͖ͳӨڹ Λ༩͑Δ

Slide 39

Slide 39 text

એ఻

Slide 40

Slide 40 text

એ఻ IUUQTTDBMBDPOOQBTTDPNFWFOU

Slide 41

Slide 41 text

એ఻ IUUQTTDBMBDPOOQBTTDPNFWFOU

Slide 42

Slide 42 text

Thank you!