hhstore / blog

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

Zig: Standard Library #378

Open hhstore opened 2 years ago

hhstore commented 2 years ago

related:

hhstore commented 2 years ago

Zig 标准库:

std 文档:

std 源码:

官方对 std 源码阅读建议:

hhstore commented 2 years ago

Zig 标准库源码分析:

阅读入口:

💢 std.builtin:

💢 std.atomic:

std.atomic.Atomic:

const Atomic = std.atomic.Atomic;

队列:

栈:

hhstore commented 2 years ago

💢 std.mem.Allocator:


const Allocator = std.mem.Allocator;

💢 std.heap.ArenaAllocator:


const ArenaAllocator = std.heap.ArenaAllocator;
hhstore commented 2 years 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 2 years ago

简单模块:

💢 std.once:

💢 std.http:

💢 std.crypto:

hmac:

hhstore commented 2 years ago

1

hhstore commented 2 years ago

1