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

feat(wash-lib): support other build languages #1295

Merged
merged 1 commit into from
Jan 11, 2024

Conversation

brooksmtownsend
Copy link
Member

@brooksmtownsend brooksmtownsend commented Jan 9, 2024

Feature or Problem

This PR allows wash to support other languages than Rust or TinyGo by using the build_command and build_artifact information from wasmcloud.toml. The proper usage of these fields is to supply a build command that wash can execute for you, and then the build artifact should be the path to the built Wasm component so wash can then load it to sign the component. For example, a Javascript component will be compilable by wash if you use a wasmcloud.toml like so:

name = "componentize"
language = "javascript"
version = "0.1.0"
type = "actor"

[actor]
claims = []
build_command = "node componentize.mjs"
build_artifact = "hello.component.wasm"
destination = "hello_s.component.wasm"

I left the language as a completely open String, so users could supply any language other than rust or go if that's what they are using.

Related Issues

Release Information

Patch bump in wash-lib and wash-cli, so whenever we release the next version

Consumer Impact

Testing

Unit Test(s)

Acceptance or Integration

Manual Verification

This worked for my componentize-js demo!

@brooksmtownsend brooksmtownsend requested a review from a team as a code owner January 9, 2024 22:28
@brooksmtownsend brooksmtownsend changed the title feat(wash-cli): support other build languages feat(wash-lib): support other build languages Jan 9, 2024
Copy link
Contributor

@vados-cosmonic vados-cosmonic left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

crates/wash-lib/src/build.rs Show resolved Hide resolved
crates/wash-cli/README.md Outdated Show resolved Hide resolved
Signed-off-by: Brooks Townsend <brooksmtownsend@gmail.com>

PR suggestion

Signed-off-by: Brooks Townsend <brooksmtownsend@gmail.com>
@brooksmtownsend brooksmtownsend enabled auto-merge (rebase) January 10, 2024 21:02
@brooksmtownsend brooksmtownsend merged commit 5dac7af into main Jan 11, 2024
37 checks passed
@brooksmtownsend brooksmtownsend deleted the feat/support-other-language branch January 11, 2024 11:02
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.

None yet

2 participants