You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The first Universal Windows Platform app written in pure Rust.
3
5
4
6
**Note: this project is an early-stage experiment. Code quality is not guaranteed. Crashes or memory leak may occur.**
5
7
8
+
## What have been done
9
+
- Initialize Application during launch activation
10
+
- Metadata provider to work with Frame navigation
11
+
- Load XAML (.xbf) contents
12
+
- Implementation of IComponentConnector to receive XAML `x:Name`s and event handlers
13
+
- Weak references (translated from C++/WinRT projects)
14
+
- Implementation of ICustomPropertyProvider for XAML binding support (`{Binding}` style)
15
+
- Pass Windows App Cert Kit (WACK) and distribute from Microsoft Store
16
+
17
+
## What yet to be done
18
+
- Idiomatic and safe Rust implementation (let's wait for https://github.com/microsoft/winrt-rs/issues/81)
19
+
- Generate .xbf file (see https://github.com/microsoft/winrt-rs/issues/306#issuecomment-670046333)
20
+
-`{x:Bind}`-style binding (too much boilerplate code)
21
+
6
22
## Build and Run
7
23
```powershell
8
24
# Build the project using x86_64-pc-windows-msvc default target
@@ -11,26 +27,31 @@ cargo build
11
27
# Register the package layout
12
28
Add-AppxPackage -Register AppxManifest.xml
13
29
14
-
# Then click "First UWP in rs" in your Start Menu
30
+
# Then launch "First UWP in Rust" in your Start Menu
15
31
```
16
32
33
+
## Screenshots
34
+

35
+
36
+

37
+
17
38
## Cross compilation and Packaging
18
-
The default targets `*-pc-windows-*` has some link options unsuitable for UWP applications. A package that contains executable files generated with such target fails Windows App Cert Kit (WACK) in terms of `AppContainerCheck` and unsupported APIs used. To pass WACK, `*-uwp-windows-*` targets should be used.
39
+
The default targets `*-pc-windows-*` has some link options unsuitable for UWP applications. A package that contains executable files generated with such target fails WACK in terms of `AppContainerCheck` and unsupported APIs used. To pass WACK, `*-uwp-windows-*` targets should be used.
19
40
20
41
<del>[Xargo](https://github.com/japaric/xargo) is recommended for cross-compilation in this project. Using Xargo, it is not necessary to build the whole Rust toolchain in order to consume tier-3 targets.</del> Xargo is not maintained any more. A more recommended way is to use [`build-std`](https://doc.rust-lang.org/cargo/reference/unstable.html#build-std) feature in cargo.
21
42
22
43
Follow the steps below in `powershell` to build and generate a `.appx` package:
`i686-uwp-windows-msvc`, `thumbv7a-uwp-windows-msvc` and `aarch64-uwp-windows-msvc` targets can be used for x64, ARM and ARM64. `panic_abort` needs to be specified explicitly due to https://github.com/rust-lang/wg-cargo-std-aware/issues/29.
54
+
`i686-uwp-windows-msvc`, `thumbv7a-uwp-windows-msvc` and `aarch64-uwp-windows-msvc` targets can be used for x64, ARM and ARM64. `panic_abort` needs to be specified explicitly due to https://github.com/rust-lang/wg-cargo-std-aware/issues/29.
34
55
35
56
3. Set up environment variables before consuming Windows SDK command line tools
0 commit comments