v1.4.0 - WebAssembly Support & Interactive Demo
Pre-release
Pre-release
IPv6 Parse v1.4.0 - WebAssembly Support
π Major new feature: Full WebAssembly support with interactive web demo!
π Live Demo
Try it now: https://jrepp.github.io/ipv6-parse/
β¨ What's New
WebAssembly Build Target
- Complete WASM compilation with Emscripten
- Clean, idiomatic JavaScript API wrapper
- TypeScript definitions included
- Diagnostic output support for detailed error reporting
- Zero dependencies in browser
Interactive Web Demo
- Modern, beautiful UI with animated gradients and glass morphism
- Single address mode with instant parsing and validation
- Batch mode for testing multiple addresses at once
- Load Test Set button with 60+ comprehensive test addresses
- Detailed diagnostic error messages with visual position indicators
- Real-time parsing with example addresses
- Responsive design for mobile and desktop
Enhanced Features
- Full diagnostic support in WASM showing exact error positions
- Comprehensive test coverage with 49 passing tests
- Cross-platform build support (Windows, macOS, Linux)
- Improved error messages ("Invalid address" instead of "Invalid input")
Developer Experience
- Clean JavaScript API:
new IPv6Parser(module).parse(address) - TypeScript support with full type definitions
- ESLint and ShellCheck passing
- Comprehensive documentation in docs/README.md
- Example usage patterns included
π¦ What's Included
- WASM Module: Compiled parser optimized for web browsers
- JavaScript API: Clean wrapper around WASM primitives
- TypeScript Definitions: Full type safety
- Interactive Demo: Beautiful web interface at docs/index.html
- Test Suite: 60+ test addresses covering all formats
π§ͺ Supported Address Formats
- Basic IPv6:
2001:db8::1,::1,ffff::1 - IPv4 embedded:
::ffff:192.0.2.1 - CIDR notation:
2001:db8::/32,::1/128 - Port numbers:
[::1]:8080,[2001:db8::1]:443 - Zone IDs:
fe80::1%eth0,fe80::1%lo0 - IPv4 formats:
192.168.1.1,127.0.0.1:8080 - IPv4 shorthand:
1.2.3.4,1.2.3,1.2,1 - Complex combinations of all above
π Quick Start
In Browser
<script src="https://jrepp.github.io/ipv6-parse/ipv6-parse.js"></script>
<script src="https://jrepp.github.io/ipv6-parse/ipv6-parse-api.js"></script>
<script>
createIPv6Module().then(wasmModule => {
const parser = new IPv6Parser(wasmModule);
const addr = parser.parse('2001:db8::1');
console.log('Formatted:', addr.formatted);
console.log('Components:', addr.components);
});
</script>Try the Demo
Visit https://jrepp.github.io/ipv6-parse/ to test addresses interactively
π Full Changelog
Added
- WebAssembly build target with CMake and Emscripten
- Interactive web demo with modern CSS design
- Batch mode for testing multiple addresses
- Load Test Set button with comprehensive test suite
- Diagnostic output mode with error position indicators
- Visual error highlighting in web interface
- TypeScript definitions for JavaScript API
- Cross-platform timing support (Windows/Unix)
Improved
- Error messages: "Invalid address" (more user-friendly)
- Caret alignment in error diagnostics
- Shell script linting (shellcheck passing)
- Build artifact organization (all in build/ directories)
- Documentation with comprehensive examples
Fixed
- Windows build errors (sys/time.h β windows.h)
- Windows SDK header warnings
- WASM memory initialization
- Error position accuracy in diagnostics
- Monospace alignment for error indicators
π§ Technical Details
- WASM Binary Size: Optimized for web delivery
- Memory Management: Efficient with proper cleanup
- Browser Compatibility: Modern browsers with WASM support
- No Dependencies: Pure WASM + vanilla JavaScript
- Test Coverage: 49 passing tests across all modes
π Acknowledgments
Thanks to everyone who contributed to making this release possible!
Installation: See README.md for full installation instructions
Documentation: Visit docs/README.md for WASM API documentation
Issues: Report bugs at https://github.com/jrepp/ipv6-parse/issues