safetensors 0.4.3

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 #1191224 2024-04-15T15:55:29.958140+00:00
# rustc version
rustc 1.79.0-nightly (0d8b3346a 2024-04-14)# docs.rs version
docsrs 0.6.0 (5a34f74a 2024-04-10)# build log
[INFO] running `Command { std: "docker" "create" "-v" "/home/cratesfyi/workspace/builds/safetensors-0.4.3/target:/opt/rustwide/target:rw,Z" "-v" "/home/cratesfyi/workspace/builds/safetensors-0.4.3/source:/opt/rustwide/workdir:ro,Z" "-v" "/home/cratesfyi/workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/home/cratesfyi/workspace/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:2788e3201cd34a07e3172128adcd8b3090168a8e3bcc40d7c032b9dda1df7d1c" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "rustdoc" "--lib" "-Zrustdoc-map" "--config" "build.rustdocflags=[\"--cfg\", \"docsrs\", \"-Z\", \"unstable-options\", \"--emit=invocation-specific\", \"--resource-suffix\", \"-20240414-1.79.0-nightly-0d8b3346a\", \"--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}/x86_64-unknown-linux-gnu\"" "-Zrustdoc-scrape-examples" "-j6" "--target" "x86_64-unknown-linux-gnu", kill_on_drop: false }`
[INFO] [stdout] e3336963d916b548052ac6f1a1d62d3bf156a79f7e76678428faa36e3474260b
[INFO] [stderr] WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap.
[INFO] running `Command { std: "docker" "start" "-a" "e3336963d916b548052ac6f1a1d62d3bf156a79f7e76678428faa36e3474260b", 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.3 (/opt/rustwide/workdir)
[INFO] [stderr]     Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.46s
[INFO] [stderr]    Generated /opt/rustwide/target/x86_64-unknown-linux-gnu/doc/safetensors/index.html
[INFO] running `Command { std: "docker" "inspect" "e3336963d916b548052ac6f1a1d62d3bf156a79f7e76678428faa36e3474260b", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "rm" "-f" "e3336963d916b548052ac6f1a1d62d3bf156a79f7e76678428faa36e3474260b", kill_on_drop: false }`
[INFO] [stdout] e3336963d916b548052ac6f1a1d62d3bf156a79f7e76678428faa36e3474260b