1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
|
#import "@preview/touying:0.6.3": *
#import "@preview/cjk-unbreak:0.2.0": remove-cjk-break-space
#import "@preview/cetz:0.5.2"
#import "@preview/cetz-plot:0.1.4": plot
#import "setoka.typ": *
#show: remove-cjk-break-space
#show: setoka-theme.with(
aspect-ratio: "16-9",
config-info(
title: [
最近作っている\
Rust 製 Composer の進捗
],
subtitle: [PHPerKaigi mini \#1],
author: [nsfisis (いまむら)],
date: datetime(year: 2026, month: 5, day: 25),
),
)
#set text(font: "BIZ UDPGothic", lang: "ja")
#show raw: set text(font: "UDEV Gothic 35")
#let color-composer = rgb("#3b82f6")
#let color-mozart = rgb("#e2682b")
#title-slide()
#[
#set align(center + horizon)
#set text(size: 60pt)
biome oxc esbuild\
uv bun......
]
---
#[
#set align(center + horizon)
#grid(
columns: (auto, auto, auto),
column-gutter: 0.6em,
align: horizon,
text(size: 64pt)[世は大],
text(size: 22pt)[
その言語で書かれた\
ツールチェーンを\
速そうな別言語で\
書き直して生産性を\
引き上げていけたら\
いいんじゃないか
],
text(size: 64pt)[時代],
)
]
---
#[
#set align(center + horizon)
#text(size: 56pt)[Mago(旧 Fennec)]
#v(0.5em)
#text(size: 32pt)[linter, formatter, static analyzer......]
]
---
#[
#set align(center + horizon)
Composer は\
置き換えないの?
]
---
#[
#set align(horizon)
#set text(size: 36pt)
#grid(
columns: (auto, auto),
column-gutter: 0.4em,
align: top,
[A.],
[
I/O bound だから速くならないよ。\
エコシステム分断するし。\
PHP 製の Composer plugin も\
サポートできないでしょ
],
)
]
---
#[
#set align(center + horizon)
本当か?
]
---
#[
#set align(center + horizon)
Rust 製 Composer
#v(0.5em)
Mozart
]
---
#[
#set align(center + horizon)
#set text(size: 9pt, fill: black)
// hyperfine による計測結果 (10 runs)
#let labels = (
[composer/no-cache], [mozart/no-cache], [composer/cache], [mozart/cache],
)
#let vals = (21.516, 136.072, 5.988, 7.877)
#let errs = (1.177, 20.269, 0.276, 0.094)
#let cols = (color-composer, color-mozart, color-composer, color-mozart)
#cetz.canvas({
import cetz.draw: *
// 背景
rect((-3.3, -1.6), (12.4, 9.4), fill: white, stroke: none)
set-style(
axes: (
stroke: black,
tick: (stroke: black),
grid: (stroke: rgb("#cccccc") + 0.5pt),
),
)
plot.plot(
size: (12, 7),
axis-style: "left",
x-min: 0,
x-max: 4,
y-min: 0,
y-max: 145,
x-tick-step: none,
x-ticks: range(4).map(i => (i + 0.5, text(size: 8pt)[#labels.at(i)])),
y-tick-step: none,
y-ticks: range(0, 141, step: 20).map(v => (v, text(size: 9pt)[#v s])),
y-grid: true,
y-label: text(size: 11pt)[実行時間 (秒)],
x-label: none,
legend: none,
{
for i in range(4) {
plot.add-bar(
((i + 0.5, vals.at(i)),),
bar-width: 0.6,
style: (fill: cols.at(i), stroke: none),
)
}
plot.annotate({
for i in range(4) {
let x = i + 0.5
let v = vals.at(i)
let e = errs.at(i)
line((x, v - e), (x, v + e), stroke: black + 1.2pt)
line((x - 0.1, v + e), (x + 0.1, v + e), stroke: black + 1.2pt)
line((x - 0.1, v - e), (x + 0.1, v - e), stroke: black + 1.2pt)
}
})
},
)
// 凡例
let ly = 8.4
rect((0, ly - 0.18), (0.36, ly + 0.18), fill: color-composer, stroke: none)
content((0.5, ly), text(size: 10pt)[composer], anchor: "west")
rect((3.0, ly - 0.18), (3.36, ly + 0.18), fill: color-mozart, stroke: none)
content((3.5, ly), text(size: 10pt)[mozart], anchor: "west")
content(
(6.0, ly),
text(size: 10pt)[誤差棒 = 標準偏差 σ(10回実行)],
anchor: "west",
)
})
]
---
#[
#set align(horizon)
現在書き直し中\
→ Shirabe
]
---
#[
#set align(top)
#v(0.3em)
Why Rewrite?
]
---
#[
#set align(horizon)
Why Rewrite?
#v(1.5em)
#h(1em) Plugin をサポートしたい!
]
---
#[
#set align(horizon)
#set text(size: 40pt)
Rust のデータ構造を\
PHP のクラス構造に寄せる
#v(1em)
可能な限り「そのまま」移植
]
---
#[
#set align(top)
#v(0.3em)
まとめ
#set text(size: 34pt)
#v(0.5em)
- Rust 製 Composer を開発中
- 現在大幅に書き直し中
- Plugin を含めた *100%* 互換を目指す
]
|