diff --git a/.github/workflows/build-examples.yml b/.github/workflows/build-examples.yml index 5c7089d..2f245c3 100644 --- a/.github/workflows/build-examples.yml +++ b/.github/workflows/build-examples.yml @@ -10,7 +10,7 @@ on: - "README.md" env: - RUST_VERSION: "1.73" + RUST_VERSION: "1.76" SPIN_VERSION: "" jobs: diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index de86a4c..48fb422 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,7 +9,7 @@ on: - "README.md" env: - RUST_VERSION: 1.73 + RUST_VERSION: 1.76 jobs: lint-and-test: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a8dee7d..f047288 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,7 +8,7 @@ on: - "v*" env: - RUST_VERSION: 1.73 + RUST_VERSION: 1.76 jobs: crates: @@ -39,4 +39,4 @@ jobs: - name: Publish spin-sdk to crates.io working-directory: ./ run: | - cargo publish --token ${{ secrets.CARGO_REGISTRY_TOKEN }} \ No newline at end of file + cargo publish --token ${{ secrets.CARGO_REGISTRY_TOKEN }} diff --git a/Cargo.lock b/Cargo.lock index 358bcab..bc79437 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -19,9 +19,9 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "ahash" -version = "0.8.9" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d713b3834d76b85304d4d525563c1276e2e30dc97cc67bfb4585a4a29fc2c89f" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", "once_cell", @@ -79,7 +79,7 @@ checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.87", ] [[package]] @@ -661,7 +661,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.87", ] [[package]] @@ -809,9 +809,12 @@ name = "heck" version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" -dependencies = [ - "unicode-segmentation", -] + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "hello-world" @@ -1304,7 +1307,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.87", ] [[package]] @@ -1369,11 +1372,21 @@ version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +[[package]] +name = "prettyplease" +version = "0.2.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033" +dependencies = [ + "proc-macro2", + "syn 2.0.87", +] + [[package]] name = "proc-macro2" -version = "1.0.78" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" +checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e" dependencies = [ "unicode-ident", ] @@ -1728,7 +1741,7 @@ checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.87", ] [[package]] @@ -1976,9 +1989,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.50" +version = "2.0.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74f1bdc9872430ce9b75da68329d1c1746faf50ffac5f19e02b71e37ff881ffb" +checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d" dependencies = [ "proc-macro2", "quote", @@ -2063,7 +2076,7 @@ checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.87", ] [[package]] @@ -2107,7 +2120,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.87", ] [[package]] @@ -2178,7 +2191,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.87", ] [[package]] @@ -2223,12 +2236,6 @@ dependencies = [ "tinyvec", ] -[[package]] -name = "unicode-segmentation" -version = "1.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" - [[package]] name = "unicode-width" version = "0.1.11" @@ -2350,7 +2357,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.87", "wasm-bindgen-shared", ] @@ -2384,7 +2391,7 @@ checksum = "642f325be6301eb8107a83d12a8ac6c1e1c54345a7ef1a9261962dfefda09e66" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.87", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -2397,36 +2404,37 @@ checksum = "4f186bd2dcf04330886ce82d6f33dd75a7bfcf69ecf5763b89fcde53b6ac9838" [[package]] name = "wasm-encoder" -version = "0.38.1" +version = "0.41.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ad2b51884de9c7f4fe2fd1043fccb8dcad4b1e29558146ee57a144d15779f3f" +checksum = "972f97a5d8318f908dded23594188a90bcd09365986b1163e66d70170e5287ae" dependencies = [ "leb128", ] [[package]] name = "wasm-encoder" -version = "0.41.2" +version = "0.200.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "972f97a5d8318f908dded23594188a90bcd09365986b1163e66d70170e5287ae" +checksum = "b9e3fb0c8fbddd78aa6095b850dfeedbc7506cf5f81e633f69cf8f2333ab84b9" dependencies = [ "leb128", ] [[package]] name = "wasm-encoder" -version = "0.200.0" +version = "0.219.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e3fb0c8fbddd78aa6095b850dfeedbc7506cf5f81e633f69cf8f2333ab84b9" +checksum = "29cbbd772edcb8e7d524a82ee8cef8dd046fc14033796a754c3ad246d019fa54" dependencies = [ "leb128", + "wasmparser 0.219.1", ] [[package]] name = "wasm-metadata" -version = "0.10.20" +version = "0.200.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18ebaa7bd0f9e7a5e5dd29b9a998acf21c4abed74265524dd7e85934597bfb10" +checksum = "c31b8cc0c21f46d55b0aaa419cacce1eadcf28eaebd0e1488d6a6313ee71a586" dependencies = [ "anyhow", "indexmap", @@ -2434,15 +2442,15 @@ dependencies = [ "serde_derive", "serde_json", "spdx", - "wasm-encoder 0.41.2", - "wasmparser 0.121.2", + "wasm-encoder 0.200.0", + "wasmparser 0.200.0", ] [[package]] name = "wasm-metadata" -version = "0.200.0" +version = "0.219.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c31b8cc0c21f46d55b0aaa419cacce1eadcf28eaebd0e1488d6a6313ee71a586" +checksum = "2af5a8e37a5e996861e1813f8de30911c47609c9ff51a7284f7dbd754dc3a9f3" dependencies = [ "anyhow", "indexmap", @@ -2450,25 +2458,26 @@ dependencies = [ "serde_derive", "serde_json", "spdx", - "wasm-encoder 0.200.0", - "wasmparser 0.200.0", + "wasm-encoder 0.219.1", + "wasmparser 0.219.1", ] [[package]] name = "wasmparser" -version = "0.118.2" +version = "0.121.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77f1154f1ab868e2a01d9834a805faca7bf8b50d041b4ca714d005d0dab1c50c" +checksum = "9dbe55c8f9d0dbd25d9447a5a889ff90c0cc3feaa7395310d3d826b2c703eaab" dependencies = [ + "bitflags 2.4.2", "indexmap", "semver", ] [[package]] name = "wasmparser" -version = "0.121.2" +version = "0.200.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dbe55c8f9d0dbd25d9447a5a889ff90c0cc3feaa7395310d3d826b2c703eaab" +checksum = "a03f65ac876612140c57ff6c3b8fe4990067cce97c2cfdb07368a3cc3354b062" dependencies = [ "bitflags 2.4.2", "indexmap", @@ -2477,11 +2486,13 @@ dependencies = [ [[package]] name = "wasmparser" -version = "0.200.0" +version = "0.219.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a03f65ac876612140c57ff6c3b8fe4990067cce97c2cfdb07368a3cc3354b062" +checksum = "5c771866898879073c53b565a6c7b49953795159836714ac56a5befb581227c5" dependencies = [ + "ahash", "bitflags 2.4.2", + "hashbrown 0.14.3", "indexmap", "semver", ] @@ -2578,7 +2589,7 @@ dependencies = [ "anyhow", "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.87", "wasmtime-component-util", "wasmtime-wit-bindgen", "wit-parser 0.13.2", @@ -2746,7 +2757,7 @@ checksum = "6b0300976c36a9427d184e3ecf7c121c2cb3f030844faf9fcb767821e9d4c382" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.87", ] [[package]] @@ -2829,7 +2840,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff6e9754e0a526238ea66da9ba21965a54846a2b22d9de89a298fb8998389507" dependencies = [ "anyhow", - "heck", + "heck 0.4.1", "indexmap", "wit-parser 0.13.2", ] @@ -2909,11 +2920,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "443ac1ebb753ca22bca98d01742762de1243ff722839907c35ea683a8264c74e" dependencies = [ "anyhow", - "heck", + "heck 0.4.1", "proc-macro2", "quote", "shellexpand", - "syn 2.0.50", + "syn 2.0.87", "witx", ] @@ -2925,7 +2936,7 @@ checksum = "9e9e2f1f06ae07bac15273774782c04ab14e9adfbf414762fc84dbbfcf7fb1ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.87", "wiggle-generate", ] @@ -3130,58 +3141,70 @@ dependencies = [ [[package]] name = "wit-bindgen" -version = "0.16.0" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b76f1d099678b4f69402a421e888bbe71bf20320c2f3f3565d0e7484dbe5bc20" +checksum = "7e11ad55616555605a60a8b2d1d89e006c2076f46c465c892cc2c153b20d4b30" dependencies = [ - "bitflags 2.4.2", + "wit-bindgen-rt", "wit-bindgen-rust-macro", ] [[package]] name = "wit-bindgen-core" -version = "0.16.0" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75d55e1a488af2981fb0edac80d8d20a51ac36897a1bdef4abde33c29c1b6d0d" +checksum = "163cee59d3d5ceec0b256735f3ab0dccac434afb0ec38c406276de9c5a11e906" dependencies = [ "anyhow", - "wit-component 0.18.2", - "wit-parser 0.13.2", + "heck 0.5.0", + "wit-parser 0.219.1", +] + +[[package]] +name = "wit-bindgen-rt" +version = "0.34.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "744845cde309b8fa32408d6fb67456449278c66ea4dcd96de29797b302721f02" +dependencies = [ + "bitflags 2.4.2", ] [[package]] name = "wit-bindgen-rust" -version = "0.16.0" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a01ff9cae7bf5736750d94d91eb8a49f5e3a04aff1d1a3218287d9b2964510f8" +checksum = "f6919521fc7807f927a739181db93100ca7ed03c29509b84d5f96b27b2e49a9a" dependencies = [ "anyhow", - "heck", - "wasm-metadata 0.10.20", + "heck 0.5.0", + "indexmap", + "prettyplease", + "syn 2.0.87", + "wasm-metadata 0.219.1", "wit-bindgen-core", - "wit-component 0.18.2", + "wit-component 0.219.1", ] [[package]] name = "wit-bindgen-rust-macro" -version = "0.16.0" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "804a98e2538393d47aa7da65a7348116d6ff403b426665152b70a168c0146d49" +checksum = "c967731fc5d50244d7241ecfc9302a8929db508eea3c601fbc5371b196ba38a5" dependencies = [ "anyhow", + "prettyplease", "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.87", "wit-bindgen-core", "wit-bindgen-rust", - "wit-component 0.18.2", ] [[package]] name = "wit-component" -version = "0.18.2" +version = "0.200.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b8a35a2a9992898c9d27f1664001860595a4bc99d32dd3599d547412e17d7e2" +checksum = "39979723340baea490b87b11b2abae05f149d86f2b55c18d41d78a2a2b284c16" dependencies = [ "anyhow", "bitflags 2.4.2", @@ -3190,17 +3213,17 @@ dependencies = [ "serde", "serde_derive", "serde_json", - "wasm-encoder 0.38.1", - "wasm-metadata 0.10.20", - "wasmparser 0.118.2", - "wit-parser 0.13.2", + "wasm-encoder 0.200.0", + "wasm-metadata 0.200.0", + "wasmparser 0.200.0", + "wit-parser 0.200.0", ] [[package]] name = "wit-component" -version = "0.200.0" +version = "0.219.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39979723340baea490b87b11b2abae05f149d86f2b55c18d41d78a2a2b284c16" +checksum = "ad1673163c0cb14a6a19ddbf44dd4efe6f015ec1ebb8156710ac32501f19fba2" dependencies = [ "anyhow", "bitflags 2.4.2", @@ -3209,10 +3232,10 @@ dependencies = [ "serde", "serde_derive", "serde_json", - "wasm-encoder 0.200.0", - "wasm-metadata 0.200.0", - "wasmparser 0.200.0", - "wit-parser 0.200.0", + "wasm-encoder 0.219.1", + "wasm-metadata 0.219.1", + "wasmparser 0.219.1", + "wit-parser 0.219.1", ] [[package]] @@ -3250,6 +3273,24 @@ dependencies = [ "wasmparser 0.200.0", ] +[[package]] +name = "wit-parser" +version = "0.219.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a86f669283257e8e424b9a4fc3518e3ade0b95deb9fbc0f93a1876be3eda598" +dependencies = [ + "anyhow", + "id-arena", + "indexmap", + "log", + "semver", + "serde", + "serde_derive", + "serde_json", + "unicode-xid", + "wasmparser 0.219.1", +] + [[package]] name = "witx" version = "0.9.1" @@ -3279,7 +3320,7 @@ checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.87", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 345920d..dd2285c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -86,10 +86,10 @@ authors = ["Fermyon Engineering "] edition = "2021" license = "Apache-2.0 WITH LLVM-exception" repository = "https://github.com/fermyon/spin-rust-sdk" -rust-version = "1.73" +rust-version = "1.76" homepage = "https://developer.fermyon.com/spin/v2/rust-components" [workspace.dependencies] -wit-bindgen = "0.16.0" +wit-bindgen = "0.34.0" futures = "0.3.28" once_cell = "1.18.0" diff --git a/crates/macro/src/lib.rs b/crates/macro/src/lib.rs index 4ffc8f5..51b4ba8 100644 --- a/crates/macro/src/lib.rs +++ b/crates/macro/src/lib.rs @@ -134,19 +134,19 @@ pub fn http_component(_attr: TokenStream, item: TokenStream) -> TokenStream { impl From for ::spin_sdk::http::IncomingRequest { fn from(req: self::preamble::wasi::http::types::IncomingRequest) -> Self { - unsafe { Self::from_handle(req.into_handle()) } + unsafe { Self::from_handle(req.take_handle()) } } } impl From<::spin_sdk::http::OutgoingResponse> for self::preamble::wasi::http::types::OutgoingResponse { fn from(resp: ::spin_sdk::http::OutgoingResponse) -> Self { - unsafe { Self::from_handle(resp.into_handle()) } + unsafe { Self::from_handle(resp.take_handle()) } } } impl From for ::spin_sdk::http::ResponseOutparam { fn from(resp: self::preamble::wasi::http::types::ResponseOutparam) -> Self { - unsafe { Self::from_handle(resp.into_handle()) } + unsafe { Self::from_handle(resp.take_handle()) } } } } @@ -162,10 +162,6 @@ enum Export { } fn preamble(export: Export) -> proc_macro2::TokenStream { - let export_decl = match export { - Export::WasiHttp => quote!("wasi:http/incoming-handler": Spin), - Export::Redis => quote!("fermyon:spin/inbound-redis": Spin), - }; let world = match export { Export::WasiHttp => quote!("wasi-http-trigger"), Export::Redis => quote!("redis-trigger"), @@ -176,10 +172,9 @@ fn preamble(export: Export) -> proc_macro2::TokenStream { world: #world, path: #WIT_PATH, runtime_path: "::spin_sdk::wit_bindgen::rt", - exports: { - #export_decl - } + generate_all, }); pub struct Spin; + export!(Spin); } } diff --git a/src/lib.rs b/src/lib.rs index 53f6b6f..461773b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -31,19 +31,13 @@ pub mod wit { "wasi:io/error@0.2.0": spin_executor::bindings::wasi::io::error, "wasi:io/streams@0.2.0": spin_executor::bindings::wasi::io::streams, "wasi:io/poll@0.2.0": spin_executor::bindings::wasi::io::poll, - } + }, + generate_all, }); pub use fermyon::spin2_0_0 as v2; pub use spin::postgres::postgres as pg3; } -/// Needed by the export macro -/// -/// See [this commit](https://github.com/bytecodealliance/wit-bindgen/pull/394/commits/9d2ea88f986f4a883ba243449e3a070cac18958e) for more info. -#[cfg(target_arch = "wasm32")] -#[doc(hidden)] -pub use wit::__link_section; - #[export_name = concat!("spin-sdk-version-", env!("SDK_VERSION"))] extern "C" fn __spin_sdk_version() {} diff --git a/wit/deps/spin-postgres@3.0.0/postgres.wit b/wit/deps/spin-postgres@3.0.0/postgres.wit index 6e94a40..5583322 100644 --- a/wit/deps/spin-postgres@3.0.0/postgres.wit +++ b/wit/deps/spin-postgres@3.0.0/postgres.wit @@ -35,8 +35,8 @@ interface postgres { int16(s16), int32(s32), int64(s64), - floating32(float32), - floating64(float64), + floating32(f32), + floating64(f64), str(string), binary(list), date(tuple), // (year, month, day) @@ -57,8 +57,8 @@ interface postgres { int16(s16), int32(s32), int64(s64), - floating32(float32), - floating64(float64), + floating32(f32), + floating64(f64), str(string), binary(list), date(tuple), // (year, month, day) diff --git a/wit/deps/spin@2.0.0/llm.wit b/wit/deps/spin@2.0.0/llm.wit index ffed09c..bcb59b8 100644 --- a/wit/deps/spin@2.0.0/llm.wit +++ b/wit/deps/spin@2.0.0/llm.wit @@ -10,15 +10,15 @@ interface llm { /// Note: the backing implementation may return less tokens. max-tokens: u32, /// The amount the model should avoid repeating tokens. - repeat-penalty: float32, + repeat-penalty: f32, /// The number of tokens the model should apply the repeat penalty to. repeat-penalty-last-n-token-count: u32, /// The randomness with which the next token is selected. - temperature: float32, + temperature: f32, /// The number of possible next tokens the model will choose from. top-k: u32, /// The probability total of next tokens the model will choose from. - top-p: float32 + top-p: f32 } /// The set of errors which may be raised by functions in this interface @@ -57,7 +57,7 @@ interface llm { /// Result of generating embeddings record embeddings-result { /// The embeddings generated by the request - embeddings: list>, + embeddings: list>, /// Usage related to the embeddings generation request usage: embeddings-usage } diff --git a/wit/deps/spin@2.0.0/rdbms-types.wit b/wit/deps/spin@2.0.0/rdbms-types.wit index 64f3e59..aff2e96 100644 --- a/wit/deps/spin@2.0.0/rdbms-types.wit +++ b/wit/deps/spin@2.0.0/rdbms-types.wit @@ -37,8 +37,8 @@ interface rdbms-types { uint16(u16), uint32(u32), uint64(u64), - floating32(float32), - floating64(float64), + floating32(f32), + floating64(f64), str(string), binary(list), db-null, @@ -56,8 +56,8 @@ interface rdbms-types { uint16(u16), uint32(u32), uint64(u64), - floating32(float32), - floating64(float64), + floating32(f32), + floating64(f64), str(string), binary(list), db-null, diff --git a/wit/deps/spin@2.0.0/sqlite.wit b/wit/deps/spin@2.0.0/sqlite.wit index 8a5ab2d..d82f2d9 100644 --- a/wit/deps/spin@2.0.0/sqlite.wit +++ b/wit/deps/spin@2.0.0/sqlite.wit @@ -42,7 +42,7 @@ interface sqlite { /// A single column's result from a database query variant value { integer(s64), - real(float64), + real(f64), text(string), blob(list), null diff --git a/wit/deps/spin@unversioned/llm.wit b/wit/deps/spin@unversioned/llm.wit index ffed09c..bcb59b8 100644 --- a/wit/deps/spin@unversioned/llm.wit +++ b/wit/deps/spin@unversioned/llm.wit @@ -10,15 +10,15 @@ interface llm { /// Note: the backing implementation may return less tokens. max-tokens: u32, /// The amount the model should avoid repeating tokens. - repeat-penalty: float32, + repeat-penalty: f32, /// The number of tokens the model should apply the repeat penalty to. repeat-penalty-last-n-token-count: u32, /// The randomness with which the next token is selected. - temperature: float32, + temperature: f32, /// The number of possible next tokens the model will choose from. top-k: u32, /// The probability total of next tokens the model will choose from. - top-p: float32 + top-p: f32 } /// The set of errors which may be raised by functions in this interface @@ -57,7 +57,7 @@ interface llm { /// Result of generating embeddings record embeddings-result { /// The embeddings generated by the request - embeddings: list>, + embeddings: list>, /// Usage related to the embeddings generation request usage: embeddings-usage } diff --git a/wit/deps/spin@unversioned/rdbms-types.wit b/wit/deps/spin@unversioned/rdbms-types.wit index 7af0420..8f9c9c3 100644 --- a/wit/deps/spin@unversioned/rdbms-types.wit +++ b/wit/deps/spin@unversioned/rdbms-types.wit @@ -26,8 +26,8 @@ interface rdbms-types { uint16(u16), uint32(u32), uint64(u64), - floating32(float32), - floating64(float64), + floating32(f32), + floating64(f64), str(string), binary(list), db-null, @@ -44,8 +44,8 @@ interface rdbms-types { uint16(u16), uint32(u32), uint64(u64), - floating32(float32), - floating64(float64), + floating32(f32), + floating64(f64), str(string), binary(list), db-null, diff --git a/wit/deps/spin@unversioned/sqlite.wit b/wit/deps/spin@unversioned/sqlite.wit index 7e2908f..d5abcb2 100644 --- a/wit/deps/spin@unversioned/sqlite.wit +++ b/wit/deps/spin@unversioned/sqlite.wit @@ -44,7 +44,7 @@ interface sqlite { variant value { integer(s64), - real(float64), + real(f64), text(string), blob(list), null