hhstore / blog

My Tech Blog: about Mojo / Rust / Golang / Python / Kotlin / Flutter / VueJS / Blockchain etc.
https://github.com/hhstore/blog/issues
276 stars 22 forks source link

Zig: Standard Library #378

Open hhstore opened 1 year ago

hhstore commented 1 year ago

related:

hhstore commented 1 year ago

Zig 标准库:

std 文档:

std 源码:

官方对 std 源码阅读建议:

hhstore commented 1 year ago

Zig 标准库源码分析:

阅读入口:

💢 std.builtin:

💢 std.atomic:

std.atomic.Atomic:

const Atomic = std.atomic.Atomic;

队列:

栈:

hhstore commented 1 year ago

💢 std.mem.Allocator:


const Allocator = std.mem.Allocator;

💢 std.heap.ArenaAllocator:


const ArenaAllocator = std.heap.ArenaAllocator;
hhstore commented 1 year ago

💢 std.event:

std.event.Loop:


const Loop = std.event.Loop;

std.event.Channel:


const Channel = std.event.Channel;

用例:

std.event.WaitGroup:

💢 std.meta:

std.meta.trait:

重要方法:

hhstore commented 1 year ago

简单模块:

💢 std.once:

💢 std.http:

💢 std.crypto:

hmac:

hhstore commented 1 year ago

1

hhstore commented 1 year ago

1