Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a package.metadata.component.proxy setting. #221

Merged
merged 1 commit into from
Jan 26, 2024

Conversation

peterhuene
Copy link
Member

@peterhuene peterhuene commented Jan 26, 2024

This PR adds a package.metadata.component.proxy setting to Cargo.toml that controls whether or not to use the wasi:http/proxy specific adapter.

This option can be set when creating a project with cargo component new --lib --proxy.

The wasi:http/proxy adapter is now built-in to cargo-component; it adapts from preview1 in a way that ensures the resulting component conforms to the wasi:http/proxy world.

Additionally, the --command option has been renamed to --bin, with an alias for --command for backwards compatibility.

This commit adds a `package.metadata.component.proxy` setting to `Cargo.toml`
that controls whether or not to use the `wasi:http/proxy` specific adapter.

This option can be set when creating a project with `cargo component new --lib
--proxy`.

The `wasi:http/proxy` adapter is now built-in to `cargo-component`; it adapters
from preview1 in a way that ensures the resulting component conforms to the
`wasi:http/proxy` world.

Additionally, the `--command` option has been renamed to `--bin`, with an alias
for `--command` for backwards compatibility.
Copy link
Member

@sunfishcode sunfishcode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, I like the --proxy argument to cargo component new that sets this variable automatically.

@peterhuene peterhuene merged commit c2f294d into bytecodealliance:main Jan 26, 2024
6 checks passed
@peterhuene peterhuene deleted the proxy branch January 26, 2024 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants