Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zig: Standard Library #378

Open
hhstore opened this issue Aug 13, 2022 · 7 comments
Open

Zig: Standard Library #378

hhstore opened this issue Aug 13, 2022 · 7 comments

Comments

@hhstore
Copy link
Owner

hhstore commented Aug 13, 2022

related:

@hhstore
Copy link
Owner Author

hhstore commented Aug 13, 2022

Zig 标准库:

std 文档:

std 源码:

官方对 std 源码阅读建议:

@hhstore
Copy link
Owner Author

hhstore commented Aug 13, 2022

Zig 标准库源码分析:

阅读入口:

💢 std.builtin:

💢 std.atomic:

std.atomic.Atomic:

  • comptime 用法(类似泛型)
  • ⭐️⭐️⭐️⭐️⭐️
const Atomic = std.atomic.Atomic;

队列:

栈:

@hhstore
Copy link
Owner Author

hhstore commented Aug 13, 2022

💢 std.mem.Allocator:

const Allocator = std.mem.Allocator;

💢 std.heap.ArenaAllocator:

const ArenaAllocator = std.heap.ArenaAllocator;

@hhstore
Copy link
Owner Author

hhstore commented Aug 13, 2022

@hhstore
Copy link
Owner Author

hhstore commented Aug 13, 2022

简单模块:

💢 std.once:

💢 std.http:

💢 std.crypto:

hmac:

@hhstore
Copy link
Owner Author

hhstore commented Aug 13, 2022

1

1 similar comment
@hhstore
Copy link
Owner Author

hhstore commented Aug 13, 2022

1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant