Coder Social home page Coder Social logo

Comments (3)

veeso avatar veeso commented on May 26, 2024 1

Okay then, I'll manage to fix all these things in the next version then. Thanks for reporting this info.

from suppaftp.

veeso avatar veeso commented on May 26, 2024

Yes, I know, but there's no way to do that otherwise, so I don't care.

That's just a trip I mean. Why one should ever need both clients?
I know the cargo reference says that, but it's also true that the language doesn't allow me to do otherwise. I mean, I could rename the stream to asyncstream, but idk.

from suppaftp.

OvermindDL1 avatar OvermindDL1 commented on May 26, 2024

Generally they are alternate types (or tag types) for the different types of interfaces yeah. Most commonly the community and rust authors would tend to design something like this like FtpStream<IO> or so, where the different implementations of IO (a sync, a tokio, and an async-std generally, if anyone bothers with async-std nowadays) expose the relevantly useful API's for their own use. Then usually some pub type SyncFTPStream = FtpStream<SyncFTPIO> and TokioFTPStream and AsyncStdFTPStream as well, though not always.

That's just a trip I mean. Why one should ever need both clients?

Oh I know, the program here is split among a lot of libraries that are combined together into a single tower server. One is using the sync API because other stuff they are doing is forced sync on them so why not, and the other is using the async api, but it apparently is causing yet other issues because it's using the mostly-dead async-std instead of tokio for some reason? Trying to convince the async one to switch to the sync since can't seem to get suppaftp to use tokio and just put it behind a spawn_blocking or so like the other person but finding free time to do that is always fun.


But anyway, features must always be additive (sync feature, tokio feature, async-std features sound best for here? perhaps with default having sync but that can still be opted out of), everything about cargo assumes that and it will break things if it's not except for the most trivial of programs.

from suppaftp.

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.