jmcnamara / libxlsxwriter

A C library for creating Excel XLSX files.
https://libxlsxwriter.github.io
Other
1.48k stars 330 forks source link

Zig package #400

Closed kassane closed 1 year ago

kassane commented 1 year ago

closes #401

How to use

e.g:

More info about zig-pkg

jmcnamara commented 1 year ago

How would a zig developer use this to build a zig compatible library?

kassane commented 1 year ago

How would a zig developer use this to build a zig compatible library?

Hi, @jmcnamara

Using that build the developers could choose to create a binding on top of the original library or access the library directly.

In other words, do you remember the binding built by me? zig-xlsxwriter

Well, with this change, not only could that project benefit from the library addition be downloaded, build and run with the included binding (another project) or also, users can bypass my binding and use the library directly with @cImport/@cInclude (zig translate-c inside) to auto-generate a binding, regardless of the user-binding project that me or any other developers.

more info: https://ziglang.org/documentation/master/#cImport-vs-translate-c

kassane commented 1 year ago

Pointer 2

Using zig toolchain does not exactly mean that need to create a ziglang project, could replace the makefile, cmake, or any other conventional tool with zig. zig toolchain is pure-LLVM buildtools (replaces: build-essential/base-devel - does not include dbgs or binutils).

jmcnamara commented 1 year ago

In general I'd prefer not to add this type of configuration to the root directory. I made an exception for iOS and now there are too many Coacoa and other related files as well as several PRs.

I prefer the VPG and Homebrew approaches where the package updates are in an external repository, like this: https://vcpkg.roundtrip.dev/ports/libxlsxwriter

However, I like Zig as a language and would like to support it so if you agree to support the library additions and make any fixes that are required in the future then I will merge it.

kassane commented 1 year ago

OK! I will even complete support for zlib and minizip dependencies. (Optional install)

jmcnamara commented 1 year ago

Ok. Merged. Thanks!