lib/accy/src/tensor/wire/root.zig
daab053ee43316e1809a84551d573ddd1e5bf3d2
1 //! A way to write a tensor program as bytes and read it back, for hosts outside this process. A
2 //! host has to hand over a program, and this side has to accept only programs that are well typed.
3 //! Any host can send any bytes, and a layout that changes without notice breaks senders built
4 //! against the old one.
5 //!
6 //! Programs travel as versioned bytes (*wire bytes*) that begin with the four bytes "ACTP" and
7 //! version 1. The reader replays every operation through the same checked step that builds a
8 //! program one operation at a time, so the bytes cannot introduce a type that step did not derive.
9 //! The parts are the byte layout (`format`), the encoder (`encode`) and the decoder (`decode`).
10 pub const format = @import("format.zig");
11
12 pub const magic = format.magic;
13 pub const version = format.version;
14 pub const max_scan_depth = format.max_scan_depth;
15 pub const Error = format.Error;
16 pub const encode = @import("encode.zig").encode;
17 pub const decode = @import("decode.zig").decode;