nimweis is nimble nim-webui, and svelte with vite. this is your starter pack for developing desktop GUI alternative for electronjs or tauri.
use degit npx degit IDNatte/nimweis <your-project-name>
for scaffold this template. and done, just start poking around in the project.
nimweis.nimble
src/nimweis.nim
nimeweis.nim
as your project name e.g, banana_conter.nimsrc-frontend/package.json
nimweis.nimble
that is your average nodejs project package.json as you expected, you can tweak it as however you likesrc-frontend/src/assets/*
src-frontend/src/components/*
src-frontend/src/lib/*
src-frontend/src/route/*
generally you can see around the project scaffold in this template.
yep in the front-end
i'm using path aliases for import here the list because why using normal path ?? easier to use path aliases right ?
@lib
= './src/lib/*'
@assets
= ./src/assets/*
@routes
= ./src/routes/*
@components
= ./src/components/*
after using npx degit IDNatte/nimweis <your-project-name>
:
src-frontend
,yarn
/ yarn install
) but you can use any package you like.<your package manager> run dev
nimble run -d:debug
to get in to nim-webui debug mode (it is explained in src/nimweis.nim
file)you need to build the front-end first, then you can build the binary from nim like e.g. nim c -d:<release / danger> -d:strip --debugInfo:off --mm:orc --opt:size --passL:-flto --passL:-fuse-linker-plugin --out:build/ src/<your project main entrypoint>.nim
or nimble build -d:<release / danger> -d:strip --debugInfo:off --mm:orc --opt:size --passL:-flto --passL:-fuse-linker-plugin
. Btw this flag is optimized to result small size binary you can use whatever flag as you like or need.