Code Monkey home page Code Monkey logo

Comments (7)

LIJI32 avatar LIJI32 commented on May 24, 2024 1

Replacing libpng with libplum has the side-effect of removing all of the runtime dependencies that are downloaded from Homebrew on macOS, which has these nice side-effects:

  1. It simplifies the release build process by removing the need to hack around pkg-config, brew, etc to statically link against libpng
  2. It will allow to trivially add fat-binary support in the macOS releases, so RGBDS could have readily-downloadable ARM64 builds rather than having to emulate it via Rosetta.

from rgbds.

Rangi42 avatar Rangi42 commented on May 24, 2024

Other alternatives to weigh: libspng, lodepng, stb_image, fpng. (Haven't investigated yet, there may be reasons why one or all of these are non-starters.)

from rgbds.

aaaaaa123456789 avatar aaaaaa123456789 commented on May 24, 2024

I don't know to what extent libplum depends on POSIXisms that Windows doesn't follow.

It does not. It's designed to be portable. However, it does not build under MSVC, because it requires C17, and the only C standard that MSVC properly supports is C89. (That being said, it can be built for Windows using any conformant compiler.)

from rgbds.

Rangi42 avatar Rangi42 commented on May 24, 2024

It also needs bash to build, since it relies on merge.sh.

from rgbds.

aaaaaa123456789 avatar aaaaaa123456789 commented on May 24, 2024

It also needs bash to build, since it relies on merge.sh.

Only from source. The releases already contain the merged files.

from rgbds.

Rangi42 avatar Rangi42 commented on May 24, 2024

If RGBGFX gets rewritten in Rust, it may end up using an existing Rust library like image. But if we do want libplum, I was looking at https://github.com/alexcrichton/bzip2-rs as an example of how to write a Rust wrapper around a C library.

from rgbds.

ISSOtm avatar ISSOtm commented on May 24, 2024

The plan is indeed to RIIR (#1213), and also to switch to libplum since it provides the functionality we are interested in (in particular, palette-aware image loading) but also support for more image formats than PNG.

I had begun writing a higher-level wrapper (the low-level bindings were trivial to write thanks to bindgen), but I got stuck on how to design that crate's API to wrap around libplum. I think @eievui5 had some interest in writing such a wrapper, but am not sure if she'd be interested in designing and/or developing it after I admittedly stole her thunder... :/ (My apologies for that, if you're reading this.)

from rgbds.

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.