[package] name = "hafas-rs" version = "0.2.3" authors = ["Julian Schmidhuber ", "Yureka "] edition = "2021" repository = "https://gitlab.com/schmiddi-on-mobile/hafas-rs" license = "AGPL-3.0-or-later OR EUPL-1.2" description = "Implementation of a HAFAS client in Rust" keywords = ["public-transport", "hafas"] [lib] crate-type = ["cdylib", "rlib"] [dependencies] md-5 = "0.10" serde = { version = "1.0", features = [ "derive" ] } serde_repr = "0.1" serde_json = "1.0" thiserror = "1.0" hyper-rustls = { version = "0.24", optional = true, features = [ "http1" ] } # Note: Version 1.0 is already available, but using it would duplicate this dependency with the old version. # See hyper = { version = "0.14", optional = true } async-trait = "0.1" chrono = { version = "0.4", features = [ "serde" ] } chrono-tz = "0.8" geojson = { version = "0.24", optional = true } polyline = { version = "0.10", optional = true } log = "0.4" env_logger = { version = "0.10", optional = true } hex = "0.4.3" anyhow = { version = "1.0", optional = true } tokio = { version = "1.37", optional = true, features = [ "macros", "rt-multi-thread" ] } serde_urlencoded = { version = "0.7", optional = true } wasm-bindgen = { version = "0.2", optional = true } wasm-bindgen-futures = { version = "0.4", optional = true } js-sys = { version = "0.3", optional = true } [dependencies.web-sys] version = "0.3.69" optional = true features = [ 'Headers', 'Request', 'RequestInit', 'RequestMode', 'Response', 'Window', ] [features] default = [ "hyper-requester", "all-profiles", "polylines" ] hyper-requester = [ "hyper-rustls", "hyper" ] js-error = [ "wasm-bindgen" ] js-fetch-requester = [ "js-error", "web-sys", "wasm-bindgen-futures" ] rt-multi-thread = [ ] wasm-bindings = [ "wasm-bindgen/serde-serialize", "js-sys", "chrono/wasmbind", "wasm-bindgen-futures" ] polylines = [ "polyline", "geojson" ] db-profile = [] # sncf-profile = [] vbb-profile = [] oebb-profile = [] nahsh-profile = [] vvt-profile = [] pkp-profile = [] irish-rail-profile = [] mobiliteit-lu-profile = [] bart-profile = [] dart-profile = [] rmv-profile = [] insa-profile = [] cmta-profile = [] sbahn-muenchen-profile = [] saarvv-profile = [] cfl-profile = [] nvv-profile = [] mobil-nrw-profile = [] db-busradar-nrw-profile = [] vsn-profile = [] vgi-profile = [] vbn-profile = [] vrn-profile = [] rsag-profile = [] vmt-profile = [] vos-profile = [] avv-profile = [] rejseplanen-profile = [] ooevv-profile = [] salzburg-profile = [] verbundlinie-profile = [] svv-profile = [] vor-profile = [] vkg-profile = [] vvv-profile = [] # tpg-profile = [] bls-profile = [] zvv-profile = [] # ADD FEATURE HERE all-profiles = [ "db-profile" # , "sncf-profile" , "vbb-profile" , "oebb-profile" , "nahsh-profile" , "vvt-profile" , "pkp-profile" , "irish-rail-profile" , "mobiliteit-lu-profile" # , "bart-profile" , "dart-profile" # Currently always returns "location missing or invalid" for trip search. # , "insa-profile" , "rmv-profile" , "cmta-profile" , "sbahn-muenchen-profile" , "saarvv-profile" , "cfl-profile" , "nvv-profile" , "mobil-nrw-profile" # TODO: Broken, alwys returns "No connection". # , "db-busradar-nrw-profile" , "vsn-profile" , "vgi-profile" , "vbn-profile" , "vrn-profile" , "rsag-profile" , "vmt-profile" , "vos-profile" , "avv-profile" , "rejseplanen-profile" , "ooevv-profile" , "salzburg-profile" , "verbundlinie-profile" , "svv-profile" , "vor-profile" , "vkg-profile" , "vvv-profile" # , "tpg-profile" , "bls-profile" # TODO: Broken as authorization failed # , "zvv-profile" ] # APPEND FEATHRE HERE ] rest-server = [ "hyper-requester", "all-profiles", "anyhow", "hyper", "hyper/server", "tokio", "serde_urlencoded", "env_logger", "rt-multi-thread" ] [dev-dependencies] tokio = { version = "1.37", features = [ "rt-multi-thread", "macros" ] } env_logger = "0.11.3" [[bin]] name = "hafas-rest-server" path = "src/rest-server/main.rs" required-features = [ "rest-server" ]