Skip to content

Commit 080aa1e

Browse files
committed
Move windows_subsystem example to the intro
1 parent 53db837 commit 080aa1e

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/runtime.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ r[runtime.windows_subsystem]
1515
r[runtime.windows_subsystem.intro]
1616
The *`windows_subsystem` attribute* may be applied at the crate level to set the [subsystem] when linking on a Windows target.
1717

18+
> [!EXAMPLE]
19+
> ```rust
20+
> #![windows_subsystem = "windows"]
21+
> ```
22+
1823
r[runtime.windows_subsystem.syntax]
1924
It uses the [MetaNameValueStr] syntax to specify the subsystem with a value of either `console` or `windows`.
2025
@@ -27,10 +32,6 @@ The "console" subsystem is the default. If a console process is run from an exis
2732
r[runtime.windows_subsystem.windows]
2833
The "windows" subsystem is commonly used by GUI applications that do not want to display a console window on startup. It will run detached from any existing console.
2934
30-
```rust
31-
#![windows_subsystem = "windows"]
32-
```
33-
3435
[`GlobalAlloc`]: alloc::alloc::GlobalAlloc
3536
[crate types]: linkage.md
3637
[static item]: items/static-items.md

0 commit comments

Comments
 (0)