Live Document
Proof of concept application showcasing the usability of wasm-peers crate for easy and costless peer-2-peer WebRTC communication.
It's an application akin to Google Docs, where many users can share a document and see changes introduced by any of them in real-time.
It was written in Rust, compiles down to WASM and can be hosted as a set of static files, no backend required.
Check out the live demo here.
Overview
This application uses wasm-peers crate to provide many-to-many connection between each pair of connecting peers.
Thanks to that, even if the original creator of the document leaves, copy of the work is still stored and distributed by each peer.
It also utilises yew framework for creation of Single Page Application.
Local development
To run the game locally you must have Rust and trunk installed.
Signaling server from wasm-peer project should be running on 0.0.0.0:9001
. See here for instructions.
First, some env variables are required:
# for now, only env variable without the default is the signaling server address
# in production, it should be some publicly available server, for ex. EC2 instance (tiny one should suffice)
export SIGNALING_SERVER_URL="ws://0.0.0.0:9001"
Then you can build the project:
trunk build # trunk serve for awesome hot-reloading compile and serving
This will create a dist
folder with index.html
and all the other required files. You can serve them any way you like.
Authors
Tomasz Karwowski
LinkedIn
License
This project is licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.