Crate morsewave

Crate morsewave 

Source
Expand description

§MorseWave

A high-performance Morse code encoder/decoder library built with Rust and WebAssembly.

MorseWave provides blazing-fast Morse code encoding and decoding capabilities, along with real-time audio playback using the Web Audio API.

§Features

  • Fast Encoding/Decoding: Convert text to Morse code and back in <1ms
  • Audio Playback: Real-time Morse code audio synthesis
  • WebAssembly Support: Compile to WASM for browser usage
  • Full Character Set: Supports letters, numbers, and punctuation

§Example

use morsewave::MorseWave;

let morse = MorseWave::new();
let encoded = morse.text_to_morse("HELLO");
assert_eq!(encoded, ".... . .-.. .-.. ---");

let decoded = morse.morse_to_text(".... . .-.. .-.. ---");
assert_eq!(decoded, "HELLO");

Structs§

AudioPlayer
Web Audio API-based Morse code audio player.
MorseCodec
Core Morse code encoder and decoder.
MorseMessage
Represents a Morse code message with its text, encoded form, and timestamp.
MorseWave
WebAssembly-compatible Morse code interface.