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.
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.
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.
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).
For development, you can run the project in watch mode:
SIGNALING_SERVER_URL="ws://0.0.0.0:9001" trunk serve # comes with awesome hot-reloading
If you only want to build the static files:
SIGNALING_SERVER_URL="ws://0.0.0.0:9001" trunk build
This will create a dist
folder with index.html
and all the other required files.
You can serve them any way you like.
- Add reference to GitHub
- Use proper CRDT
- Save and retrieve file contents from local cache
Tomasz Karwowski
LinkedIn
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)
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.