Initial structure and text

This commit is contained in:
Ralf Zerres
2024-10-17 10:44:29 +02:00
parent 24182845a7
commit 1d3c838aa0
20 changed files with 10872 additions and 0 deletions

22
src/SUMMARY.md Normal file
View File

@@ -0,0 +1,22 @@
# Summary
[The Element-Call book](title-page.md)
[Foreword](foreword.md)
[Introduction](ch00-00-introduction.md)
# Getting started
- [Getting Started](ch01-00-getting-started.md)
- [The building blocks](ch01-01-building-blocks.md)
- [Hello Element-Call!](ch01-02-element-call-hello.md)
- [Installation](ch02-00-installation.md)
- [Element-Call Examples](ch09-00-element-call-examples.md)
- [ELement-Call-Hello!](ch09-01-element-call-hello.md)
- [Appendix](appendix-00.md)
- [A - Keywords](appendix-01-keywords.md)
- [B - Operators and Symbols](appendix-02-operators.md)
- [C - Derivable Traits](appendix-03-derivable-traits.md)
- [D - Translations of the Book](appendix-04-translation.md)

3
src/appendix-00.md Normal file
View File

@@ -0,0 +1,3 @@
# Element-Call Appendix
This is WIP

View File

@@ -0,0 +1,3 @@
# Element-Call Appendix - Keywords
This is WIP

View File

@@ -0,0 +1,3 @@
# Element-Call Appendix - Operators
This is WIP

View File

@@ -0,0 +1,3 @@
# Element-CAll Appendix - Derivable Traits
This is WIP

View File

@@ -0,0 +1,13 @@
# Appendix D: Translations of the Book
For resources in languages other than English. This is work in progress; see
[the Translations label][label] to help or let us know about a new translation!
[label]: https://gitea.networkx.de/ralf.zerres/element-call-book/issues?q=is%3Aopen+is%3Aissue+label%3ATranslations
- [Deutsch](https://gitea.networkx.de/rzerres/element-call-book)
<!---
- [Deutsch](https://github.com/element.io/element-call/book/book-de)
- [Français](https://github.com/element.io/element-call/book/book-fr)
-->

View File

@@ -0,0 +1,72 @@
# Introduction
<!--
> WIP: to be uncommented, once it is done
> Note: This edition of the book is the same as [The Orbital Widget Toolkit]
> [nsprust] available in print and ebook format from [No Starch Press][nsporbtk].
[nsporbtk]: https://nostarch.com/orbtk
[nsp]: https://nostarch.com/
-->
[<img src="img/element-call-webui.png" width="720"/>](img/element-call-webui.png)
Welcome to `Element-Call`, an introductory book about the Matrix based
video conferencing subsystem.
<div class="warning">
Warning: This book is incomplete. Documenting everything and
rewriting outdated parts take a while.
See the [issue tracker] to check what's missing or outdated. If there
are any mistakes or ideas that haven't been reported, feel free to
open a new issue there.
</div>
[issue tracker]: https://https://gitea.networkx.de/rzerres/element-call/book/issues
`Element-Call` fully embraces the potential of MatrixRTC. All
supported clients will connect via the genreric API, though selecting
their prefered mode (standalone- vs. widget-view).
[<img src="img/element-call-modes.png" width="720"/>](img/element-call-modes.png)
## Features
* Modern WebRTC API (powered by LifeKit)
* Custom widgets
* WebBrowser suport
* Custom theming engine
* Localization
## Supported Backend Platforms
* Linux (native)
<!--
* macOS (native)
* Windows (native)
* openBSD (not tested, but should work)
* Web (cargo-node)
* Android (native planned | cargo-node)
* iOS (native planned | cargo-node planned)
-->
## Supported Client Platforms
* Matrix clients (e.g. Element X, ShildiNext)
* WebBrouwsers (e.g. Brave, Chrome, Edge, Firefox)
## Who Element-Call Book Is For
The intention of `Element-Call` book is to help interested developers and administrators to get familiar with the structure and the componets choosen to implement a fully functional decentralized video conferencing solution. It will offer the needed in depth information to get in touch with the codebase. It will also aid an administrator to set up the needed software components to build up a self hosted installation.
## Source Code
The source files of the book are maintained as a git submodule found at [`Element-Call book`][element_call_book].
[element_call_book]: https://gitea.networkx.de/rzerres/element-call-book/book-en
<!--
[element-call_book_en_stable]: https://element.io/element-call/stable/book/
-->

View File

@@ -0,0 +1,7 @@
# Getting Started
Lets start your Element-Call journey! Theres a lot to learn, but every journey starts
somewhere. In this chapter, well discuss:
* The building blocks of Element-Call
* Installing Element-Call

View File

@@ -0,0 +1,4 @@
## Building blocks
[element_call_building_blocks]: https://gitea.networkx.de/rzerres/element-call/book/blob/main/src/img/element-call_building_blocks.png

View File

@@ -0,0 +1,132 @@
## Hello ELement-Call!
<!--
[<img src="img/element-call.png" width="720"/>](img/element-call-webui.png)
-->
![Welcome to the element-call book.][element_call_book]
Now that youve installed the needed building blocks, lets adapt the
Frontend.
[element_call_book]: https://gitea.networkx.de/rzerres/element-call-book/src/branch/main/src/img/element-call-webui.png
### Writing and Running the ELement-Call frontend
First, we make a new project using *Cargo*. With its *.toml* file we
allow Rust to declare the various dependencies and metadata. That
ensures that youll always get a repeatable output of the build.
Go ahead like so:
```console
$ cargo new element-call
$ cd element-call
```
The first command, `cargo new`, takes the name of the project
("`element-call`") as the first argument. The second command changes to
the new projects directory.
Look at the generated *Cargo.toml* file:
<span class="filename">Filename: Cargo.toml</span>
```toml
{{#include ./listings/ch01-02-element-call-hello/no-listing-01-02-cargo-new/Cargo.toml}}
```
<span class="caption">Listing 1-1: Default metadata "element_call_hello"</span>
With `cargo new`, a default project structure is created. Maybe the
author information is already exchanged if *Cargo* could obtain a definition
from your environment. *Cargo* also generated source code for a "Hello, world!"
program. Let's Check out the corresponding *src/main.rs* file:
<span class="filename">Filename: src/main.rs</span>
```rust
{{#rustdoc_include ./listings/ch01-02-element-call-hello/no-listing-01-02-cargo-new/src/main.rs}}
```
<span class="caption">Listing 1-2: Default source file "main.rs"</span>
No need to compile that stage with `cargo run`, since we are going to
exchange the project metadata, as well as the element-call source code right
away.
#### Update Cargo.toml
First reopen the *Cargo.toml* file and enter the Code in Listing 1-1 into *Cargo.toml*
<span class="filename">Filename: Cargo.toml</span>
```toml,ignore
{{#include ./listings/ch01-02-element-call-hello/listing-01-02/Cargo.toml:All}}
```
<span class="caption">Listing 1-1: Project metadata "Element-Call"</span>
You may wonder, why the *name* property inside the *Cargo.toml* is
formatted like `element_call`.
```toml,ignore
{{#include ./listings/ch01-02-element-call-hello/listing-01-02/Cargo.toml:Name}}
```
It is a good habit to follow rusts
naming convention, that encourages you to use [snake_case][naming]
naming. While expanding the *Element-Call* example sources, we will keep
the grouping prefix `element-call`. That way we end up to call our first target
binary `element-call_hello`.
#### Update main.rs
All of the *Element-Call* specific code that is needed to build our first
example "Hello Element-Call!" is shown in Listing 1-2. It goes to
*src/main.rs*.
<span class="filename">Filename: src/main.rs</span>
```rust,ignore
{{#rustdoc_include ./listings/ch01-02-element-call-hello/listing-01-02/src/main.rs:All}}
```
<span class="caption">Listing 1-2: Code that creates a Window and
prints "Hey Element-Call!"</span>
Save the file and go back to your terminal window. Enter the following
commands to compile and run the file:
```console
$ cargo run --release element_call_hello
```
### Compiling and Running Are Separate Steps
Before running an Element-Call application, you must compile its source code. A typical
Element-Call project will generate the executable binary code using cargo and place the
result in the target subfolder of the project.
Profiles may be used to configure compiler options such as optimization levels
and debug settings. By default the `dev` or `test` profiles are used. If the
`--release` flag is given, then the release or bench profiles are used.
```console
$ cargo build --release --bin element-call-hello.rs
$ ../target/release/hello_element_call
```
On Windows, you need to use `backslash` as a path delimiter:
```powershell
> cargo build --release --bin element-call-hello.rs
> ..\target\release\element_call_hello.exe
```
If you like to get debug feedback you can call the build process like this
```console
$ cargo build --features debug --bin element-call-hello.rs
```
[naming]: https://rust-lang.github.io/api-guidelines/naming.html

View File

@@ -0,0 +1,88 @@
## Installation
The first step is to install Rust. This is described in depth following
[Rust book Chapter 1](https://github.com/rust-lang/book/blob/master/src/ch01-01-installation.md)
When creating a OrbTk application, we define the needed dependencies to the
OrbTk crates in the Cargo.toml file of our project. The complile process
will resolve the references and download the source as needed.
> ### Command Line Notation
>
> In this chapter and throughout the book, well show some commands used in the
> terminal. Lines that you should enter in a terminal all start with `$`. You
> dont need to type in the `$` character; it indicates the start of each
> command. Lines that dont start with `$` typically show the output of the
> previous command. Additionally, PowerShell-specific examples will use `>`
> rather than `$`.
### Troubleshooting
> ***WIP***: What are the most common culprits? Can we provide some general, basic solutions
### Local Documentation
OrbTk offers the option to install its documentation locally, so you can read it
offline.
Any time a type, a function, a method or a crate is reference by the toolkit
and youre not sure what it does or how to use it, have a look at its application
programming interface [API documentation] to find out!
<!-- [API documentation]: https://www.redox-os.org/orbtk/doc/en -->
<!-- [API documentation]: https://github.com/redox-os/orbtk -->
[API documentation]: https://docs.rs/orbtk
### Install Rust on Linux or macOS
If you are using Linux or macOS open up an terminal and copy and paste the text below and hit the enter key on your keyboard:
```bash
curl https://sh.rustup.rs -sSf | sh
```
### Install Rust on Windows
Download and run the Rust windows installer from https://www.rust-lang.org/tools/install.
### Install Redoxer (Redox OS)
If you want build and run your Rust application on a [KVM](https://en.wikipedia.org/wiki/Kernel-based_Virtual_Machine) capable OS for Redox you can use [redoxer](https://gitlab.redox-os.org/redox-os/redoxer).
To install Redoxer you have to first install the rust toolchain. After that open up an terminal and copy and paste the text below and hit the enter key on your keyboard:
```bash
cargo +nightly install redoxer
```
To compile and run your application on Redox OS you should check the Redox OS Book.
### Editor and IDE integration
A wide range of editors and IDE's are providing support for Rust code like
* like syntax-highlighting
* auto-completion
* linting
* lsp support
#### VS Code
There is a big community that rely on the visualstudio implementation
to handle their code base. Following are the steps needed to expand
your installation to support `VS Code for Rust` development:
1. Download VS Code [from](https://code.visualstudio.com/download).
2. Install [Rust Language Server plugin](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust) (the
Rust Language Server).
#### Alternative Editors and IDEs
If you perefer other solution, you will find in depth help inside the
context of this inclomplete links:
* [Atom](https://atom.io/packages/language-rust)
* [Intellij IDEA](https://intellij-rust.github.io)
* [Vim](https://github.com/rust-lang/rust.vim)
* [Emacs](https://github.com/rust-lang/rust-mode)
* [Eclipse](https://github.com/eclipse/corrosion)

View File

@@ -0,0 +1,16 @@
# ELement-Call Example Applications
This section provides `Element-Call` example apps. We hope to cover
interesting aspects of the API.
Take them as a tutorial, all listings are created as a reference. They
have in mind to serve as an introduction to a specific topic. As
educational content, this apps are marked with in-lined comments and
anchors. If we did well, you can concentrate on the parts we like
to emphasize.
Inside the library, you will find the collection of example code in
the subdirectory *examples* in crate [`element-call`][examples].
[examples]: https://github.com/element-hq/element-call/tree/develop/element-call/examples

View File

@@ -0,0 +1,10 @@
# Hello Element-Call!
We already introduced the source in [Chapter 01][example_element-call-hello].
For the sake of completeness, and since its a habit to begin with ... here we go.
[example_element-call-hello]: https://gitea.networkx.de/element-call-book/src/listings/ch01-02-element-call-hello.html#pdate-cargotoml
<!--
[example_hello-element-call]: https://element-hq.github.io/element-call/book/src/listings/ch01-02-element-call-hello.html#pdate-cargotoml
-->

60
src/foreword.md Normal file
View File

@@ -0,0 +1,60 @@
# Foreword
The history of computer-aided communication, which supports not only
text video and sound goes back to the 1990s. From from today's
perspective, it seems almost grotesque what prices had to be paid for
the had to be paid for the hardware developed at that time. Not only
for the quality and quality of encoded data streams, new formats had
to be invented (CIF (CIF, QCIF). The development of Codex was in its
infancy. infancy. There was a lack of
standardization. Interoperability and and the use of the Internet were
at best distant goals. People were working on very
application-specific solutions and approaches that had the potential
for affordable components for mass production. As an example, the
pioneering manufacturer [`Parallax Graphics
Inc.`][parallax_graphics]. Founded in 1982 by two graduates of Cornell
University, the company focused on the marketing of the marketing of
`high end` graphics cards, including for the then popular university
environment at the time. These cards initially cost around €25,000
and supplied ASICS and a codex implemented in implemented in hardware,
which could realize resolutions of up to 1280x1024 pixels could be
realized.
Every commercially available cell phone, tablet, notebook and desktop
PCs currently deliver graphics card performance that can render 2k,
even 4k pixels can render. Encoding and decoding solutions are
decoding solutions have been standardized internationally, which have
significantly reduced the bandwidths to be transmitted and thus and
thus enable billions of uses on the Internet use on the
Internet. One-to-one video telephony has been established for years.
established for years. And everyone will remember the radical upheaval
in the professional use of video conferencing solutions that the COVID
pandemic brought with it in 2022.
Today, the use of video conferencing solutions is ubiquitous. In the
working world, proprietary solutions are often used, to implement work
processes regardless of location. Examples include the products from
the manufacturers [`CISCO->(Webex)`][cisco],
[`Microsoft->(Skype,Teams)`][microsoft_teams], [`HP->(Poly)`][poly]
and [`Zoom->(Zoom)`][zoom] are listed. But also free software such as
[`BigBlueButton`][bbb], [`Jitsi`][jitsi] or
[`Nextcloud->(Talk)`][nextcloud] are enjoying worldwide distribution.
With `Element-Call` the Matrix ecosystems gains a new approach that
fully embraces the potential of MatrixRTC. Think of participents in
decentralized domains that are to able to dynamicly create and manage
multipoint meetings in an efficiant manner. An Open-Source, that
enables fee choice of any Matrix complient Client. What progress.
— Ralf Zerres
[bbb]: https://bigbluebutton.org/
[cisco]: https://en.wikipedia.org/wiki/Cisco
[parallax_graphics]: https://en.wikipedia.org/wiki/Parallax_Graphics
[jitsi]: https://jitsi.org/
[microsoft_teams]: https://de.wikipedia.org/wiki/Microsoft_Teams
[nextcloud]: https://nextcloud-talk.readthedocs.io/en/latest/
[poly]: https://www.hp.com/de-de/poly.html
[sun_microsystems]: https://en.wikipedia.org/wiki/Sun_Microsystems
[zoom]: https://en.wikipedia.org/wiki/Zoom_(software)

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 381 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 855 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 591 KiB

44
src/title-page.md Normal file
View File

@@ -0,0 +1,44 @@
# Element Call
[element_call_book]: https://gitea.networkx.de/rzerres/element-call/book/blob/main/src/img/element-call.png
*annotated and documented by Ralf Zerres and all contributers*
This version of the text assumes youre using Element-Call v0.6.7 or later in
conjuction with Rust v1.83.0 or later. *Cargo.toml* should define
`edition="2021"`. That enables and uses Rust 2021 Edition idioms in
all derived projects.
See the [“Installation” section of Chapter 2][element_call_install]
to install or update Element-Call.
The 2021 Edition of this book is the initial release. It will be
released with the Element-Call version 1.0.0.
- Appendix A “Keywords”, explains the new raw identifiers.
- Appendix D “Translations”, is work in progress. We will release
instances of this book in the target language once they are translated.
For online reading, a HTML rendered version is available at
[Element-Call book][element_call_book]. Alternatively you might want to have it handy
for offline usage. Either you downlaod a rendered `pdf` or
`ebook`version or go ahead and download the source. Then kick on
mdbook (the definition of the target location is optional).
```console
mdbook build --dest-dir book_en --open
```
[element_call_book]: https://gitea.networkx.de/rzerres/element-call-book/book_en
<!---
This text is available in [paperback and ebook format from No Starch Press][nsprust].
-->
[element_call_install]: https://https://gitea.networkx.de/rzerres/element-call/book/ch02-00-installation.html
[nsprust]: https://nostarch.com/element-call
<!--
[element-call_book_en]: https://gitea.networkx.de/rzerres/element-call/book/
[element-call_book_en_stable]: https://element.io/element-call/stable/book/
-->