Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build for 32 bit platforms or only x64? #554

Closed
ralphtheninja opened this issue Dec 16, 2018 · 10 comments
Closed

Build for 32 bit platforms or only x64? #554

ralphtheninja opened this issue Dec 16, 2018 · 10 comments
Labels
discussion Discussion
Milestone

Comments

@ralphtheninja
Copy link
Member

ralphtheninja commented Dec 16, 2018

We need to modify so prebuildify also builds for 32 bit if this is the case. Linux and Windows.

For each platform-arch we will build two binaries, so if we build for x64 only on mac, linux and windows the resulting prebuilds/ folder will look like:

$ tree
.
├── darwin-x64
│   ├── electron-napi.node
│   └── node-napi.node
├── linux-x64
│   ├── electron-napi.node
│   └── node-napi.node
└── win32-x64
    ├── electron-napi.node
    └── node-napi.node

How common is 32 bit? Will people cry on windows? Personally I'd go for the above setup.

@ralphtheninja ralphtheninja added the discussion Discussion label Dec 16, 2018
@ralphtheninja ralphtheninja added this to the 5.0.0-rc1 milestone Dec 16, 2018
@vweevers
Copy link
Member

I'm also fine with x64 only.

The GitHub API exposes download stats IIRC, we can check how many 32bit downloads we have now.

@vweevers
Copy link
Member

4.0.1:

image

4.0.0:

image

3.0.2:

image

@vweevers
Copy link
Member

So for the latest release, 1.9% of downloads are 32 bit. IMO it's fine to say, those few people should compile binaries themselves.

@vweevers
Copy link
Member

@ralphtheninja good to close (we have an action item in #553)?

@ralphtheninja
Copy link
Member Author

Yep!

@okdistribute
Copy link

okdistribute commented Mar 20, 2020

Hi we're running into this issue because we are building for 32bit machines, we work with folks with old computers who live in remote locations. They have limited connectivity and will not be upgrading Windows to 64bit.

Is it possible to do a prebuilt for win32?

If not, is there something you could suggest for packaging leveldown>=5.0 on win32 with electron? electron-builder documentation is also quite sparse in this area, I've worked on it for a few hours now..

Here's the original issue reported from one of our partners and the error message which signals leveldown is not built for win32. digidem/mapeo-desktop#305 (comment)

@okdistribute
Copy link

apparently building 32-bit builds of leveldown as a dependency to an electron app is challenging, https://github.com/digidem/mapeo-desktop/runs/521162496?check_suite_focus=true

@vweevers
Copy link
Member

Is it possible to do a prebuilt for win32?

Certainly. I'd be happy to help those folks and I don't see any technical challenge on this end. The only concern is increasing our npm package size, but (surprisingly) we haven't gotten a single compliant about that yet. Is it a concern for y'all, e.g. on slow networks?

@okdistribute
Copy link

okdistribute commented Mar 20, 2020

Yeah, although now I'm trying your suggestion of running node and npm install on 32-bit and seeing if that works, even though the build machine is 64-bit

@okdistribute
Copy link

okdistribute commented Mar 20, 2020

That didn't work for me so easily and I'm going to take a break from it now. How much would it increase the package size? The app we're shipping is >80mb, so an extra 250kb won't hurt

vweevers added a commit that referenced this issue Mar 22, 2020
Adds 194kb (or 406kb unpacked) to our npm package size.

Previously removed because only 2% of installs were on 32-bit
Windows and we agreed those users could compile from source.

However, there is currently a gap in electron(-builder) tooling
when used on native addons that use node-gyp-build: these addons
don't get automatically recompiled. Though we don't need that
anymore for runtimes (the builds are compatible with both node and
electron) our users do need it when targeting multiple CPU
architectures.

Ref digidem/mapeo-desktop#305
Ref electron-userland/electron-builder#4370
Ref #554
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Discussion
Projects
None yet
Development

No branches or pull requests

3 participants