ziglibs / repository Goto Github PK
View Code? Open in Web Editor NEWA community-maintained repository of zig packages
License: MIT License
A community-maintained repository of zig packages
License: MIT License
any project listing would need at the very least:
Zig package manager has been merged for a while, as for this project, I suggest we add a new option module: bool
to indicate whether it has module support, something like this:
{
"author": "vrischmann",
"tags": [
"database"
],
"git": "https://github.com/vrischmann/zig-sqlite",
"root_file": "/sqlite.zig",
"description": "zig-sqlite is a small wrapper around sqlite's C API, making it easier to use with Zig. ",
"license": "mit",
"updated_at": "2023-01-28T06:15:38Z",
"homepage": ""
"module": false // newly add field
}
Might be nice to add a license field to the package json.
Something super simple like:
"license": "MIT",
"license_url": "https://github.com/ziglibs/repository/blob/main/LICENSE"
Where LICENSE
is one of predefined text, for instance one of PUBDOMAIN | MIT | BSD-3C | BSD-2C | ISC | APACHE-2.0 | GPL2 | GPL3 | ... | CUSTOM
Where CUSTOM
could be a catch all for "not a common one; user should investigate further".
This is required for more complex packages that depend on each other. My proposal is to do the following format change:
{
"dependencies": {
"${import name 1}": "${package name 1}",
"${import name 2}": "${package name 2}"
}
}
This allows package managers to create a correct DAG out of the packages and build a correct std.build.Pkg
structure. Import name is the name that needs to get passed to @import(…)
, package name is the file name in the repository without the file extension.
Example:
{
"author": "truemedian",
"description": "A WebSocket 1.3 library for Zig",
"git": "https://github.com/truemedian/wz",
"root_file": "/src/main.zig",
"dependencies": {
"hzzp": "hzzp"
},
"tags": [
"networking"
]
}
I'm using a private repository similar to this for my own "package manager" (it's just a way to quickly add submodules). The current format allows these two configurations:
"parser-toolkit": {
"git": "https://github.com/MasterQ32/parser-toolkit",
"pkg_file": "src/main.zig"
},
"sdl": {
"git": "https://github.com/MasterQ32/SDL.zig",
"sdk_file": "Sdk.zig"
}
The pkg_file
item can be set for repositories that export a single zig package (like zig-args), the sdk_file
can be used for packages that use a build time package (like SDL.zig).
What's currently not covered is repos that export more than one package (like SDL.zig). What we could do for those is either using a sdk_file
or this:
"sdl": {
"git": "https://github.com/MasterQ32/SDL.zig",
"sdk_file": "Sdk.zig",
"packages": {
"native": "src/binding/sdl.zig",
"wrapper": "src/wrapper/sdl.zig"
}
}
This does not cover any dependencies yet, so what i'm experimenting around with is this structure:
"ziglyph": {
"git": "https://github.com/jecolon/ziglyph",
"pkg_file": "src/ziglyph.zig"
},
"zigstr": {
"git": "https://github.com/jecolon/zigstr",
"pkg_file": "src/Zigstr.zig",
"dependencies": [
"ziglyph"
]
}
This does not properly encode multi-package-repos yet, neither as a dependency nor as source package. The dependencies
field could use a string-formatted variant like "sdl/native"
or similar, while multi-package repos could use a { "file": "", "dependencies": [ … ] }
structure for the packages
items.
Any thoughts?
@mattnite and @nektro already have designed a similar system, so i'd appreciate some input on these thoughts. Am i missing some important data or could this actually be enough to model a zig package structure (excluding any kind of versions)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.