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 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
S-101 Electronic Navigational Chart rendered with FerriteS100, featuring the S-421 Route Planner plugin
Features
| Category | Description |
|---|---|
| Chart Parsing | Full ISO 8211 binary format parsing for S-101 ENC files (.000) |
| Memory-Mapped I/O | Zero-copy file loading using OS page cache |
| Dynamic Catalogues | Runtime loading of Feature & Portrayal Catalogues from XML |
| Lua Portrayal | Standard-compliant portrayal using official S-100 Lua scripts |
| GPU Rendering | Hardware-accelerated rendering with wgpu (Vulkan/DX12/Metal) |
| Multi-cell Support | Load and display multiple chart cells simultaneously |
| Symbol Rendering | SVG-based symbol rendering with color profile support |
| Plugin System | Extensible 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:
| Protection | Description |
|---|---|
| Safe Libraries Only | Only base, string, table, math loaded |
| No File System Access | loadfile, dofile disabled |
| No C Modules | package.loadlib and C searchers disabled |
| Restricted Search | Only 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
- No Hardcoding — Feature and Portrayal catalogues are loaded dynamically at runtime
- Standard Compliance — Lua portrayal rules follow IHO international standards
- S-100 Specification — Implementation follows IHO S-100/S-101 specifications
Tech Stack
| Category | Technologies |
|---|---|
| Language | Rust 1.70+ |
| GPU | wgpu (Vulkan / DX12 / Metal) |
| GUI | egui, winit |
| Parsing | nom (ISO 8211), quick-xml (FC/PC) |
| Scripting | mlua (Lua 5.4, sandboxed) |
| Parallelism | rayon |
| Security | ed25519-dalek, sha2 |
License
FerriteS100 is licensed under the PolyForm Noncommercial License 1.0.0.
| Usage | Allowed |
|---|---|
| Research / Academic | Yes |
| Personal / Non-profit | Yes |
| Modification | Yes (with attribution) |
| Commercial / Enterprise | No (separate license required) |