Post

FerriteS100: A High-Performance S-100/S-101 ENC Viewer Written in Rust

Introducing FerriteS100 — a GPU-accelerated electronic navigational chart viewer built with Rust, wgpu, and Lua portrayal engine.

FerriteS100: A High-Performance S-100/S-101 ENC Viewer Written in Rust

FerriteS100 Icon

FerriteS100 is a high-performance application for parsing and rendering IHO S-100/S-101 Electronic Navigational Charts (ENC), written entirely in Rust.

The project leverages modern GPU rendering via wgpu and follows the S-100 portrayal model using sandboxed Lua scripts. It supports Vulkan, DirectX 12, and Metal backends for cross-platform GPU acceleration.


Screenshot

FerriteS100 Screenshot S-101 Electronic Navigational Chart rendered with FerriteS100, featuring the S-421 Route Planner plugin


Features

CategoryDescription
Chart ParsingFull ISO 8211 binary format parsing for S-101 ENC files (.000)
Memory-Mapped I/OZero-copy file loading using OS page cache
Dynamic CataloguesRuntime loading of Feature & Portrayal Catalogues from XML
Lua PortrayalStandard-compliant portrayal using official S-100 Lua scripts
GPU RenderingHardware-accelerated rendering with wgpu (Vulkan/DX12/Metal)
Multi-cell SupportLoad and display multiple chart cells simultaneously
Symbol RenderingSVG-based symbol rendering with color profile support
Plugin SystemExtensible architecture with ABI-stable plugin support

Interactive Features

  • Pan & Zoom — Smooth navigation with mouse/trackpad
  • Feature Inspector — Click any feature to view detailed attributes
  • Real-time Coordinates — Live latitude/longitude display
  • Screenshot Export — Save rendered charts as PNG

Plugin System

FerriteS100 supports extensible plugins loaded as dynamic libraries with full security verification:

  • ABI-stable interface via abi_stable
  • Ed25519 signature verification for plugin DLLs
  • SHA-256 hash integrity checks
  • Sandboxed host API access

Included Plugin: S-421 Route Planner — Add waypoints, calculate distances (Haversine), and export/import routes in standard S-421 GML format.


Security

The application implements a sandboxed Lua environment:

ProtectionDescription
Safe Libraries OnlyOnly base, string, table, math loaded
No File System Accessloadfile, dofile disabled
No C Modulespackage.loadlib and C searchers disabled
Restricted SearchOnly Portrayal Catalogue directory is searchable

This design mitigates potential security risks from malicious Portrayal Catalogue scripts (CWE-829, CWE-749).


Architecture

1
2
3
4
5
6
7
8
9
10
11
12
13
FerriteS100/
├── crates/
│   ├── ferrite-iso8211/           # ISO 8211 binary format parser
│   ├── ferrite-s100-core/         # S-100 core data structures
│   ├── ferrite-feature-catalog/   # Feature Catalogue XML parser
│   ├── ferrite-portrayal-catalog/  # Portrayal Catalogue XML parser
│   ├── ferrite-lua/               # Lua portrayal engine (sandboxed)
│   ├── ferrite-render/            # Abstract rendering instructions
│   ├── ferrite-wgpu/              # GPU renderer
│   ├── ferrite-plugin-api/        # Plugin API (ABI-stable traits)
│   └── ferrite-plugin-loader/     # Plugin DLL loader & verifier
└── plugins/
    └── route-plugin/              # S-421 Route Planner plugin

Key Design Principles

  1. No Hardcoding — Feature and Portrayal catalogues are loaded dynamically at runtime
  2. Standard Compliance — Lua portrayal rules follow IHO international standards
  3. S-100 Specification — Implementation follows IHO S-100/S-101 specifications

Tech Stack

CategoryTechnologies
LanguageRust 1.70+
GPUwgpu (Vulkan / DX12 / Metal)
GUIegui, winit
Parsingnom (ISO 8211), quick-xml (FC/PC)
Scriptingmlua (Lua 5.4, sandboxed)
Parallelismrayon
Securityed25519-dalek, sha2

License

FerriteS100 is licensed under the PolyForm Noncommercial License 1.0.0.

UsageAllowed
Research / AcademicYes
Personal / Non-profitYes
ModificationYes (with attribution)
Commercial / EnterpriseNo (separate license required)
This post is licensed under CC BY 4.0 by the author.