Add musl target to Makefile.toml

bump version
This commit is contained in:
Dietrich 2021-07-12 11:24:25 +02:00 committed by Franz Dietrich
parent 9db2737f7f
commit a0903b91e0
7 changed files with 37 additions and 9 deletions

6
Cargo.lock generated
View File

@ -442,7 +442,7 @@ dependencies = [
[[package]] [[package]]
name = "app" name = "app"
version = "0.3.1" version = "0.4.0"
dependencies = [ dependencies = [
"enum-map", "enum-map",
"fluent 0.15.0", "fluent 0.15.0",
@ -2781,7 +2781,7 @@ dependencies = [
[[package]] [[package]]
name = "pslink" name = "pslink"
version = "0.3.1" version = "0.4.0"
dependencies = [ dependencies = [
"actix-files", "actix-files",
"actix-identity", "actix-identity",
@ -3507,7 +3507,7 @@ dependencies = [
[[package]] [[package]]
name = "shared" name = "shared"
version = "0.3.1" version = "0.4.0"
dependencies = [ dependencies = [
"chrono", "chrono",
"enum-map", "enum-map",

View File

@ -13,6 +13,11 @@ extend = "build"
description = "Build client and server in release mode" description = "Build client and server in release mode"
dependencies = ["build_client_release", "build_server_release"] dependencies = ["build_client_release", "build_server_release"]
[tasks.build_standalone]
extend = "build"
description = "Build client and server with musl libc embedded"
dependencies = ["build_client_release", "build_server_standalone"]
[tasks.build_client] [tasks.build_client]
description = "Build client" description = "Build client"
install_crate = { crate_name = "wasm-pack", binary = "wasm-pack", test_arg = "-V" } install_crate = { crate_name = "wasm-pack", binary = "wasm-pack", test_arg = "-V" }
@ -35,20 +40,31 @@ extend = "build_server"
description = "Build server in release mode" description = "Build server in release mode"
args = ["build", "--package", "pslink", "--release"] args = ["build", "--package", "pslink", "--release"]
[tasks.build_server_standalone]
extend = "build_server"
description = "Build server with the musl libc embedded"
args = ["build", "--package", "pslink", "--release", "--target", "x86_64-unknown-linux-musl"]
# ---- START ---- # ---- START ----
[tasks.start] [tasks.start]
description = "Build and start Actix server with client on port 8000" description = "Build and start the pslink server in debug mode"
command = "cargo" command = "cargo"
args = ["run", "--package", "pslink", "--", "runserver"] args = ["run", "--package", "pslink", "--", "runserver"]
dependencies = ["build"] dependencies = ["build"]
[tasks.start_release] [tasks.start_release]
extend = "start" extend = "start"
description = "Build and start Actix server with client on port 8000 in release mode" description = "Build and start the pslink server in release mode"
args = ["run", "--package", "pslink", "--release", "--", "runserver"] args = ["run", "--package", "pslink", "--release", "--", "runserver"]
dependencies = ["build_release"] dependencies = ["build_release"]
[tasks.start_standalone]
extend = "start"
description = "Build and start the pslink server with the musl c library embedded."
args = ["run", "--package", "pslink", "--release", "--", "runserver", "--target", "x86_64-unknown-linux-musl"]
dependencies = ["build_standalone"]
# ---- TEST ---- # ---- TEST ----
[tasks.test_firefox] [tasks.test_firefox]

View File

@ -53,7 +53,7 @@ $ export SQLX_OFFLINE=1
$ cargo make build_release $ cargo make build_release
``` ```
If pslink is built with `cargo build release --target=x86_64-unknown-linux-musl` everything is embedded and it should be portable to any 64bit linux system. Otherwise the same or newer version of libc needs to be installed on the target linux system. If pslink is built with `cargo make build_standalone` everything is embedded and it should be portable to any 64bit linux system. Otherwise the same or newer version of libc needs to be installed on the target linux system. Note that you need to install `musl-gcc` for this to work using: `sudo dnf install musl-libc musl-gcc` or `sudo apt-get install musl-tools`.
Templates and migrations are allways embedded in the binary so it should run standalone without anything extra. Templates and migrations are allways embedded in the binary so it should run standalone without anything extra.

View File

@ -8,7 +8,7 @@ keywords = ["url", "link", "webpage", "actix", "web"]
license = "MIT OR Apache-2.0" license = "MIT OR Apache-2.0"
readme = "README.md" readme = "README.md"
repository = "https://github.com/enaut/pslink/" repository = "https://github.com/enaut/pslink/"
version = "0.3.1" version = "0.4.0"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

View File

@ -9,7 +9,8 @@ license = "MIT OR Apache-2.0"
name = "pslink" name = "pslink"
readme = "README.md" readme = "README.md"
repository = "https://github.com/enaut/pslink/" repository = "https://github.com/enaut/pslink/"
version = "0.3.1" version = "0.4.0"
[build-dependencies] [build-dependencies]
actix-web-static-files = "3.0" actix-web-static-files = "3.0"

View File

@ -0,0 +1,11 @@
# The Frontend for pslink
This part of `pslink` is the wasm binary for the frontend of `pslink`.
It provides:
* a login screen
* management for links
* management for users
* switching the language
The wasm binary communicates via a REST-JSON-Api with the server.

View File

@ -8,7 +8,7 @@ license = "MIT OR Apache-2.0"
name = "shared" name = "shared"
readme = "../pslink/README.md" readme = "../pslink/README.md"
repository = "https://github.com/enaut/pslink/" repository = "https://github.com/enaut/pslink/"
version = "0.3.1" version = "0.4.0"
[dependencies] [dependencies]
serde = "1.0" serde = "1.0"