netcdf
Library Featured
High-level NetCDF bindings for Rust
- Downloads
- 22,481
- Dependents
- 29
- Stars
- 106
- Forks
- 30
- Contributors
- 18
- Commits
- 620
- Latest release
- 0.12.1 ·
About
Medium-level netCDF bindings for Rust, allowing easy reading and writing of array-like structures to a file.
netCDF can read and write hdf5 files, which is a commonly used file format in scientific computing.
Status
Supported:
- Variables
- Normal Dimensions
- Attributes
- Subgroups
- Open/Append/Create modes
- Reading from memory
- Unlimited dimensions
- User defined types, using the feature
derive(enum, compound, other types requires additional work)
Not (yet) supported (PRs welcome):
- Writing using memory-mapped file
All variable data is read into a contiguous buffer, or into an ndarray if the ndarray feature is activated.
Building
This crate depends on the C library netcdf-c which must be installed on the machine, along with libraries such as hdf5 which netcdf-c depends on. For some platforms you might have to set the environment variable NETCDF_DIR which needs to point at the installation of netcdf-c you wish to use.
An alternative to using the system libraries is to enable static feature of this crate (cargo add netcdf --features static), which compiles libnetcdf from source. The static feature requires cmake, a c++ compiler and more to be installed on the build machine.
Read the full README
The crate is built on several platforms using github actions, and is currently known to build form from source on all major platforms (linux, macos, windows (gnu+msvc)), and through the package installers conda and apt. Please see the github workflows for tips on how to install netcdf.
Building libnetcdf statically
git clone https://github.com/georust/netcdfgit submodule update --init --recursivecargo build --features static
Documentation
Some examples of usage can be found in the tests/lib.rs file. The documentation can also be generated using cargo doc.
Thread safety
The netcdf crate is thread-safe, although the netcdf-c library is not itself threadsafe. To render a safe interface, a global mutex is used to serialize access to the underlying library. Consider using a non threadsafe version of hdf5 to avoid double locking (performance consideration).
Use of netcdf-sys is not thread-safe. Users of this library must take care that calls do not interfere with simultaneous use of e.g. netcdf or hdf5-sys. Use the lock provided by netcdf-sys to serialise access to the hdf5 and netCDF libraries.
License
Licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Compatibility
- Runs on
- GPU support unknown
What shows it
- no dependency or feature matches a backend row
- Native code
- Required
- Binds native code: netcdf-sys, hdf5-metno-sys, libz-sys, mpi-sys (feature mpi)
- Python bindings
- No Python binding crate found
- License
- Apache-2.0 OR MIT
Compare with similar projects
Order: strongest tier first, then most downloads, then name, with unmeasured values last. A library counts downloads over 30 days. An app counts binary downloads per release. An app with none counts its crate downloads over 30 days. ML Rust runs this catalogue, so its closest project always gets a row.
| Project | Downloads | Dependents | Stars | Latest release | Runs on (GPU) | Native code | License |
|---|---|---|---|---|---|---|---|
|
High-level NetCDF bindings for Rust |
22,481 downloads over 30 days | 29 | 106 | 0.12.1 | GPU support unknown | Binds native code: netcdf-sys, hdf5-metno-sys, libz-sys, mpi-sys (feature mpi) | Apache-2.0 OR MIT |
|
arrow-rs Featured
Rust implementation of Apache Arrow Python bindings |
10,746,755 downloads over 30 days | 2,126 | 3,664 | 60.1.0 | GPU support unknown | Binds native code: ring (feature encryption), liblzma-sys (feature default), zstd-sys (feature default) | Apache-2.0 |
|
lance Featured
A columnar data format that is 100x faster than Parquet for random access. |
915,526 downloads over 30 days | 48 | 7,268 | 14.0.2 | GPU support unknown | Binds native code: ring (feature credential-vendor-gcp), lz4-sys (feature lz4), zstd-sys (feature zstd). Build uses a native toolchain: cc | Apache-2.0 |
|
hdf5-rust Featured
Thread-safe Rust bindings for the HDF5 library. |
253,180 downloads over 30 days | 70 | 85 | 0.15.1 | GPU support unknown | Binds native code: hdf5-metno-sys, blosc-src (feature blosc), lzf-sys (feature lzf), mpi-sys (feature mpio), zfp-sys (feature zfp) | Apache-2.0 OR MIT |
|
dlpark Listed
Pure Rust DLPack implementation for zero-copy tensor interoperability Python bindings |
68,157 downloads over 30 days | 5 | 66 | 0.10.0 | CUDA | No native code found | Apache-2.0 |
|
netcdf-rust Listed
Pure-Rust NetCDF-3 classic and NetCDF-4 (HDF5-backed) file reader |
36,012 downloads over 30 days | 10 | 11 | 0.12.1 | GPU support unknown | No native code found | Apache-2.0 OR MIT |
|
Model conversion and quantization with no Python: reads SafeTensors, GGUF, TCF and PyTorch state dicts, writes SafeTensors, GGUF and TCF, and quantizes to Q2_K through Q8_0 and IQ4 formats, including Q4_K_M mixes. GPTQ, AWQ, NF4, FP8, EXL2 and ONNX input are not implemented. Python bindings |
23 downloads over 30 days | Not applicable | 0 | 0.2.1 | GPU support unknown | No native code found | Apache-2.0 |
Why FeaturedIt passes every Featured gate.
What it meets
- It has 18 active dependents and 16 new dependents in 365 days. Featured needs 11 active dependents or 9 new dependents in 365 days.
- Active dependents are at 100% of their peak. Featured needs at least 50%.
- Docs are present. The release commit or a manifest ties the crate to the repository.
- No vulnerability advisory stays unpatched past the grace window. At least one version is neither a prerelease nor 0.0.x.
- The last activity is on 19 Sep 2026, 51 days ago. The rules expect an update within 600 days. Dormancy rule
Exact rules: Featured library. The check on applied thresholds version 9.
Every rule outcome, as the check records it
expected-interval: version 0.12.1 base 300, doubled for 18 active users: E = 600 daysdormancy: last activity 2026-09-19, 51 days ago, E = 600: activefeatured: featured: active_users 18, new_adopters 16, former_glory 1
Measurements and sources
Each signal row shows the raw value, its source and the fetch date. The Sources list gathers every distinct source on this page. Movement needs more history.
Sources6 sources
- Description: the crates.io description
- crates.io database dump, fetched
- RustSec advisory database, fetched
- GitHub repository, fetched
- crates.io package, fetched
- GitHub contributors, fetched
Adoption18 active dependents, 16 new dependents in 365 days1 not measured
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Active dependents | 18 | crates.io database dump | Yes | |
| New dependents (365 days) | 16 | crates.io database dump | Yes | |
| Peak active dependents | 18 | crates.io database dump | Yes | |
| Active dependents as a share of the peak | 1 | crates.io database dump | Yes | |
| Binary downloads per release | Not measured | Yes |
MaintenanceLatest human commit: 51 days ago3 not measured
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Latest human commit | 2026-09-19 | GitHub repository | Yes | |
| Latest release | 2026-07-26 | crates.io database dump | Yes | |
| First release | 2015-06-27 | crates.io database dump | Yes | |
| Latest version | 0.12.1 | crates.io database dump | Yes | |
| Days the oldest outside issue waits for a reply | 0 | GitHub repository | Yes | |
| Maintainer replies over 365 days | 13 | GitHub repository | Yes | |
| Repository archived | false | GitHub repository | Yes | |
| Repository gone | false | GitHub repository | Yes | |
| Release commit or manifest in the repo | true | crates.io package | Yes | |
| Published docs | true | crates.io database dump | Yes | |
| Latest release fails cargo check | Not measured | Yes | ||
| Build check date | Not measured | Yes | ||
| Build check toolchain | Not measured | Yes |
SecurityUnpatched vulnerabilities: none
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Unpatched vulnerabilities past the grace window | none | RustSec advisory database | Yes | |
| RustSec unmaintained advisory | none | RustSec advisory database | Yes | |
| Deprecation notice | none | crates.io database dump | Yes | |
| Deprecated requirement | none | crates.io database dump | Yes |
Distribution31 releases, 22,481 downloads over 30 days5 not measured
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Releases | 31 | crates.io database dump | Yes | |
| Downloads over 30 days | 22481 | crates.io database dump | Yes | |
| Binary downloads over the last 3 releases | Not measured | Yes | ||
| Homebrew installs on request over 365 days | Not measured | Yes | ||
| Repology repository families | Not measured | Yes | ||
| Docker pull growth over 90 days | Not measured | Yes | ||
| Docker pulls at the growth baseline | Not measured | Yes | ||
| Every version a prerelease | false | crates.io database dump | Yes | |
| Every version 0.0.x | false | crates.io database dump | Yes | |
| Every version yanked | false | crates.io database dump | Yes | |
| Crate deleted from crates.io | false | crates.io database dump | Yes |
Repository106 stars, 30 forks, 18 contributors, 620 commits. Stars alone never qualify a project.
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| GitHub stars | 106 | GitHub repository | Yes — one part of the repository route | |
| GitHub forks | 30 | GitHub repository | Yes — one part of the repository route | |
| Contributors with a GitHub account | 18 | GitHub contributors | Yes — one part of the repository route | |
| Commits on the default branch | 620 | GitHub repository | No | |
| Repository's main crate left out of the entry | none | crates.io database dump | Yes |
Facts that never count
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| License | Apache-2.0 OR MIT | crates.io database dump | No | |
| Runs on, from listed crates and their direct dependencies | GPU support unknown | crates.io database dump | No | |
| What shows each backend | no dependency or feature matches a backend row | crates.io database dump | No | |
| Native code, from listed crates and their dependencies | Binds native code: netcdf-sys, hdf5-metno-sys, libz-sys, mpi-sys (feature mpi) | crates.io database dump | No | |
| Python bindings, from direct dependencies of listed crates | No Python binding crate found | crates.io database dump | No | |
| Crates that depend on a listed crate directly | 29 | crates.io database dump | No |
Corrections and review history
No correction applies to this entry.
Judgments
A judgment enters only through an approved issue and a merged pull request.
No judgment applies to this entry.