You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: browser-chat/README.md
+7-9Lines changed: 7 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,16 +1,16 @@
1
1
# browser-chat
2
2
3
-
This is a chat app that runs in both the browser and the command line. It uses [`iroh-gossip`](https://github.com/n0-computer/iroh-gossip/).
3
+
This is a chat app that runs in both the browser and the command line. It uses [`iroh-gossip`](https://github.com/n0-computer/iroh-gossip/) to send messages between peers sharing a channel.
4
4
5
5
The example has the following parts:
6
6
7
-
*[`shared`](shared) is a Rust library that exposes a `ChatNode`, which uses iroh and iroh-gossip to power a simple ephemeral gossip chat between peers.
8
-
*[`cli`](cli) uses the `shared`library to create a basic command-line interface to chat with peers
9
-
*[`browser-wasm`](browser-wasm) is a WebAssembly wrapper around the shared library which uses [`wasm-bindgen`](https://github.com/rustwasm/wasm-bindgen) to expose the chat node to JavaScript running in web browser. It can be packaged with [`wasm-pack`](https://rustwasm.github.io/wasm-pack/) into a NPM package.
10
-
*[`frontend`](frontend) is a web app that uses `browser-wasm`. The web app is a single-page application written [Typescript](https://www.typescriptlang.org/), using[React](https://react.dev/) and [shadcn components](https://ui.shadcn.com/).
11
-
It is built and bundled with [Vite](https://vite.dev/). The UI was initially mostly written by an AI tool, which we then adapted to use the API exposed by `browser-wasm`.
7
+
*[**shared**](shared) is a Rust library that exposes a `ChatNode`, which uses iroh and iroh-gossip to power a simple ephemeral gossip chat between peers.
8
+
*[**cli**](cli) uses that library to create a simple command-line chat app.
9
+
*[**browser-wasm**](browser-wasm) is a wrapper around the shared library that uses [`wasm-bindgen`](https://github.com/rustwasm/wasm-bindgen) to export JavaScript bindings.
10
+
*[**frontend**](frontend) is the web app. It is written in [TypeScript](https://www.typescriptlang.org/) and uses[React](https://react.dev/) and [shadcn components](https://ui.shadcn.com/).
11
+
It is built and bundled with [Vite](https://vite.dev/).
12
12
13
-
## Browser app
13
+
## Web app
14
14
15
15
Follow the steps below to build and run the browser version of the chat app.
0 commit comments