[wip] compile in build dir

This commit is contained in:
Michael Bradley, Jr 2021-12-02 16:20:49 -06:00
parent 15b4694655
commit 8ea2a9429a
No known key found for this signature in database
GPG Key ID: D0307DBCF21A9A58
2 changed files with 6 additions and 2 deletions

View File

@ -58,6 +58,7 @@ task localstore, "Build localstore experiment":
common_opts =
" --define:ssl" &
" --out:build/localstore" &
" --threads:on" &
" --tlsEmulation:off"
@ -86,7 +87,7 @@ task localstore, "Build localstore experiment":
(when maxRequestBodySize != "": " --define:maxRequestBodySize=" & maxRequestBodySize else: "") &
(when port != "": " --define:port=" & port else: "") &
" experiments/localstore.nim",
"experiments/localstore"
"build/localstore"
]
for command in commands:

View File

@ -52,6 +52,9 @@ proc scheduleStop(runner: TaskRunner, s: Duration) {.async.} =
await runner.stop
proc main() {.async.} =
const destDir = currentSourcePath.parentDir.parentDir / "build" / "files"
createDir(destDir)
var
localstoreArg = LocalstoreArg()
runner = TaskRunner.new
@ -63,7 +66,7 @@ proc main() {.async.} =
let
request = r.tryGet
filename = ($request.uri).split("/")[^1]
destPath = currentSourcePath.parentDir / "files" / filename
destPath = destDir / filename
(rfd, wfd) = createAsyncPipe()
writer = wfd.fromPipe