Skip to content

openharmony-zig/zig-ping

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@ohos-rs/zig-ping

A simple ping implement by zig.

Note: This is an experiential project, if you want a stable version, please use @ohos-rs/ping.

Usage

import { ping } from "@ohos-rs/zig-ping";

const handlePing = async () => {
  const ret = await ping("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

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published