Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PM-9126] COM Object Registration #13278

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from
99 changes: 96 additions & 3 deletions apps/desktop/desktop_native/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apps/desktop/desktop_native/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[workspace]
resolver = "2"
members = ["napi", "core", "proxy", "macos_provider", "windows-plugin-authenticator"]
members = ["napi", "core", "proxy", "macos_provider", "windows_plugin_authenticator"]

[workspace.dependencies]
anyhow = "=1.0.94"
Expand Down
1 change: 1 addition & 0 deletions apps/desktop/desktop_native/napi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ tokio-stream.workspace = true

[target.'cfg(windows)'.dependencies]
windows-registry = "=0.4.0"
windows_plugin_authenticator = { path = "../windows_plugin_authenticator" }

[build-dependencies]
napi-build = "=2.1.4"
3 changes: 3 additions & 0 deletions apps/desktop/desktop_native/napi/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,3 +179,6 @@ export declare namespace autofill {
export declare namespace crypto {
export function argon2(secret: Buffer, salt: Buffer, iterations: number, memory: number, parallelism: number): Promise<Buffer>
}
export declare namespace passkey_authenticator {
export function register(): number
}
8 changes: 8 additions & 0 deletions apps/desktop/desktop_native/napi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -805,3 +805,11 @@ pub mod crypto {
.map(Buffer::from)
}
}

#[napi]
pub mod passkey_authenticator {
#[napi]
pub fn register() -> i32 {
windows_plugin_authenticator::register()
}
}

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[package]
name = "windows_plugin_authenticator"
version = "0.0.0"
edition = "2021"
license = "GPL-3.0"
publish = false

[target.'cfg(target_os = "windows")'.build-dependencies]
bindgen = "0.71.1"

[target.'cfg(windows)'.dependencies]
windows = { version = "0.59.0", features = ["Win32_Foundation", "Win32_Security", "Win32_System_Com", "Win32_System_LibraryLoader" ] }
windows-core = "0.59.0"
ciborium = "0.2.2"
hex = "0.4.3"
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ fn windows() {

bindings
.write_to_file(format!(
"{}\\windows_pluginauthenticator_bindings.rs",
"{}\\windows_plugin_authenticator_bindings.rs",
out_dir
))
.expect("Couldn't write bindings.");
Expand Down
Loading
Loading