Skip to content

Conversation

@wingo
Copy link
Collaborator

@wingo wingo commented Sep 15, 2025

No description provided.

@wingo wingo force-pushed the filesystem-flags-and-type branch from 5646b22 to 462f43f Compare September 16, 2025 07:14
@wingo wingo force-pushed the filesystem-flags-and-type branch 2 times, most recently from 5cb924f to 298070d Compare September 16, 2025 07:39
@wingo wingo marked this pull request as ready for review September 16, 2025 07:42
@wingo
Copy link
Collaborator Author

wingo commented Sep 16, 2025

Hi, I have 20 or so tests that are of this general form, so if it works for y'all @pchickey and @alexcrichton would you mind taking a look that there's nothing in this PR that you wouldn't want repeated 20 times ? All the branches share the commit that adds a fs-tests.dir/ path.

Copy link
Collaborator

@alexcrichton alexcrichton left a comment

Choose a reason for hiding this comment

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

Looks reasonable to me!

Copy link
Contributor

@pchickey pchickey left a comment

Choose a reason for hiding this comment

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

Only one suggestion from me, maybe you already thought of this and there is a good reason it doesn't work.

"wasi:cli/[email protected]#run",
],
generate_all
});
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we use wit-bindgen somewhere common (e.g. src/lib.rs) rather than having invocations in each test? That will make it easier to update version numbers, and also hopefully save compile time.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I looked into this and it got very annoying 😅

  • If the mod is in src/lib like in wasmtime's test-programs then I have to have the package name at all the use sites; annoying
  • The macrology needed to support multiple worlds is a bit annoying
  • In general I was hoping for short & sweet & minimal wit_bindgen worlds in each test; if we got it down to a couple lines, I think that would be a nice happy medium

All that said, I am sympathetic to the question of updating versions in umpteen places and of compile time. Let's revisit this. Happy to learn about tasteful ways to make things terse with Rust, I am still quite the newb!

@wingo wingo force-pushed the filesystem-flags-and-type branch from 298070d to a9bb5a4 Compare September 22, 2025 09:45
@wingo wingo changed the title wasi:[email protected]: Add tests for flags/type APIs wasi:[email protected]: Add tests for flags/type APIs Sep 22, 2025
@wingo wingo merged commit 4cf6b4f into WebAssembly:main Sep 22, 2025
14 checks passed
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.

3 participants