Git Product home page Git Product logo

Comments (5)

rhysd avatar rhysd commented on August 15, 2024 3

I'm working on this in ratatui branch

from tui-textarea.

rhysd avatar rhysd commented on August 15, 2024 2

I confirmed the following change worked.

diff --git a/Cargo.toml b/Cargo.toml
index b706d9a..2d8c2c0 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -23,16 +23,19 @@ include = [

 [features]
 default = ["crossterm"]
-crossterm = ["dep:crossterm", "tui/crossterm"]
+crossterm = ["dep:crossterm-025", "tui/crossterm"]
 termion = ["dep:termion", "tui/termion"]
 search = ["dep:regex"]
+crossterm-ratatui = ["dep:crossterm-026", "ratatui/crossterm"]

 [dependencies]
-crossterm = { version = "0.25", optional = true }
+crossterm-025 = { package = "crossterm", version = "0.25", optional = true }
 regex = { version = "1", optional = true }
 termion = { version = "1.5", optional = true }
 tui = { version = "0.19", default-features = false }
 arbitrary = { version = "1", features = ["derive"], optional = true }
+crossterm-026 = { package = "crossterm", version = "0.26", optional = true }
+ratatui = { version = "0.20.1", default-features = false }

 [[example]]
 name = "minimal"

This means

I need to check if Cargo allows different versions of same crate to exist in dependencies list.

is possible.

Now I wonder how handle the combination of (tui, ratatui) * (crossterm, termion) with features of this crate. Current idea is adding the following features separate from original crossterm and termion features.

  • ratatui-crossterm
  • ratatui-termion

from tui-textarea.

rhysd avatar rhysd commented on August 15, 2024

Yes, this should be supported. Though currently I don't have enough velocity to implement this, I'd like to work on this with higher priority when I have enough time.

from tui-textarea.

rhysd avatar rhysd commented on August 15, 2024

One thing I need to clarify is version of crossterm dependency.

  • tui-rs is depending on v0.25
  • ratatui is depending on v0.26

Currently tui-textarea is directly depending on v0.25 to align with tui-rs. I'm not sure we can switch the version of crossterm crate depending on tui-rs or ratatui respectively. I need to check if Cargo allows different versions of same crate to exist in dependencies list.

from tui-textarea.

rvigo avatar rvigo commented on August 15, 2024

Hi @rhysd, thanks for the ratatui support <3
Is it already available?

Just followed the instructions on README.md but got this error:

the package `X` depends on `tui-textarea`, with features: `ratatui-crossterm` but `tui-textarea` does not have these features.

Sorry if it is a silly question, I'm just not familiarized with Cargo releases

Additional Info:
Cargo.toml

crossterm = "0.26.1"
tui = { package = "ratatui", version = "0.20.1" }
tui-textarea = { version = "0.2.0",  features = ["ratatui-crossterm"], default-features = false }

from tui-textarea.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.