diff --git a/src/hyperlight_host/src/clippy.toml b/src/hyperlight_host/clippy.toml similarity index 100% rename from src/hyperlight_host/src/clippy.toml rename to src/hyperlight_host/clippy.toml diff --git a/src/hyperlight_host/examples/guest-debugging/main.rs b/src/hyperlight_host/examples/guest-debugging/main.rs index d476c7fa5..842849d5b 100644 --- a/src/hyperlight_host/examples/guest-debugging/main.rs +++ b/src/hyperlight_host/examples/guest-debugging/main.rs @@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ - +#![allow(clippy::disallowed_macros)] use std::thread; use hyperlight_common::flatbuffer_wrappers::function_types::{ParameterValue, ReturnType}; diff --git a/src/hyperlight_host/examples/hello-world/main.rs b/src/hyperlight_host/examples/hello-world/main.rs index ad1dedbd2..4bad723d4 100644 --- a/src/hyperlight_host/examples/hello-world/main.rs +++ b/src/hyperlight_host/examples/hello-world/main.rs @@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ - +#![allow(clippy::disallowed_macros)] use std::thread; use hyperlight_common::flatbuffer_wrappers::function_types::{ParameterValue, ReturnType}; diff --git a/src/hyperlight_host/examples/logging/main.rs b/src/hyperlight_host/examples/logging/main.rs index c4b9b6cc2..6a0a1a74e 100644 --- a/src/hyperlight_host/examples/logging/main.rs +++ b/src/hyperlight_host/examples/logging/main.rs @@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ - +#![allow(clippy::disallowed_macros)] extern crate hyperlight_host; use std::sync::{Arc, Mutex}; diff --git a/src/hyperlight_host/examples/metrics/main.rs b/src/hyperlight_host/examples/metrics/main.rs index 9fa814346..4c88c255d 100644 --- a/src/hyperlight_host/examples/metrics/main.rs +++ b/src/hyperlight_host/examples/metrics/main.rs @@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ - +#![allow(clippy::disallowed_macros)] extern crate hyperlight_host; use std::sync::{Arc, Mutex}; use std::thread::{spawn, JoinHandle}; diff --git a/src/hyperlight_host/examples/tracing-chrome/main.rs b/src/hyperlight_host/examples/tracing-chrome/main.rs index 8150463d3..401043677 100644 --- a/src/hyperlight_host/examples/tracing-chrome/main.rs +++ b/src/hyperlight_host/examples/tracing-chrome/main.rs @@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ - +#![allow(clippy::disallowed_macros)] use hyperlight_host::func::{ParameterValue, ReturnType, ReturnValue}; use hyperlight_host::sandbox::uninitialized::UninitializedSandbox; use hyperlight_host::sandbox_state::sandbox::EvolvableSandbox; diff --git a/src/hyperlight_host/examples/tracing-otlp/main.rs b/src/hyperlight_host/examples/tracing-otlp/main.rs index ccddc3626..bd09faa65 100644 --- a/src/hyperlight_host/examples/tracing-otlp/main.rs +++ b/src/hyperlight_host/examples/tracing-otlp/main.rs @@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ - +#![allow(clippy::disallowed_macros)] use hyperlight_common::flatbuffer_wrappers::function_types::{ParameterValue, ReturnType}; //use opentelemetry_sdk::resource::ResourceBuilder; use opentelemetry_sdk::trace::SdkTracerProvider; diff --git a/src/hyperlight_host/examples/tracing-tracy/main.rs b/src/hyperlight_host/examples/tracing-tracy/main.rs index 6b16c93bf..c2d1b2abc 100644 --- a/src/hyperlight_host/examples/tracing-tracy/main.rs +++ b/src/hyperlight_host/examples/tracing-tracy/main.rs @@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ - +#![allow(clippy::disallowed_macros)] use hyperlight_host::func::{ParameterValue, ReturnType, ReturnValue}; use hyperlight_host::sandbox::uninitialized::UninitializedSandbox; use hyperlight_host::sandbox_state::sandbox::EvolvableSandbox; diff --git a/src/hyperlight_host/examples/tracing/main.rs b/src/hyperlight_host/examples/tracing/main.rs index f746a270e..0c572adea 100644 --- a/src/hyperlight_host/examples/tracing/main.rs +++ b/src/hyperlight_host/examples/tracing/main.rs @@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ - +#![allow(clippy::disallowed_macros)] use hyperlight_common::flatbuffer_wrappers::function_types::{ParameterValue, ReturnType}; use tracing::{span, Level}; extern crate hyperlight_host; diff --git a/src/hyperlight_host/src/hypervisor/windows_hypervisor_platform.rs b/src/hyperlight_host/src/hypervisor/windows_hypervisor_platform.rs index 47e200d38..14fd86b1d 100644 --- a/src/hyperlight_host/src/hypervisor/windows_hypervisor_platform.rs +++ b/src/hyperlight_host/src/hypervisor/windows_hypervisor_platform.rs @@ -28,12 +28,6 @@ use crate::hypervisor::wrappers::{WHvFPURegisters, WHvGeneralRegisters, WHvSpeci use crate::mem::memory_region::{MemoryRegion, MemoryRegionFlags}; use crate::{new_error, Result}; -// We need to pass in a primitive array of register names/values -// to WHvSetVirtualProcessorRegisters and rust needs to know array size -// at compile time. There is an assert in set_virtual_process_registers -// to ensure we never try and set more registers than this constant -const REGISTER_COUNT: usize = 16; - /// Interop calls for Windows Hypervisor Platform APIs /// /// Documentation can be found at: @@ -218,7 +212,6 @@ impl VMProcessor { ) -> Result<()> { let partition_handle = self.get_partition_hdl(); let register_count = registers.len(); - assert!(register_count <= REGISTER_COUNT); let mut register_names: Vec = vec![]; let mut register_values: Vec = vec![]; diff --git a/src/hyperlight_host/tests/common/mod.rs b/src/hyperlight_host/tests/common/mod.rs index e874c216a..507b72b62 100644 --- a/src/hyperlight_host/tests/common/mod.rs +++ b/src/hyperlight_host/tests/common/mod.rs @@ -13,7 +13,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ - use hyperlight_host::func::HostFunction; use hyperlight_host::sandbox_state::sandbox::EvolvableSandbox; use hyperlight_host::sandbox_state::transition::Noop; diff --git a/src/hyperlight_host/tests/integration_test.rs b/src/hyperlight_host/tests/integration_test.rs index 03e4ee8f5..7dcafce39 100644 --- a/src/hyperlight_host/tests/integration_test.rs +++ b/src/hyperlight_host/tests/integration_test.rs @@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ - +#![allow(clippy::disallowed_macros)] use hyperlight_common::flatbuffer_wrappers::guest_error::ErrorCode; use hyperlight_common::mem::PAGE_SIZE; use hyperlight_host::func::{ParameterValue, ReturnType, ReturnValue}; diff --git a/src/hyperlight_host/tests/sandbox_host_tests.rs b/src/hyperlight_host/tests/sandbox_host_tests.rs index 815692ec9..05f3a699c 100644 --- a/src/hyperlight_host/tests/sandbox_host_tests.rs +++ b/src/hyperlight_host/tests/sandbox_host_tests.rs @@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ - +#![allow(clippy::disallowed_macros)] use core::f64; use std::sync::{Arc, Mutex};