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 square wasi without gitignore #26

Merged
merged 6 commits into from
Sep 30, 2024
Merged

Conversation

calvinrp
Copy link
Collaborator

@calvinrp calvinrp commented Sep 27, 2024

This is a branch off of #23 that can replace that PR.

Closes #16

The instructions to configure your local setup and build the component will get simpler before the hackathon. You shouldn't need to manually edit a file, it will be a CLI command or something configurable in a local toml file (Cargo.toml or another file).

Copy link
Contributor

@ethanfrey ethanfrey left a comment

Choose a reason for hiding this comment

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

Going to merge this now as it is a big step forward.
I think there is more to do here for DevX.

One small comment (for you) is that if we commit bindings.rs and it causes cargo fmt issues, this is a bit annoying. When does it get rebuilt?

Is it possible to add a rustfmt.toml file such that bindings.rs would be correctly formatted? (I am not too particular on formating styles.. just odd that auto-gen fails on cargo fmt and nice if this "just works")

cargo binstall cargo-component
```

The configuration for registry mappings is in the process of getting better,
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for these docs, I never would have figured it out on my own.

| macOS | `/Users/<username>/Library/Application Support` |
| Windows | `C:\Users\<username>\AppData\Roaming` |

The configuration file is TOML and currently must be edited manually. A future release will include
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to use wkg somehow? Or does this happen automatically?

Can you document the process to updating the wit files (which I assume is what wkg is doing)? Or explain how it relates to the toolchain

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

cargo-component shares the wkg config. Installing wkg is optional for this workflow. This is all very new. Days old and actively being improved.

Yep, I will document. Put in Wasmatic repo?

@ethanfrey ethanfrey merged commit 3cc0393 into main Sep 30, 2024
2 checks passed
@ethanfrey ethanfrey deleted the add-square-wasi-without-gitignore branch September 30, 2024 10:31
@calvinrp
Copy link
Collaborator Author

One small comment (for you) is that if we commit bindings.rs and it causes cargo fmt issues, this is a bit annoying. When does it get rebuilt?

It gets rebuilt with the cargo component build and cargo component publish commands. Not with the standard cargo build etc commands.

Is it possible to add a rustfmt.toml file such that bindings.rs would be correctly formatted? (I am not too particular on formating styles.. just odd that auto-gen fails on cargo fmt and nice if this "just works")

Created an issue in cargo component.

@calvinrp
Copy link
Collaborator Author

calvinrp commented Sep 30, 2024

Going to merge this now as it is a big step forward. I think there is more to do here for DevX.

💯 Agree that the DX needs a lot more work. But fixable and can improve incrementally every day. Expect to be in a better place before the end of this week.

@ethanfrey ethanfrey mentioned this pull request Sep 30, 2024
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.

Add square WASI component as example
2 participants