Skip to content

Commit

Permalink
Use edition 2024 for all crates
Browse files Browse the repository at this point in the history
  • Loading branch information
ia0 committed Dec 9, 2024
1 parent 9737b83 commit efdae3e
Show file tree
Hide file tree
Showing 126 changed files with 207 additions and 139 deletions.
1 change: 1 addition & 0 deletions crates/api-desc/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

### Minor

- Use Rust edition 2024
- Use C-string literals to implement dispatch for native applets
- Implement `bytemuck::Pod` for generated `Params`

Expand Down
2 changes: 1 addition & 1 deletion crates/api-desc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.2.2-git"
authors = ["Julien Cretin <[email protected]>"]
license = "Apache-2.0"
publish = true
edition = "2021"
edition = "2024"
description = "Description of the Wasefire applet API"
repository = "https://github.com/google/wasefire"
include = ["/LICENSE", "/src/"]
Expand Down
2 changes: 1 addition & 1 deletion crates/api-desc/crates/update/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.0"
authors = ["Julien Cretin <[email protected]>"]
license = "Apache-2.0"
publish = false
edition = "2021"
edition = "2024"

[dependencies]
anyhow = { version = "1.0.86", default-features = false, features = ["std"] }
Expand Down
6 changes: 3 additions & 3 deletions crates/api-desc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -370,13 +370,13 @@ impl Fn {
pub struct Params { #(#params,)* }
}
#[cfg(not(feature = "native"))]
extern "C" {
unsafe extern "C" {
#(#[doc = #docs])*
#[link_name = #link]
pub fn #name(#fn_params) -> isize;
pub unsafe fn #name(#fn_params) -> isize;
}
#[cfg(feature = "native")]
#[export_name = #env_link]
#[unsafe(export_name = #env_link)]
#[linkage = "weak"]
pub unsafe extern "C" fn #name(#fn_params) -> isize {
#let_params
Expand Down
4 changes: 4 additions & 0 deletions crates/api-macro/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@

- Update `wasefire-applet-api-desc` version

### Minor

- Use Rust edition 2024

## 0.7.0

### Major
Expand Down
2 changes: 1 addition & 1 deletion crates/api-macro/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.8.0-git"
authors = ["Julien Cretin <[email protected]>"]
license = "Apache-2.0"
publish = true
edition = "2021"
edition = "2024"
description = "Proc-macro to generate the Wasefire applet API"
repository = "https://github.com/google/wasefire"
include = ["/LICENSE", "/src/"]
Expand Down
1 change: 1 addition & 0 deletions crates/api/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

### Minor

- Use Rust edition 2024
- Provide `bytemuck::Pod` for `ArrayU32`
- Implement `bytemuck::Pod` for `U32<T>`

Expand Down
2 changes: 1 addition & 1 deletion crates/api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.7.1-git"
authors = ["Julien Cretin <[email protected]>"]
license = "Apache-2.0"
publish = true
edition = "2021"
edition = "2024"
description = "Low-level Wasefire applet API"
repository = "https://github.com/google/wasefire"
include = ["/LICENSE", "/src/"]
Expand Down
2 changes: 1 addition & 1 deletion crates/api/src/wasm/native.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use core::ffi::{c_char, CStr};

use wasefire_logger as log;

#[no_mangle]
#[unsafe(no_mangle)]
#[linkage = "weak"]
pub(crate) unsafe extern "C" fn env_dispatch(link: *const c_char, _params: *const u32) -> isize {
log::panic!("{:?} is not defined", unsafe { CStr::from_ptr(link) });
Expand Down
4 changes: 4 additions & 0 deletions crates/board/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## 0.8.1-git

### Minor

- Use Rust edition 2024

### Patch

- Update dependencies
Expand Down
2 changes: 1 addition & 1 deletion crates/board/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.8.1-git"
authors = ["Julien Cretin <[email protected]>"]
license = "Apache-2.0"
publish = true
edition = "2021"
edition = "2024"
description = "Wasefire board API"
repository = "https://github.com/google/wasefire"
include = ["/LICENSE", "/src/"]
Expand Down
1 change: 1 addition & 0 deletions crates/cli-tools/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

### Minor

- Use Rust edition 2024
- Add `fs::targz_{list,extract}()` to manipulate tarballs
- Add `fs::download()` for download files

Expand Down
2 changes: 1 addition & 1 deletion crates/cli-tools/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.2.1-git"
authors = ["Julien Cretin <[email protected]>"]
license = "Apache-2.0"
publish = true
edition = "2021"
edition = "2024"
description = "Command-line utilities for Wasefire"
repository = "https://github.com/google/wasefire"
include = ["/LICENSE", "/src/"]
Expand Down
1 change: 1 addition & 0 deletions crates/cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

### Minor

- Use Rust edition 2024
- Add `self-update` to download and install the latest CLI

### Patch
Expand Down
2 changes: 1 addition & 1 deletion crates/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.2.1-git"
authors = ["Julien Cretin <[email protected]>"]
license = "Apache-2.0"
publish = true
edition = "2021"
edition = "2024"
description = "Wasefire CLI to manage applets and platforms"
repository = "https://github.com/google/wasefire"
include = ["/LICENSE", "/src/"]
Expand Down
4 changes: 4 additions & 0 deletions crates/error/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## 0.1.3-git

### Minor

- Use Rust edition 2024

### Patch

- Add clippy lint
Expand Down
2 changes: 1 addition & 1 deletion crates/error/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.3-git"
authors = ["Julien Cretin <[email protected]>"]
license = "Apache-2.0"
publish = true
edition = "2021"
edition = "2024"
description = "Wasefire API errors"
repository = "https://github.com/google/wasefire"
include = ["/LICENSE", "/src/"]
Expand Down
4 changes: 4 additions & 0 deletions crates/interpreter/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## 0.3.2-git

### Minor

- Use Rust edition 2024

### Patch

- Fix clippy lints
Expand Down
2 changes: 1 addition & 1 deletion crates/interpreter/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.3.2-git"
authors = ["Julien Cretin <[email protected]>"]
license = "Apache-2.0"
publish = true
edition = "2021"
edition = "2024"
description = "Wasefire WebAssembly interpreter"
repository = "https://github.com/google/wasefire"
include = ["/LICENSE", "/src/"]
Expand Down
2 changes: 1 addition & 1 deletion crates/interpreter/src/module.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ impl<'m> Module<'m> {
&self.types
}

pub(crate) fn imports(&self) -> impl Iterator<Item = Import<'m>> {
pub(crate) fn imports(&self) -> impl Iterator<Item = Import<'m>> + use<'m> {
let (n, mut parser) = match self.section(SectionId::Import) {
None => (0, Parser::default()),
Some(mut parser) => (parser.parse_vec().into_ok(), parser),
Expand Down
4 changes: 4 additions & 0 deletions crates/logger/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## 0.1.7-git

### Minor

- Use Rust edition 2024

### Patch

- Add clippy lint
Expand Down
2 changes: 1 addition & 1 deletion crates/logger/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.7-git"
authors = ["Julien Cretin <[email protected]>"]
license = "Apache-2.0"
publish = true
edition = "2021"
edition = "2024"
description = "Wasefire platform logging"
repository = "https://github.com/google/wasefire"
include = ["/LICENSE", "/src/"]
Expand Down
4 changes: 4 additions & 0 deletions crates/one-of/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## 0.1.1-git

### Minor

- Use Rust edition 2024

### Patch

- Add clippy lint
Expand Down
2 changes: 1 addition & 1 deletion crates/one-of/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.1-git"
authors = ["Julien Cretin <[email protected]>"]
license = "Apache-2.0"
publish = true
edition = "2021"
edition = "2024"
description = "Macros for mutually exclusive features"
repository = "https://github.com/google/wasefire"
include = ["/LICENSE", "/src/"]
Expand Down
4 changes: 4 additions & 0 deletions crates/prelude/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## 0.7.1-git

### Minor

- Use Rust edition 2024

### Patch

- Update dependencies
Expand Down
2 changes: 1 addition & 1 deletion crates/prelude/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.7.1-git"
authors = ["Julien Cretin <[email protected]>"]
license = "Apache-2.0"
publish = true
edition = "2021"
edition = "2024"
description = "High-level Wasefire applet API"
repository = "https://github.com/google/wasefire"
include = ["/LICENSE", "/src/"]
Expand Down
8 changes: 4 additions & 4 deletions crates/prelude/src/allocator/native.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@

use core::alloc::{GlobalAlloc, Layout};

extern "C" {
fn board_alloc(size: u32, align: u32) -> *mut u8;
fn board_dealloc(ptr: *mut u8, size: u32, align: u32);
unsafe extern "C" {
unsafe fn board_alloc(size: u32, align: u32) -> *mut u8;
unsafe fn board_dealloc(ptr: *mut u8, size: u32, align: u32);
}

#[no_mangle]
#[unsafe(no_mangle)]
extern "C" fn applet_init() {}

struct Allocator;
Expand Down
4 changes: 2 additions & 2 deletions crates/prelude/src/allocator/wasm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use rlsf::Tlsf;

use crate::sync::Mutex;

#[no_mangle]
#[unsafe(no_mangle)]
extern "C" fn init() {
assert!(!wasefire_sync::executed!());
const SIZE: usize = 32768;
Expand All @@ -36,7 +36,7 @@ extern "C" fn init() {
assert!(size > NonZeroUsize::new(SIZE / 2));
}

#[no_mangle]
#[unsafe(no_mangle)]
extern "C" fn alloc(size: u32, align: u32) -> u32 {
let layout = match Layout::from_size_align(size as usize, align as usize) {
Ok(x) => x,
Expand Down
2 changes: 1 addition & 1 deletion crates/prelude/src/callback.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ macro_rules! define {
define!(#[cfg(feature = "native")] $an $(, $x)*);
};
(#[$m:meta] $n:ident $(, $x:ident)*) => {
#[$m] #[no_mangle]
#[$m] #[unsafe(no_mangle)]
extern "C" fn $n (
ptr: extern "C" fn(*const u8 $(, usize ${ignore($x)})*),
this: *const u8 $(, $x: usize)*
Expand Down
4 changes: 2 additions & 2 deletions crates/prelude/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ macro_rules! applet {

use wasefire::*;

#[export_name = "main"]
#[unsafe(export_name = "main")]
#[allow(unreachable_code)]
#[allow(clippy::diverging_sub_expression)]
extern "C" fn _main() {
Expand All @@ -131,7 +131,7 @@ macro_rules! applet {

use wasefire::*;

#[no_mangle]
#[unsafe(no_mangle)]
#[allow(unreachable_code)]
#[allow(clippy::diverging_sub_expression)]
extern "C" fn applet_main() {
Expand Down
4 changes: 4 additions & 0 deletions crates/protocol-tokio/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## 0.1.1-git

### Minor

- Use Rust edition 2024

### Patch

- Update dependencies
Expand Down
2 changes: 1 addition & 1 deletion crates/protocol-tokio/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.1-git"
authors = ["Julien Cretin <[email protected]>"]
license = "Apache-2.0"
publish = true
edition = "2021"
edition = "2024"
description = "Wasefire protocol using std::io::Read and Write"
repository = "https://github.com/google/wasefire"
include = ["/LICENSE", "/src/"]
Expand Down
4 changes: 4 additions & 0 deletions crates/protocol-usb/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## 0.2.1-git

### Minor

- Use Rust edition 2024

### Patch

- Update dependencies
Expand Down
2 changes: 1 addition & 1 deletion crates/protocol-usb/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.2.1-git"
authors = ["Julien Cretin <[email protected]>"]
license = "Apache-2.0"
publish = true
edition = "2021"
edition = "2024"
description = "Wasefire USB protocol between platform and host"
repository = "https://github.com/google/wasefire"
include = ["/LICENSE", "/src/"]
Expand Down
4 changes: 4 additions & 0 deletions crates/protocol/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## 0.2.1-git

### Minor

- Use Rust edition 2024

### Patch

- Update dependencies
Expand Down
2 changes: 1 addition & 1 deletion crates/protocol/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.2.1-git"
authors = ["Julien Cretin <[email protected]>"]
license = "Apache-2.0"
publish = true
edition = "2021"
edition = "2024"
description = "Wasefire protocol between platform and host"
repository = "https://github.com/google/wasefire"
include = ["/LICENSE", "/src/"]
Expand Down
2 changes: 1 addition & 1 deletion crates/protocol/crates/schema/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.0"
authors = ["Julien Cretin <[email protected]>"]
license = "Apache-2.0"
publish = false
edition = "2021"
edition = "2024"

[dependencies]
anyhow = "1.0.86"
Expand Down
2 changes: 1 addition & 1 deletion crates/runner-host/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.0"
authors = ["Julien Cretin <[email protected]>"]
license = "Apache-2.0"
publish = false
edition = "2021"
edition = "2024"

[dependencies]
anyhow = "1.0.86"
Expand Down
Loading

0 comments on commit efdae3e

Please sign in to comment.