|
|
||
|---|---|---|
| .cargo | init | |
| src | separating http and https, adding optional hostname | |
| .env | separating http and https, adding optional hostname | |
| .gitignore | init | |
| Cargo.lock | separating http and https, adding optional hostname | |
| Cargo.toml | separating http and https, adding optional hostname | |
| Cross.toml | init | |
| GenerateCerts.sh | fix logs, add print history part I | |
| README.md | fix logs, add print history part I | |
| rust-toolchain.toml | init | |
Web API project for rust-printers
Building the project
Generate certs
Generate local certificates by running ./GenerateCerts.sh
Import ./localhost2-RootCA/localhost2-RootCA.crt intro your browser.
.env
LOG_LEVEL - application log level
HTTP_PORT - port for http
HTTPS_PORT - port for https
Build on host
Just run cargo run
Build for other platforms (e.g RPI)
Change target CPU in .cargo/config.toml and build project with CROSS : cross build --target=aarch64-unknown-linux-gnu --bins --release
Building for RPI currently doesn't work because of the following issues:
https://github.com/rust-lang/rust/issues/125033 || fix ? https://github.com/llvm/llvm-project/pull/95694
As I know the opensource community this will be fixed between soon and 2099 !
You can by pass this by useting target cpu to generic (performance decrese)
The following pacakges are required: libssl-dev and pkg-config cups libcups2-dev
Note:
If NO printer is present the app might crash