~/bend-docscommunity

bend-safetensors-reader@0.1.0.0 relies on unsafe/foreign

0xd8619c297e019f1c512e443a1b7ff426

bend-safetensors-reader: read .safetensors files into Bend arrays: a checked header parser (with laws), tensor lookup by name, raw and F32 loads.

bend-safetensors-reader@0.1.0.0 by tjpa

Published
2026-11-11
Size
61,999 bytes, 12 files
License
MIT-0 (no LICENSE file; the hub's default)
Declarations
7 laws (7 proved), 166 defs, 15 types

Import

import bend-safetensors-reader@0.1.0.0/LAWS.bend as LAWS
import 0xd8619c297e019f1c512e443a1b7ff426/LAWS.bend as LAWS
import bend-safetensors-reader@0.1.0.0/PROOF.bend as PROOF
import 0xd8619c297e019f1c512e443a1b7ff426/PROOF.bend as PROOF
import bend-safetensors-reader@0.1.0.0/header.bend as Header
import 0xd8619c297e019f1c512e443a1b7ff426/header.bend as Header
import bend-safetensors-reader@0.1.0.0/lex.bend as Lex
import 0xd8619c297e019f1c512e443a1b7ff426/lex.bend as Lex
import bend-safetensors-reader@0.1.0.0/package.bend as Package
import 0xd8619c297e019f1c512e443a1b7ff426/package.bend as Package
import bend-safetensors-reader@0.1.0.0/st.bend as St
import 0xd8619c297e019f1c512e443a1b7ff426/st.bend as St
import bend-safetensors-reader@0.1.0.0/test/f16_all.bend as F16_all
import 0xd8619c297e019f1c512e443a1b7ff426/test/f16_all.bend as F16_all
import bend-safetensors-reader@0.1.0.0/test/list.bend as MList
import 0xd8619c297e019f1c512e443a1b7ff426/test/list.bend as MList
import bend-safetensors-reader@0.1.0.0/test/read.bend as Read
import 0xd8619c297e019f1c512e443a1b7ff426/test/read.bend as Read
import bend-safetensors-reader@0.1.0.0/w64.bend as W64
import 0xd8619c297e019f1c512e443a1b7ff426/w64.bend as W64
import bend-safetensors-reader@0.1.0.0/widen.bend as Widen
import 0xd8619c297e019f1c512e443a1b7ff426/widen.bend as Widen

Modules

Other files

Dependencies

Dependents

No package in this build imports it.

Status on bend 2.0.40

FileStatusChecker saysTime
LAWS.bendopen laws/TODOs 7 TODOs found.
Checked alone, a law without a def is a TODO; all of them are proved in files that check, so the package counts this file as checks.
output
SOME PROOFS FAIL
Error: 7 TODOs found.
The code is incomplete, and not a valid proof yet.
0.5 s
PROOF.bendchecks ALL PROOFS CHECK6.2 s
header.bendchecks ALL PROOFS CHECK0.5 s
lex.bendchecks ALL PROOFS CHECK0.4 s
package.bendrelies on unsafe/foreign 23 defs rely on unsafe or foreign code
output
SOME PROOFS FAIL
Error: 23 defs rely on unsafe or foreign code:
defs that depend on @unsafe: 0xd8619c297e019f1c512e443a1b7ff426/st.wid, 0xd8619c297e019f1c512e443a1b7ff426/st.wid_get, 0xd8619c297e019f1c512e443a1b7ff426/st.St.widen, 0xd8619c297e019f1c512e443a1b7ff426/st.read16, 0xd8619c297e019f1c512e443a1b7ff426/st.St.read_f32, 0xd8619c297e019f1c512e443a1b7ff426/test/read.fold, 0xd8619c297e019f1c512e443a1b7ff426/test/read.fold_get, 0xd8619c297e019f1c512e443a1b7ff426/test/read.sums, 0xd8619c297e019f1c512e443a1b7ff426/test/read.f32_part, 0xd8619c297e019f1c512e443a1b7ff426/test/read.one, 0xd8619c297e019f1c512e443a1b7ff426/test/read.each, 0xd8619c297e019f1c512e443a1b7ff426/test/read.opened, 0xd8619c297e019f1c512e443a1b7ff426/test/read.arg, 0xd8619c297e019f1c512e443a1b7ff426/test/read.main, 0xd8619c297e019f1c512e443a1b7ff426/test/f16_all.go, 0xd8619c297e019f1c512e443a1b7ff426/test/f16_all.main
defs that depend on foreign effects: 0x3a5a2b27c16f21aea8fab4bc162bd90a/raw.Raw.read, 0x3a5a2b27c16f21aea8fab4bc162bd90a/raw.Raw.write, 0x3a5a2b27c16f21aea8fab4bc162bd90a/raw.Raw.read_at, 0xd8619c297e019f1c512e443a1b7ff426/st.tail, 0xd8619c297e019f1c512e443a1b7ff426/st.read_tail, 0xd8619c297e019f1c512e443a1b7ff426/st.read_go, 0xd8619c297e019f1c512e443a1b7ff426/st.St.read, 0xd8619c297e019f1c512e443a1b7ff426/st.read16, 0xd8619c297e019f1c512e443a1b7ff426/st.St.read_f32, 0xd8619c297e019f1c512e443a1b7ff426/test/read.f32_part, 0xd8619c297e019f1c512e443a1b7ff426/test/read.one, 0xd8619c297e019f1c512e443a1b7ff426/test/read.each, 0xd8619c297e019f1c512e443a1b7ff426/test/read.opened, 0xd8619c297e019f1c512e443a1b7ff426/test/read.arg, 0xd8619c297e019f1c512e443a1b7ff426/test/read.main
Hint: no law or proof uses these defs. Move them to a file this proof does not import, and the proofs will check: 0xd8619c297e019f1c512e443a1b7ff426/st.wid, 0xd8619c297e019f1c512e443a1b7ff426/st.wid_get, 0xd8619c297e019f1c512e443a1b7ff426/st.St.widen, 0xd8619c297e019f1c512e443a1b7ff426/st.read16, 0xd8619c297e019f1c512e443a1b7ff426/st.St.read_f32, 0xd8619c297e019f1c512e443a1b7ff426/test/read.fold, 0xd8619c297e019f1c512e443a1b7ff426/test/read.fold_get, 0xd8619c297e019f1c512e443a1b7ff426/test/read.sums, 0xd8619c297e019f1c512e443a1b7ff426/test/read.f32_part, 0xd8619c297e019f1c512e443a1b7ff426/test/read.one, 0xd8619c297e019f1c512e443a1b7ff426/test/read.each, 0xd8619c297e019f1c512e443a1b7ff426/test/read.opened, 0xd8619c297e019f1c512e443a1b7ff426/test/read.arg, 0xd8619c297e019f1c512e443a1b7ff426/test/read.main, 0xd8619c297e019f1c512e443a1b7ff426/test/f16_all.go, 0xd8619c297e019f1c512e443a1b7ff426/test/f16_all.main, 0x3a5a2b27c16f21aea8fab4bc162bd90a/raw.Raw.read, 0x3a5a2b27c16f21aea8fab4bc162bd90a/raw.Raw.write, 0x3a5a2b27c16f21aea8fab4bc162bd90a/raw.Raw.read_at, 0xd8619c297e019f1c512e443a1b7ff426/st.tail, 0xd8619c297e019f1c512e443a1b7ff426/st.read_tail, 0xd8619c297e019f1c512e443a1b7ff426/st.read_go, 0xd8619c297e019f1c512e443a1b7ff426/st.St.read
4.9 s
st.bendrelies on unsafe/foreign 12 defs rely on unsafe or foreign code
output
SOME PROOFS FAIL
Error: 12 defs rely on unsafe or foreign code:
defs that depend on @unsafe: wid, wid_get, St.widen, read16, St.read_f32
defs that depend on foreign effects: 0x3a5a2b27c16f21aea8fab4bc162bd90a/raw.Raw.read, 0x3a5a2b27c16f21aea8fab4bc162bd90a/raw.Raw.write, 0x3a5a2b27c16f21aea8fab4bc162bd90a/raw.Raw.read_at, tail, read_tail, read_go, St.read, read16, St.read_f32
0.5 s
test/f16_all.bendrelies on unsafe/foreign 2 defs rely on unsafe or foreign code
output
SOME PROOFS FAIL
Error: 2 defs rely on unsafe or foreign code:
defs that depend on @unsafe: go, main
0.4 s
test/list.bendrelies on unsafe/foreign 12 defs rely on unsafe or foreign code
output
SOME PROOFS FAIL
Error: 12 defs rely on unsafe or foreign code:
defs that depend on @unsafe: 0xd8619c297e019f1c512e443a1b7ff426/st.wid, 0xd8619c297e019f1c512e443a1b7ff426/st.wid_get, 0xd8619c297e019f1c512e443a1b7ff426/st.St.widen, 0xd8619c297e019f1c512e443a1b7ff426/st.read16, 0xd8619c297e019f1c512e443a1b7ff426/st.St.read_f32
defs that depend on foreign effects: 0x3a5a2b27c16f21aea8fab4bc162bd90a/raw.Raw.read, 0x3a5a2b27c16f21aea8fab4bc162bd90a/raw.Raw.write, 0x3a5a2b27c16f21aea8fab4bc162bd90a/raw.Raw.read_at, 0xd8619c297e019f1c512e443a1b7ff426/st.tail, 0xd8619c297e019f1c512e443a1b7ff426/st.read_tail, 0xd8619c297e019f1c512e443a1b7ff426/st.read_go, 0xd8619c297e019f1c512e443a1b7ff426/st.St.read, 0xd8619c297e019f1c512e443a1b7ff426/st.read16, 0xd8619c297e019f1c512e443a1b7ff426/st.St.read_f32
Hint: no law or proof uses these defs. Move them to a file this proof does not import, and the proofs will check: 0xd8619c297e019f1c512e443a1b7ff426/st.wid, 0xd8619c297e019f1c512e443a1b7ff426/st.wid_get, 0xd8619c297e019f1c512e443a1b7ff426/st.St.widen, 0xd8619c297e019f1c512e443a1b7ff426/st.read16, 0xd8619c297e019f1c512e443a1b7ff426/st.St.read_f32, 0x3a5a2b27c16f21aea8fab4bc162bd90a/raw.Raw.read, 0x3a5a2b27c16f21aea8fab4bc162bd90a/raw.Raw.write, 0x3a5a2b27c16f21aea8fab4bc162bd90a/raw.Raw.read_at, 0xd8619c297e019f1c512e443a1b7ff426/st.tail, 0xd8619c297e019f1c512e443a1b7ff426/st.read_tail, 0xd8619c297e019f1c512e443a1b7ff426/st.read_go, 0xd8619c297e019f1c512e443a1b7ff426/st.St.read
0.6 s
test/read.bendrelies on unsafe/foreign 21 defs rely on unsafe or foreign code
output
SOME PROOFS FAIL
Error: 21 defs rely on unsafe or foreign code:
defs that depend on @unsafe: 0xd8619c297e019f1c512e443a1b7ff426/st.wid, 0xd8619c297e019f1c512e443a1b7ff426/st.wid_get, 0xd8619c297e019f1c512e443a1b7ff426/st.St.widen, 0xd8619c297e019f1c512e443a1b7ff426/st.read16, 0xd8619c297e019f1c512e443a1b7ff426/st.St.read_f32, fold, fold_get, sums, f32_part, one, each, opened, arg, main
defs that depend on foreign effects: 0x3a5a2b27c16f21aea8fab4bc162bd90a/raw.Raw.read, 0x3a5a2b27c16f21aea8fab4bc162bd90a/raw.Raw.write, 0x3a5a2b27c16f21aea8fab4bc162bd90a/raw.Raw.read_at, 0xd8619c297e019f1c512e443a1b7ff426/st.tail, 0xd8619c297e019f1c512e443a1b7ff426/st.read_tail, 0xd8619c297e019f1c512e443a1b7ff426/st.read_go, 0xd8619c297e019f1c512e443a1b7ff426/st.St.read, 0xd8619c297e019f1c512e443a1b7ff426/st.read16, 0xd8619c297e019f1c512e443a1b7ff426/st.St.read_f32, f32_part, one, each, opened, arg, main
0.4 s
w64.bendchecks ALL PROOFS CHECK0.5 s
widen.bendchecks ALL PROOFS CHECK0.4 s