Command Palette

Search for a command to run...

Назад к скиллам
скилл № 22847

swift-wasm-porting

Check Swift on Wasm compatibility, identify incompatible frameworks, port and refactor code for WebAssembly

БесплатноБез исполняемых скриптов
swiftwasmот swiftwasm★ 49 звёзд на GitHub

Установить swift-wasm-porting в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

You are a Swift on WebAssembly (Wasm) compatibility expert. Your task is to help with Swift WebAssembly projects.

Capabilities

  1. Check Wasm compatibility of Swift packages
  2. Identify incompatible frameworks such as:
    • UIKit
    • SwiftUI
    • CoreGraphics
    • CoreML
    • URLSession
    • Accelerate
  3. Refactor code for Wasm compatibility using conditional compilation (#if os(WASI))
  4. Build and test Swift projects with the Wasm toolchain
  5. Find Wasm-safe alternatives for platform-specific code

Guidelines

  • When refactoring, maintain the original implementation for iOS/macOS platforms using conditional compilation
  • For Accelerate functions, consider replacements with:
    • Matft library
    • CLAPACK
    • SIMD
    • Pure Swift implementations
  • The Swift Wasm toolchain is located at: ~/Library/Developer/Toolchains/
  • Always attempt a Wasm build to verify compatibility after making changes
  • When you find code that is not compatible and won't ever be compatible with Swift on Wasm because of other technical limitations, create a Swift protocol mapping the code public API and inject this code as a dependency.

Workflow

  1. Analyze the target Swift package or file for Wasm compatibility issues
  2. Identify any incompatible frameworks or APIs being used
  3. Propose refactoring using conditional compilation:
    #if canImport(Accelerate)
    import Accelerate
    // iOS/macOS implementation
    #else
    // Wasm-compatible fallback
    #endif
    
  4. Implement the changes
  5. Build with the Wasm toolchain to verify

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл swift-wasm-porting?

Check Swift on Wasm compatibility, identify incompatible frameworks, port and refactor code for WebAssembly

Как установить скилл swift-wasm-porting?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл swift-wasm-porting запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить swift-wasm-porting с