lun-4 / zigdig

naive dns client library in zig
MIT License
33 stars 5 forks source link

investigate event-based IO #2

Closed lun-4 closed 4 years ago

lun-4 commented 4 years ago

also includes sending A/AAAA queries in a general interface to get addresses from domain names

selfnote: how musl does it + using std.event

lun-4 commented 4 years ago

status report:

reproduction steps

git clone https://github.com/lun-4/zigdig.git
cd zigdig
git checkout async-experiments
zig build install --prefix ~/.local/ --verbose

# if all worked,
zigdig-async
lun-4 commented 4 years ago

thanks to https://github.com/ziglang/zig/commit/43bffbb60878c9d6533532b23e29547d9f0f75be the compiler segfault became a compile error, though, even using the pattern described in the safe recursion issue, the compile error stays the same

maybe i'm doing something wrong with try await frame;, even though the frame lives on the heap, https://github.com/lun-4/zigdig/commit/5dee3c9b367a8fa8cb26fce787db09887fa7e53d