Yoda/README.md

56 lines
1.5 KiB
Markdown
Raw Normal View History

2024-09-18 20:39:03 +03:00
# Yoda - Browser for [Gemini protocol](https://geminiprotocol.net)
2024-09-18 20:52:52 +03:00
Rust / GTK 4 implementation
2024-09-18 20:39:03 +03:00
> [!IMPORTANT]
> Project in development!
2024-09-18 20:51:18 +03:00
>
## Install
2024-09-20 17:54:28 +03:00
### Stable
``` bash
cargo install Yoda
```
2024-09-23 14:26:24 +03:00
### Repository
2024-09-19 13:23:28 +03:00
``` bash
git clone https://github.com/YGGverse/Yoda.git
cd Yoda
git checkout Rust-GTK4
2024-09-23 14:26:24 +03:00
cargo run
2024-09-19 13:23:28 +03:00
```
2024-09-23 14:26:24 +03:00
## Development
This guide in process
### Modules
#### `browser`
2024-09-26 00:29:08 +03:00
* Composition pattern, using standard `mod.rs` model
2024-09-23 16:17:29 +03:00
* One mod = one widget. Create new mod for new widget implementation
2024-09-26 00:42:28 +03:00
* The codebase of module must be as minimal as possible: separate different tasks to sub-modules
2024-09-26 00:29:08 +03:00
* Every module must:
2024-09-26 00:42:28 +03:00
* access 1 level of child API, never parents (e.g.`super`)
2024-09-26 00:29:08 +03:00
* implement only one `struct` (same as one file for one class)
2024-09-26 00:42:28 +03:00
* `struct` is public, where members - private
* contain `struct` implementation:
2024-09-26 01:16:26 +03:00
* at least one constructor that must return:
* raw `struct` (`new() -> Self`) without cover to any kind of smart `std` or `glib` pointers
2024-09-26 00:52:53 +03:00
* ownership to new object created
2024-09-26 02:54:25 +03:00
* one public link getter for privately constructed widget (`widget -> &Gtk`)
2024-09-26 00:29:08 +03:00
2024-09-23 14:26:24 +03:00
### Contribution
* before commit, make sure:
* new branch created for every new PR `git checkout -b 'contribution-name'`
* new code follows common [rustfmt](https://rust-lang.github.io/rustfmt/) style `cargo fmt --check`
2024-09-18 20:52:52 +03:00
## See also
2024-09-18 20:56:04 +03:00
* [CPP-GTK4](https://github.com/YGGverse/Yoda/tree/CPP-GTK4) - C++ / GTK 4 implementation
* [PHP-GTK3](https://github.com/YGGverse/Yoda/tree/PHP-GTK3) - PHP / GTK 3 experimental branch