las-rs
A high-performance LAS file parser and writer, written in Rust with first-class Python bindings.
Reads and writes LAS 1.2, 2.0, and 3.0 well log files. Designed as a fast, drop-in alternative to lasio.
Available both as a Rust crate (las_rs on crates.io — pure Rust, no Python dependency) and as a Python package (las-rs on PyPI).
Installation
Python:
Prebuilt wheels are available for Python 3.10 -- 3.13 on Linux (x86_64), macOS (ARM), and Windows (x64).
Rust:
The crate is pure Rust by default — no PyO3 or numpy in your dependency tree.
Quick start
# Read a LAS file
=
# Access header metadata
# Well name
# Start depth
# "M", "FT", etc.
# Access curve data (numpy arrays)
=
=
# Iterate curves
# Convert to pandas DataFrame
=
Reading options
=
read() accepts a file path, a pathlib.Path, a string containing LAS content, or any file-like object with a .read() method.
Working with curves
# Add a curve
# Update a curve
# Delete a curve
# Stack selected curves into a 2D array
=
# Get full curve metadata
=
Writing and export
# Write LAS file
# Export to CSV
# JSON
=
Depth conversion
= # Index converted to meters
= # Index converted to feet
Rust
The same engine is usable directly from Rust, without the Python layer:
use ;
// Read a file from disk (encoding auto-detected).
let las = read_file?;
// Header metadata.
println!;
println!;
// Curve data — NULLs are represented as f64::NAN.
for name in las.curve_mnemonics
// Access the index (first) curve and a named curve.
let depth = las.index.unwrap_or;
if let Some = las.curve_data
// Parse from an in-memory string, with custom options.
let opts = ReadOptions ;
let las2 = parse_with?;
// Write back out.
las.write_file?;
let text: String = las.to_las_string?;
# let _ = ;
Ok::
Full API docs: docs.rs/las_rs.