diff --git a/Cargo.toml b/Cargo.toml index 7cef60a2..9453611a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ version = "0.3.1" description = "A fast, minimal, and ergonomic entity-component-system" authors = ["Benjamin Saunders "] edition = "2018" -license = "Apache-2.0" +license = "MIT OR Apache-2.0" repository = "https://github.com/Ralith/hecs" readme = "README.md" keywords = ["ecs", "entity"] diff --git a/LICENSE b/LICENSE-APACHE similarity index 100% rename from LICENSE rename to LICENSE-APACHE diff --git a/LICENSE-MIT b/LICENSE-MIT new file mode 100644 index 00000000..b76d2455 --- /dev/null +++ b/LICENSE-MIT @@ -0,0 +1,7 @@ +Copyright (c) 2020 The hecs Developers + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md index 125d8f9e..f436b8cc 100644 --- a/README.md +++ b/README.md @@ -88,6 +88,22 @@ hecs builds on these successes by focusing on further simplification, boiling the paradigm down to a minimal, light-weight and ergonomic core, without compromising on performance or flexibility. +## License + +Licensed under either of + + * Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0) + * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT) + +at your option. + +### Contribution + +Unless you explicitly state otherwise, any contribution intentionally +submitted for inclusion in the work by you, as defined in the +Apache-2.0 license, shall be dual licensed as above, without any +additional terms or conditions. + ### Disclaimer This is not an official Google product (experimental or otherwise), it is just diff --git a/benches/bench.rs b/benches/bench.rs index c339dbf6..ab62a8c3 100644 --- a/benches/bench.rs +++ b/benches/bench.rs @@ -1,16 +1,9 @@ // Copyright 2019 Google LLC // -// 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 -// -// https://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. +// Licensed under the Apache License, Version 2.0, or the MIT license , at your option. This file may not be +// copied, modified, or distributed except according to those terms. use bencher::{benchmark_group, benchmark_main, Bencher}; use hecs::*; diff --git a/macros/src/lib.rs b/macros/src/lib.rs index 88491e38..516bc4e2 100644 --- a/macros/src/lib.rs +++ b/macros/src/lib.rs @@ -1,16 +1,9 @@ // Copyright 2019 Google LLC // -// 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 -// -// https://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. +// Licensed under the Apache License, Version 2.0, or the MIT license , at your option. This file may not be +// copied, modified, or distributed except according to those terms. extern crate proc_macro; diff --git a/src/archetype.rs b/src/archetype.rs index cfebf6f7..70efdb35 100644 --- a/src/archetype.rs +++ b/src/archetype.rs @@ -1,16 +1,9 @@ // Copyright 2019 Google LLC // -// 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 -// -// https://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. +// Licensed under the Apache License, Version 2.0, or the MIT license , at your option. This file may not be +// copied, modified, or distributed except according to those terms. use crate::alloc::alloc::{alloc, dealloc, Layout}; use crate::alloc::boxed::Box; diff --git a/src/borrow.rs b/src/borrow.rs index c42a4bb9..d80c5222 100644 --- a/src/borrow.rs +++ b/src/borrow.rs @@ -1,16 +1,9 @@ // Copyright 2019 Google LLC // -// 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 -// -// https://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. +// Licensed under the Apache License, Version 2.0, or the MIT license , at your option. This file may not be +// copied, modified, or distributed except according to those terms. use core::any::TypeId; use core::ops::{Deref, DerefMut}; diff --git a/src/bundle.rs b/src/bundle.rs index 16957355..99d32aef 100644 --- a/src/bundle.rs +++ b/src/bundle.rs @@ -1,16 +1,9 @@ // Copyright 2019 Google LLC // -// 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 -// -// https://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. +// Licensed under the Apache License, Version 2.0, or the MIT license , at your option. This file may not be +// copied, modified, or distributed except according to those terms. use crate::alloc::{vec, vec::Vec}; use core::any::{type_name, TypeId}; diff --git a/src/entity_builder.rs b/src/entity_builder.rs index 4f847d49..f346fbd5 100644 --- a/src/entity_builder.rs +++ b/src/entity_builder.rs @@ -1,16 +1,9 @@ // Copyright 2019 Google LLC // -// 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 -// -// https://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. +// Licensed under the Apache License, Version 2.0, or the MIT license , at your option. This file may not be +// copied, modified, or distributed except according to those terms. use crate::alloc::alloc::{alloc, dealloc, Layout}; use crate::alloc::vec::Vec; diff --git a/src/lib.rs b/src/lib.rs index 4e9834c8..3e24c90f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,16 +1,9 @@ // Copyright 2019 Google LLC // -// 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 -// -// https://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. +// Licensed under the Apache License, Version 2.0, or the MIT license , at your option. This file may not be +// copied, modified, or distributed except according to those terms. //! A handy ECS //! diff --git a/src/query.rs b/src/query.rs index 40d0b630..2c44ee15 100644 --- a/src/query.rs +++ b/src/query.rs @@ -1,16 +1,9 @@ // Copyright 2019 Google LLC // -// 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 -// -// https://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. +// Licensed under the Apache License, Version 2.0, or the MIT license , at your option. This file may not be +// copied, modified, or distributed except according to those terms. use core::marker::PhantomData; use core::ptr::NonNull; diff --git a/src/world.rs b/src/world.rs index 0f294e03..653a3235 100644 --- a/src/world.rs +++ b/src/world.rs @@ -1,16 +1,9 @@ // Copyright 2019 Google LLC // -// 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 -// -// https://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. +// Licensed under the Apache License, Version 2.0, or the MIT license , at your option. This file may not be +// copied, modified, or distributed except according to those terms. use crate::alloc::vec::Vec; use core::any::TypeId; diff --git a/tests/tests.rs b/tests/tests.rs index 3a115ea7..4d46fdd7 100644 --- a/tests/tests.rs +++ b/tests/tests.rs @@ -1,16 +1,9 @@ // Copyright 2019 Google LLC // -// 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 -// -// https://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. +// Licensed under the Apache License, Version 2.0, or the MIT license , at your option. This file may not be +// copied, modified, or distributed except according to those terms. use hecs::*;