topic/rust #2

Merged
ian merged 6 commits from topic/rust into main 2023-11-20 13:10:23 +00:00

6 Commits

Author SHA1 Message Date
Ian Wijma b7583f4db0 Update Cargo.toml for optimized release binary
Configured the `Cargo.toml` to automatically strip symbols, optimize for size, enable Link Time Optimization (LTO), and set codegen-units to 1 for the release profile. This significantly reduces the size and improves the performance of the resulting binary.
2023-11-21 00:08:17 +11:00
Ian Wijma 9392325115 Correct commit message for the given diff:
Add newline character to error message

In this commit, a newline character `\n` was added at the end of the error message in the `print!` function within main.rs. This change ensures the output from the program is properly formatted and readable, increasing the overall user experience when such exceptions are encountered.
2023-11-21 00:08:03 +11:00
Ian Wijma a5dd011506 Renamed workflow and adjusted it to handle releases
In this commit, I've renamed the name of the workflow from build.yaml to release.yaml. It now gets triggered on 'release' instead of 'push'. The job names and some parameters were also altered to fit into the new release context. The aim of this modification is to optimize the project delivery process as the workflow is now focus on handling final product releases.
2023-11-21 00:00:05 +11:00
Ian Wijma 0b686e86d9 Update build.yaml to streamline compilation and packaging process
Keep Running / Build (tar.gz tar.xz tar.zst, x86_64-unknown-linux-musl) (push) Successful in 1m54s Details
Keep Running / Build (zip, x86_64-apple-darwin) (push) Successful in 1m9s Details
Keep Running / Build (zip, x86_64-pc-windows-gnu) (push) Successful in 1m9s Details
This commit simplifies and optimizes the build workflow process by leveraging the rust-build action for compiling and releasing. The "build.yaml" file has been revised to include different targets and types of archives as per the platform. Also, previous separate jobs for checking out, installing dependencies, building project, and creating/uploading archives have been removed. The new strategy is aimed to reduce redundancy, speed up the process, and allow seamless multi-platform build support.
2023-11-20 23:47:04 +11:00
Ian Wijma b0daf0db5f Improve script safety by quoting variables and updating comparisons
This commit updates the `test.sh` script to incorporate best shell scripting practices. Changes include quoting the variables "$SLEEP" and "$EXIT" to handle null or space-containing values better. The arithmetic comparison has been updated to use "bash-style" to improve the script's security. This refactoring aims to enhance the overall efficiency and reliability of the script execution.
2023-11-20 23:40:56 +11:00
Ian Wijma 8581f19127 Remove outdated codebase
This commit deletes the current codebase and configurations because we're switching to rust. This includes src/index.js, package.json, package-lock.json and .gitignore files. A refactor or rewrite app with updated dependencies and code style will be added afterwards.
2023-11-20 23:40:22 +11:00