Update for rust

This commit is contained in:
Nova
2022-09-30 14:05:12 -04:00
parent 52e61bb163
commit 41218d6804
33 changed files with 53 additions and 101 deletions

View File

@@ -4,104 +4,51 @@ sidebar_position: 2
# Installation
As Stardust is a display server, it is split into multiple parts. Make sure to install the parts in order to avoid issues, and don't be afraid to ask questions in the Matrix or Discord servers!
As Stardust is a display server, it is split into multiple parts. Don't be afraid to ask questions in the [Matrix](https://matrix.to/#/#stardustxr:matrix.org) or [Discord](https://discord.gg/A9w7fKE) servers!
1. [libstardustxr client/server/fusion](#libstardustxr-server-client-and-fusion)
2. [stardust-xr](#stardust-xr-reference-server)
3. Other clients (such as the [tests](#stardust-client-tests))
## [stardust-xr](https://github.com/StardustXR/stardust-xr-server) (reference server)
## [libstardustxr](https://github.com/StardustXR/libstardustxr) (server, client, and fusion)
### Packages
AUR: `libstardustxr-git` and `libstardustxr-fusion-git`
<!-- ### Packages -->
<!-- AUR: `stardust-xr-git` -->
### Build system
1. Meson >= 0.55.0
2. Ninja (tested on 1.10.2)
1. Cargo
### Build dependencies
1. Flatbuffers >= 2.0.8
2. EGL+GLES 3.2
3. GLX+Xlib
4. fontconfig
5. dlopen
6. libseat (such as [seatd](https://sr.ht/~kennylevinsen/seatd/))
7. wayland
8. OpenXR Loader (required even if run in flatscreen mode, generally just named `openxr`)
### Download
```bash
git clone https://github.com/StardustXR/stardust-xr-server.git
cd stardust-xr-server
```
### Build
```bash
cargo build
```
### Install
```bash
cargo install
```
## [Flatland](https://github.com/StardustXR/flatland) (Simple simula-like panel UI client for 2D app interaction)
### Build system
1. Cargo
### Build dependencies
1. Flatbuffers >= 1.12.0
### Download
```bash
git clone https://github.com/StardustXR/libstardustxr.git
cd libstardustxr
```
### Build
```bash
meson build --prefix=/usr
cd build
ninja
```
### Install
```bash
ninja install
```
## [stardust-xr](https://github.com/StardustXR/stardust-xr) (reference server)
### Packages
AUR: `stardust-xr-git`
### Build system
1. Meson >= 0.55.0
2. Ninja (tested on 1.10.2)
3. CMake (tested on 3.21.1)
### Build dependencies
1. [libstardustxr](#libstardustxr-server-client-and-fusion)
2. Flatbuffers >= 1.12.0
3. EGL+GLES 3.2
4. GLX+Xlib
5. fontconfig
6. dlopen
7. libseat (such as [seatd](https://sr.ht/~kennylevinsen/seatd/))
8. wayland
9. xwayland
10. OpenXR Loader (required even if run in flatscreen mode, generally just named `openxr`)
11. libxkbcommon-x11
### Download
```bash
git clone https://github.com/StardustXR/stardust-xr.git
cd stardust-xr
```
### Build
```bash
meson build --prefix=/usr
cd build
ninja
```
### Install
```bash
meson install --skip-subprojects
```
## [Stardust Client Tests](https://github.com/StardustXR/stardust-client-tests)
### Build system
1. Meson >= 0.55.0
2. Ninja (tested on 1.10.2)
### Build dependencies
1. [libstardustxr](#libstardustxr-server-client-and-fusion)
2. Flatbuffers >= 1.12.0
3. sdbus-cpp
### Download
```bash
git clone https://github.com/StardustXR/stardust-client-tests.git
cd stardust-client-tests
```
### Build
```bash
meson build --prefix=/usr
cd build
ninja
cargo install flatland
```

View File

@@ -4,7 +4,7 @@ sidebar_position: 3
# Starting
First, try running `stardustxr` in a terminal window. If a headset is plugged in and OpenXR is working no window will show up. However, the headset should show the same things as the window that opens:
First, try running `stardust-xr-server` in a terminal window. If a headset is plugged in and OpenXR is working no window will show up. However, the headset should show the same things as the window that opens:
![A pitch black void with a single bleach white hand in the middle](/img/docs/run/xr_mode_windowed_blank.png)
@@ -20,11 +20,16 @@ Flatscreen mode when `~/.config/stardust/skytex.hdr` is [Zhengyang Gate](https:/
### Help screen
```
Stardust XR
Usage: stardustxr [OPTIONS]
stardust-xr-server 0.10.0
Nova King <technobaboo@proton.me>
Stardust XR reference display server
Options:
-h,--help Print this help message and exit
-F,--flatscreen Run Stardust in flatscreen mode
--field-debug Draw translucent meshes around fields
USAGE:
stardust-xr-server [OPTIONS]
OPTIONS:
-f, --flatscreen Force flatscreen mode and use the mouse pointer as a 3D pointer
-h, --help Print help information
-o, --overlay <PRIORITY> Run Stardust XR as an overlay with given priority
-V, --version Print version information
```

View File

@@ -7,7 +7,7 @@ sidebar_position: 4
## Server
The server is what renders all the meshes of each client, takes in input from input methods, and spits out input to input handlers according to the SUIS (Spatial Universal Interaction System). As well, the server is going to be part Wayland compositor and OpenXR runtime so all 2D and XR applications can be used together at once (if the hardware allows). It is the glue of Stardust, allowing any number of clients and apps to work in harmony while allowing the user full control in an intuitive way.
As new technologies come out, keeping the same server and trying to progressively upgrade it may lead to bloat and issues, so the protocol is designed to make creating new servers possible without too much hassle. Old interfaces can be deprecated without breaking the overall system, and new interfaces can be added if needed due to the object-oriented design. The design is highly inspired by game engines, however the reference server is made in StereoKit due to it being more optimal.
As new technologies come out, keeping the same server and trying to progressively upgrade it may lead to bloat and issues, so the protocol is designed to make creating new servers possible without too much hassle or to make servers modular. Old interfaces can be deprecated without breaking the overall system, and new interfaces can be added if needed due to the object-oriented design. The design is highly inspired by game engines, however the reference server is made in StereoKit due to it being more optimal.
### Reference Server
Stardust has a reference server, but unlike other display servers this reference server is just as functional as any other Stardust server would be, because all the functionality is implemented in the clients. The server is just the glue.
@@ -30,10 +30,10 @@ The reference server uses StereoKit as its backend for many reasons:
- Uses OpenXR as its backend out of the box
## IPC
The Stardust XR IPC uses Unix domain sockets for communication.
The Stardust XR IPC uses Unix domain sockets for communication and a protocol based on flatbuffers/flexbuffers.
## [Protocol](stardust-protocol/protocol.md)
The Stardust XR protocol is object-oriented, depending on a scenegraph on the server end and scenegraph or functionally equivalent structure on the client end. This allows easier implementation of the protocol while still remaining fast and reliable.
## Clients
The clients tell the server what models to draw, where they would like to accept input in, etc. Stardust clients are much more suited to widgets or user interfaces to 2D/XR apps. However, if a more fully featured application works better in Stardust it can do that too.
The clients tell the server what models to draw, where they would like to accept input in, etc. Stardust clients are much more suited to widgets or user interfaces to 2D/XR apps.

View File

@@ -8,7 +8,7 @@ const FeatureList = [
image: '/img/icon.gif',
description: (
<>
Stardust allows you to make XR widgets or interfaces and run them among others.
Stardust allows developers to make XR widgets or interfaces and run them among others.
You don&apos;t have to make a whole system UI, just a few pieces.
</>
),