-
Notifications
You must be signed in to change notification settings - Fork 213
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
Migrate the rust_xcrate
test to wit-bindgen test
#1236
Migrate the rust_xcrate
test to wit-bindgen test
#1236
Conversation
@@ -0,0 +1,75 @@ | |||
//@ tests = ['intermediate', 'leaf'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this mean runner
is run with both intermediate
and leaf
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question, and mostly points to this being a bad name. I've renamed this to dependencies
which should make it more clear that these are dependencies of the runner
component, not separate and individual tests. The sum total of all three components are what makes a single test.
This was a tricky test to migrate. Doing this required implementing a number of new features: * Rust now has a `[lang]`-specific configuration `externs = [...]` which is a list of files to compile as external crates. This tests the cross-crate behavior of the test. * Tests now support more than just runner/test composed components, now they also support multiple components being composed. This is required because the test was specifically testing behavior where a component simultaneously imports and exports. This last point was particularly tricky. Namely this required abstracting the definition of a test to a runner plus a list of tests, not just one test. These are still modeled as a list of `world` items in the original WIT document. Additionally I was having trouble getting `wasm-compose` working so I ended up switching to `wac`. This means that tests can now support custom `wac` composition scripts to configure how exactly the composition is created, and that's used in this new test to insert a component as a sandwich between two others.
373efc8
to
ff0ad4d
Compare
This was a tricky test to migrate. Doing this required implementing a number of new features:
[lang]
-specific configurationexterns = [...]
which is a list of files to compile as external crates. This tests the cross-crate behavior of the test.This last point was particularly tricky. Namely this required abstracting the definition of a test to a runner plus a list of tests, not just one test. These are still modeled as a list of
world
items in the original WIT document. Additionally I was having trouble gettingwasm-compose
working so I ended up switching towac
. This means that tests can now support customwac
composition scripts to configure how exactly the composition is created, and that's used in this new test to insert a component as a sandwich between two others.