Relicense under dual Apache/MIT

This commit is contained in:
mratsim 2018-03-02 11:48:08 +01:00
parent fb2659703d
commit 8b8f2a55c4
19 changed files with 163 additions and 43 deletions

21
LICENSE-MIT Normal file
View File

@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2018 Status Research & Development GmbH
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.

View File

@ -2,6 +2,7 @@
[![Build Status (Travis)](https://img.shields.io/travis/status-im/mpint/master.svg?label=Linux%20/%20macOS "Linux/macOS build status (Travis)")](https://travis-ci.org/status-im/mpint) [![Build Status (Travis)](https://img.shields.io/travis/status-im/mpint/master.svg?label=Linux%20/%20macOS "Linux/macOS build status (Travis)")](https://travis-ci.org/status-im/mpint)
[![License: Apache](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![License: Apache](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
![Stability: experimental](https://img.shields.io/badge/stability-experimental-orange.svg) ![Stability: experimental](https://img.shields.io/badge/stability-experimental-orange.svg)
A fast and portable multi-precision integer library in pure Nim A fast and portable multi-precision integer library in pure Nim
@ -14,3 +15,12 @@ Main focus:
- casting to and from array of bytes - casting to and from array of bytes
- converting to and from Hex - converting to and from Hex
- converting to and from decimal strings - converting to and from decimal strings
## 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.

View File

@ -2,12 +2,12 @@ packageName = "mpint"
version = "0.0.1" version = "0.0.1"
author = "Status Research & Development GmbH" author = "Status Research & Development GmbH"
description = "Efficient multiprecision int in Nim" description = "Efficient multiprecision int in Nim"
license = "Apache License 2.0" license = "Apache License 2.0 or MIT"
srcDir = "src" srcDir = "src"
### Dependencies ### Dependencies
requires "nim >= 0.17.2" requires "nim >= 0.18"
proc test(name: string, lang: string = "c") = proc test(name: string, lang: string = "c") =
if not dirExists "build": if not dirExists "build":

View File

@ -1,5 +1,11 @@
# Copyright (c) 2018 Status Research & Development GmbH # Mpint
# Distributed under the MIT License (license terms are at http://opensource.org/licenses/MIT). # Copyright 2018 Status Research & Development GmbH
# 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. This file may not be copied, modified, or distributed except according to those terms.
import ./uint_type, import ./uint_type,
./uint_init, ./uint_init,

View File

@ -1,5 +1,11 @@
# Copyright (c) 2018 Status Research & Development GmbH # Mpint
# Distributed under the MIT License (license terms are at http://opensource.org/licenses/MIT). # Copyright 2018 Status Research & Development GmbH
# 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. This file may not be copied, modified, or distributed except according to those terms.
import ../uint_type import ../uint_type

View File

@ -1,5 +1,11 @@
# Copyright (c) 2018 Status Research & Development GmbH # Mpint
# Distributed under the MIT License (license terms are at http://opensource.org/licenses/MIT). # Copyright 2018 Status Research & Development GmbH
# 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. This file may not be copied, modified, or distributed except according to those terms.
import ../uint_type, import ../uint_type,
macros macros

View File

@ -1,5 +1,11 @@
# Copyright (c) 2018 Status Research & Development GmbH # Mpint
# Distributed under the MIT License (license terms are at http://opensource.org/licenses/MIT). # Copyright 2018 Status Research & Development GmbH
# 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. This file may not be copied, modified, or distributed except according to those terms.
import ./private/[bithacks, casting], import ./private/[bithacks, casting],
uint_type, uint_type,

View File

@ -1,5 +1,11 @@
# Copyright (c) 2018 Status Research & Development GmbH # Mpint
# Distributed under the MIT License (license terms are at http://opensource.org/licenses/MIT). # Copyright 2018 Status Research & Development GmbH
# 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. This file may not be copied, modified, or distributed except according to those terms.
import uint_type import uint_type

View File

@ -1,5 +1,11 @@
# Copyright (c) 2018 Status Research & Development GmbH # Mpint
# Distributed under the MIT License (license terms are at http://opensource.org/licenses/MIT). # Copyright 2018 Status Research & Development GmbH
# 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. This file may not be copied, modified, or distributed except according to those terms.
import ./uint_type import ./uint_type

View File

@ -1,9 +1,15 @@
# Copyright (c) 2018 Status Research & Development GmbH # Mpint
# Distributed under the MIT License (license terms are at http://opensource.org/licenses/MIT). # Copyright 2018 Status Research & Development GmbH
# 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. This file may not be copied, modified, or distributed except according to those terms.
import typetraits import typetraits
import ./private/bithacks, import ./private/[bithacks, casting],
./uint_type ./uint_type
proc initMpUint*[T: BaseUint; U: BaseUInt](n: T, base_type: typedesc[U]): MpUint[U] {.noSideEffect.} = proc initMpUint*[T: BaseUint; U: BaseUInt](n: T, base_type: typedesc[U]): MpUint[U] {.noSideEffect.} =

View File

@ -1,5 +1,11 @@
# Copyright (c) 2018 Status Research & Development GmbH # Mpint
# Distributed under the MIT License (license terms are at http://opensource.org/licenses/MIT). # Copyright 2018 Status Research & Development GmbH
# 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. This file may not be copied, modified, or distributed except according to those terms.
import uint_type import uint_type

View File

@ -1,6 +1,11 @@
# Copyright (c) 2018 Status Research & Development GmbH # Mpint
# Distributed under the MIT License (license terms are at http://opensource.org/licenses/MIT). # Copyright 2018 Status Research & Development GmbH
# 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. This file may not be copied, modified, or distributed except according to those terms.
type type
MpUint*{.packed.}[BaseUint] = object MpUint*{.packed.}[BaseUint] = object

View File

@ -1,5 +1,11 @@
# Copyright (c) 2018 Status Research & Development GmbH # Mpint
# Distributed under the MIT License (license terms are at http://opensource.org/licenses/MIT).$ # Copyright 2018 Status Research & Development GmbH
# 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. This file may not be copied, modified, or distributed except according to those terms.
import test_endianness, import test_endianness,
test_comparison, test_comparison,

View File

@ -1,5 +1,11 @@
# Copyright (c) 2018 Status Research & Development GmbH # Mpint
# Distributed under the MIT License (license terms are at http://opensource.org/licenses/MIT). # Copyright 2018 Status Research & Development GmbH
# 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. This file may not be copied, modified, or distributed except according to those terms.
import ../src/mpint, unittest import ../src/mpint, unittest

View File

@ -1,5 +1,11 @@
# Copyright (c) 2018 Status Research & Development GmbH # Mpint
# Distributed under the MIT License (license terms are at http://opensource.org/licenses/MIT). # Copyright 2018 Status Research & Development GmbH
# 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. This file may not be copied, modified, or distributed except according to those terms.
import ../src/mpint, unittest import ../src/mpint, unittest

View File

@ -1,5 +1,11 @@
# Copyright (c) 2018 Status Research & Development GmbH # Mpint
# Distributed under the MIT License (license terms are at http://opensource.org/licenses/MIT). # Copyright 2018 Status Research & Development GmbH
# 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. This file may not be copied, modified, or distributed except according to those terms.
import ../src/mpint, unittest import ../src/mpint, unittest

View File

@ -1,5 +1,11 @@
# Copyright (c) 2018 Status Research & Development GmbH # Mpint
# Distributed under the MIT License (license terms are at http://opensource.org/licenses/MIT). # Copyright 2018 Status Research & Development GmbH
# 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. This file may not be copied, modified, or distributed except according to those terms.
import ../src/mpint, unittest import ../src/mpint, unittest

View File

@ -1,5 +1,11 @@
# Copyright (c) 2018 Status Research & Development GmbH # Mpint
# Distributed under the MIT License (license terms are at http://opensource.org/licenses/MIT). # Copyright 2018 Status Research & Development GmbH
# 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. This file may not be copied, modified, or distributed except according to those terms.
import ../src/mpint, unittest import ../src/mpint, unittest