Relicense under dual Apache/MIT
This commit is contained in:
parent
fb2659703d
commit
8b8f2a55c4
|
@ -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.
|
10
README.md
10
README.md
|
@ -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.
|
||||||
|
|
|
@ -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":
|
||||||
|
|
|
@ -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,
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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,
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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.} =
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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,
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue