TheAlgorithms / Zig

Collection of Algorithms implemented in Zig.
https://the-algorithms.com/language/zig
MIT License
166 stars 32 forks source link

More changes: Web examples #5

Closed kassane closed 1 year ago

kassane commented 1 year ago

changes:

cc: @Panquesito7

Note: zig-tests don't stop to print stderr (aka std.debug.print).

kassane commented 1 year ago

Http.Server tests on Windows and MacOS has issue to get request, linux works. Please see the last action! @Panquesito7


edit

@truemedian , any suggestions about? Trying to get a functional basic example of zig http support's.

truemedian commented 1 year ago

std.http changed again in https://github.com/ziglang/zig/pull/15299 (at least this time I have some more complete example code). So this code is already a bit wrong.

I'd like std.http.Server to be considered barely-functional at the moment. It currently leaks memory with every connection and probably has a host of other issues that will be caught when std.http.Client and std.http.Server are tested against eachother, until then I can't advertise much about it's functionality.

kassane commented 1 year ago

std.http changed again in ziglang/zig#15299 (at least this time I have some more complete example code). So this code is already a bit wrong.

New reference update: https://github.com/ziglang/zig/pull/15372

nwtgck commented 1 year ago

Hi,

I'm using Zig HTTP server and it works well in 0.11.0-dev.2661+d2a799c65!

I love its API since we can handle in low-level.

kassane commented 1 year ago

Finally works!! thx @truemedian @nwtgck