2 desc "Universal WebAssembly Runtime"
3 homepage "https://wasmer.io"
4 url "https://github.com/wasmerio/wasmer/archive/refs/tags/v5.0.4.tar.gz"
5 sha256 "e6f0df11dd4647fa3d9177ed298a6e3afd2b5be6ea4494c00c2074c90681ad27"
7 head "https://github.com/wasmerio/wasmer.git", branch: "master"
11 sha256 cellar: :any_skip_relocation, arm64_sequoia: "125ceff044fe590c81adf25dd1cd04d472b5649e8e54cbe122bca65579e9bbee"
12 sha256 cellar: :any_skip_relocation, arm64_sonoma: "e7323f35dd94c282210b5ea295257a7b6c1fc318f0dafd6ae4dea582b2ed8f62"
13 sha256 cellar: :any_skip_relocation, arm64_ventura: "6bf51106be2fdb78fd06b11268fd10269c3dfe1c7fc1c67c84f84b195e3f7ead"
14 sha256 cellar: :any_skip_relocation, sonoma: "502738bb88139da09da3a9065cd1a2077abc8d2a538a6a023f0072882a5fd0fb"
15 sha256 cellar: :any_skip_relocation, ventura: "59019f8fd8d6e571cf0b2db906d773ca12904213150222508767c2ac554c646d"
16 sha256 cellar: :any_skip_relocation, x86_64_linux: "10eb158e7950f7de195258ec2a41abc6d2f8dce12c0bd1050917328adb34623e"
19 depends_on "cmake" => :build
20 depends_on "rust" => :build
21 depends_on "wabt" => :build
24 depends_on "pkgconf" => :build
25 depends_on "libxkbcommon"
29 system "cargo", "install", "--features", "cranelift", *std_cargo_args(path: "lib/cli")
31 generate_completions_from_executable(bin/"wasmer", "gen-completions")
35 wasm = ["0061736d0100000001070160027f7f017f030201000707010373756d00000a09010700200020016a0b"].pack("H*")
36 (testpath/"sum.wasm").write(wasm)
38 shell_output("#{bin}/wasmer run #{testpath/"sum.wasm"} --invoke sum 1 2")