the.bay.news

Accessing private functions of Io and Allocator implementations

Ziggit
Accessing private functions of Io and Allocator implementations
If a vtable is comptime-known, you can obtain the implementation’s non-pub functions. This allows for inlining and dead code elimination. The code below directly calls functions whose addresses are in a vtable and has an executable size of 8.3 KiB. While I have no doubts that #31421 will be solved, for now you do not need to revert to 0.15 in order to access the “middle level” between std.Io and std.posix. const std = @import("std"); const inl: std.builtin.CallModifier = .always_inline; cons...

0 comments

Sign in to join the discussion — your thebay.events account works here.

No comments yet.