Skip to content

Commit 7df69f5

Browse files
committed
Update README.md
1 parent 58abc9d commit 7df69f5

File tree

3 files changed

+25
-4
lines changed

3 files changed

+25
-4
lines changed

README.md

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,24 @@
11
# First UWP in Rust
2+
<a href='https://www.microsoft.com/store/apps/9PKF8HP44J2H?cid=storebadge&ocid=badge'><img src='https://developer.microsoft.com/en-us/store/badges/images/English_get-it-from-MS.png' alt='English badge' style='width: 284px; height: 104px;'/></a>
3+
24
The first Universal Windows Platform app written in pure Rust.
35

46
**Note: this project is an early-stage experiment. Code quality is not guaranteed. Crashes or memory leak may occur.**
57

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+
622
## Build and Run
723
```powershell
824
# Build the project using x86_64-pc-windows-msvc default target
@@ -11,26 +27,31 @@ cargo build
1127
# Register the package layout
1228
Add-AppxPackage -Register AppxManifest.xml
1329
14-
# Then click "First UWP in rs" in your Start Menu
30+
# Then launch "First UWP in Rust" in your Start Menu
1531
```
1632

33+
## Screenshots
34+
![MainPage on PC](images/PC-MainPage.png?raw=true)
35+
36+
![MainPage on Windows Phone (portrait)](images/WP-MainPage-Portrait.png?raw=true)
37+
1738
## 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.
1940

2041
<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.
2142

2243
Follow the steps below in `powershell` to build and generate a `.appx` package:
2344
1. Set up Rust nightly toolchain for this project
2445
```powershell
2546
rustup toolchain install nightly-2020-08-15
26-
rustup override set nightly
47+
rustup override set nightly-2020-08-15
2748
rustup component add rust-src
2849
```
2950
2. Build with std-aware cargo
3051
```powershell
3152
cargo build --release -Z build-std=std,panic_abort --target x86_64-uwp-windows-msvc
3253
```
33-
`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.
3455

3556
3. Set up environment variables before consuming Windows SDK command line tools
3657
```powershell

images/PC-MainPage.png

84.5 KB
Loading

images/WP-MainPage-Portrait.png

103 KB
Loading

0 commit comments

Comments
 (0)