-
-
Notifications
You must be signed in to change notification settings - Fork 23
implement remaining public functions #49
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
Comments
I'm interested in working on the gz functions, if someone can give me a few hints on where to put them. Should type declarations (like |
Thanks for your interest! organization I think these api's will just be for C consumption, so code that is only used by them should live just in We currently don't have [features]
gz = ["dep:libc"]
[dependencies]
libc = { ..., optional = true } We'd enable that flag when building a method & priorities Our idea (but the funding has so far not materialized for us to look at this ourselves) was to use c2rust for this part of the api, and then clean that up but not spend too much time ttrying to make it idiomatic rust (e.g. by trying to use So, idk if you want to go that route or try something more manual (up to you), but our priorities here are 1) compatibility and 2) decent rust code. Given that the source material uses libc functions a bunch, it likely won't be possible to just use final thoughs We merged a PR yesterday that means all extern functions are now annotated with #[cfg_attr(feature = "export-symbols", export_name = prefix!(<function name>))] Finally, we have limited review capacity at the moment (again, funding etc.), so small PRs are much easier for us to handle than bigger ones. |
Should |
Those are not really symbols, but defines in the header file, e.g. https://github.com/zlib-ng/zlib-ng/blob/46fc33f39d0de9b85330c275b26391645a04ffa5/zlib.h.in#L1767 So if you look at the object file, |
After thinking about this some more, and asking for feedback, here's my plan for actually releasing the gzip functions:
I think this minimizes risk, unblocks some other processes (releases, security audits) |
I attempted to make a patch that moves |
hmm, anything in particular that is problematic? (you can open a draft PR if that's easier, though currently no tests are run on CI for the cdylib crate) |
It turns out that this cannot work, because a We'd like to release soon, so here are the steps that I plan to take:
|
I was able to work around that in my dev environment by having |
really? can you push that to the PR? |
Uh oh!
There was an error while loading. Please reload this page.
these are missing versus zlib
deflate
inflate
inflateCodesUsed
#350general
zlibCompileFlags
#324gz
gzbuffer Implement gzread and gzbuffer #345
gzclearerr⚠ Add gzclearerr and gzeof functions #339
gzclose⚠ Partial implementation of gzopen and gzclose #326
gzclose_r Make gzclose_r and gzclose_w part of the public API #348
gzclose_w Make gzclose_r and gzclose_w part of the public API #348
gzdirect⚠ Implement gzdirect #341
gzdopen⚠ Finish implementing gz_open and add gzdopen and gzerror #335
gzeof⚠ Add gzclearerr and gzeof functions #339
gzerror⚠ Finish implementing gz_open and add gzdopen and gzerror #335
gzFile Partial implementation of gzopen and gzclose #326
gzFile_s Partial implementation of gzopen and gzclose #326
gzflush⚠ Implement gzwrite and gzflush #347
gzfread Implement gzfread #353
gzfwrite Implement gzfwrite and add null buffer check to gzfread #354
gzgetc_ Implement gzgetc and gzgets #352
gzgetc⚠ Implement gzgetc and gzgets #352
gzgets⚠ Implement gzgetc and gzgets #352
gzoffset Implement gzoffset and gztell #349
gzopen⚠ Finish implementing gz_open and add gzdopen and gzerror #335
gzputc⚠ Implement gzputc and gzputs #351
gzputs⚠ Implement gzputc and gzputs #351
gzread⚠ Implement gzread and gzbuffer #345
gzrewind⚠ Implement gzseek for reads, as well as gzrewind #358
gzseek⚠ Implement gzseek for writes #359
gzsetparams⚠ Implement gzsetparams #356
gztell⚠ Implement gzoffset and gztell #349
gzungetc⚠ Implement gzungetc #355
gzwrite⚠ Implement gzwrite and gzflush #347
gzprintf (cannot be implemented in stable rust)
The text was updated successfully, but these errors were encountered: