safetensors 0.4.5

Provides functions to read and write safetensors which aim to be safer than their PyTorch counterpart. The format is 8 bytes which is an unsized int, being the size of a JSON header, the JSON header refers the `dtype` the `shape` and `data_offsets` which are the offsets for the values in the rest of the file.
Documentation
Build #1348996 2024-09-05T13:42:47.149407+00:00
# rustc version
rustc 1.83.0-nightly (4ac7bcbaa 2024-09-04)# docs.rs version
docsrs 0.6.0 (a6155e2c 2024-08-13)# build log
[INFO] running `Command { std: "docker" "create" "-v" "/home/cratesfyi/workspace-builder/builds/safetensors-0.4.5/target:/opt/rustwide/target:rw,Z" "-v" "/home/cratesfyi/workspace-builder/builds/safetensors-0.4.5/source:/opt/rustwide/workdir:ro,Z" "-v" "/home/cratesfyi/workspace-builder/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/home/cratesfyi/workspace-builder/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "DOCS_RS=1" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "6442450944" "--cpus" "6" "--user" "1001:1001" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:96c0aa5895ecf336b730ef27bcdde6e21027415df19888aad3cf1448e5d65d90" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "rustdoc" "--lib" "-Zrustdoc-map" "--config" "build.rustdocflags=[\"--cfg\", \"docsrs\", \"-Z\", \"unstable-options\", \"--emit=invocation-specific\", \"--resource-suffix\", \"-20240904-1.83.0-nightly-4ac7bcbaa\", \"--static-root-path\", \"/-/rustdoc.static/\", \"--cap-lints\", \"warn\", \"--extern-html-root-takes-precedence\"]" "--offline" "-Zunstable-options" "--config=doc.extern-map.registries.crates-io=\"https://docs.rs/{pkg_name}/{version}/i686-pc-windows-msvc\"" "-Zrustdoc-scrape-examples" "-j6" "--target" "i686-pc-windows-msvc", kill_on_drop: false }`
[INFO] [stderr] WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap.
[INFO] [stdout] f310aeb48a0990ca5847f8c41ba26c424ed51d5e36da5648d97ab1c61e4b5470
[INFO] running `Command { std: "docker" "start" "-a" "f310aeb48a0990ca5847f8c41ba26c424ed51d5e36da5648d97ab1c61e4b5470", kill_on_drop: false }`
[INFO] [stderr] warning: target filter specified, but no targets matched; this is a no-op
[INFO] [stderr]  Documenting safetensors v0.4.5 (/opt/rustwide/workdir)
[INFO] [stderr]     Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.37s
[INFO] [stderr]    Generated /opt/rustwide/target/i686-pc-windows-msvc/doc/safetensors/index.html
[INFO] running `Command { std: "docker" "inspect" "f310aeb48a0990ca5847f8c41ba26c424ed51d5e36da5648d97ab1c61e4b5470", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "rm" "-f" "f310aeb48a0990ca5847f8c41ba26c424ed51d5e36da5648d97ab1c61e4b5470", kill_on_drop: false }`
[INFO] [stdout] f310aeb48a0990ca5847f8c41ba26c424ed51d5e36da5648d97ab1c61e4b5470