From 3c41b70af4fcb6864fa062b91e9b3db4a83d8a79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Doru=20Bl=C3=A2nzeanu?= Date: Wed, 25 Feb 2026 12:26:12 +0200 Subject: [PATCH] Add copyright 2026 headers for source code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Doru Blânzeanu --- src/hyperlight-js-runtime/build.rs | 15 +++++++++++++++ src/hyperlight-js-runtime/src/globals/console.rs | 15 +++++++++++++++ src/hyperlight-js-runtime/src/globals/mod.rs | 15 +++++++++++++++ src/hyperlight-js-runtime/src/globals/print.rs | 15 +++++++++++++++ src/hyperlight-js-runtime/src/globals/require.rs | 15 +++++++++++++++ src/hyperlight-js-runtime/src/globals/string.rs | 15 +++++++++++++++ src/hyperlight-js-runtime/src/host.rs | 15 +++++++++++++++ src/hyperlight-js-runtime/src/host_fn.rs | 15 +++++++++++++++ src/hyperlight-js-runtime/src/lib.rs | 15 +++++++++++++++ src/hyperlight-js-runtime/src/main.rs | 15 +++++++++++++++ src/hyperlight-js-runtime/src/main/hyperlight.rs | 15 +++++++++++++++ src/hyperlight-js-runtime/src/main/native.rs | 15 +++++++++++++++ src/hyperlight-js-runtime/src/modules/console.rs | 15 +++++++++++++++ src/hyperlight-js-runtime/src/modules/crypto.rs | 15 +++++++++++++++ src/hyperlight-js-runtime/src/modules/io.rs | 15 +++++++++++++++ src/hyperlight-js-runtime/src/modules/mod.rs | 15 +++++++++++++++ src/hyperlight-js-runtime/src/modules/require.rs | 15 +++++++++++++++ src/hyperlight-js-runtime/src/utils.rs | 15 +++++++++++++++ src/hyperlight-js-runtime/stubs/clock.c | 15 +++++++++++++++ src/hyperlight-js-runtime/stubs/localtime.c | 15 +++++++++++++++ src/hyperlight-js/build.rs | 15 +++++++++++++++ src/hyperlight-js/examples/tracing-otlp/main.rs | 2 +- src/hyperlight-js/src/lib.rs | 15 +++++++++++++++ src/hyperlight-js/src/resolver.rs | 15 +++++++++++++++ src/hyperlight-js/src/sandbox/host_fn.rs | 15 +++++++++++++++ src/hyperlight-js/src/sandbox/js_sandbox.rs | 15 +++++++++++++++ .../src/sandbox/loaded_js_sandbox.rs | 15 +++++++++++++++ src/hyperlight-js/src/sandbox/metrics.rs | 15 +++++++++++++++ src/hyperlight-js/src/sandbox/mod.rs | 15 +++++++++++++++ src/hyperlight-js/src/sandbox/monitor/cpu_time.rs | 15 +++++++++++++++ src/hyperlight-js/src/sandbox/monitor/mod.rs | 15 +++++++++++++++ src/hyperlight-js/src/sandbox/monitor/runtime.rs | 15 +++++++++++++++ .../src/sandbox/monitor/wall_clock.rs | 15 +++++++++++++++ src/hyperlight-js/src/sandbox/proto_js_sandbox.rs | 15 +++++++++++++++ src/hyperlight-js/src/sandbox/sandbox_builder.rs | 15 +++++++++++++++ src/hyperlight-js/src/script.rs | 15 +++++++++++++++ src/js-host-api/build.rs | 15 +++++++++++++++ src/js-host-api/lib.js | 15 +++++++++++++++ src/js-host-api/src/lib.rs | 15 +++++++++++++++ 39 files changed, 571 insertions(+), 1 deletion(-) diff --git a/src/hyperlight-js-runtime/build.rs b/src/hyperlight-js-runtime/build.rs index 6855f0b..34ef786 100644 --- a/src/hyperlight-js-runtime/build.rs +++ b/src/hyperlight-js-runtime/build.rs @@ -1,3 +1,18 @@ +/* +Copyright 2026 The Hyperlight Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +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. +*/ fn main() { if std::env::var_os("CARGO_CFG_HYPERLIGHT").is_none() { return; diff --git a/src/hyperlight-js-runtime/src/globals/console.rs b/src/hyperlight-js-runtime/src/globals/console.rs index 0c0691f..37f6db0 100644 --- a/src/hyperlight-js-runtime/src/globals/console.rs +++ b/src/hyperlight-js-runtime/src/globals/console.rs @@ -1,3 +1,18 @@ +/* +Copyright 2026 The Hyperlight Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +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 rquickjs::object::Property; use rquickjs::{Ctx, Module, Object}; diff --git a/src/hyperlight-js-runtime/src/globals/mod.rs b/src/hyperlight-js-runtime/src/globals/mod.rs index a02d4ad..82f6d26 100644 --- a/src/hyperlight-js-runtime/src/globals/mod.rs +++ b/src/hyperlight-js-runtime/src/globals/mod.rs @@ -1,3 +1,18 @@ +/* +Copyright 2026 The Hyperlight Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +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 rquickjs::Ctx; mod console; diff --git a/src/hyperlight-js-runtime/src/globals/print.rs b/src/hyperlight-js-runtime/src/globals/print.rs index 35f947d..91afe66 100644 --- a/src/hyperlight-js-runtime/src/globals/print.rs +++ b/src/hyperlight-js-runtime/src/globals/print.rs @@ -1,3 +1,18 @@ +/* +Copyright 2026 The Hyperlight Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +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 rquickjs::object::Property; use rquickjs::{Ctx, Function, Module, Object}; diff --git a/src/hyperlight-js-runtime/src/globals/require.rs b/src/hyperlight-js-runtime/src/globals/require.rs index 9f2a3a7..8fdd62b 100644 --- a/src/hyperlight-js-runtime/src/globals/require.rs +++ b/src/hyperlight-js-runtime/src/globals/require.rs @@ -1,3 +1,18 @@ +/* +Copyright 2026 The Hyperlight Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +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 rquickjs::object::Property; use rquickjs::{Ctx, Function, Module, Object}; diff --git a/src/hyperlight-js-runtime/src/globals/string.rs b/src/hyperlight-js-runtime/src/globals/string.rs index 6a0fa67..d585b51 100644 --- a/src/hyperlight-js-runtime/src/globals/string.rs +++ b/src/hyperlight-js-runtime/src/globals/string.rs @@ -1,3 +1,18 @@ +/* +Copyright 2026 The Hyperlight Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +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 alloc::string::{String, ToString as _}; use base64::engine::general_purpose::STANDARD_NO_PAD; diff --git a/src/hyperlight-js-runtime/src/host.rs b/src/hyperlight-js-runtime/src/host.rs index 413ebe3..f51bbc2 100644 --- a/src/hyperlight-js-runtime/src/host.rs +++ b/src/hyperlight-js-runtime/src/host.rs @@ -1,3 +1,18 @@ +/* +Copyright 2026 The Hyperlight Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +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 alloc::string::String; use anyhow::Result; diff --git a/src/hyperlight-js-runtime/src/host_fn.rs b/src/hyperlight-js-runtime/src/host_fn.rs index 48d8353..531b97d 100644 --- a/src/hyperlight-js-runtime/src/host_fn.rs +++ b/src/hyperlight-js-runtime/src/host_fn.rs @@ -1,3 +1,18 @@ +/* +Copyright 2026 The Hyperlight Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +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 alloc::format; use alloc::rc::Rc; use alloc::string::{String, ToString as _}; diff --git a/src/hyperlight-js-runtime/src/lib.rs b/src/hyperlight-js-runtime/src/lib.rs index 258f097..e7e8065 100644 --- a/src/hyperlight-js-runtime/src/lib.rs +++ b/src/hyperlight-js-runtime/src/lib.rs @@ -1,3 +1,18 @@ +/* +Copyright 2026 The Hyperlight Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +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. +*/ #![no_std] #![no_main] extern crate alloc; diff --git a/src/hyperlight-js-runtime/src/main.rs b/src/hyperlight-js-runtime/src/main.rs index 9f2d149..5774b8c 100644 --- a/src/hyperlight-js-runtime/src/main.rs +++ b/src/hyperlight-js-runtime/src/main.rs @@ -1,3 +1,18 @@ +/* +Copyright 2026 The Hyperlight Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +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. +*/ #![cfg_attr(hyperlight, no_std)] #![cfg_attr(hyperlight, no_main)] diff --git a/src/hyperlight-js-runtime/src/main/hyperlight.rs b/src/hyperlight-js-runtime/src/main/hyperlight.rs index 1c47ada..f5f60f1 100644 --- a/src/hyperlight-js-runtime/src/main/hyperlight.rs +++ b/src/hyperlight-js-runtime/src/main/hyperlight.rs @@ -1,3 +1,18 @@ +/* +Copyright 2026 The Hyperlight Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +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. +*/ extern crate alloc; use core::ffi::*; diff --git a/src/hyperlight-js-runtime/src/main/native.rs b/src/hyperlight-js-runtime/src/main/native.rs index 229dadb..b6b0ca2 100644 --- a/src/hyperlight-js-runtime/src/main/native.rs +++ b/src/hyperlight-js-runtime/src/main/native.rs @@ -1,3 +1,18 @@ +/* +Copyright 2026 The Hyperlight Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +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 std::path::{Path, PathBuf}; use std::{env, fs}; diff --git a/src/hyperlight-js-runtime/src/modules/console.rs b/src/hyperlight-js-runtime/src/modules/console.rs index 8403c36..77c29b5 100644 --- a/src/hyperlight-js-runtime/src/modules/console.rs +++ b/src/hyperlight-js-runtime/src/modules/console.rs @@ -1,3 +1,18 @@ +/* +Copyright 2026 The Hyperlight Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +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 alloc::string::String; use rquickjs::prelude::Rest; diff --git a/src/hyperlight-js-runtime/src/modules/crypto.rs b/src/hyperlight-js-runtime/src/modules/crypto.rs index cbb6cce..a9f5455 100644 --- a/src/hyperlight-js-runtime/src/modules/crypto.rs +++ b/src/hyperlight-js-runtime/src/modules/crypto.rs @@ -1,3 +1,18 @@ +/* +Copyright 2026 The Hyperlight Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +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 alloc::format; use alloc::rc::Rc; use alloc::string::String; diff --git a/src/hyperlight-js-runtime/src/modules/io.rs b/src/hyperlight-js-runtime/src/modules/io.rs index de9704a..d0d3187 100644 --- a/src/hyperlight-js-runtime/src/modules/io.rs +++ b/src/hyperlight-js-runtime/src/modules/io.rs @@ -1,3 +1,18 @@ +/* +Copyright 2026 The Hyperlight Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +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 alloc::string::String; #[rquickjs::module(rename_vars = "camelCase", rename_types = "camelCase")] diff --git a/src/hyperlight-js-runtime/src/modules/mod.rs b/src/hyperlight-js-runtime/src/modules/mod.rs index b3b8b63..c0ca64f 100644 --- a/src/hyperlight-js-runtime/src/modules/mod.rs +++ b/src/hyperlight-js-runtime/src/modules/mod.rs @@ -1,3 +1,18 @@ +/* +Copyright 2026 The Hyperlight Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +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 alloc::string::{String, ToString as _}; use hashbrown::HashMap; diff --git a/src/hyperlight-js-runtime/src/modules/require.rs b/src/hyperlight-js-runtime/src/modules/require.rs index 98a8dc4..1756a6d 100644 --- a/src/hyperlight-js-runtime/src/modules/require.rs +++ b/src/hyperlight-js-runtime/src/modules/require.rs @@ -1,3 +1,18 @@ +/* +Copyright 2026 The Hyperlight Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +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 alloc::string::String; use rquickjs::{Ctx, Module, Object, Result}; diff --git a/src/hyperlight-js-runtime/src/utils.rs b/src/hyperlight-js-runtime/src/utils.rs index 951f9d8..2be8b2c 100644 --- a/src/hyperlight-js-runtime/src/utils.rs +++ b/src/hyperlight-js-runtime/src/utils.rs @@ -1,3 +1,18 @@ +/* +Copyright 2026 The Hyperlight Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +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 alloc::vec::Vec; use rquickjs::{Exception, Result, Value}; diff --git a/src/hyperlight-js-runtime/stubs/clock.c b/src/hyperlight-js-runtime/stubs/clock.c index 0cf2831..a81d625 100644 --- a/src/hyperlight-js-runtime/stubs/clock.c +++ b/src/hyperlight-js-runtime/stubs/clock.c @@ -1,3 +1,18 @@ +/* +Copyright 2026 The Hyperlight Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +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. +*/ #define _POSIX_MONOTONIC_CLOCK 1 #include diff --git a/src/hyperlight-js-runtime/stubs/localtime.c b/src/hyperlight-js-runtime/stubs/localtime.c index da634d4..173a1a3 100644 --- a/src/hyperlight-js-runtime/stubs/localtime.c +++ b/src/hyperlight-js-runtime/stubs/localtime.c @@ -1,3 +1,18 @@ +/* +Copyright 2026 The Hyperlight Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +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. +*/ #include #include #include diff --git a/src/hyperlight-js/build.rs b/src/hyperlight-js/build.rs index de6e119..e8d5961 100644 --- a/src/hyperlight-js/build.rs +++ b/src/hyperlight-js/build.rs @@ -1,3 +1,18 @@ +/* +Copyright 2026 The Hyperlight Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +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)] // allow assert!(..) // build.rs diff --git a/src/hyperlight-js/examples/tracing-otlp/main.rs b/src/hyperlight-js/examples/tracing-otlp/main.rs index 6f3cde7..33c9048 100644 --- a/src/hyperlight-js/examples/tracing-otlp/main.rs +++ b/src/hyperlight-js/examples/tracing-otlp/main.rs @@ -1,5 +1,5 @@ /* -Copyright 2025 The Hyperlight Authors. +Copyright 2026 The Hyperlight Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/src/hyperlight-js/src/lib.rs b/src/hyperlight-js/src/lib.rs index bd6b379..916faba 100644 --- a/src/hyperlight-js/src/lib.rs +++ b/src/hyperlight-js/src/lib.rs @@ -1,3 +1,18 @@ +/* +Copyright 2026 The Hyperlight Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +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. +*/ //! This crate provides a Hyperlight implementation for JavaScript guest code. #![deny(dead_code, missing_docs, unused_mut)] #![cfg_attr(not(any(test, debug_assertions)), warn(clippy::panic))] diff --git a/src/hyperlight-js/src/resolver.rs b/src/hyperlight-js/src/resolver.rs index 4f78428..094ad98 100644 --- a/src/hyperlight-js/src/resolver.rs +++ b/src/hyperlight-js/src/resolver.rs @@ -1,3 +1,18 @@ +/* +Copyright 2026 The Hyperlight Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +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. +*/ //! Module resolution and loading implementations. //! //! This module provides the core abstractions and implementations for loading diff --git a/src/hyperlight-js/src/sandbox/host_fn.rs b/src/hyperlight-js/src/sandbox/host_fn.rs index 7ba8773..8f0322b 100644 --- a/src/hyperlight-js/src/sandbox/host_fn.rs +++ b/src/hyperlight-js/src/sandbox/host_fn.rs @@ -1,3 +1,18 @@ +/* +Copyright 2026 The Hyperlight Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +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 std::collections::HashMap; use serde::de::DeserializeOwned; diff --git a/src/hyperlight-js/src/sandbox/js_sandbox.rs b/src/hyperlight-js/src/sandbox/js_sandbox.rs index 2e3ef14..5fae60d 100644 --- a/src/hyperlight-js/src/sandbox/js_sandbox.rs +++ b/src/hyperlight-js/src/sandbox/js_sandbox.rs @@ -1,3 +1,18 @@ +/* +Copyright 2026 The Hyperlight Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +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 std::collections::HashMap; use std::fmt::Debug; diff --git a/src/hyperlight-js/src/sandbox/loaded_js_sandbox.rs b/src/hyperlight-js/src/sandbox/loaded_js_sandbox.rs index baed5d8..975bc49 100644 --- a/src/hyperlight-js/src/sandbox/loaded_js_sandbox.rs +++ b/src/hyperlight-js/src/sandbox/loaded_js_sandbox.rs @@ -1,3 +1,18 @@ +/* +Copyright 2026 The Hyperlight Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +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 std::fmt::Debug; use std::sync::Arc; diff --git a/src/hyperlight-js/src/sandbox/metrics.rs b/src/hyperlight-js/src/sandbox/metrics.rs index 035f5ea..9bb09b2 100644 --- a/src/hyperlight-js/src/sandbox/metrics.rs +++ b/src/hyperlight-js/src/sandbox/metrics.rs @@ -1,3 +1,18 @@ +/* +Copyright 2026 The Hyperlight Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +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. +*/ /*! This module contains the definitions and implementations of the metrics used by the sandbox module */ diff --git a/src/hyperlight-js/src/sandbox/mod.rs b/src/hyperlight-js/src/sandbox/mod.rs index 7fbc546..cb1e90c 100644 --- a/src/hyperlight-js/src/sandbox/mod.rs +++ b/src/hyperlight-js/src/sandbox/mod.rs @@ -1,3 +1,18 @@ +/* +Copyright 2026 The Hyperlight Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +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. +*/ //! The `sandbox` module contains the sandbox types for the Hyperlight JavaScript runtime. use std::env; /// Definition of a host function that can be called from guest JavaScript code. diff --git a/src/hyperlight-js/src/sandbox/monitor/cpu_time.rs b/src/hyperlight-js/src/sandbox/monitor/cpu_time.rs index 78715f4..d1a133f 100644 --- a/src/hyperlight-js/src/sandbox/monitor/cpu_time.rs +++ b/src/hyperlight-js/src/sandbox/monitor/cpu_time.rs @@ -1,3 +1,18 @@ +/* +Copyright 2026 The Hyperlight Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +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. +*/ //! CPU time based execution monitor. //! //! This module provides monitoring based on actual CPU execution time rather than diff --git a/src/hyperlight-js/src/sandbox/monitor/mod.rs b/src/hyperlight-js/src/sandbox/monitor/mod.rs index e17dea4..e76328c 100644 --- a/src/hyperlight-js/src/sandbox/monitor/mod.rs +++ b/src/hyperlight-js/src/sandbox/monitor/mod.rs @@ -1,3 +1,18 @@ +/* +Copyright 2026 The Hyperlight Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +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. +*/ //! Execution monitoring for JavaScript sandbox handlers. //! //! This module provides the [`ExecutionMonitor`] trait and built-in implementations diff --git a/src/hyperlight-js/src/sandbox/monitor/runtime.rs b/src/hyperlight-js/src/sandbox/monitor/runtime.rs index cc0f50e..afb757a 100644 --- a/src/hyperlight-js/src/sandbox/monitor/runtime.rs +++ b/src/hyperlight-js/src/sandbox/monitor/runtime.rs @@ -1,3 +1,18 @@ +/* +Copyright 2026 The Hyperlight Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +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. +*/ //! Shared Tokio runtime for execution monitor orchestration. //! //! This module provides a lazily-initialized, shared Tokio runtime used by diff --git a/src/hyperlight-js/src/sandbox/monitor/wall_clock.rs b/src/hyperlight-js/src/sandbox/monitor/wall_clock.rs index 436ed0a..d430659 100644 --- a/src/hyperlight-js/src/sandbox/monitor/wall_clock.rs +++ b/src/hyperlight-js/src/sandbox/monitor/wall_clock.rs @@ -1,3 +1,18 @@ +/* +Copyright 2026 The Hyperlight Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +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. +*/ //! Wall-clock time based execution monitor. use std::future::Future; diff --git a/src/hyperlight-js/src/sandbox/proto_js_sandbox.rs b/src/hyperlight-js/src/sandbox/proto_js_sandbox.rs index ab36245..587eccb 100644 --- a/src/hyperlight-js/src/sandbox/proto_js_sandbox.rs +++ b/src/hyperlight-js/src/sandbox/proto_js_sandbox.rs @@ -1,3 +1,18 @@ +/* +Copyright 2026 The Hyperlight Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +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 std::collections::HashMap; use std::fmt::Debug; use std::time::SystemTime; diff --git a/src/hyperlight-js/src/sandbox/sandbox_builder.rs b/src/hyperlight-js/src/sandbox/sandbox_builder.rs index 8cea862..53c6beb 100644 --- a/src/hyperlight-js/src/sandbox/sandbox_builder.rs +++ b/src/hyperlight-js/src/sandbox/sandbox_builder.rs @@ -1,3 +1,18 @@ +/* +Copyright 2026 The Hyperlight Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +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. +*/ #[cfg(target_os = "linux")] use std::time::Duration; diff --git a/src/hyperlight-js/src/script.rs b/src/hyperlight-js/src/script.rs index c8b1550..adce6ba 100644 --- a/src/hyperlight-js/src/script.rs +++ b/src/hyperlight-js/src/script.rs @@ -1,3 +1,18 @@ +/* +Copyright 2026 The Hyperlight Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +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 std::path::{Path, PathBuf}; use std::sync::Arc; diff --git a/src/js-host-api/build.rs b/src/js-host-api/build.rs index 0f1b010..2dc7cfb 100644 --- a/src/js-host-api/build.rs +++ b/src/js-host-api/build.rs @@ -1,3 +1,18 @@ +/* +Copyright 2026 The Hyperlight Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +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. +*/ fn main() { napi_build::setup(); } diff --git a/src/js-host-api/lib.js b/src/js-host-api/lib.js index 84d2336..0fdf593 100644 --- a/src/js-host-api/lib.js +++ b/src/js-host-api/lib.js @@ -1,3 +1,18 @@ +/* +Copyright 2026 The Hyperlight Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +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. +*/ // ── Hyperlight JS Host API — Error enrichment wrapper ──────────────── // // This module re-exports the native napi-rs binding from index.js and diff --git a/src/js-host-api/src/lib.rs b/src/js-host-api/src/lib.rs index 977e567..53378a9 100644 --- a/src/js-host-api/src/lib.rs +++ b/src/js-host-api/src/lib.rs @@ -1,3 +1,18 @@ +/* +Copyright 2026 The Hyperlight Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +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 std::sync::atomic::{AtomicBool, Ordering}; use std::sync::{Arc, Mutex}; use std::time::Duration;