Word Counter(https://linux.die.net/man/1/wc) as a Service.
Web application, counts symbols in a text, including and excluding spaces. Proper handling of symbols, which do not fit in two bytes is not guaranteed 🙃.
Same as https://github.com/fedinskiy/symbol-counter, but rewritten in Rust using warp and askama.
cargo build
- Install a tool for a crosslinking and cross-compilation(https://github.com/rust-embedded/cross):
cargo install cross - Build an executable file:
cross build --target armv7-unknown-linux-gnueabihf
- Build for desired architecture and type of deployment(edit makefile, if needed):
makeORmake -e 'EXEC=$(PROD)' allfor production build. Do not forget to removetargetfolder beforehead. - Copy file
target/wcas.tar.xzto the target machine:rsync --progress target/wcas.tar.xz ${user}@${host}:${path} - Unarchive and install:
tar -xaf wcas.tar.xzcd wcasmake install makefile
Points 3 and 4 can be replaced by running ansible-playbook install/install.yml if Ansible is installed on the host machine.
Default parameters expect Raspberry Pi 4 and Raspbian Buster, but can be tuned to target any Linux system with systemd(required for autostart scripts ) and at least Tier 2 Rust support[1].
[1] https://doc.rust-lang.org/stable/rustc/platform-support.html
- Copy
makefileto the target machine:rsync --progress makefile ${to} - Run uninstall script:
make uninstall