Skip to main content

Crate iso8583_core

Crate iso8583_core 

Source
Expand description

§iso8583-core

Production-ready ISO 8583 message parsing and generation library.

§Features

  • Zero Allocation: Static const tables, no runtime overhead
  • SIMD Optimized: Accelerated bitmap operations on x86_64 and aarch64
  • no_std Compatible: Works in embedded environments
  • Type Safe: Compile-time field validation
  • High Performance: Optimized for financial systems

§Quick Start

use iso8583_core::*;

// Build a message
let message = ISO8583Message::builder()
    .mti(MessageType::AUTHORIZATION_REQUEST)
    .field(Field::PrimaryAccountNumber, "4111111111111111")
    .field(Field::ProcessingCode, "000000")
    .field(Field::TransactionAmount, "000000010000")
    .field(Field::SystemTraceAuditNumber, "123456")
    .field(Field::LocalTransactionTime, "120000")
    .field(Field::LocalTransactionDate, "0219")
    .build()?;

// Generate bytes
let bytes = message.to_bytes();

// Parse bytes
let parsed = ISO8583Message::from_bytes(&bytes)?;

§Architecture

This library uses several advanced techniques for production performance:

  1. Static Specification Tables: Field definitions stored in const arrays
  2. Zero-Copy Parsing: Borrows from input buffers where possible
  3. SIMD Bitmap Operations: Vectorized field presence checking
  4. Compile-Time Validation: Type system enforces correctness

§Feature Flags

  • std (default): Standard library support
  • alloc: Heap allocation (Vec, String)
  • simd: SIMD-accelerated bitmap operations
  • serde: JSON serialization support

Re-exports§

pub use bitmap_simd as bitmap;alloc
pub use fields::IsoField;
pub use spec::DataType;
pub use spec::FieldDefinition;
pub use spec::Iso1987;
pub use spec::IsoSpec;
pub use spec::LengthType;
pub use bitmap::Bitmap;alloc
pub use error::ISO8583Error;std
pub use error::Result;std
pub use mti::MessageClass;std
pub use mti::MessageFunction;std
pub use mti::MessageOrigin;std
pub use mti::MessageType;std
pub use message::ISO8583Message;std
pub use message::MessageBuilder;std
pub use response_code::ResponseCategory;std
pub use response_code::ResponseCode;std
pub use processing_code::AccountType;std
pub use processing_code::ProcessingCode;std
pub use processing_code::TransactionType;std
pub use validation::Validator;std
pub use crate::field::Field;std

Modules§

bitmap_simdalloc
SIMD-Optimized Bitmap Operations
encodingstd
Encoding and decoding utilities for ISO 8583 messages
errorstd
Error types for ISO 8583 message processing
fieldstd
ISO 8583 Field Definitions
fields
Type-Safe Field Generation System
messagestd
ISO 8583 Message structure and operations
mtistd
Message Type Indicator (MTI) definitions and parsing
processing_codestd
ISO 8583 Processing Codes
response_codestd
ISO 8583 Response Codes
spec
ISO 8583 Field Specifications - Zero-Allocation Static Tables
utilsstd
Utility functions for common ISO 8583 operations
validationstd
Validation utilities for ISO 8583 messages and fields

Macros§

define_field
Macro to define a type-safe ISO 8583 field
define_numeric_field
Macro to define a fixed-length numeric field with compile-time size checking