Giter VIP home page Giter VIP logo

Comments (9)

Skycoder42 avatar Skycoder42 commented on September 16, 2024 1

Okay, I see your point. Allthough the ProcessStartMode.inheritStdio (which can be passed to Process.start) allows to forward stdin/out/err to the child process transparently, which enables all the scenarios you described above. It's still not exactly the same as native, as for example additional unix file descriptor will not be passed to the child, but it might be sufficient enough for your use case.

Secondly, if you prefer to keep the native approach, why use the C-library anyways, when you can directly invoke the methods from dart via ffi. As far as I can see, you do not links against any extra libraries, so the functions you invoke are all available directly from within dart. This would remove the extra layer as well, without sacrificing the native approach. You could even use https://pub.dev/packages/ffigen to generate the native function bindings.

from rps.

Skycoder42 avatar Skycoder42 commented on September 16, 2024 1

After further investigation, I found out the reason it is not working is simply that I am using docker on an ARM machine with an ARM image - so of course the x64 so cannot be loaded.

from rps.

gonuit avatar gonuit commented on September 16, 2024 1

Currently supported platforms are:

Platform x64 Arm64
Linux
Windows
MacOs

If the error still occurs, please reopen this issue.

from rps.

juhkarh avatar juhkarh commented on September 16, 2024

I also encountered this issue today.
Seems like Visual Studio - develop for Windows must be installed.
So basic 'flutter doctor'-case 😅.

from rps.

coodin avatar coodin commented on September 16, 2024

I will check your suggestion thank you

from rps.

gonuit avatar gonuit commented on September 16, 2024

Interesting 🤔, I guess I need to think about changing the "native" part of this library 🤔.
Maybe I can change it from C++ implementation to Go or rust - a much simpler API and possibly less error-prone.

from rps.

Skycoder42 avatar Skycoder42 commented on September 16, 2024

I had this issue today as well, inside a Docker Dev-Container.

One question: Why the native code at all? Dart has the Process class to start and control child processes and the ProcessSignal class to register and handle signals.

from rps.

gonuit avatar gonuit commented on September 16, 2024

Hi @Skycoder42,
Since we do not want to "communicate" with a native process acting as a bridge, instead we want the process to directly use the shell to have a native feel. For example, with this, it can render and delete lines, wait for key inputs and so on

from rps.

gonuit avatar gonuit commented on September 16, 2024

I was experimenting with the ProcessStartMode.inheritStdio before, But it did not work as expected, but I can't recall the problem. I think it's worth going back and testing it again.

Also, if you have a good idea of what it might look like, feel free to open a PR.

Thank you for your insight! 🚀

from rps.

Related Issues (15)

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.