mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-28 03:43:23 +00:00
License rust and c source files
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
5fb8a9f7e5
commit
faaa4438d6
@ -1,3 +1,6 @@
|
||||
// Licensed under the Apache License, Version 2.0 or the MIT License.
|
||||
// Copyright (C) 2023-2024 Ant Group.
|
||||
|
||||
use std::collections::{BTreeMap, HashSet};
|
||||
use std::{env, fs, io, path::PathBuf};
|
||||
|
||||
|
@ -1,3 +1,6 @@
|
||||
// Licensed under the Apache License, Version 2.0 or the MIT License.
|
||||
// Copyright (C) 2023-2024 Ant Group.
|
||||
|
||||
#![feature(rustc_private)]
|
||||
|
||||
extern crate rustc_ast;
|
||||
|
@ -1,4 +1,7 @@
|
||||
//! This implementation is from rust-clippy
|
||||
// Licensed under the Apache License, Version 2.0 or the MIT License.
|
||||
// Copyright (C) 2023-2024 Ant Group.
|
||||
|
||||
// This implementation is from rust clippy. We modified the code.
|
||||
|
||||
fn main() {
|
||||
// Forward the profile to the main compilation
|
||||
|
@ -1,7 +1,8 @@
|
||||
//! Licensed under the Apache License, Version 2.0 or the MIT License.
|
||||
//! Copyright (C) 2023 Ant Group.
|
||||
// Licensed under the Apache License, Version 2.0 or the MIT License.
|
||||
// Copyright (C) 2023-2024 Ant Group.
|
||||
|
||||
// This implementation is from rust clippy. We modified the code.
|
||||
|
||||
//! This implementation is from rust clippy. We modified the code.
|
||||
#![feature(rustc_private)]
|
||||
#![feature(once_cell)]
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
//! Licensed under the Apache License, Version 2.0 or the MIT License.
|
||||
//! Copyright (C) 2023 Ant Group.
|
||||
// Licensed under the Apache License, Version 2.0 or the MIT License.
|
||||
// Copyright (C) 2023-2024 Ant Group.
|
||||
|
||||
//! This implementation is from rust clippy. We modified the code.
|
||||
// This implementation is from rust clippy. We modified the code.
|
||||
|
||||
use std::env;
|
||||
use std::path::PathBuf;
|
||||
|
@ -1,3 +1,6 @@
|
||||
// Licensed under the Apache License, Version 2.0 or the MIT License.
|
||||
// Copyright (C) 2023-2024 Ant Group.
|
||||
|
||||
//! This test checks that if two components have same name, the compiler will panic.
|
||||
|
||||
#![feature(once_cell)]
|
||||
|
@ -1,3 +1,6 @@
|
||||
// Licensed under the Apache License, Version 2.0 or the MIT License.
|
||||
// Copyright (C) 2023-2024 Ant Group.
|
||||
|
||||
//! This test checks that if Components.toml is missed, the compiler will panic.
|
||||
|
||||
#![feature(once_cell)]
|
||||
|
@ -1,3 +1,6 @@
|
||||
// Licensed under the Apache License, Version 2.0 or the MIT License.
|
||||
// Copyright (C) 2023-2024 Ant Group.
|
||||
|
||||
//! This test checks that if cargo-component can control reexported entry points.
|
||||
|
||||
#![feature(once_cell)]
|
||||
|
@ -1,3 +1,6 @@
|
||||
// Licensed under the Apache License, Version 2.0 or the MIT License.
|
||||
// Copyright (C) 2023-2024 Ant Group.
|
||||
|
||||
//! This test checks that visiting controlled resources in whitelist is allowed.
|
||||
|
||||
#![feature(once_cell)]
|
||||
|
@ -1,3 +1,6 @@
|
||||
// Licensed under the Apache License, Version 2.0 or the MIT License.
|
||||
// Copyright (C) 2023-2024 Ant Group.
|
||||
|
||||
#![allow(unused)]
|
||||
|
||||
use std::path::PathBuf;
|
||||
|
@ -1,3 +1,6 @@
|
||||
// Licensed under the Apache License, Version 2.0 or the MIT License.
|
||||
// Copyright (C) 2023-2024 Ant Group.
|
||||
|
||||
//! This test checks that if cargo-component can control method and trait method
|
||||
|
||||
#![feature(once_cell)]
|
||||
|
@ -1,4 +1,8 @@
|
||||
//! This test checks that if controlled resource not in whitelist is visited, cargo-component will report warning message.
|
||||
// Licensed under the Apache License, Version 2.0 or the MIT License.
|
||||
// Copyright (C) 2023-2024 Ant Group.
|
||||
|
||||
//! This test checks that if controlled resource not in whitelist is visited, cargo-component will
|
||||
//! report warning message.
|
||||
|
||||
#![feature(once_cell)]
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
use proc_macro2::{TokenStream, TokenTree};
|
||||
use quote::{ToTokens, TokenStreamExt};
|
||||
use syn::parse::Parse;
|
||||
|
@ -1,3 +1,5 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
//!This crate defines the component system related macros.
|
||||
//!
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
use std::{collections::HashMap, fs::File, io::Read, ops::Add, process::Command, str::FromStr};
|
||||
|
||||
use json::JsonValue;
|
||||
|
@ -1,3 +1,5 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
//! Component system
|
||||
//!
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
use std::sync::atomic::AtomicBool;
|
||||
use std::sync::atomic::Ordering::Relaxed;
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
use std::sync::atomic::{Ordering::Relaxed, AtomicBool};
|
||||
|
||||
use component::init_component;
|
||||
|
@ -1,3 +1,5 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
use second_init::HAS_INIT;
|
||||
use std::sync::atomic::Ordering::Relaxed;
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
use std::sync::atomic::{Ordering::Relaxed, AtomicBool};
|
||||
|
||||
use component::init_component;
|
||||
|
@ -1,3 +1,5 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
use first_init::HAS_INIT;
|
||||
use component::init_component;
|
||||
use std::sync::atomic::Ordering::Relaxed;
|
||||
|
@ -1,3 +1,5 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
//! This crate defines two attribute macros `controlled` and `uncontrolled`.
|
||||
//! This two macros are attached to functions or static variables to enable crate level access control.
|
||||
//! To use these two macros, a crate must at first registers a tool named `component_access_control`,
|
||||
|
Reference in New Issue
Block a user