You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 7, 2024. It is now read-only.
The wasmer.toml format doesn't give package developers a way to specify the entrypoint command, so code turning it into a webc manifest has to guess:
/// Infer the package's entrypoint.////// there is no way to explicitly specify an entrypoint in a/// `wasmer.toml` file. If there is exactly one command, we'll use that,/// otherwise the entrypoint will be left unspecified.fnentrypoint(manifest:&WasmerManifest) -> Option<String>{match manifest.command.as_deref(){Some([only_command]) => Some(only_command.get_name()),
_ => None,}}
We should allow package developers to specify the entrypoint so downstream users don't need to do wasmer run my/package --command=some-command every time.
Possible Syntax
Given a package with multiple commands, there are a couple different ways the entrypoint could be specified.
Option 1 - put it in [package]
[package]
name = "sharrattj/bash"version = "1.2.3"entrypoint = "bash"
[[module]]
name = "bash"source = "./bash.wasm"abi = "wasi"
[[command]]
name = "bash"module = "bash"
[[command]]
name = "sh"module = "bash"
Option 2 - put it in the command
[package]
name = "sharrattj/bash"version = "1.2.3"
[[module]]
name = "bash"source = "./bash.wasm"abi = "wasi"
[[command]]
name = "bash"module = "bash"entrypoint = true
[[command]]
name = "sh"module = "bash"
Option 3 - create a separate section
[package]
name = "sharrattj/bash"version = "1.2.3"
[[module]]
name = "bash"source = "./bash.wasm"abi = "wasi"
[[command]]
name = "bash"module = "bash"
[[command]]
name = "sh"module = "bash"
[defaults]
entrypoint = "bash"
The text was updated successfully, but these errors were encountered:
Option 1: simplest and it does the job
Option 2: we would need to do extra checks to make sure there's only one command with entrypoint = True
Option 3: it's more cumbersome that option 1
The
wasmer.toml
format doesn't give package developers a way to specify the entrypoint command, so code turning it into awebc
manifest has to guess:We should allow package developers to specify the entrypoint so downstream users don't need to do
wasmer run my/package --command=some-command
every time.Possible Syntax
Given a package with multiple commands, there are a couple different ways the
entrypoint
could be specified.Option 1 - put it in
[package]
Option 2 - put it in the command
Option 3 - create a separate section
The text was updated successfully, but these errors were encountered: