mirror of
https://github.com/logos-storage/logos-storage-nim-dht.git
synced 2026-01-04 06:23:05 +00:00
Initial commit with nimble initialised repo
# Conflicts: # README.md
This commit is contained in:
parent
f530a24a25
commit
617a98bd01
12
libp2p_dht/libp2p_dht.nimble
Normal file
12
libp2p_dht/libp2p_dht.nimble
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# Package
|
||||||
|
|
||||||
|
version = "0.0.1"
|
||||||
|
author = "Status.im"
|
||||||
|
description = "DHT based on the libp2p Kademlia spec"
|
||||||
|
license = "MIT"
|
||||||
|
srcDir = "src"
|
||||||
|
|
||||||
|
|
||||||
|
# Dependencies
|
||||||
|
|
||||||
|
requires "nim >= 1.6.2"
|
||||||
7
libp2p_dht/src/libp2p_dht.nim
Normal file
7
libp2p_dht/src/libp2p_dht.nim
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
# This is just an example to get you started. A typical library package
|
||||||
|
# exports the main API in this file. Note that you cannot rename this file
|
||||||
|
# but you can remove it if you wish.
|
||||||
|
|
||||||
|
proc add*(x, y: int): int =
|
||||||
|
## Adds two files together.
|
||||||
|
return x + y
|
||||||
12
libp2p_dht/src/libp2p_dht/submodule.nim
Normal file
12
libp2p_dht/src/libp2p_dht/submodule.nim
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# This is just an example to get you started. Users of your library will
|
||||||
|
# import this file by writing ``import libp2p_dht/submodule``. Feel free to rename or
|
||||||
|
# remove this file altogether. You may create additional modules alongside
|
||||||
|
# this file as required.
|
||||||
|
|
||||||
|
type
|
||||||
|
Submodule* = object
|
||||||
|
name*: string
|
||||||
|
|
||||||
|
proc initSubmodule*(): Submodule =
|
||||||
|
## Initialises a new ``Submodule`` object.
|
||||||
|
Submodule(name: "Anonymous")
|
||||||
1
libp2p_dht/tests/config.nims
Normal file
1
libp2p_dht/tests/config.nims
Normal file
@ -0,0 +1 @@
|
|||||||
|
switch("path", "$projectDir/../src")
|
||||||
12
libp2p_dht/tests/test1.nim
Normal file
12
libp2p_dht/tests/test1.nim
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# This is just an example to get you started. You may wish to put all of your
|
||||||
|
# tests into a single file, or separate them into multiple `test1`, `test2`
|
||||||
|
# etc. files (better names are recommended, just make sure the name starts with
|
||||||
|
# the letter 't').
|
||||||
|
#
|
||||||
|
# To run these tests, simply execute `nimble test`.
|
||||||
|
|
||||||
|
import unittest
|
||||||
|
|
||||||
|
import libp2p_dht
|
||||||
|
test "can add":
|
||||||
|
check add(5, 5) == 10
|
||||||
Loading…
x
Reference in New Issue
Block a user