GithubHelp home page GithubHelp logo

kryndex / node-canvas-prebuilt Goto Github PK

View Code? Open in Web Editor NEW

This project forked from node-gfx/node-canvas-prebuilt

0.0 2.0 0.0 34 KB

Versions of node-canvas published to NPM with prebuilt binaries. This repo is mostly for its build scripts

Shell 37.77% Python 33.43% JavaScript 26.92% Batchfile 1.88%

node-canvas-prebuilt's Introduction

NPM version

This is a drop-in replacement for canvas that does not require any compiling. To use it just npm install canvas-prebuilt or replace canvas with canvas-prebuilt in your dependencies.

You will also need to change require('canvas') to require('canvas-prebuilt').

The repo is just a set of scripts that downloads a specific node-canvas version, builds it and bundles it on all platforms. It's meant to run on Travis and AppVeyor but it can be run locally too

Releases

More detail on the releases below, this won't be relevant to most users.

Binaries

Make sure your node version is the most recent to guarantee ABI compatibility

[email protected]
[email protected]
[email protected]
node 7 node 6 node 5 node 4 node 0.12 node 0.10
Linux x64
Windows x64
OSX x64
Windows x86 𐄂¹ 𐄂¹ 𐄂¹ 𐄂¹ 𐄂¹ 𐄂¹
Linux x86 𐄂¹ 𐄂¹ 𐄂¹ 𐄂¹ 𐄂¹ 𐄂¹
Linux ARM 𐄂¹ 𐄂¹ 𐄂¹ 𐄂¹ 𐄂¹ 𐄂¹

¹I have some ideas on how to get these working with cross-compilation if people request it. I plan to add Linux/ARM

Canvas version mapping

canvas canvas-prebuilt
1.4.0 1.4.0
1.5.0 1.5.0
1.6.0 1.6.0

Bundling

The bundling scripts just take a regularly compiled executable (canvas.node in this case) and look at which non-system libraries it links against. Those libraries are then copied to the release directory and binaries are updated if necessary to refer to them.

The strategies for bundling could be applied to other projects too since they're general:

  • On macOS, macpack is used to search dependencies, filter out non-system ones, and update binary references
  • On Windows, Dependency Walker's CLI is used to search dependencies. Anything in the MSYS2 folder is considered non-system. Patching is not necessary because Windows looks for dlls in the same folder as the binary
  • On Linux, pax-utils searches dependencies, and everything not in /lib is non-system. The custom binding.gyp compiles canvas.node to look inside its own directory for dependencies

node-canvas-prebuilt's People

Contributors

chearon avatar

Watchers

 avatar  avatar

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.