You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
Sebastian Hugentobler 409602c825
ci/woodpecker/push/woodpecker Pipeline was successful Details
Delete '.gitlab-ci.yml'
5 months ago
.cargo add makefile for static compilation 1 year ago
.idea add http-client 1 year ago
bank add conditional put 1 year ago
http-client add conditional put 1 year ago
http-lib add makefile for static compilation 1 year ago
http-server full reformat 1 year ago
socket-server Implement the http variant of the bank server. 1 year ago
.gitignore add makefile for static compilation 1 year ago
.woodpecker.yml Add '.woodpecker.yml' 5 months ago
Cargo.lock add makefile for static compilation 1 year ago
Cargo.toml add http-client 1 year ago
LICENSE Update LICENSE 1 year ago
Makefile add makefile for static compilation 1 year ago
README.md update readme 1 year ago

README.md

vesys bank servers and clients

Implementations of a simple bank server for the 2022 vesys class at FHNW.

Please note that the writer is in no way an experienced or even professional rust developer (hence the cloning everywhere) and most of this was written in a hurry. Parts of the code might sneak into your house in bright daylight and marry your cat to run off with them to Greenland or wherever it is they go for their honeymoon.

socket-server

Use an on-the-fly invented byte protocol. Consult the code for documentation.

http-server

An http implementation, using actix-web, wanted to try that for a while now. Again, consult the code for information on how the routes work.

http-client

An experimental client for the http-server, built with rust, yew and the power of web assembly. First time I am trying this, there is probably even more wrong with it than with the server implementations.

Usage

Servers

Run it like you would with any cargo workspace project.

For example, starting the http-server variant, with debug logging and compiled in release mode:

 RUST_LOG=debug cargo run --release --bin http-server

http client

Trunk is used for wasm bundling.

Local development with auto-reload:

trunk serve

Build for release (the built artifacts can be found in dist):

trunk build --release

Releases

Release binaries are built for multiple architectures (always statically compiled):

  • x86_64-unknown-linux-musl (needs x86_64-linux-musl-gcc)
  • aarch64-unknown-linux-musl (needs aarch64-linux-musl-gcc and aarch64-linux-musl-gcc)
  • x86_64-pc-windows-gnu (needs x86_64-w64-mingw32-gcc)
  • wasm32-unknown-unknown (needed for the http-client)

These are the target triplet names as they are used by rustup (add them with rustup target add $TARGET).

To make it more convenient to build, a makefile is provided. Use the following targets for it:

  • linux-x86_64-musl
  • linux-aarch64-musl
  • windows-gnu
  • http-client

The default and all targets build all of them. After a successful build, everything is copied into the release folder.