From 6723c6cb90009015d5405ada85fef86464fe0486 Mon Sep 17 00:00:00 2001 From: Nimaoth Date: Tue, 16 Jul 2024 21:59:33 +0200 Subject: [PATCH] Added nimwasmtime dependency --- absytree.nimble | 3 ++- config.nims | 12 ++++++++++++ nimble.lock | 16 +++++++++++++--- 3 files changed, 27 insertions(+), 4 deletions(-) diff --git a/absytree.nimble b/absytree.nimble index 05d5fdab..3053bee4 100644 --- a/absytree.nimble +++ b/absytree.nimble @@ -32,7 +32,8 @@ requires "https://github.com/Nimaoth/wasm3 >= 0.1.13" requires "https://github.com/Nimaoth/lrucache.nim >= 1.1.4" requires "https://github.com/Nimaoth/boxy >= 0.4.2" requires "https://github.com/Nimaoth/nimscripter >= 1.0.21" -requires "https://github.com/Nimaoth/nimtreesitter-api >= 0.1.6" +requires "https://github.com/Nimaoth/nimtreesitter-api >= 0.1.8" +requires "https://github.com/Nimaoth/nimwasmtime >= 0.1.0" # Use this to include all treesitter languages (takes longer to download) requires "https://github.com/Nimaoth/nimtreesitter >= 0.1.3" diff --git a/config.nims b/config.nims index 435279fe..3ae3fe3a 100644 --- a/config.nims +++ b/config.nims @@ -48,6 +48,18 @@ switch("d", "wasm3VerboseErrorMessages") # switch("d", "treesitterBuiltins=cpp,nim,c,css,html,javascript,python,rust,csharp") switch("d", "treesitterBuiltins=cpp,nim,csharp,rust,python,javascript") +# Enable wasi support in nimwasmtime +switch("d", "nimWasmtimeWasi") + +# Enable wasm parser support in treesitter +switch("d", "treesitterFeatureWasm") + +# Static linking doesn't work on windows for some reason, so dynamically link +when defined(windows): + switch("d", "nimWasmtimeStatic=false") +else: + switch("d", "nimWasmtimeStatic=true") + when defined(musl): var muslGcc = findExe("musl-gcc") # muslGcc = "/home/nimaoth/musl/musl/bin/musl-gcc" diff --git a/nimble.lock b/nimble.lock index 4e045d8f..45c8e69f 100644 --- a/nimble.lock +++ b/nimble.lock @@ -271,6 +271,16 @@ "sha1": "23baf44d42d16e47e8f173a10f2ff55dd7f21382" } }, + "nimwasmtime": { + "version": "0.1.0", + "vcsRevision": "a2b89b89f988f39da79a3f01662f5561434de872", + "url": "https://github.com/Nimaoth/nimwasmtime", + "downloadMethod": "git", + "dependencies": [], + "checksums": { + "sha1": "cb65404ffbbece50f048f64f41dc0e850fe129ea" + } + }, "npeg": { "version": "1.2.2", "vcsRevision": "ec0cc6e64ea4c62d2aa382b176a4838474238f8d", @@ -302,15 +312,15 @@ } }, "treesitter": { - "version": "0.1.6", - "vcsRevision": "fbf08c356488d6435d91ba317c7f76b46a2bcf89", + "version": "0.1.8", + "vcsRevision": "fe0eca4e1edc68308ec81bfb79f3fdbe1f1c15fd", "url": "https://github.com/Nimaoth/nimtreesitter-api", "downloadMethod": "git", "dependencies": [ "nimgen" ], "checksums": { - "sha1": "42011552650a9dba03aae3285f793875f387358c" + "sha1": "db477485ae7b4520192e02290e6e88929adeb12e" } }, "urlly": {