Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
test/tester
nmqtt
nmqtt_password
nmqtt_pub
nmqtt_sub
tests/tester
bin
File renamed without changes.
6 changes: 3 additions & 3 deletions src/nmqtt.nim → nmqtt.nim
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ when defined(broker):
sequtils,
times,
random,
utils/passwords,
utils/version
nmqtt/utils/passwords,
nmqtt/utils/version
from parsecfg import loadConfig, getSectionValue
from os import fileExists

Expand Down Expand Up @@ -1191,4 +1191,4 @@ proc msgQueue*(ctx: MqttCtx): int =


when defined(broker):
include "utils/broker.nim"
include "nmqtt/utils/broker.nim"
11 changes: 5 additions & 6 deletions nmqtt.nimble
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
# Package
version = "1.0.0"
version = "1.0.1"
author = "zevv & ThomasTJdev"
description = "Native MQTT library and binaries for publishing, subscribing and broker"
license = "MIT"
srcDir = "src"
bin = @["nmqtt/nmqtt", "nmqtt/nmqtt_password", "nmqtt/nmqtt_pub", "nmqtt/nmqtt_sub"]
binDir = "bin"
installFiles = @["nmqtt.nim"]
installDirs = @["config"]
bin = @["nmqtt", "nmqtt_password", "nmqtt_pub", "nmqtt_sub"]

skipDirs = @["tests", "nmqtt"]

# Dependencies
requires "nim >= 1.0.6"
Expand All @@ -19,7 +18,7 @@ from strutils import format


task test, "Runs the test suite.":
exec "nimble c -y -r test/tester"
exec "nimble c -y -r tests/tester"


after install:
Expand Down Expand Up @@ -53,7 +52,7 @@ Access the nim-libary with an import statement in your code:


BINARIES:
Access the binaries directly with. For help append `--help`.
Access the binaries directly with the commands below. For help append `--help`.

nmqtt
nmqtt_password
Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions nmqtt/nmqtt.nim
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include "../nmqtt.nim"
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/nmqtt_pub.nim → nmqtt/nmqtt_pub.nim
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ from os import getCurrentProcessId

import utils/version

include "nmqtt.nim"
include "../nmqtt.nim"


proc handler() {.noconv.} =
Expand Down
2 changes: 1 addition & 1 deletion src/nmqtt_sub.nim → nmqtt/nmqtt_sub.nim
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ from strutils import split

import utils/version

include "nmqtt.nim"
include "../nmqtt.nim"


let ctx = newMqttCtx("nmqttsub-" & $getCurrentProcessId())
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/utils/version.nim → nmqtt/utils/version.nim
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ from strutils import replace, splitLines, split, contains
from os import `/`

macro nimbleVersion(): void =
let n = staticRead(currentSourcePath().replace("/src/utils/version.nim") / "nmqtt.nimble")
let n = staticRead(currentSourcePath().replace("/nmqtt/utils/version.nim") / "nmqtt.nimble")
var v: string
for line in n.splitLines:
let l = split(line, " = ")
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion test/tester.nim → tests/tester.nim
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ include "unsubscribe.nim"
include "publish.nim"
include "publish_qos.nim"
include "ping.nim"
include "utils.nim"
include "tools.nim"
include "willmsg.nim" # Contains retained msgs
include "publish_retained.nim" # Contains retained msgs
#
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.