-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Move applications into separate crates #423
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
Conversation
Change the service and contract to be binaries instead of example targets. Requires marking them as not having `main` functions.
Now that the Counter application has been moved, the path where its binaries are placed in has changed, so the tests must be updated.
Change the service and contract to be binaries instead of example targets. Requires marking them as not having `main` functions. Also change how the modules are organized, with `interface` becoming a library target, and the `types` module only being accessed through the library.
Update the Crowd-Funding application to use the Fungible Token application crate directly.
Change the service and contract to be binaries instead of example targets. Requires marking them as not having `main` functions.
Update the crates necessary to build for running tests.
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.
Fantastic! Make sure to get all green in CI (see comment) and otherwise ship it!
@@ -2,15 +2,13 @@ | |||
// SPDX-License-Identifier: Apache-2.0 | |||
|
|||
#![cfg(target_arch = "wasm32")] |
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.
Apparently, in order to fix all the clippy errors in CI, one has to remove all the lines #![cfg(target_arch = "wasm32")]
in contract.rs
and service.rs
files.
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.
Actually this is more tricky than that. Ideally, the workspace would handle different targets but this is not supported yet: rust-lang/cargo#5220
Motivation
Some example applications have been written and placed in
linera-sdk/examples
. However, having the applications interact among themselves and writing test code outsidelinera-sdk
that interacts with the applications is hard because none of the necessary types are exported through a crate.Solution
Create a separate crate per application in a
linera-examples
sub-directory.