-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
373 lines (322 loc) · 11.7 KB
/
index.html
File metadata and controls
373 lines (322 loc) · 11.7 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="mruby/edge - A pure-Rust reimplementation of the mruby VM for WebAssembly and embedded systems">
<meta name="keywords" content="mruby, ruby, rust, webassembly, wasm, embedded, edge computing">
<title>mruby/edge - Ruby for WebAssembly & Embedded Systems</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
line-height: 1.6;
color: #333;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
min-height: 100vh;
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 20px;
}
header {
text-align: center;
padding: 60px 20px 40px;
color: white;
}
h1 {
font-size: 3.5em;
font-weight: 700;
margin-bottom: 20px;
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}
.tagline {
font-size: 1.5em;
margin-bottom: 30px;
opacity: 0.95;
}
.badges {
display: flex;
justify-content: center;
gap: 10px;
flex-wrap: wrap;
margin-bottom: 30px;
}
.badge {
background: rgba(255, 255, 255, 0.2);
backdrop-filter: blur(10px);
padding: 8px 16px;
border-radius: 20px;
font-size: 0.9em;
border: 1px solid rgba(255, 255, 255, 0.3);
}
.cta-buttons {
display: flex;
justify-content: center;
gap: 20px;
flex-wrap: wrap;
margin-top: 30px;
}
.btn {
display: inline-block;
padding: 15px 35px;
text-decoration: none;
border-radius: 30px;
font-weight: 600;
font-size: 1.1em;
transition: all 0.3s ease;
border: 2px solid white;
}
.btn-primary {
background: white;
color: #667eea;
}
.btn-primary:hover {
transform: translateY(-2px);
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}
.btn-secondary {
background: transparent;
color: white;
}
.btn-secondary:hover {
background: rgba(255, 255, 255, 0.1);
transform: translateY(-2px);
}
main {
background: white;
border-radius: 20px;
padding: 60px 40px;
margin-top: 40px;
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
h2 {
font-size: 2.2em;
margin-bottom: 30px;
color: #667eea;
text-align: center;
}
.features {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
gap: 30px;
margin: 50px 0;
}
.feature {
padding: 30px;
background: #f8f9fa;
border-radius: 15px;
transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.feature:hover {
transform: translateY(-5px);
box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
}
.feature-icon {
font-size: 2.5em;
margin-bottom: 15px;
}
.feature h3 {
font-size: 1.4em;
margin-bottom: 15px;
color: #333;
}
.feature p {
color: #666;
line-height: 1.8;
}
.code-section {
margin: 50px 0;
}
.code-section h3 {
font-size: 1.6em;
margin-bottom: 20px;
color: #333;
}
pre {
background: #2d2d2d;
color: #f8f8f2;
padding: 25px;
border-radius: 10px;
overflow-x: auto;
font-size: 0.95em;
line-height: 1.6;
margin: 20px 0;
}
code {
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}
.use-cases {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
padding: 40px;
border-radius: 15px;
margin: 50px 0;
}
.use-cases h3 {
font-size: 1.8em;
margin-bottom: 25px;
text-align: center;
}
.use-cases ul {
list-style: none;
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 20px;
}
.use-cases li {
padding: 15px;
background: rgba(255, 255, 255, 0.1);
backdrop-filter: blur(10px);
border-radius: 10px;
border: 1px solid rgba(255, 255, 255, 0.2);
}
.use-cases li::before {
content: "✓ ";
font-weight: bold;
margin-right: 8px;
}
footer {
text-align: center;
padding: 40px 20px;
color: white;
margin-top: 50px;
}
footer a {
color: white;
text-decoration: none;
border-bottom: 1px solid rgba(255, 255, 255, 0.5);
transition: border-color 0.3s ease;
}
footer a:hover {
border-bottom-color: white;
}
@media (max-width: 768px) {
h1 {
font-size: 2.5em;
}
.tagline {
font-size: 1.2em;
}
main {
padding: 40px 20px;
}
.features {
grid-template-columns: 1fr;
}
.cta-buttons {
flex-direction: column;
align-items: center;
}
.btn {
width: 100%;
max-width: 300px;
text-align: center;
}
}
</style>
</head>
<body>
<div class="container">
<header>
<h1>mruby/edge</h1>
<p class="tagline">A pure-Rust reimplementation of the mruby VM<br>for WebAssembly and embedded systems</p>
<div class="badges">
<span class="badge">🦀 Written in Rust</span>
<span class="badge">🌐 WebAssembly-first</span>
<span class="badge">⚡ Lightweight</span>
<span class="badge">🔒 Memory Safe</span>
</div>
<div class="cta-buttons">
<a href="https://github.com/mrubyedge/mrubyedge" class="btn btn-primary" target="_blank">View on GitHub</a>
<a href="https://docs.rs/mrubyedge" class="btn btn-secondary" target="_blank">Documentation</a>
</div>
</header>
<main>
<section>
<h2>Overview</h2>
<p style="text-align: center; font-size: 1.1em; color: #555; max-width: 800px; margin: 0 auto 40px;">
mruby/edge is an mruby-compatible virtual machine implementation written in Rust,
specifically designed for WebAssembly environments and embedded systems.
Execute mruby bytecode and Ruby source code with minimal footprint and maximum safety.
</p>
</section>
<section class="features">
<div class="feature">
<div class="feature-icon">🌐</div>
<h3>WebAssembly-first Design</h3>
<p>Optimized for running Ruby code in browsers and edge computing environments. Deploy Ruby applications anywhere WebAssembly runs.</p>
</div>
<div class="feature">
<div class="feature-icon">⚡</div>
<h3>Lightweight Runtime</h3>
<p>Minimal footprint and binary size suitable for constrained environments. Perfect for resource-limited devices and applications.</p>
</div>
<div class="feature">
<div class="feature-icon">🔧</div>
<h3>no_std Core</h3>
<p>Can run in environments without standard library support. Ideal for bare-metal and embedded systems programming.</p>
</div>
<div class="feature">
<div class="feature-icon">🔄</div>
<h3>mruby Compatible</h3>
<p>Executes mruby bytecode (.mrb files) and Ruby source code. Leverage existing mruby tools and libraries.</p>
</div>
<div class="feature">
<div class="feature-icon">🦀</div>
<h3>Rust Safety</h3>
<p>Built with Rust for memory safety and reliability. Eliminate entire classes of bugs and security vulnerabilities.</p>
</div>
</section>
<section class="code-section">
<h2>Quick Start</h2>
<h3>Installation</h3>
<p>Add this to your <code>Cargo.toml</code>:</p>
<pre><code>[dependencies]
mrubyedge = "1.0"</code></pre>
<h3>Running Precompiled Bytecode</h3>
<p>Load and execute a precompiled <code>*.mrb</code> file:</p>
<pre><code>use mrubyedge::rite;
use mrubyedge::yamrb::vm;
// Bundle the compiled script at build time
const SCRIPT: &[u8] = include_bytes!("./examples/simple.mrb");
fn main() -> Result<(), Box<dyn std::error::Error>> {
let mut rite = rite::load(SCRIPT)?;
let mut vm = vm::VM::open(&mut rite);
let value = vm.run()?;
println!("{:?}", value);
Ok(())
}</code></pre>
</section>
<section class="use-cases">
<h3>Use Cases</h3>
<ul>
<li><strong>Embedded Systems</strong> - Run Ruby in resource-constrained devices</li>
<li><strong>WebAssembly Applications</strong> - Deploy Ruby code in browsers and serverless environments</li>
<li><strong>Edge Computing</strong> - Lightweight Ruby runtime for edge nodes</li>
<li><strong>Rust Integration</strong> - Embed Ruby scripting in Rust applications</li>
</ul>
</section>
<section style="text-align: center; margin-top: 60px;">
<h2>Get Started Today</h2>
<p style="font-size: 1.1em; color: #666; margin: 20px 0 30px;">
Check out the documentation and start building with mruby/edge
</p>
<div class="cta-buttons">
<a href="https://github.com/mrubyedge/mrubyedge" class="btn btn-primary" target="_blank">GitHub Repository</a>
<a href="https://docs.rs/mrubyedge" class="btn btn-secondary" target="_blank" style="color: #667eea; border-color: #667eea;">API Docs</a>
<a href="https://crates.io/crates/mrubyedge" class="btn btn-secondary" target="_blank" style="color: #667eea; border-color: #667eea;">Crates.io</a>
</div>
</section>
</main>
<footer>
<p>© 2026 mruby/edge Project. Licensed under the terms found in the <a href="https://github.com/mrubyedge/mrubyedge/blob/master/LICENSE" target="_blank">LICENSE</a> file.</p>
</footer>
</div>
</body>
</html>