Skip to content

Commit 384ff64

Browse files
authored
Merge pull request #2735 from finos/update-rust-toolchain
Support packaging in CI
2 parents d477a58 + f01cf2b commit 384ff64

File tree

34 files changed

+143
-103
lines changed

34 files changed

+143
-103
lines changed

.cargo/config.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ frequency = 'never'
2020

2121
[unstable]
2222
bindeps = true
23+
package-workspace = true
2324

2425
[term]
2526
quiet = false

.github/actions/install-deps/action.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,23 +148,23 @@ runs:
148148
uses: dtolnay/rust-toolchain@nightly
149149
if: ${{ inputs.rust == 'true' && inputs.arch != 'aarch64' }}
150150
with:
151-
toolchain: nightly-2024-05-07
151+
toolchain: nightly-2024-08-29
152152
targets: wasm32-unknown-unknown
153153
components: rustfmt, clippy, rust-src
154154

155155
- name: Install rust (aarch64 OSX)
156156
uses: dtolnay/rust-toolchain@nightly
157157
if: ${{ inputs.rust == 'true' && inputs.arch == 'aarch64' && runner.os == 'macOS' }}
158158
with:
159-
toolchain: nightly-2024-05-07
159+
toolchain: nightly-2024-08-29
160160
targets: aarch64-apple-darwin
161161
components: rustfmt, clippy, rust-src
162162

163163
- name: Install rust (aarch64 Linux)
164164
uses: dtolnay/rust-toolchain@nightly
165165
if: ${{ inputs.rust == 'true' && inputs.arch == 'aarch64' && runner.os == 'Linux' }}
166166
with:
167-
toolchain: nightly-2024-05-07
167+
toolchain: nightly-2024-08-29
168168
targets: aarch64-unknown-linux-gnu
169169
components: rustfmt, clippy, rust-src
170170

rust-toolchain.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@
1111
# ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
1212

1313
[toolchain]
14-
channel = "nightly-2024-05-07"
14+
channel = "nightly-2024-08-29"
1515
components = ["rustfmt", "clippy", "rust-src"]
1616
targets = ["wasm32-unknown-unknown", "wasm32-unknown-emscripten"]

rust/bootstrap-runtime/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ use alloc::vec::Vec;
3737

3838
use zune_inflate::DeflateDecoder;
3939

40+
#[allow(unused_unsafe)]
4041
#[global_allocator]
4142
static ALLOCATOR: talc::Talck<talc::locking::AssumeUnlockable, talc::ClaimOnOom> = {
4243
static mut MEMORY: [u8; 64000000] = [0; 64000000];

rust/perspective-client/src/rust/config/plugin.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,11 @@ pub struct DefaultStyleAttributes {
4646
pub bool: serde_json::Value,
4747
}
4848

49-
/// The data needed to populate a column's settings. These are typically default
50-
/// values, a listing of possible values, or other basic configuration settings
51-
/// for the plugin. This is the result of calling plugin.plugin_attributes
49+
/// The data needed to populate a column's settings.
50+
///
51+
/// These are typically default values, a listing of possible values, or other
52+
/// basic configuration settings for the plugin. This is the result of calling
53+
/// plugin.plugin_attributes
5254
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq)]
5355
pub struct PluginAttributes {
5456
pub symbol: Option<SymbolAttributes>,
@@ -64,4 +66,4 @@ pub struct PluginConfig {
6466
/// Refers to the currently active columns. Maps name to configuration.
6567
#[serde(default)]
6668
pub columns: HashMap<String, serde_json::Value>,
67-
}
69+
}

rust/perspective-client/src/rust/session.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ use crate::{Client, ClientError};
2222
#[cfg(doc)]
2323
use crate::{Table, View};
2424

25-
/// The server-side representation of a connection to a
26-
/// [`Client`]. For each [`Client`] that
27-
/// wants to connect to a `perspective_server::Server`, a dedicated [`Session`]
28-
/// must be created. The [`Session`] handles routing messages emitted by the
29-
/// `perspective_server::Server`ve_server::Server`, as well as owning any
30-
/// resources the [`Client`] may request.
25+
/// The server-side representation of a connection to a [`Client`].
26+
///
27+
/// For each [`Client`] that wants to connect to a `perspective_server::Server`,
28+
/// a dedicated [`Session`] must be created. The [`Session`] handles routing
29+
/// messages emitted by the `perspective_server::Server`ve_server::Server`, as
30+
/// well as owning any resources the [`Client`] may request.
3131
pub trait Session<E> {
3232
/// Handle an incoming request from the [`Client`]. Calling
3333
/// [`Session::handle_request`] will result in the `send_response` parameter

rust/perspective-client/src/rust/table.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,7 @@ use crate::view::View;
3232
pub type Schema = HashMap<String, ColumnType>;
3333

3434
/// Options which impact the behavior of [`Client::table`], as well as
35-
/// subsequent calls to [`Table::update`], even though this latter method
36-
/// itself does not take [`TableInitOptions`] as an argument, since this
37-
/// parameter is fixed at creation.
35+
/// subsequent calls to [`Table::update`].
3836
#[derive(Clone, Debug, Default, Serialize, Deserialize, TS)]
3937
pub struct TableInitOptions {
4038
#[serde(default)]

rust/perspective-js/src/rust/utils/console_logger.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -200,11 +200,12 @@ impl<S: Subscriber + for<'a> LookupSpan<'a>> Layer<S> for WasmLogger {
200200
}
201201
}
202202

203-
/// Configure `WasmLogger` as a global default for tracing. This operation will
204-
/// conflict with any other library which sets a global default
205-
/// `tracing::Subscriber`, so it should not be called when `perspective` is used
206-
/// as a library from a larger app; in this case the app itself should configure
207-
/// `tracing` explicitly.
203+
/// Configure `WasmLogger` as a global default for tracing.
204+
///
205+
/// This operation will conflict with any other library which sets a global
206+
/// default `tracing::Subscriber`, so it should not be called when `perspective`
207+
/// is used as a library from a larger app; in this case the app itself should
208+
/// configure `tracing` explicitly.
208209
pub fn set_global_logging() {
209210
static INIT_LOGGING: OnceLock<()> = OnceLock::new();
210211
INIT_LOGGING.get_or_init(|| {

rust/perspective-js/src/rust/utils/errors.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,17 @@ use std::fmt::Display;
1515
use wasm_bindgen::prelude::*;
1616

1717
/// A bespoke error class for chaining a litany of various error types with the
18-
/// `?` operator. `anyhow`, `web_sys::JsError` are candidates for replacing
18+
/// `?` operator.
19+
///
20+
/// `anyhow`, `web_sys::JsError` are candidates for replacing
1921
/// this, but we'd need a way to get around syntacitc conveniences we get
2022
/// from avoiding orphan instance issues (e.g. converting `JsValue` to an error
2123
/// in `anyhow`).
2224
///
2325
/// We'd still like to implement this, but instead must independently implement
2426
/// the instance for each error, as otherwise `rustc` will complain that the
2527
/// `wasm_bindgen` authors may themselves implement `Error` for `JsValue`.
28+
///
2629
/// ```
2730
/// impl<T> From<T> for ApiError
2831
/// where

rust/perspective-js/src/rust/utils/futures.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ use wasm_bindgen_futures::{future_to_promise, JsFuture};
2525
use super::errors::*;
2626

2727
/// A newtype wrapper for a `Future` trait object which supports being
28-
/// marshalled to a `JsPromise`, avoiding an API which requires type casting to
28+
/// marshalled to a `JsPromise`.
29+
///
30+
/// This avoids implementing an API which requires type casting to
2931
/// and from `JsValue` and the associated loss of type safety.
3032
#[must_use]
3133
pub struct ApiFuture<T>(Pin<Box<dyn Future<Output = ApiResult<T>>>>)

0 commit comments

Comments
 (0)