Skip to content

Commit dd50938

Browse files
committed
feat(web-host/HomePage): mention the virtual filesystem
1 parent defce37 commit dd50938

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

packages/web-host/src/components/HomePage.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,12 @@ export const HomePage = ({ onStartRepl }: HomePageProps) => {
5959
<strong>true cross-platform compatibility</strong> - the same code
6060
runs in browsers and terminals with different host implementations.
6161
</p>
62+
<p className="text-gray-700 mb-6 text-lg">
63+
Plugins like <code>cat</code> or <code>ls</code> can interact with a
64+
virtual filesystem using the primitives of the languages they are
65+
written in (like <code>std::fs::read_dir</code> or{" "}
66+
<code>std::fs::read_to_string</code>).
67+
</p>
6268

6369
<h4 className="text-xl font-bold mb-3">Key Features</h4>
6470
<ul className="text-gray-700 space-y-2 mb-3 text-base pl-4 list-disc">
@@ -68,6 +74,11 @@ export const HomePage = ({ onStartRepl }: HomePageProps) => {
6874
<li>
6975
Language-agnostic plugins (any language that compiles to WASM)
7076
</li>
77+
<li>
78+
Virtual filesystem: the I/O operations are forwarded via the{" "}
79+
<code>@bytecodealliance/preview2-shim/filesystem</code> shim, which
80+
shims <code>wasi:filesystem</code>
81+
</li>
7182
<li>Modern React + TypeScript web interface</li>
7283
</ul>
7384

packages/web-host/src/index.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,12 @@ button:focus-visible {
6464
a:hover {
6565
text-decoration-line: none;
6666
}
67+
code {
68+
background-color: #f0f0f0;
69+
padding: 0.2rem 0.4rem;
70+
border-radius: 0.2rem;
71+
font-size: 0.85em;
72+
}
6773
}
6874

6975
@utility word-break-word {

0 commit comments

Comments
 (0)