Skip to content

Conversation

@dbuenzli
Copy link
Contributor

@dbuenzli dbuenzli commented Nov 3, 2025

  • Add: bytesrw.0.3.0 home, doc, issues
    Composable byte stream readers and writers for OCaml

bytesrw v0.3.0 2025-11-04 Zagreb

  • Add the Bytesrw_sysrandom module for operating system provided
    cryptographically secure pseudorandom byte streams and an entropy
    primitive.

  • Add the optional Bytesrw_crypto.Psa module for low-level
    cryptographic operations on byte slices. These are thin and safe
    bindings to the PSA Crypto API specification currently provided by
    the TF-PSA-Crypto C library distributed with Mbed TLS.

  • Add the optional Bytesrw_crypto module for higher-level
    cryptographic operations implemented over Bytesrw_crypto.Psa.
    Mostly hashing for now. Use this if you need SHA-3 hashes.

  • Add the optional Bytesrw_tls a module for TLS encrypted streams
    and the needed X.509 certificate management (including system
    lookups for trusted CAs). The backend is provided by the Mbed TLS C
    library.

  • Add Bytesrw_unix.bytes_writer_of_socket_fd which shutdowns the
    fd in the send direction when the end of stream is written.

  • Add Bytes.Slice.last.

  • Review Int_val vs Long_val in C bindings. Affects
    Bytesrw_blake3, Bytesrw_md, Bytesrw_xxh, Bytesrw_zlib,
    Bytesrw_zstd


Use b0 -- .opam publish bytesrw.0.3.0 to update the pull request.

@dbuenzli
Copy link
Contributor Author

dbuenzli commented Nov 3, 2025

The windows cygwin failure is odd, I actually tested the package on my turtle vm and it succeeded. Let's wait on #28833 to be merged, I'll update the topkg constraint and we'll get a better error message.

For the rest we just have a problem with alpine that I need to investigate. It seems the getentropy C call is not defined. I guess it's a musl thing to look into.

@mseri
Copy link
Member

mseri commented Nov 5, 2025

I merged the other PR

@dbuenzli dbuenzli force-pushed the b0-publish-bytesrw.0.3.0 branch from 78fbca2 to 1d90ee4 Compare November 5, 2025 15:51
@dbuenzli
Copy link
Contributor Author

dbuenzli commented Nov 5, 2025

Aaah it's nice to see the actual errors in the opam error snippet :–) So many years and it took a cmd.exe limitation to improve topkg's error reporting.

So we have this:

'D:\opamroot\default\lib\ocamlbuild/ocamlbuild.cmx' -o myocamlbuild.exe
  # + ocamlfind ocamlc -config
  # + pkg-config --libs-only-l zlib > 'C:\Users\RUNNER~1\AppData\Local\Temp\pkgconfig3205e2pkg-config'
  # Can't open perl script "/cygdrive/c/Strawberry/perl/bin/pkg-config": No such file or directory
  # Command exited with code 2.

I'd say the error is weird but indeed the build system expects and runs pkg-config even if you don't configure any bytesrw depopt. Yet there is no dependency of the package towards conf-pkg-config. Let's try to add it.

@dbuenzli
Copy link
Contributor Author

dbuenzli commented Nov 5, 2025

The error persists (but our dependencies are more correct). I posit however that this is not an error with bytesrw but with the install of conf-pkg-config on Windows cygwin ?

 # + ocamlfind ocamlc -config
  # + pkg-config --libs-only-l zlib > 'C:\Users\RUNNER~1\AppData\Local\Temp\pkgconfig2dfc08pkg-config'
  # Can't open perl script "/cygdrive/c/Strawberry/perl/bin/pkg-config": No such file or directory
  # Command exited with code 2.

So I'd suggest to merge this. Alpine has been constrained away, the alpine support will be restored with a bugfix release.

The vif revdep failure is because the package seems to be doing tests I suspect it should not perform on the opam CI /cc @dinosaure or @hannesm.

@dinosaure
Copy link
Contributor

You can merge this PR regardless vif which is on beta.

@dbuenzli
Copy link
Contributor Author

dbuenzli commented Nov 5, 2025

You can merge this PR regardless vif which is on beta.

That's not the point :–) I think you should disable these kind of tests for the opam repository. It's annoying both for repo maintainers and submitters to have to sift through these errors.

@mseri
Copy link
Member

mseri commented Nov 5, 2025

If vif test cannot run, we should indeed disable them here on the repository

@mseri mseri merged commit 21f97b2 into ocaml:master Nov 5, 2025
1 of 4 checks passed
@mseri
Copy link
Member

mseri commented Nov 5, 2025

Thanks both!

@dbuenzli
Copy link
Contributor Author

dbuenzli commented Nov 5, 2025

Thanks @mseri. Any idea about what to do about this pkg-config issue on windows ?

@dbuenzli dbuenzli deleted the b0-publish-bytesrw.0.3.0 branch November 5, 2025 18:44
@mseri
Copy link
Member

mseri commented Nov 5, 2025

Unfortunately not. I have zero experience on windows, and only access to windows in the ci here. I would wait for some windows user to help us out if they hit the issue :P

@dbuenzli
Copy link
Contributor Author

dbuenzli commented Nov 5, 2025

I would wait for some windows user to help us out if they hit the issue :P

I'm not sure they will. I did not. I thought perhaps there is something wrong with the CI itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants