Resolving WASM build issues ()

* removing deflate because it is just shit gzip
This commit is contained in:
James Hodgkinson 2022-10-07 15:42:13 +10:00 committed by GitHub
parent e9ed430199
commit 48451150aa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 1136 additions and 101 deletions

View file

@ -48,4 +48,4 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: test
args: -p kanidm_client -p kanidm_tools -p orca -p daemon -p score
args: -p kanidm_client -p kanidm_tools -p orca -p daemon -p kanidmd_core

62
Cargo.lock generated
View file

@ -82,21 +82,6 @@ dependencies = [
"memchr",
]
[[package]]
name = "alloc-no-stdlib"
version = "2.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3"
[[package]]
name = "alloc-stdlib"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece"
dependencies = [
"alloc-no-stdlib",
]
[[package]]
name = "android_system_properties"
version = "0.1.5"
@ -201,7 +186,6 @@ version = "0.3.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "345fd392ab01f746c717b1357165b76f0b67a60192007b234058c9045fdcf695"
dependencies = [
"brotli",
"flate2",
"futures-core",
"futures-io",
@ -594,27 +578,6 @@ version = "2.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cfa8873f51c92e232f9bac4065cddef41b714152812bfc5f7672ba16d6ef8cd9"
[[package]]
name = "brotli"
version = "3.3.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a1a0b1dbcc8ae29329621f8d4f0d835787c1c38bb1401979b49d13b0b305ff68"
dependencies = [
"alloc-no-stdlib",
"alloc-stdlib",
"brotli-decompressor",
]
[[package]]
name = "brotli-decompressor"
version = "2.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "59ad2d4653bf5ca36ae797b1f4bb4dbddb60ce49ca4aed8a2ce4829f60425b80"
dependencies = [
"alloc-no-stdlib",
"alloc-stdlib",
]
[[package]]
name = "bstr"
version = "0.2.17"
@ -3064,24 +3027,6 @@ version = "2.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e"
[[package]]
name = "phf"
version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "928c6535de93548188ef63bb7c4036bd415cd8f36ad25af44b9789b2ee72a48c"
dependencies = [
"phf_shared",
]
[[package]]
name = "phf_shared"
version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e1fb5f6f826b772a8d4c0394209441e7d37cbbb967ae9c7e0e8134365c9ee676"
dependencies = [
"siphasher",
]
[[package]]
name = "phonenumber"
version = "0.3.1+8.12.9"
@ -3979,12 +3924,6 @@ dependencies = [
"event-listener",
]
[[package]]
name = "siphasher"
version = "0.3.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de"
[[package]]
name = "sketching"
version = "1.1.0-alpha.9"
@ -4277,7 +4216,6 @@ dependencies = [
"async-compression",
"futures-lite",
"http-types",
"phf",
"regex",
"tide",
]

View file

@ -109,7 +109,8 @@ smolset = "^1.3.1"
sshkeys = "^0.3.1"
tide = "^0.16.0"
tide-compress = "0.10.6"
# Including brotli *very* slow, so don't do that. Including the "default" feature pulls a mime-type list from the internet on build, which isn't used.
tide-compress = { version="0.10.6", default-features = false, features = [ "gzip", "regex-check" ] }
tide-openssl = "^0.1.1"
# Unable to increase version due to removing ability to detect

View file

@ -31,8 +31,7 @@ serde_json.workspace = true
sketching.workspace = true
tide.workspace = true
time = { workspace = true, features = ["serde", "std"] }
# I tried including brotli and it didn't work, including "default" pulls a mime-type list from the internet on build
tide-compress = { workspace = true, default-features = false, features = [ "deflate", "gzip", "regex-check" ] }
tide-compress.workspace = true
tide-openssl.workspace = true
tokio = { workspace = true, features = ["net", "sync", "io-util", "macros"] }
tokio-openssl.workspace = true

View file

@ -4,14 +4,14 @@ use async_std::task;
use criterion::{
criterion_group, criterion_main, BenchmarkId, Criterion, SamplingMode, Throughput,
};
use kanidm;
use kanidm::entry::{Entry, EntryInit, EntryNew};
use kanidm::entry_init;
use kanidm::idm::server::{IdmServer, IdmServerDelayed};
use kanidm::macros::run_idm_test_no_logging;
use kanidm::server::QueryServer;
use kanidm::utils::duration_from_epoch_now;
use kanidm::value::Value;
use kanidmd_lib;
use kanidmd_lib::entry::{Entry, EntryInit, EntryNew};
use kanidmd_lib::entry_init;
use kanidmd_lib::idm::server::{IdmServer, IdmServerDelayed};
use kanidmd_lib::macros::run_idm_test_no_logging;
use kanidmd_lib::server::QueryServer;
use kanidmd_lib::utils::duration_from_epoch_now;
use kanidmd_lib::value::Value;
pub fn scaling_user_create_single(c: &mut Criterion) {
let mut group = c.benchmark_group("user_create_single");
@ -92,7 +92,7 @@ pub fn scaling_user_create_batched(c: &mut Criterion) {
.collect();
for _i in 0..iters {
kanidm::macros::run_idm_test_no_logging(
kanidmd_lib::macros::run_idm_test_no_logging(
|_qs: &QueryServer, idms: &IdmServer, _idms_delayed: &IdmServerDelayed| {
let ct = duration_from_epoch_now();

View file

@ -2,14 +2,17 @@
name = "kanidmd_web_ui"
description = "Kanidm Server Web User Interface"
documentation = "https://docs.rs/kanidm/latest/kanidm/"
version = "1.1.0-alpha.9"
authors = [
"William Brown <william@blackhats.net.au>",
"James Hodgkinson <james@terminaloutcomes.com>",
]
rust-version = "1.59"
edition = "2021"
license = "MPL-2.0"
homepage = "https://github.com/kanidm/kanidm/"
repository = "https://github.com/kanidm/kanidm/"
version.workspace = true
authors.workspace = true
rust-version.workspace = true
edition.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true
# These are ignored because the crate is in a workspace
#[profile.release]
@ -19,25 +22,26 @@ repository.workspace = true
crate-type = ["cdylib", "rlib"]
[dependencies]
compact_jwt = { workspace = true, default-features = false, features = ["unsafe_release_without_verify"] }
gloo.workspace = true
gloo-net.workspace = true
js-sys.workspace = true
kanidm_proto = { workspace = true, features = ["wasm"] }
qrcode = { workspace = true, default-features = false, features = ["svg"] }
serde = { workspace = true, features = ["derive"] }
serde_json.workspace = true
serde-wasm-bindgen.workspace = true
uuid.workspace = true
wasm-bindgen.workspace = true
wasm-bindgen-futures.workspace = true
wasm-bindgen-test.workspace = true
yew.workspace = true
yew-agent.workspace = true
yew-router.workspace = true
compact_jwt = { version = "^0.2.3", default-features = false, features = ["unsafe_release_without_verify"] }
gloo = "^0.8.0"
gloo-net = "0.2.4"
js-sys = "^0.3.58"
kanidm_proto = { path = "../kanidm_proto", features = ["wasm"] }
qrcode = { version = "^0.12.0", default-features = false, features = ["svg"] }
serde = { version = "^1.0.142", features = ["derive"] }
serde_json = "^1.0.83"
serde-wasm-bindgen = "0.4"
uuid = "^1.1.2"
wasm-bindgen = { version = "^0.2.81" }
wasm-bindgen-futures = { version = "^0.4.30" }
wasm-bindgen-test = "0.3.33"
yew = "^0.19.3"
yew-agent = "^0.1.0"
yew-router = "^0.16.0"
[dependencies.web-sys]
workspace = true
version = "^0.3.60"
features = [
"AuthenticationExtensionsClientOutputs",
"AuthenticatorResponse",

File diff suppressed because it is too large Load diff

Binary file not shown.

View file

@ -10,7 +10,7 @@ use crate::views::AdminRoute;
const CSS_CARD: &str = "card text-center";
const CSS_CARD_BODY: &str = "card-body text-center";
#[derive(PartialEq, Properties)]
#[derive(Eq, PartialEq, Properties)]
pub struct Props;
// #[derive(PartialEq, Properties)]
@ -137,7 +137,7 @@ pub struct Entity {
pub object_type: EntityType,
}
#[derive(Debug, Clone, PartialEq)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct GetError {
pub err: String,
}