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

chore(cargo/sdk): prep for publishing spin-sdk crate #2151

Merged
merged 8 commits into from
Dec 13, 2023

Conversation

vdice
Copy link
Contributor

@vdice vdice commented Dec 8, 2023

Some updates in preparation for publishing the spin-sdk crate per https://doc.rust-lang.org/cargo/reference/publishing.html#before-publishing-a-new-crate

TODO:

Ref #316

@vdice
Copy link
Contributor Author

vdice commented Dec 11, 2023

Additions in advance of publishing the spin-macro crate in 2271d8a

Please feel free to suggest updates to the currently-minimal description and README for this crate.

Also, do we wish to keep this crate at a separate version cadence (currently 0.1.0) or do we want to align with Spin's (workspace) version?

@vdice vdice force-pushed the chore/spin-sdk-crate-prep branch from 87b4622 to 2271d8a Compare December 11, 2023 20:04
@vdice vdice requested review from fibonacci1729 and rylev December 11, 2023 20:10
@vdice
Copy link
Contributor Author

vdice commented Dec 12, 2023

(Pre-emptively bumped the spin-macro dep in spin-sdk to the to-be-published 0.1.0 version in d17ba1f; will re-run CI once published.)

@vdice
Copy link
Contributor Author

vdice commented Dec 12, 2023

The spin-macro crate is now published.

Alas, cargo publish --dry-run for the spin-sdk crate now results in errors re: the use of the relative path to the top-level wit directory:

error: failed to read file "/Users/vdice/go/src/github.com/fermyon/spin/target/package/spin-sdk-2.1.0-pre0/../../wit"

       Caused by:
           No such file or directory (os error 2)
  --> src/lib.rs:24:5
   |
24 | /     wit_bindgen::generate!({
25 | |         world: "platform",
26 | |         path: "../../wit",
27 | |     });
   | |______^
   |
   = note: this error originates in the macro `wit_bindgen::generate` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0433]: failed to resolve: could not find `wasi` in `wit`
 --> src/http/conversions.rs:5:17
  |
5 | use crate::wit::wasi::io::streams;
  |                 ^^^^ could not find `wasi` in `wit`

error[E0433]: failed to resolve: could not find `wasi` in `wit`
  --> src/http.rs:15:17
   |
15 | use super::wit::wasi::http::types;
   |                 ^^^^ could not find `wasi` in `wit`

error[E0433]: failed to resolve: could not find `wasi` in `wit`
  --> src/http.rs:16:17
   |
16 | use crate::wit::wasi::io::streams;
   |                 ^^^^ could not find `wasi` in `wit`
   ...

Signed-off-by: Vaughn Dice <vaughn.dice@fermyon.com>
Signed-off-by: Vaughn Dice <vaughn.dice@fermyon.com>
…ml, add README

Signed-off-by: Vaughn Dice <vaughn.dice@fermyon.com>
Signed-off-by: Vaughn Dice <vaughn.dice@fermyon.com>
Signed-off-by: Vaughn Dice <vaughn.dice@fermyon.com>
Signed-off-by: Vaughn Dice <vaughn.dice@fermyon.com>
@vdice vdice force-pushed the chore/spin-sdk-crate-prep branch from 54f0363 to 331c298 Compare December 12, 2023 19:42
Signed-off-by: Vaughn Dice <vaughn.dice@fermyon.com>
@vdice
Copy link
Contributor Author

vdice commented Dec 12, 2023

f48ebe2 adds a symlink'd wit dir in sdk/rust to address #2151 (comment)

… update Cargo.locks

Signed-off-by: Vaughn Dice <vaughn.dice@fermyon.com>
@vdice vdice added this to the 2.1 milestone Dec 12, 2023
@vdice vdice merged commit 09a0434 into spinframework:main Dec 13, 2023
@vdice vdice deleted the chore/spin-sdk-crate-prep branch December 13, 2023 15:41
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.

4 participants