Yoda/README.md

64 lines
1.8 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
2024-09-27 23:00:20 +03:00
Guide and protocol draft
2024-09-23 14:26:24 +03:00
2024-09-27 23:00:20 +03:00
### `browser`
2024-09-23 14:26:24 +03:00
2024-09-27 23:00:20 +03:00
#### Filesystem
2024-09-23 14:26:24 +03:00
2024-09-27 22:35:53 +03:00
* Use [modern path pattern](https://doc.rust-lang.org/edition-guide/rust-2018/path-changes.html#no-more-modrs)
* One module implements one GTK widget, it may include additional helper files in same location (like template, CSS or DB API)
2024-09-27 22:37:53 +03:00
* For children widget - create children module, located according to hierarchy
2024-09-27 23:00:20 +03:00
#### Codebase
* The codebase must be as minimal as possible, separate:
2024-09-27 22:35:53 +03:00
* different tasks
* massive structures
* structures with implementation
2024-09-26 00:29:08 +03:00
* Every module must:
2024-09-27 23:00:20 +03:00
* encapsulate it members: compose childs and stay composable for parents
* access 1 level of childs, never parents (e.g. through `super`)
2024-09-26 00:29:08 +03:00
* implement only one `struct` (same as one file for one class)
2024-09-27 22:38:48 +03:00
* implementable `struct` is public, where members - private
2024-09-27 20:49:44 +03:00
* contain main `struct` implementation:
2024-09-26 01:16:26 +03:00
* at least one constructor that must return:
2024-09-27 20:49:44 +03:00
* unwrapped main `Self` structure
* granted ownership for new object created
* public link getter for privately constructed widget
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