https://github.com/sitetester/wasm-to-websocket
A Rust library that compiles to Wasm and export one function (with Typescript syntax). This function connects to some websocket `endpoint`, sends/receives a message & returns it's contents
https://github.com/sitetester/wasm-to-websocket
Last synced: over 1 year ago
JSON representation
A Rust library that compiles to Wasm and export one function (with Typescript syntax). This function connects to some websocket `endpoint`, sends/receives a message & returns it's contents
- Host: GitHub
- URL: https://github.com/sitetester/wasm-to-websocket
- Owner: sitetester
- Created: 2024-12-26T14:07:30.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-15T06:46:24.000Z (over 1 year ago)
- Last Synced: 2025-02-15T07:31:36.767Z (over 1 year ago)
- Language: Rust
- Homepage:
- Size: 1.5 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Check relevant `README.md` files in /client & /server
It's a Rust library that compiles to Wasm and exports a function
`wsPing(endpoint: string, message: string): Promise` (Typescript syntax)
This function establishes a web socket connection to some "endpoint" and send the text message, receive a message, and return its content.
Check [Running test](https://github.com/sitetester/wasm-to-websocket/tree/main/client#running-test) on how to run relevant tests. Screenshots: [Web](https://github.com/sitetester/wasm-to-websocket/tree/main/client/web/README.md) & [Node](https://github.com/sitetester/wasm-to-websocket/tree/main/client/tests/README.md)
### Why such workspace setup ?
- It has conflict with tokio `rt-multi-thread` feature, which is being used in `/server` for running Websocket server
- For websocket server, currently there is only a single file, it's better to put it in same repository.