Git Product home page Git Product logo

Comments (3)

jpnurmi avatar jpnurmi commented on August 19, 2024 1

libserialport.dart does use FFI. This package is just an optional wrapper package that makes use of Flutter's build system to build and deploy libserialport.

from flutter_libserialport.

jwinarske avatar jwinarske commented on August 19, 2024

I understand that, but I think it's not a good pattern. For one it masks the license of libserialport, which isn't commercial friendly, and not referenced anywhere, second for Linux I think the build system approach adds a whole lot of non-sense that is not needed; ffgen is the way to go. You might consider re-directing to your ffigen repo, and also adding a note about libserialport licensing.

For the code that is implemented in case of Linux, it's fairly trivial to implement without the not commercial friendly licensing. I'd be interested in implementing (native code) an equivalent for Linux that was MIT or Apache2.0 (commercial friendly).

Just my 2 cents.

from flutter_libserialport.

jpnurmi avatar jpnurmi commented on August 19, 2024

flutter_libserialport as a pure complementary package exists only and only because Flutter devs with no C/C++ background had trouble building and deploying libserialport.c with libserialport.dart.

The point behind this package separation is that you can simply choose between "dependencies: libserialport" and "dependencies: flutter_libserialport" depending on whether you want to build and deploy libserialport.c or not. There's no other difference whatsoever. Naturally, the flutter_libserialport build system covers all platforms, including Linux, even if it wouldn't make sense to use flutter_libserialport for building a Yocto device. If you have control over the system libraries then libserialport.dart is enough because you can rely on the library being there.

Even though libserialport.dart uses ffigen because it's more convenient and less error-prone than writing bindings by hand, I don't see how ffigen is relevant here. It's just a tool to generate low-level bindings - not a user-facing API.

I do share the concern about the license, though. When I first created libserialport.dart, using the same LGPL license seemed like the right thing to do. Things got more complicated when creating the flutter_libserialport package. I looked around and saw some other libserialport language bindings having a permissive license, so I went ahead with a permissive license for flutter_libserialport that merely builds and deploys libserialport.c as a dynamic library.

Both repositories have links to each other.

from flutter_libserialport.

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.