This is a basic sample crate for creating a chat client with Rust using Conrod with several backend options. Conrod allows different graphical backend like "glium", "winit" or even "SDL2". This crate allows different socket backend options. At the moment, only the websocket crate.
This is a feature that is only available on desktop. It uses the crate "libloading" to reload "test_shared.rs" code during runtime. It helps programmers to adjust components of the gui on the fly.
To get started.
- You need to compile test_shared.rs into a crate.
rustc src/test_shared.rs --crate-name test_shared --crate-type dylib --out-dir target/debug
- Run cargo with --feature="hotload"
- During runtime, edit
src/test_shared.rs
and runrustc src/test_shared.rs --crate-name test_shared --crate-type dylib --out-dir target/debug
to see hot reloading in action.
The Chat's components' positions will be taken from staticapplication.rs
instead of dyapplication.rs
. Run cargo without the hotload feature.
Currently, there are only one example which uses websocket backend. The default features in cargo have already the correct feature implementations so you don't need to specify.
cargo run --example websocket_glium
android cargo apk build --example run -L ~/software/openssl-1.0.2l/libcrypto.a -l ssl -lcryto adb install -r target/android-artifacts/app/build/outputs/apk/app-debug.apk