-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
773 lines (671 loc) · 24.4 KB
/
Copy pathindex.html
File metadata and controls
773 lines (671 loc) · 24.4 KB
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
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="mruby/edge is an mruby-compatible virtual machine built from scratch in Rust for small, portable WebAssembly applications.">
<meta name="keywords" content="mruby, Ruby, Rust, WebAssembly, Wasm, WASI, edge computing">
<meta name="theme-color" content="#17141f">
<link rel="canonical" href="https://mrubyedge.github.io/">
<meta property="og:type" content="website">
<meta property="og:locale" content="en_US">
<meta property="og:site_name" content="mruby/edge">
<meta property="og:title" content="mruby/edge — Ruby for the edges">
<meta property="og:description" content="An mruby-compatible virtual machine built from scratch in Rust for small, portable WebAssembly applications.">
<meta property="og:url" content="https://mrubyedge.github.io/">
<meta property="og:image" content="https://mrubyedge.github.io/assets/og-image.png">
<meta property="og:image:secure_url" content="https://mrubyedge.github.io/assets/og-image.png">
<meta property="og:image:type" content="image/png">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
<meta property="og:image:alt" content="mruby/edge — Ruby for the edges">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="mruby/edge — Ruby for the edges">
<meta name="twitter:description" content="An mruby-compatible virtual machine built from scratch in Rust for small, portable WebAssembly applications.">
<meta name="twitter:image" content="https://mrubyedge.github.io/assets/og-image.png">
<meta name="twitter:image:alt" content="mruby/edge — Ruby for the edges">
<link rel="icon" href="assets/favicon.svg" type="image/svg+xml">
<link rel="icon" href="assets/favicon-32x32.png" sizes="32x32" type="image/png">
<link rel="alternate icon" href="assets/favicon.ico">
<link rel="apple-touch-icon" href="assets/apple-touch-icon.png">
<title>mruby/edge — Ruby for the edges</title>
<style>
:root {
--ink: #17141f;
--muted: #625d69;
--paper: #f8f5f0;
--card: #fffdf9;
--ruby: #dc2b3a;
--ruby-dark: #9e1625;
--rust: #c8582c;
--line: #ddd4c9;
--code: #211d29;
}
* {
box-sizing: border-box;
}
html {
scroll-behavior: smooth;
}
body {
margin: 0;
color: var(--ink);
background:
radial-gradient(circle at 92% 5%, rgba(220, 43, 58, 0.13), transparent 27rem),
radial-gradient(circle at 5% 34%, rgba(200, 88, 44, 0.1), transparent 25rem),
var(--paper);
font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
line-height: 1.6;
}
a {
color: inherit;
}
a:focus-visible {
outline: 3px solid var(--rust);
outline-offset: 4px;
}
.skip-link {
position: absolute;
top: -5rem;
left: 1rem;
z-index: 10;
padding: 0.65rem 1rem;
color: white;
background: var(--ink);
border-radius: 0.35rem;
}
.skip-link:focus {
top: 1rem;
}
.shell {
width: min(1120px, calc(100% - 2rem));
margin-inline: auto;
}
nav {
display: flex;
align-items: center;
justify-content: space-between;
gap: 2rem;
min-height: 5rem;
}
.wordmark {
display: inline-flex;
align-items: center;
gap: 0.65rem;
font-size: 1.15rem;
font-weight: 800;
letter-spacing: -0.03em;
text-decoration: none;
}
.mark {
display: grid;
width: 2rem;
height: 2rem;
place-items: center;
color: white;
background: var(--ruby);
border-radius: 0.55rem 0.55rem 0.55rem 0.15rem;
box-shadow: 0.22rem 0.22rem 0 var(--ink);
font-size: 1rem;
}
.nav-links {
display: flex;
align-items: center;
gap: 1.4rem;
margin: 0;
padding: 0;
list-style: none;
font-size: 0.9rem;
font-weight: 700;
}
.nav-links a {
text-decoration: none;
}
.nav-links a:hover {
color: var(--ruby-dark);
}
.hero {
display: grid;
grid-template-columns: minmax(0, 1.35fr) minmax(17rem, 0.65fr);
gap: clamp(2rem, 7vw, 6rem);
align-items: center;
min-height: 34rem;
padding-block: 4rem 6.5rem;
}
.eyebrow {
margin: 0 0 1rem;
color: var(--ruby-dark);
font-size: 0.78rem;
font-weight: 800;
letter-spacing: 0.16em;
text-transform: uppercase;
}
h1,
h2,
h3,
p {
margin-top: 0;
}
h1 {
max-width: 12ch;
margin-bottom: 1.5rem;
font-size: clamp(3.25rem, 9vw, 7rem);
line-height: 0.91;
letter-spacing: -0.075em;
}
h1 span {
color: var(--ruby);
}
.lede {
max-width: 42rem;
margin-bottom: 2rem;
color: #4d4854;
font-size: clamp(1.08rem, 2vw, 1.3rem);
}
.actions {
display: flex;
flex-wrap: wrap;
gap: 0.75rem;
}
.button {
display: inline-flex;
align-items: center;
justify-content: center;
min-height: 3rem;
padding: 0.75rem 1.15rem;
border: 2px solid var(--ink);
border-radius: 0.55rem;
font-weight: 800;
text-decoration: none;
transition: transform 150ms ease, box-shadow 150ms ease;
}
.button:hover {
transform: translate(-2px, -2px);
box-shadow: 4px 4px 0 var(--ink);
}
.button-primary {
color: white;
background: var(--ink);
}
.button-secondary {
background: rgba(255, 253, 249, 0.7);
}
.terminal {
overflow: hidden;
color: #f8f3ed;
background: var(--code);
border: 2px solid var(--ink);
border-radius: 0.8rem;
box-shadow: 0.7rem 0.7rem 0 var(--ruby);
transform: rotate(1.5deg);
}
.terminal-bar {
display: flex;
gap: 0.4rem;
padding: 0.8rem 1rem;
background: #302a39;
}
.terminal-bar span {
width: 0.7rem;
height: 0.7rem;
background: #8f879a;
border-radius: 50%;
}
.terminal-bar span:first-child {
background: var(--ruby);
}
pre {
margin: 0;
padding: 1.5rem;
overflow-x: auto;
font: 0.88rem/1.75 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.prompt {
color: #ff7f68;
}
.output {
color: #c9c1d4;
}
section {
padding-block: 5.5rem;
}
.section-heading {
display: grid;
grid-template-columns: minmax(0, 0.8fr) minmax(18rem, 1.2fr);
gap: 2rem;
align-items: end;
margin-bottom: 3rem;
}
h2 {
margin-bottom: 0;
font-size: clamp(2.2rem, 5vw, 4.25rem);
line-height: 1;
letter-spacing: -0.055em;
}
.section-heading p {
max-width: 42rem;
margin-bottom: 0;
color: var(--muted);
font-size: 1.05rem;
}
.feature-grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 1rem;
}
.feature {
min-height: 16rem;
padding: clamp(1.5rem, 4vw, 2.25rem);
background: rgba(255, 253, 249, 0.85);
border: 1px solid var(--line);
border-radius: 0.8rem;
}
.feature-number {
display: block;
margin-bottom: 2.5rem;
color: var(--ruby-dark);
font: 700 0.78rem ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
h3 {
margin-bottom: 0.8rem;
font-size: 1.35rem;
line-height: 1.25;
letter-spacing: -0.025em;
}
.feature p,
.talk p {
margin-bottom: 0;
color: var(--muted);
}
.feature code,
.note code {
padding: 0.08rem 0.3rem;
background: #eee7de;
border-radius: 0.25rem;
font-size: 0.88em;
}
.quickstart-wrap {
display: grid;
grid-template-columns: minmax(0, 0.7fr) minmax(20rem, 1.3fr);
gap: clamp(2rem, 7vw, 6rem);
align-items: center;
}
.quickstart-copy h2 {
margin-bottom: 1.25rem;
}
.quickstart-copy p {
color: var(--muted);
}
.note {
margin-top: 1.5rem;
padding-left: 1rem;
border-left: 3px solid var(--ruby);
font-size: 0.92rem;
}
.talks {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 1rem;
}
.talk {
display: flex;
flex-direction: column;
min-height: 21rem;
padding: clamp(1.5rem, 4vw, 2.25rem);
color: white;
background: var(--ink);
border-radius: 0.8rem;
}
.talk:last-child {
background: var(--ruby-dark);
}
.talk .year {
margin-bottom: 3.5rem;
color: #ffb6ae;
font: 700 0.78rem ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
letter-spacing: 0.12em;
text-transform: uppercase;
}
.talk h3 {
max-width: 22ch;
font-size: clamp(1.65rem, 3vw, 2.35rem);
}
.talk p {
color: #ded7e5;
}
.talk:last-child p {
color: #f2dadd;
}
.talk-links {
display: flex;
flex-wrap: wrap;
gap: 1.25rem;
margin-top: auto;
padding-top: 2rem;
}
.talk-links a {
font-weight: 800;
text-underline-offset: 0.25rem;
}
.projects {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 1rem;
}
.project {
display: flex;
flex-direction: column;
min-height: 18rem;
padding: clamp(1.5rem, 4vw, 2.25rem);
background: rgba(255, 253, 249, 0.86);
border: 1px solid var(--line);
border-radius: 0.8rem;
}
.project-label {
display: block;
margin-bottom: 3rem;
color: var(--ruby-dark);
font: 700 0.78rem ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
letter-spacing: 0.12em;
text-transform: uppercase;
}
.project h3 {
font-size: clamp(1.7rem, 3vw, 2.3rem);
}
.project p {
margin-bottom: 0;
color: var(--muted);
}
.project a {
margin-top: auto;
padding-top: 2rem;
color: var(--ink);
font-weight: 800;
text-underline-offset: 0.25rem;
}
.project-sheetruby {
border-color: #b9d8c9;
box-shadow: inset 0.35rem 0 0 #16815a;
}
.project-sheetruby .project-label {
color: #0e5b3e;
}
.project-uzumibi {
border-color: #e8c6b7;
box-shadow: inset 0.35rem 0 0 var(--rust);
}
.project-uzumibi .project-label {
color: #a34823;
}
.resources {
display: grid;
grid-template-columns: repeat(4, minmax(0, 1fr));
gap: 0.75rem;
}
.resource {
padding: 1.25rem;
background: rgba(255, 253, 249, 0.85);
border: 1px solid var(--line);
border-radius: 0.55rem;
font-weight: 800;
text-decoration: none;
}
.resource:hover {
border-color: var(--ruby);
color: var(--ruby-dark);
}
footer {
display: flex;
justify-content: space-between;
gap: 2rem;
padding-block: 2rem 3rem;
color: var(--muted);
border-top: 1px solid var(--line);
font-size: 0.85rem;
}
footer p {
margin: 0;
}
@media (max-width: 760px) {
.nav-links li:not(:last-child) {
display: none;
}
.hero,
.section-heading,
.quickstart-wrap {
grid-template-columns: 1fr;
}
.hero {
padding-block: 3rem 5rem;
}
.terminal {
transform: none;
}
.feature-grid,
.talks,
.projects {
grid-template-columns: 1fr;
}
.resources {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
footer {
flex-direction: column;
}
}
@media (prefers-reduced-motion: reduce) {
html {
scroll-behavior: auto;
}
.button {
transition: none;
}
}
</style>
</head>
<body>
<a class="skip-link" href="#main-content">Skip to content</a>
<nav class="shell" aria-label="Primary navigation">
<a class="wordmark" href="#top" aria-label="mruby/edge home">
<span class="mark" aria-hidden="true">/</span>
mruby/edge
</a>
<ul class="nav-links">
<li><a href="#features">Features</a></li>
<li><a href="#projects">Projects</a></li>
<li><a href="#talks">Talks</a></li>
<li><a href="https://github.com/mrubyedge/mrubyedge">GitHub</a></li>
</ul>
</nav>
<header class="hero shell" id="top">
<div>
<p class="eyebrow">mruby-compatible · Pure Rust · Wasm-first</p>
<h1>Ruby for the <span>edges.</span></h1>
<p class="lede">
mruby/edge is a virtual machine built from scratch in Rust for WebAssembly.
It runs mruby bytecode in small, portable modules and embeds cleanly in Rust applications.
</p>
<div class="actions">
<a class="button button-primary" href="https://mrubyedge.github.io/playground/">Open playground</a>
<a class="button button-secondary" href="https://github.com/mrubyedge/mrubyedge">View source</a>
</div>
</div>
<div class="terminal" aria-label="Quick command-line example">
<div class="terminal-bar" aria-hidden="true"><span> </span><span> </span><span> </span></div>
<pre><code><span class="prompt">$</span> cargo install mrubyedge-cli
<span class="prompt">$</span> mrbedge -e 'puts RUBY_ENGINE'
<span class="output">mruby/edge</span>
<span class="prompt">$</span> mrbedge app.rb
<span class="prompt">$</span> mrbedge app.mrb</code></pre>
</div>
</header>
<main id="main-content">
<section class="shell" id="features">
<div class="section-heading">
<div>
<p class="eyebrow">Current runtime</p>
<h2>Small core.<br>Useful boundaries.</h2>
</div>
<p>
The VM focuses on the Ruby features needed to run real programs at the edge,
while keeping WebAssembly host integration explicit.
</p>
</div>
<div class="feature-grid">
<article class="feature">
<span class="feature-number">01 / VM</span>
<h3>mruby bytecode, rebuilt in Rust</h3>
<p>
The core VM loads <code>.mrb</code> bytecode. Its Ruby subset includes classes and modules,
exceptions, blocks and closures, control flow, and keyword arguments.
</p>
</article>
<article class="feature">
<span class="feature-number">02 / WASM</span>
<h3>WASI or host-defined WebAssembly</h3>
<p>
Build for <code>wasm32-wasip1</code>, or target <code>wasm32-unknown-unknown</code>
with <code>--no-wasi</code>. Minimal builds can stay under 400 KiB.
</p>
</article>
<article class="feature">
<span class="feature-number">03 / ABI</span>
<h3>Typed imports and exports with RBS</h3>
<p>
Sidecar <code>.import.rbs</code> and <code>.export.rbs</code> files connect Ruby methods
to WebAssembly functions across the host boundary.
</p>
</article>
<article class="feature">
<span class="feature-number">04 / PROFILES</span>
<h3>Only the features you need</h3>
<p>
Cargo flags add Regexp, Random, instruction limits, or FNV-backed hashes.
<code>SharedMemory</code> provides direct access to Wasm linear memory.
</p>
</article>
</div>
</section>
<section class="shell" id="quickstart">
<div class="quickstart-wrap">
<div class="quickstart-copy">
<p class="eyebrow">CLI workflow</p>
<h2>From Ruby to Wasm.</h2>
<p>
<code>mrbedge</code> compiles Ruby source, runs source or precompiled bytecode,
starts a REPL, and generates WebAssembly modules.
</p>
<p class="note">
The core VM executes bytecode; source compilation is provided by the CLI.
For the exact supported Ruby surface, see the compatibility coverage.
</p>
<div class="actions">
<a class="button button-secondary" href="https://github.com/mrubyedge/mrubyedge/blob/master/mrubyedge/COVERAGE.md">Compatibility coverage</a>
</div>
</div>
<div class="terminal" aria-label="WebAssembly build example">
<div class="terminal-bar" aria-hidden="true"><span> </span><span> </span><span> </span></div>
<pre><code><span class="output"># app.rb</span>
def add(a, b)
a + b
end
<span class="output"># app.export.rbs</span>
def add: (Integer, Integer) -> Integer
<span class="prompt">$</span> mrbedge wasm app.rb -o app.wasm
<span class="output">[ok] wasm file is generated: app.wasm</span></code></pre>
</div>
</div>
</section>
<section class="shell" id="talks">
<div class="section-heading">
<div>
<p class="eyebrow">On stage</p>
<h2>Two chapters<br>of mruby/edge.</h2>
</div>
<p>
From building a new mruby-family VM for Wasm to deploying Ruby applications
across edge platforms with Uzumibi.
</p>
</div>
<div class="talks">
<article class="talk">
<p class="year">RubyKaigi 2024</p>
<h3>An mruby for WebAssembly</h3>
<p>
Why mruby/edge began, how its bytecode VM works, and how Ruby methods become
WebAssembly exports—plus the project’s early Component Model ambitions.
</p>
<div class="talk-links">
<a href="https://rubykaigi.org/2024/presentations/udzura.html">Talk details</a>
<a href="https://udzura.jp/slides/2024/rubykaigi/">Slides</a>
<a href="https://www.youtube.com/watch?v=FyomdDn9eGo">Video</a>
</div>
</article>
<article class="talk">
<p class="year">RubyKaigi 2026</p>
<h3>Uzumibi: Reinventing mruby for the Edges</h3>
<p>
The evolved VM—OOP, exceptions, closures, keyword arguments, and feature flags—
meets Uzumibi, a lightweight framework for portable Ruby edge applications.
</p>
<div class="talk-links">
<a href="https://rubykaigi.org/2026/presentations/udzura.html">Talk details</a>
<a href="https://udzura.jp/slides/2026/rubykaigi/">Slides</a>
</div>
</article>
</div>
</section>
<section class="shell" id="projects">
<div class="section-heading">
<div>
<p class="eyebrow">Built with mruby/edge</p>
<h2>Ruby, where<br>it matters.</h2>
</div>
<p>
mruby/edge runs beneath products that bring Ruby to different WebAssembly hosts—from
spreadsheet formulas to Cloudflare Workers.
</p>
</div>
<div class="projects">
<article class="project project-sheetruby">
<span class="project-label">Google Sheets</span>
<h3>sheetruby</h3>
<p>
Write Ruby as a Google Sheets custom function. sheetruby embeds the VM in Google Apps
Script and evaluates formulas through WebAssembly.
</p>
<a href="https://mrubyedge.github.io/sheetruby/">Explore sheetruby ↗</a>
</article>
<article class="project project-uzumibi">
<span class="project-label">Edges (Cloudflare Workers)</span>
<h3>Uzumibi</h3>
<p>
Build and deploy Ruby applications for Cloudflare Workers with an mruby/edge-powered
WebAssembly runtime.
</p>
<a href="https://mrubyedge.github.io/uzumibi/">Explore Uzumibi ↗</a>
</article>
</div>
</section>
<section class="shell" id="resources">
<div class="section-heading">
<div>
<p class="eyebrow">Dive deeper</p>
<h2>Project resources.</h2>
</div>
<p>Source, API references, published crates, and a browser playground.</p>
</div>
<div class="resources">
<a class="resource" href="https://github.com/mrubyedge/mrubyedge">GitHub ↗</a>
<a class="resource" href="https://docs.rs/mrubyedge">Core API ↗</a>
<a class="resource" href="https://crates.io/crates/mrubyedge-cli">CLI crate ↗</a>
<a class="resource" href="https://mrubyedge.github.io/playground/">Playground ↗</a>
</div>
</section>
</main>
<footer class="shell">
<p>© 2026 mruby/edge project</p>
<p><a href="https://github.com/mrubyedge/mrubyedge/blob/master/LICENSE">BSD 3-Clause License</a></p>
</footer>
</body>
</html>