diff --git a/Cargo.toml b/Cargo.toml index 4ac784c..95fdb85 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,6 +7,7 @@ members = [ "tools/winrt-meta", ] resolver = "2" +license = "MIT" [profile.release] opt-level = 3 diff --git a/bench-electron/electron.vite.config.ts b/bench-electron/electron.vite.config.ts index 4915341..6d90128 100644 --- a/bench-electron/electron.vite.config.ts +++ b/bench-electron/electron.vite.config.ts @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + import { resolve } from 'path' import { defineConfig, externalizeDepsPlugin } from 'electron-vite' import react from '@vitejs/plugin-react' diff --git a/bench-electron/package.json b/bench-electron/package.json index 3d68617..116958a 100644 --- a/bench-electron/package.json +++ b/bench-electron/package.json @@ -1,6 +1,7 @@ { "name": "dynwinrt-bench-electron", "version": "1.0.0", + "license": "MIT", "description": "Electron benchmark for dynwinrt WinRT dynamic invocation", "main": "./out/main/index.js", "scripts": { diff --git a/bench-electron/src/main/index.ts b/bench-electron/src/main/index.ts index 326df85..68c6e45 100644 --- a/bench-electron/src/main/index.ts +++ b/bench-electron/src/main/index.ts @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + import { app, BrowserWindow, ipcMain } from 'electron' import { join } from 'path' import { createRequire } from 'module' diff --git a/bench-electron/src/preload/index.d.ts b/bench-electron/src/preload/index.d.ts index b684020..c0e7297 100644 --- a/bench-electron/src/preload/index.d.ts +++ b/bench-electron/src/preload/index.d.ts @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + declare global { interface Window { api: { diff --git a/bench-electron/src/preload/index.ts b/bench-electron/src/preload/index.ts index c92d4c2..1b6b48e 100644 --- a/bench-electron/src/preload/index.ts +++ b/bench-electron/src/preload/index.ts @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + import { contextBridge, ipcRenderer } from 'electron' const api = { diff --git a/bindings/js/__test__/index.spec.ts b/bindings/js/__test__/index.spec.ts index e652ff9..b3212b0 100644 --- a/bindings/js/__test__/index.spec.ts +++ b/bindings/js/__test__/index.spec.ts @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + import test from 'ava' import { diff --git a/bindings/js/__test__/package.json b/bindings/js/__test__/package.json index 3dbc1ca..3de1080 100644 --- a/bindings/js/__test__/package.json +++ b/bindings/js/__test__/package.json @@ -1,3 +1,4 @@ { - "type": "module" + "type": "module", + "license": "MIT" } diff --git a/bindings/js/benchmark/bench.ts b/bindings/js/benchmark/bench.ts index 2128b55..252b10e 100644 --- a/bindings/js/benchmark/bench.ts +++ b/bindings/js/benchmark/bench.ts @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + import { Bench } from 'tinybench' import { plus100 } from '../index.js' diff --git a/bindings/js/benchmark/package.json b/bindings/js/benchmark/package.json index 3dbc1ca..3de1080 100644 --- a/bindings/js/benchmark/package.json +++ b/bindings/js/benchmark/package.json @@ -1,3 +1,4 @@ { - "type": "module" + "type": "module", + "license": "MIT" } diff --git a/bindings/js/samples/array_struct.ts b/bindings/js/samples/array_struct.ts index a947ece..541fa29 100644 --- a/bindings/js/samples/array_struct.ts +++ b/bindings/js/samples/array_struct.ts @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + /** * Test: Array and Struct bindings for dynwinrt-js * diff --git a/bindings/js/samples/bench_3way.ts b/bindings/js/samples/bench_3way.ts index 079cb44..a17a15c 100644 --- a/bindings/js/samples/bench_3way.ts +++ b/bindings/js/samples/bench_3way.ts @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + /** * 4-way benchmark: C++ static vs Rust raw N-API vs Rust napi-rs vs Dynamic * diff --git a/bindings/js/samples/benchmark.ts b/bindings/js/samples/benchmark.ts index 74820e1..44d8ecc 100644 --- a/bindings/js/samples/benchmark.ts +++ b/bindings/js/samples/benchmark.ts @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + /** * Benchmark: JS → C++/WinRT static projection vs JS → dynwinrt (end-to-end) * diff --git a/bindings/js/samples/ocr.ts b/bindings/js/samples/ocr.ts index 06d945e..5eeb9b9 100644 --- a/bindings/js/samples/ocr.ts +++ b/bindings/js/samples/ocr.ts @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + /** * OCR Demo: Pure dynamic WinRT calls using registerInterface + invoke. * Requires WinAppSDK with AI features and package identity. diff --git a/bindings/js/samples/picker.ts b/bindings/js/samples/picker.ts index 1ac82a1..a4adb82 100644 --- a/bindings/js/samples/picker.ts +++ b/bindings/js/samples/picker.ts @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + import { initWinappsdk, DynWinRtValue, diff --git a/bindings/js/samples/test_progress.ts b/bindings/js/samples/test_progress.ts index 7751ac6..794c9c3 100644 --- a/bindings/js/samples/test_progress.ts +++ b/bindings/js/samples/test_progress.ts @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + /** * Test: IAsyncOperationWithProgress progress handler * Uses InMemoryRandomAccessStream.WriteAsync → IAsyncOperationWithProgress diff --git a/bindings/js/samples/test_register_interface.ts b/bindings/js/samples/test_register_interface.ts index 9269f75..8b2e971 100644 --- a/bindings/js/samples/test_register_interface.ts +++ b/bindings/js/samples/test_register_interface.ts @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + /** * Test: registerInterface + addMethod + method/methodByName + invoke * Uses Windows.Foundation.Uri (no WinAppSDK needed) diff --git a/bindings/js/src/lib.rs b/bindings/js/src/lib.rs index 518b293..bd763e8 100644 --- a/bindings/js/src/lib.rs +++ b/bindings/js/src/lib.rs @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + #![deny(clippy::all)] #![allow(clippy::missing_safety_doc)] diff --git a/bindings/js/static-bench-cpp/find_sdk.js b/bindings/js/static-bench-cpp/find_sdk.js index a11a105..6c07684 100644 --- a/bindings/js/static-bench-cpp/find_sdk.js +++ b/bindings/js/static-bench-cpp/find_sdk.js @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + // Finds the C++/WinRT include directory from the latest Windows SDK. const fs = require('fs'); const path = require('path'); diff --git a/bindings/js/static-bench-cpp/package.json b/bindings/js/static-bench-cpp/package.json index 95a9968..3404355 100644 --- a/bindings/js/static-bench-cpp/package.json +++ b/bindings/js/static-bench-cpp/package.json @@ -2,6 +2,7 @@ "name": "static-bench-cppwinrt", "version": "1.0.0", "private": true, + "license": "MIT", "description": "C++/WinRT static projection benchmark addon (pure C++, no Rust)", "scripts": { "build": "node-gyp rebuild --release", diff --git a/bindings/js/static-bench-rust/Cargo.toml b/bindings/js/static-bench-rust/Cargo.toml index 9c9a52a..cd6d497 100644 --- a/bindings/js/static-bench-rust/Cargo.toml +++ b/bindings/js/static-bench-rust/Cargo.toml @@ -2,6 +2,7 @@ name = "static-bench-rust" version = "0.1.0" edition = "2021" +license = "MIT" [lib] crate-type = ["cdylib"] diff --git a/bindings/js/static-bench-rust/build.rs b/bindings/js/static-bench-rust/build.rs index b827f5d..c7e589e 100644 --- a/bindings/js/static-bench-rust/build.rs +++ b/bindings/js/static-bench-rust/build.rs @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + fn main() { // Link against node.lib so N-API symbols resolve at load time. // node-gyp puts node.lib in the node-gyp cache; napi-build finds it. diff --git a/bindings/js/static-bench-rust/src/lib.rs b/bindings/js/static-bench-rust/src/lib.rs index 7c5ccdc..c906586 100644 --- a/bindings/js/static-bench-rust/src/lib.rs +++ b/bindings/js/static-bench-rust/src/lib.rs @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + //! Raw N-API Rust static benchmark — minimal overhead, no napi-rs macros. //! Matches the C++ static-bench-cpp addon 1:1. diff --git a/bindings/py/src/lib.rs b/bindings/py/src/lib.rs index 2466205..a989f3f 100644 --- a/bindings/py/src/lib.rs +++ b/bindings/py/src/lib.rs @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + use pyo3::prelude::*; mod runtime; diff --git a/bindings/py/src/runtime.rs b/bindings/py/src/runtime.rs index 278a601..f433ebe 100644 --- a/bindings/py/src/runtime.rs +++ b/bindings/py/src/runtime.rs @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + use std::sync::Arc; use dynwinrt; diff --git a/bindings/py/src/values.rs b/bindings/py/src/values.rs index 44a51cc..cf52c97 100644 --- a/bindings/py/src/values.rs +++ b/bindings/py/src/values.rs @@ -1 +1,4 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + // Value conversion utilities — currently handled inline in runtime.rs diff --git a/bindings/py/tests/test_basic.py b/bindings/py/tests/test_basic.py index 8ad2ed2..bd89524 100644 --- a/bindings/py/tests/test_basic.py +++ b/bindings/py/tests/test_basic.py @@ -1,3 +1,6 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. + import dynwinrt_py from dynwinrt_py import ( DynWinRTType, diff --git a/bindings/py/tests/test_runtime.py b/bindings/py/tests/test_runtime.py index 675e079..da24cdc 100644 --- a/bindings/py/tests/test_runtime.py +++ b/bindings/py/tests/test_runtime.py @@ -1,3 +1,6 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. + import dynwinrt_py def test_winrt_method(): diff --git a/crates/dynwinrt/benches/bench.rs b/crates/dynwinrt/benches/bench.rs index 278ec1d..15bfb1f 100644 --- a/crates/dynwinrt/benches/bench.rs +++ b/crates/dynwinrt/benches/bench.rs @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + //! Benchmarks: dynwinrt dynamic invocation vs windows-rs static projection. //! //! Groups: diff --git a/crates/dynwinrt/build.rs b/crates/dynwinrt/build.rs index f328e4d..b0d5c0f 100644 --- a/crates/dynwinrt/build.rs +++ b/crates/dynwinrt/build.rs @@ -1 +1,4 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + fn main() {} diff --git a/crates/dynwinrt/src/abi.rs b/crates/dynwinrt/src/abi.rs index f2d8604..434db97 100644 --- a/crates/dynwinrt/src/abi.rs +++ b/crates/dynwinrt/src/abi.rs @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub enum AbiType { Bool, diff --git a/crates/dynwinrt/src/array.rs b/crates/dynwinrt/src/array.rs index 0f4640a..38e8ce4 100644 --- a/crates/dynwinrt/src/array.rs +++ b/crates/dynwinrt/src/array.rs @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + use core::ffi::c_void; use windows_core::{IUnknown, Interface}; diff --git a/crates/dynwinrt/src/call.rs b/crates/dynwinrt/src/call.rs index e851e79..2d4adea 100644 --- a/crates/dynwinrt/src/call.rs +++ b/crates/dynwinrt/src/call.rs @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + use core::ffi::c_void; use libffi::middle::{Arg, arg}; use windows_core::{HRESULT, Interface}; diff --git a/crates/dynwinrt/src/com_helpers.rs b/crates/dynwinrt/src/com_helpers.rs index a639a69..a0d9e76 100644 --- a/crates/dynwinrt/src/com_helpers.rs +++ b/crates/dynwinrt/src/com_helpers.rs @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + #![allow(unsafe_op_in_unsafe_fn)] //! Shared COM boilerplate macros and helpers for dynamic WinRT collection implementations. //! diff --git a/crates/dynwinrt/src/dasync.rs b/crates/dynwinrt/src/dasync.rs index 1d459d1..e30b36f 100644 --- a/crates/dynwinrt/src/dasync.rs +++ b/crates/dynwinrt/src/dasync.rs @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + use std::future::{Future, IntoFuture}; use std::pin::Pin; use std::sync::{Arc, Mutex}; diff --git a/crates/dynwinrt/src/delegate.rs b/crates/dynwinrt/src/delegate.rs index 6c911c5..23226b1 100644 --- a/crates/dynwinrt/src/delegate.rs +++ b/crates/dynwinrt/src/delegate.rs @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + //! Dynamic WinRT delegate (callback) implementation. //! //! A delegate is a COM object with IUnknown + a single `Invoke` method. diff --git a/crates/dynwinrt/src/interfaces.rs b/crates/dynwinrt/src/interfaces.rs index d74f405..bc80f88 100644 --- a/crates/dynwinrt/src/interfaces.rs +++ b/crates/dynwinrt/src/interfaces.rs @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + use std::sync::Arc; use crate::signature::{InterfaceSignature, MethodSignature}; use crate::metadata_table::MetadataTable; diff --git a/crates/dynwinrt/src/lib.rs b/crates/dynwinrt/src/lib.rs index 1f6aaa9..ada7674 100644 --- a/crates/dynwinrt/src/lib.rs +++ b/crates/dynwinrt/src/lib.rs @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + use windows::core::*; mod abi; diff --git a/crates/dynwinrt/src/map.rs b/crates/dynwinrt/src/map.rs index 1619d9c..df77ee2 100644 --- a/crates/dynwinrt/src/map.rs +++ b/crates/dynwinrt/src/map.rs @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + #![allow(unsafe_op_in_unsafe_fn)] //! Dynamic WinRT IMap / IMapView / IKeyValuePair / IIterable implementation. //! diff --git a/crates/dynwinrt/src/meta.rs b/crates/dynwinrt/src/meta.rs index 8f86d10..e41785f 100644 --- a/crates/dynwinrt/src/meta.rs +++ b/crates/dynwinrt/src/meta.rs @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + #[cfg(test)] mod tests { #[test] diff --git a/crates/dynwinrt/src/metadata_table/arena.rs b/crates/dynwinrt/src/metadata_table/arena.rs index a9a0b32..4646de7 100644 --- a/crates/dynwinrt/src/metadata_table/arena.rs +++ b/crates/dynwinrt/src/metadata_table/arena.rs @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + use std::alloc::Layout; use windows_core::GUID; diff --git a/crates/dynwinrt/src/metadata_table/iid.rs b/crates/dynwinrt/src/metadata_table/iid.rs index 8c65188..df8ccb4 100644 --- a/crates/dynwinrt/src/metadata_table/iid.rs +++ b/crates/dynwinrt/src/metadata_table/iid.rs @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + use windows_core::GUID; use super::MetadataTable; diff --git a/crates/dynwinrt/src/metadata_table/method_handle.rs b/crates/dynwinrt/src/metadata_table/method_handle.rs index 222fda5..ebe4cc2 100644 --- a/crates/dynwinrt/src/metadata_table/method_handle.rs +++ b/crates/dynwinrt/src/metadata_table/method_handle.rs @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + use std::sync::Arc; use crate::value::WinRTValue; diff --git a/crates/dynwinrt/src/metadata_table/mod.rs b/crates/dynwinrt/src/metadata_table/mod.rs index 26d6143..87e055d 100644 --- a/crates/dynwinrt/src/metadata_table/mod.rs +++ b/crates/dynwinrt/src/metadata_table/mod.rs @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + mod type_kind; mod type_handle; mod value_data; diff --git a/crates/dynwinrt/src/metadata_table/type_handle.rs b/crates/dynwinrt/src/metadata_table/type_handle.rs index a45998d..5d962a8 100644 --- a/crates/dynwinrt/src/metadata_table/type_handle.rs +++ b/crates/dynwinrt/src/metadata_table/type_handle.rs @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + use std::alloc::Layout; use std::sync::Arc; diff --git a/crates/dynwinrt/src/metadata_table/type_kind.rs b/crates/dynwinrt/src/metadata_table/type_kind.rs index ca6eb95..ce4e5dc 100644 --- a/crates/dynwinrt/src/metadata_table/type_kind.rs +++ b/crates/dynwinrt/src/metadata_table/type_kind.rs @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + use windows_core::{GUID, Interface}; // =========================================================================== diff --git a/crates/dynwinrt/src/metadata_table/value_data.rs b/crates/dynwinrt/src/metadata_table/value_data.rs index 8abcae9..d087dd2 100644 --- a/crates/dynwinrt/src/metadata_table/value_data.rs +++ b/crates/dynwinrt/src/metadata_table/value_data.rs @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + use core::ffi::c_void; use windows_core::{IUnknown, Interface}; diff --git a/crates/dynwinrt/src/result.rs b/crates/dynwinrt/src/result.rs index 2a7bba2..6aec87a 100644 --- a/crates/dynwinrt/src/result.rs +++ b/crates/dynwinrt/src/result.rs @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + use crate::metadata_table::TypeKind; use crate::abi::AbiType; diff --git a/crates/dynwinrt/src/roapi.rs b/crates/dynwinrt/src/roapi.rs index c5af75f..45b5e8c 100644 --- a/crates/dynwinrt/src/roapi.rs +++ b/crates/dynwinrt/src/roapi.rs @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + use windows::Win32::System::WinRT::{IActivationFactory, RoGetActivationFactory}; use windows::Win32::System::LibraryLoader::{LoadLibraryW, GetProcAddress}; use windows_core::{HSTRING, HRESULT, IUnknown, Interface, PCSTR}; diff --git a/crates/dynwinrt/src/signature.rs b/crates/dynwinrt/src/signature.rs index 75eef7d..b0c6ba6 100644 --- a/crates/dynwinrt/src/signature.rs +++ b/crates/dynwinrt/src/signature.rs @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + use libffi::middle::Cif; use std::sync::Arc; use windows::core::{GUID, HSTRING, Interface}; diff --git a/crates/dynwinrt/src/value.rs b/crates/dynwinrt/src/value.rs index c1c2571..ff4e7b8 100644 --- a/crates/dynwinrt/src/value.rs +++ b/crates/dynwinrt/src/value.rs @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + use libffi::middle::Arg; use windows::Win32::System::WinRT::IActivationFactory; use windows_core::{GUID, IUnknown, Interface}; diff --git a/crates/dynwinrt/src/vector.rs b/crates/dynwinrt/src/vector.rs index ae97677..8acb2a1 100644 --- a/crates/dynwinrt/src/vector.rs +++ b/crates/dynwinrt/src/vector.rs @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + #![allow(unsafe_op_in_unsafe_fn)] //! Dynamic WinRT IVector / IIterable / IVectorView / IIterator implementation. //! diff --git a/crates/dynwinrt/src/winapp.rs b/crates/dynwinrt/src/winapp.rs index de652a7..e690ede 100644 --- a/crates/dynwinrt/src/winapp.rs +++ b/crates/dynwinrt/src/winapp.rs @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + use std::ffi::CString; use windows::ApplicationModel::PackageVersion; diff --git a/tests/sample/package.json b/tests/sample/package.json index f677aa4..9abca28 100644 --- a/tests/sample/package.json +++ b/tests/sample/package.json @@ -1,5 +1,6 @@ { "private": true, + "license": "MIT", "dependencies": { "dynwinrt-js": "file:./dynwinrt-js" } diff --git a/tests/sample/test_picker.ts b/tests/sample/test_picker.ts index 9f2508b..0c3515f 100644 --- a/tests/sample/test_picker.ts +++ b/tests/sample/test_picker.ts @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + /** * End-to-end test using 100% winrt-meta generated bindings + dynwinrt-js. * Tests: create picker, set properties, use IVector_String.append(), open dialog. diff --git a/tests/sample/test_uri.ts b/tests/sample/test_uri.ts index de69a91..60dd4a6 100644 --- a/tests/sample/test_uri.ts +++ b/tests/sample/test_uri.ts @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + /** * Basic test using Windows SDK only — no WinAppSDK needed. * Run: ./winrt-meta.exe generate --namespace "Windows.Foundation" --class-name "Uri" --output ./generated-uri diff --git a/tests/test_simple_array.rs b/tests/test_simple_array.rs index ef12c25..f61bf44 100644 --- a/tests/test_simple_array.rs +++ b/tests/test_simple_array.rs @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + // Simple test for PropertyValue.CreateInt32Array // This is the SIMPLEST possible array API to test with diff --git a/tools/winrt-meta/npm/cli.js b/tools/winrt-meta/npm/cli.js index 8d87693..a9b5fb9 100644 --- a/tools/winrt-meta/npm/cli.js +++ b/tools/winrt-meta/npm/cli.js @@ -1,4 +1,7 @@ #!/usr/bin/env node +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + const { execFileSync } = require("child_process"); const path = require("path"); const fs = require("fs"); diff --git a/tools/winrt-meta/npm/lib/compile.js b/tools/winrt-meta/npm/lib/compile.js index 9eab193..ba0cb7c 100644 --- a/tools/winrt-meta/npm/lib/compile.js +++ b/tools/winrt-meta/npm/lib/compile.js @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + const path = require("path"); const fs = require("fs"); diff --git a/tools/winrt-meta/src/codegen/common.rs b/tools/winrt-meta/src/codegen/common.rs index 0bc4a90..d3b4a81 100644 --- a/tools/winrt-meta/src/codegen/common.rs +++ b/tools/winrt-meta/src/codegen/common.rs @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + use std::collections::HashSet; use std::sync::LazyLock; diff --git a/tools/winrt-meta/src/codegen/method.rs b/tools/winrt-meta/src/codegen/method.rs index 4c378d4..9b731e3 100644 --- a/tools/winrt-meta/src/codegen/method.rs +++ b/tools/winrt-meta/src/codegen/method.rs @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + use std::collections::HashSet; use crate::meta::{InterfaceMeta, MethodMeta, ParamDirection}; diff --git a/tools/winrt-meta/src/codegen/mod.rs b/tools/winrt-meta/src/codegen/mod.rs index 6fd8011..7f826ca 100644 --- a/tools/winrt-meta/src/codegen/mod.rs +++ b/tools/winrt-meta/src/codegen/mod.rs @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + pub mod common; pub(crate) mod method; pub mod typescript; diff --git a/tools/winrt-meta/src/codegen/typescript.rs b/tools/winrt-meta/src/codegen/typescript.rs index b3bd09e..d7f30c6 100644 --- a/tools/winrt-meta/src/codegen/typescript.rs +++ b/tools/winrt-meta/src/codegen/typescript.rs @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + use std::collections::HashSet; use crate::meta::{ClassMeta, InterfaceMeta, ParamDirection}; diff --git a/tools/winrt-meta/src/lib.rs b/tools/winrt-meta/src/lib.rs index 2a8fbb4..213aa90 100644 --- a/tools/winrt-meta/src/lib.rs +++ b/tools/winrt-meta/src/lib.rs @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + pub mod codegen; pub mod meta; pub mod types; diff --git a/tools/winrt-meta/src/main.rs b/tools/winrt-meta/src/main.rs index abf2e81..5695b65 100644 --- a/tools/winrt-meta/src/main.rs +++ b/tools/winrt-meta/src/main.rs @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + use std::collections::{HashMap, HashSet}; use std::fs; use std::path::Path; diff --git a/tools/winrt-meta/src/meta.rs b/tools/winrt-meta/src/meta.rs index 71d0592..e1bfadf 100644 --- a/tools/winrt-meta/src/meta.rs +++ b/tools/winrt-meta/src/meta.rs @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + use std::collections::HashSet; use std::path::Path; diff --git a/tools/winrt-meta/src/types.rs b/tools/winrt-meta/src/types.rs index 5d323ce..d152b14 100644 --- a/tools/winrt-meta/src/types.rs +++ b/tools/winrt-meta/src/types.rs @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + /// The kind of a named WinRT type reference. #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Ord)] pub enum TypeKind { diff --git a/tools/winrt-meta/tests/snapshot_test.rs b/tools/winrt-meta/tests/snapshot_test.rs index 2cd6887..0a026e0 100644 --- a/tools/winrt-meta/tests/snapshot_test.rs +++ b/tools/winrt-meta/tests/snapshot_test.rs @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + //! E2E snapshot test: generate TypeScript for Windows.Foundation.Uri and compare //! against committed snapshots. //!