Skip to content

eryx-precompile compile: auto-download runtime.wasm when input omitted #166

Description

@sd2k

Summary

eryx-precompile compile currently requires an explicit runtime.wasm path as a positional argument. For the common case where you just want to customize compilation options (e.g. --target x86-64-v3, --preinit, --package), it would be nice to omit the input and have it auto-download the matching runtime.wasm from GitHub Releases — the same way setup does.

Example

# Currently required:
eryx-precompile compile runtime.wasm -o runtime.cwasm --preinit --stdlib ./python-stdlib --target x86-64-v3

# Proposed: omit input, auto-downloads runtime.wasm
eryx-precompile compile -o runtime.cwasm --preinit --stdlib ./python-stdlib --target x86-64-v3

Suggested behavior

  • If no positional input argument is provided, download runtime.wasm from the GitHub Release matching the binary's version (reusing the download_runtime_wasm logic from setup)
  • Cache the downloaded wasm in ~/.cache/eryx/ to avoid re-downloading
  • If input is provided, use it as-is (current behavior, no change)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions