rhaskia / preTTY

Dioxus-based Terminal Emulator
1 stars 1 forks source link

Can't install #30

Closed Rijaja closed 1 day ago

Rijaja commented 1 month ago
$ git clone git@github.com:rhaskia/preTTY.git
[...]
$ cd preTTY/
[...]
$ cargo install --locked pretty-term
    Updating crates.io index
error: could not find `pretty-term` in registry `crates-io` with version `*`
$ rm -r ~/.cargo/registry
$ cargo update
[...]
$ cargo search pretty-term
(no output)

System information:

OS: Fedora Linux 40 (KDE Plasma) x86_64
Kernel: 6.8.9-300.fc40.x86_64
DE: KDE Plasma 6.0.4

Cargo version: cargo 1.80.0-nightly (0de7f2ec6 2024-05-17)

I also tried building but got dependency issues

rhaskia commented 1 month ago

Oh sorry, the project is not actually on crates.io just yet. To run the program you will have to run cargo run --release inside the git repo, and copy target/gui to /usr/bin/prettyterm to be able to run it.

rhaskia commented 1 month ago

Hopefully, I will get the project up on crates.io soon, I need to fix up a few extra bugs and clean up some parts

Rijaja commented 1 month ago

Thanks. I tried compiling. In case you want to make a manual later, I had to install these dependencies on my system:

sudo dnf install javascriptcoregtk4.1-devel atk-devel pango-devel gdk-pixbuf2-devel libsoup3-devel rust-gdk-devel webkit2gtk4.1-devel

There's likely a lot of other dependencies that were already installed.

Then it failed to compile:

error[E0433]: failed to resolve: use of undeclared crate or module `async_channel`
  --> gui/src/terminal.rs:34:20
   |
34 |     let (tx, rx) = async_channel::unbounded();
   |                    ^^^^^^^^^^^^^ use of undeclared crate or module `async_channel`

error[E0282]: type annotations needed for `dioxus::prelude::Signal<_>`
  --> gui/src/terminal.rs:35:9
   |
35 |     let mut rx = use_signal(|| rx);
   |         ^^^^^^
...
78 |             let action = rx.write().recv().await;
   |                                     ---- type must be known at this point
   |
help: consider giving `rx` an explicit type, where the type for type parameter `T` is specified
   |
35 |     let mut rx: dioxus::prelude::Signal<_> = use_signal(|| rx);
   |               ++++++++++++++++++++++++++++

error[E0282]: type annotations needed for `Result<_, _>`
  --> gui/src/terminal.rs:78:17
   |
78 |             let action = rx.write().recv().await;
   |                 ^^^^^^
79 |             match action {
80 |                 Ok(ref a) => terminal.write().handle_actions(a.clone()),
   |                                                                ----- type must be known at this point
   |
help: consider giving `action` an explicit type, where the type for type parameter `T` is specified
   |
78 |             let action: Result<T, E> = rx.write().recv().await;
   |                       ++++++++++++++

I didn't include the warnings.

Should I checkout a different branch?

rhaskia commented 1 month ago

My bad, I was cleaning up some dependencies and must've pushed without fully checking. It should compile on main now.

Rijaja commented 1 month ago

I also installed libxdo-devel and now it compiles! Yay!