1
Fork 0
mirror of https://github.com/RGBCube/ZTerm synced 2025-07-29 08:57:46 +00:00

Write README

This commit is contained in:
RGBCube 2023-05-17 23:40:38 +03:00
parent 4f44f7c010
commit 9eeb776fe5
2 changed files with 41 additions and 14 deletions

View file

@ -2,6 +2,33 @@
Terminal abstraction library for Zig.
## Contents
This is a simple guide to using the library.
The contents will be briefly covered here.
### Spinner
```zig
const std = @import("std");
const zterm = @import("zterm");
pub fn main() !void {
var sp = zterm.Spinner{
.loading_charset = [_][]const u8{"⣾", "⣽", "⣻", "⢿", "⡿", "⣟", "⣯", "⣷"};
.loading_message = "Selling all your data to the CCP...",
.finished_charset = "✓",
.finished_message = "Lock your doors.",
};
try sp.start();
var stdOut = std.io.getOut();
try stdOut.writeAll("Calculating very important stuff...");
try sp.stop();
}
```
## License
```