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
Member

@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

sdk/rust/Cargo.toml Outdated Show resolved Hide resolved
sdk/rust/Cargo.toml Outdated Show resolved Hide resolved
@vdice
Copy link
Member 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
Copy link
Member 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
Member 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>
Signed-off-by: Vaughn Dice <vaughn.dice@fermyon.com>
@vdice
Copy link
Member 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 fermyon:main Dec 13, 2023
9 checks passed
@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.

None yet

4 participants