mirror of
https://github.com/szabodanika/microbin
synced 2024-11-14 05:07:06 +00:00
28463e48c1
With `no-c-deps` enabled microbin can be compiled for aarch64 by simply passing in `--no-default-features`, `--no-c-deps` & `--target aarch64-unknown-linux-musl`. The resulting binary is fully static and does *not* depend on glibc. Therefore it can be deployed to any linux target running an aarch64 cpu (arm). There is no need for any containers. There where four obstactles to easily statically linking microbin with musl. - The syntect library depended on the onigura regex engine. With `no-c-deps` it uses `fancy-regex` a slower alternative fully written in rust. - Dependency actix-web supported zstd compression requiring the system zstd library to be present. - The rusqlite library build and linked the C-library sqlite. That needs a crosscompiler and various crosscompile packages. With `no-c-deps` enabled the sqlite db option is disabled and the -json-db arg must be used. If the user does not pass -json-db microbin will panic when starting with a clear error message. - reqwest was using openssl for reporting telemetry and checking for new versions. With `no-c-deps` it uses rustls with crypto provider rustcrypto. While rustcrypto has not been formally verified it should be good enough for sending telemetry (which should not contain any secure/personal data anyway) and checking versions.
71 lines
2.4 KiB
TOML
71 lines
2.4 KiB
TOML
[package]
|
|
name = "microbin"
|
|
version = "2.0.4"
|
|
edition = "2021"
|
|
rust-version = "1.74.0"
|
|
authors = ["Daniel Szabo <daniel@microbin.eu>"]
|
|
license = "BSD-3-Clause"
|
|
description = "Simple, performant, configurable, entirely self-contained Pastebin and URL shortener."
|
|
readme = "README.md"
|
|
homepage = "https://microbin.eu"
|
|
repository = "https://github.com/szabodanika/microbin"
|
|
keywords = ["pastebin", "filesharing", "microbin", "actix", "selfhosted"]
|
|
categories = ["pastebins"]
|
|
|
|
[dependencies]
|
|
actix-files = "0.6.6"
|
|
actix-multipart = "0.7.2"
|
|
actix-web = { version = "4", default-features = false, features = [
|
|
"compat","compress-brotli", "compress-gzip", "cookies", "http2", "macros", "unicode"] }
|
|
actix-web-httpauth = "0.8.2"
|
|
askama = "0.10"
|
|
askama-filters = { version = "0.1.3", features = ["chrono"] }
|
|
bytesize = { version = "1.1", features = ["serde"] }
|
|
chrono = "0.4.19"
|
|
clap = { version = "3.1.12", features = ["derive", "env"] }
|
|
env_logger = "0.9.0"
|
|
futures = "0.3"
|
|
harsh = "0.2"
|
|
html-escape = "0.2.13"
|
|
lazy_static = "1.4.0"
|
|
linkify = "0.10.0"
|
|
log = "0.4.21"
|
|
magic-crypt = "3.1.13"
|
|
mime_guess = "2.0.4"
|
|
once_cell = "1.19.0"
|
|
qrcode-generator = "4.1.9"
|
|
rand = "0.8.5"
|
|
reqwest = { version = "0.12", default-features = false, features = ["charset",
|
|
"http2", "macos-system-configuration", "json", "blocking"] }
|
|
rusqlite = { version = "0.32", features = ["bundled"], optional = true }
|
|
rust-embed = "8.3.0"
|
|
|
|
# The rustls-rustcrypto version must support the rustls version and the
|
|
# rustls version must match the one expected by reqwest;
|
|
rustls = { version = "0.23", default-features = false, features = ["custom-provider"], optional = true }
|
|
rustls-rustcrypto = { version = "0.0.2-alpha", optional = true }
|
|
|
|
sanitize-filename = "0.5.0"
|
|
serde_json = "1.0.114"
|
|
serde = { version = "1.0.197", features = ["derive"] }
|
|
syntect = { version = "5.2.0", default-features = false }
|
|
webpki-roots = { version = "0.26", optional = true }
|
|
|
|
[dependencies.openssl]
|
|
version = "0.10.64"
|
|
features = ["vendored"]
|
|
optional = true
|
|
|
|
[features]
|
|
default = ["__default-tls", "__zstd", "__syntect-fast", "dep:rusqlite"]
|
|
no-c-deps = ["__rustcrypto-tls", "__syntect-rust"]
|
|
|
|
__default-tls = ["reqwest/default-tls", "dep:openssl"]
|
|
__rustcrypto-tls = ["reqwest/rustls-tls-manual-roots-no-provider", "dep:rustls", "dep:rustls-rustcrypto", "webpki-roots"]
|
|
__syntect-fast = ["syntect/default-onig"]
|
|
__syntect-rust = ["syntect/default-fancy"]
|
|
__zstd = ["actix-web/compress-zstd"]
|
|
|
|
[profile.release]
|
|
lto = true
|
|
strip = true
|