Skip to content

Repository files navigation

@ohos-rs/zig-ping

A simple ping implement by zig.

Install

ohpm install @ohos-rs/zig-ping

Usage

import{ping}from"@ohos-rs/zig-ping";consthandlePing=async()=>{constret=awaitping("www.baidu.com");console.log(ret);};

Why we need it?

Previously, we had a fully functional ping tool built using ohos-rs.However, its release build size exceeded 900KB which is quite large for such a lightweight utility.

By re-implementing the same functionality in Zig, we successfully reduced the release build size to just 35KB—over four times smaller than the original version.

License

MIT

About

A simple ping powed by zig-napi

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages