Skip to content
This repository was archived by the owner on Nov 17, 2025. It is now read-only.

Commit 8a81f02

Browse files
license: consistent with official used
1 parent 2686ba5 commit 8a81f02

File tree

6 files changed

+28
-727
lines changed

6 files changed

+28
-727
lines changed

bindings/rust/evmc-client/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44

55
[package]
66
name = "evmc-client"
7-
version = "6.3.1"
7+
version = "7.3.0"
88
authors = ["Zigang Lin <[email protected]>"]
99
license = "Apache-2.0"
1010
repository = "https://github.com/ethereum/evmc"
1111
description = "Bindings to EVMC (Client/Host specific)"
1212
edition = "2018"
1313

1414
[dependencies]
15-
evmc-sys = { path = "../evmc-sys" }
15+
evmc-sys = { path = "../evmc-sys", version = "7.3.0" }
1616
libloading = "0.5"

bindings/rust/evmc-client/LICENSE

Lines changed: 0 additions & 661 deletions
This file was deleted.

bindings/rust/evmc-client/src/host.rs

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,7 @@
1-
// Copyright (C) 2020 Second State.
2-
// This file is part of Rust-SSVM.
3-
4-
// Rust-SSVM is free software: you can redistribute it and/or modify
5-
// it under the terms of the GNU Affero General Public License as
6-
// published by the Free Software Foundation, either version 3 of the
7-
// License, or (at your option) any later version.
8-
9-
// Rust-SSVM is distributed in the hope that it will be useful,
10-
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11-
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12-
// GNU Affero General Public License for more details.
13-
14-
// You should have received a copy of the GNU Affero General Public License
15-
// along with this program. If not, see <https://www.gnu.org/licenses/>.
1+
/* EVMC: Ethereum Client-VM Connector API.
2+
* Copyright 2019 The EVMC Authors.
3+
* Licensed under the Apache License, Version 2.0.
4+
*/
165

176
use crate::types::*;
187
use evmc_sys as ffi;
@@ -53,7 +42,9 @@ struct Callback {
5342
host_interface: ::std::option::Option<Box<dyn HostInterface>>,
5443
}
5544

56-
static mut CALLBACK: Callback = Callback { host_interface: None };
45+
static mut CALLBACK: Callback = Callback {
46+
host_interface: None,
47+
};
5748

5849
pub fn set_host_interface(interface: Option<Box<dyn HostInterface>>) {
5950
unsafe {
@@ -62,7 +53,9 @@ pub fn set_host_interface(interface: Option<Box<dyn HostInterface>>) {
6253
}
6354

6455
pub fn get_evmc_host_context() -> ffi::evmc_host_context {
65-
ffi::evmc_host_context {_bindgen_opaque_blob:[0u8; 0]}
56+
ffi::evmc_host_context {
57+
_bindgen_opaque_blob: [0u8; 0],
58+
}
6659
}
6760

6861
pub fn get_evmc_host_interface() -> ffi::evmc_host_interface {
@@ -203,7 +196,9 @@ unsafe extern "C" fn selfdestruct(
203196
beneficiary: *const ffi::evmc_address,
204197
) {
205198
match &mut CALLBACK.host_interface {
206-
Some(host_interface) => host_interface.selfdestruct(&(*address).bytes, &(*beneficiary).bytes),
199+
Some(host_interface) => {
200+
host_interface.selfdestruct(&(*address).bytes, &(*beneficiary).bytes)
201+
}
207202
None => {
208203
panic!("Host context not implemented");
209204
}

bindings/rust/evmc-client/src/lib.rs

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,7 @@
1-
// Copyright (C) 2020 Second State.
2-
// This file is part of Rust-SSVM.
3-
4-
// Rust-SSVM is free software: you can redistribute it and/or modify
5-
// it under the terms of the GNU Affero General Public License as
6-
// published by the Free Software Foundation, either version 3 of the
7-
// License, or (at your option) any later version.
8-
9-
// Rust-SSVM is distributed in the hope that it will be useful,
10-
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11-
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12-
// GNU Affero General Public License for more details.
13-
14-
// You should have received a copy of the GNU Affero General Public License
15-
// along with this program. If not, see <https://www.gnu.org/licenses/>.
1+
/* EVMC: Ethereum Client-VM Connector API.
2+
* Copyright 2019 The EVMC Authors.
3+
* Licensed under the Apache License, Version 2.0.
4+
*/
165

176
pub mod host;
187
mod loader;
@@ -50,7 +39,7 @@ fn error(err: EvmcLoaderErrorCode) -> Result<EvmcLoaderErrorCode, &'static str>
5039

5140
pub struct EvmcVm {
5241
handle: *mut ffi::evmc_vm,
53-
host_context: *mut ffi::evmc_host_context,
42+
host_context: *mut ffi::evmc_host_context,
5443
host_interface: *mut ffi::evmc_host_interface,
5544
}
5645

bindings/rust/evmc-client/src/loader.rs

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,7 @@
1-
// Copyright (C) 2020 Second State.
2-
// This file is part of Rust-SSVM.
3-
4-
// Rust-SSVM is free software: you can redistribute it and/or modify
5-
// it under the terms of the GNU Affero General Public License as
6-
// published by the Free Software Foundation, either version 3 of the
7-
// License, or (at your option) any later version.
8-
9-
// Rust-SSVM is distributed in the hope that it will be useful,
10-
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11-
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12-
// GNU Affero General Public License for more details.
13-
14-
// You should have received a copy of the GNU Affero General Public License
15-
// along with this program. If not, see <https://www.gnu.org/licenses/>.
1+
/* EVMC: Ethereum Client-VM Connector API.
2+
* Copyright 2019 The EVMC Authors.
3+
* Licensed under the Apache License, Version 2.0.
4+
*/
165

176
use evmc_sys as ffi;
187
use libloading::{Library, Symbol};

bindings/rust/evmc-client/src/types.rs

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,7 @@
1-
// Copyright (C) 2020 Second State.
2-
// This file is part of Rust-SSVM.
3-
4-
// Rust-SSVM is free software: you can redistribute it and/or modify
5-
// it under the terms of the GNU Affero General Public License as
6-
// published by the Free Software Foundation, either version 3 of the
7-
// License, or (at your option) any later version.
8-
9-
// Rust-SSVM is distributed in the hope that it will be useful,
10-
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11-
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12-
// GNU Affero General Public License for more details.
13-
14-
// You should have received a copy of the GNU Affero General Public License
15-
// along with this program. If not, see <https://www.gnu.org/licenses/>.
1+
/* EVMC: Ethereum Client-VM Connector API.
2+
* Copyright 2019 The EVMC Authors.
3+
* Licensed under the Apache License, Version 2.0.
4+
*/
165

176
pub use evmc_sys as ffi;
187

0 commit comments

Comments
 (0)