mirror of
https://github.com/kanidm/kanidm.git
synced 2025-02-23 20:47:01 +01:00
Fix WASM build post-version-thing (#1000)
* disable last-git-commit in WASM * Print the version to the console when building in dev mode
This commit is contained in:
parent
93b260da0f
commit
e88d345c41
|
@ -13,10 +13,10 @@ repository = "https://github.com/kanidm/kanidm/"
|
|||
[features]
|
||||
wasm = ["webauthn-rs-proto/wasm"]
|
||||
|
||||
|
||||
[dependencies]
|
||||
base32 = "^0.4.0"
|
||||
base64urlsafedata = "0.1.0"
|
||||
last-git-commit = "0.2.0"
|
||||
serde = { version = "^1.0.142", features = ["derive"] }
|
||||
serde_json = "^1.0.83"
|
||||
# Can not upgrade due to breaking timezone apis.
|
||||
|
@ -25,3 +25,6 @@ url = { version = "^2.2.2", features = ["serde"] }
|
|||
urlencoding = "2.1.0"
|
||||
uuid = { version = "^1.1.2", features = ["serde"] }
|
||||
webauthn-rs-proto = "0.4.2-beta.3"
|
||||
|
||||
[target.'cfg(not(target_family = "wasm"))'.dependencies]
|
||||
last-git-commit = "0.2.0"
|
||||
|
|
|
@ -5,8 +5,11 @@ pub fn show_version(name: &str) {
|
|||
|
||||
pub fn get_version(name: &str) -> String {
|
||||
let version = env!("CARGO_PKG_VERSION");
|
||||
#[cfg(not(target_family = "wasm"))]
|
||||
match last_git_commit::LastGitCommit::new().build() {
|
||||
Ok(value) => format!("{} {} {}", name, version, value.id().short()),
|
||||
Err(_) => format!("{} {}", name, version),
|
||||
}
|
||||
#[cfg(target_family = "wasm")]
|
||||
format!("{} {}", name, version)
|
||||
}
|
||||
|
|
|
@ -224,7 +224,7 @@ function addBorrowedObject(obj) {
|
|||
}
|
||||
function __wbg_adapter_30(arg0, arg1, arg2) {
|
||||
try {
|
||||
wasm._dyn_core__ops__function__FnMut___A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h3eb106a8361acfe4(arg0, arg1, addBorrowedObject(arg2));
|
||||
wasm._dyn_core__ops__function__FnMut___A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h059700c1260af691(arg0, arg1, addBorrowedObject(arg2));
|
||||
} finally {
|
||||
heap[stack_pointer++] = undefined;
|
||||
}
|
||||
|
@ -252,11 +252,11 @@ function makeClosure(arg0, arg1, dtor, f) {
|
|||
return real;
|
||||
}
|
||||
function __wbg_adapter_33(arg0, arg1, arg2) {
|
||||
wasm._dyn_core__ops__function__Fn__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h318938a944441f49(arg0, arg1, addHeapObject(arg2));
|
||||
wasm._dyn_core__ops__function__Fn__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hba0e2d91e3f361c8(arg0, arg1, addHeapObject(arg2));
|
||||
}
|
||||
|
||||
function __wbg_adapter_36(arg0, arg1, arg2) {
|
||||
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hd2e1878f2351e593(arg0, arg1, addHeapObject(arg2));
|
||||
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hd75fa9c9bfc3f75e(arg0, arg1, addHeapObject(arg2));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -814,15 +814,15 @@ function getImports() {
|
|||
return addHeapObject(ret);
|
||||
};
|
||||
imports.wbg.__wbindgen_closure_wrapper4903 = function(arg0, arg1, arg2) {
|
||||
const ret = makeMutClosure(arg0, arg1, 1267, __wbg_adapter_30);
|
||||
const ret = makeMutClosure(arg0, arg1, 1268, __wbg_adapter_30);
|
||||
return addHeapObject(ret);
|
||||
};
|
||||
imports.wbg.__wbindgen_closure_wrapper5008 = function(arg0, arg1, arg2) {
|
||||
const ret = makeClosure(arg0, arg1, 1300, __wbg_adapter_33);
|
||||
const ret = makeClosure(arg0, arg1, 1301, __wbg_adapter_33);
|
||||
return addHeapObject(ret);
|
||||
};
|
||||
imports.wbg.__wbindgen_closure_wrapper5271 = function(arg0, arg1, arg2) {
|
||||
const ret = makeMutClosure(arg0, arg1, 1349, __wbg_adapter_36);
|
||||
imports.wbg.__wbindgen_closure_wrapper5273 = function(arg0, arg1, arg2) {
|
||||
const ret = makeMutClosure(arg0, arg1, 1350, __wbg_adapter_36);
|
||||
return addHeapObject(ret);
|
||||
};
|
||||
|
||||
|
|
Binary file not shown.
|
@ -32,5 +32,7 @@ mod views;
|
|||
#[cfg_attr(target_arch = "wasm32", wasm_bindgen)]
|
||||
pub fn run_app() -> Result<(), JsValue> {
|
||||
yew::start_app::<manager::ManagerApp>();
|
||||
#[cfg(debug_assertions)]
|
||||
gloo::console::debug!(kanidm_proto::utils::get_version("kanidmd_web_ui"));
|
||||
Ok(())
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue