Skip to content

Instantly share code, notes, and snippets.

View genotrance's full-sized avatar

genotrance genotrance

View GitHub Profile
@genotrance
genotrance / yara.nim
Last active April 8, 2022 13:28
Nim wrapper for libyara using nimterop
# nim c -d:yaraGit yara.nim
# nim c -d:yaraGit -d:yaraStatic yara.nim
import os
import nimterop/[build, cimport]
const
baseDir = getProjectCacheDir("nimyara")
@genotrance
genotrance / flecs.nim
Last active December 26, 2023 14:16
Nim wrapper for flecs using nimterop
# nim c -d:flecsGit -r flecs.nim
import os
import nimterop/[cimport, build]
const
baseDir = getProjectCacheDir("nimflecs")
getHeader(
@genotrance
genotrance / meow.nim
Created August 7, 2020 21:45
Nim wrapper for meow hash using nimterop
import strutils
import nimterop/[build, cimport]
const
baseDir = getProjectCacheDir("meow")
static:
gitPull(
"https://github.com/cmuratori/meow_hash",
@genotrance
genotrance / freetype.nim
Created July 13, 2020 21:18
Nim wrapper for freetype using nimterop
import nimterop/cimport
const
baseDir = "/usr/include/freetype2"
cDefine("FT_UInt32", "unsigned int32")
cIncludeDir(baseDir)
cImport(
filename = "ft.h",
recurse = true,
@genotrance
genotrance / sciter.nim
Last active July 13, 2020 03:38
Nim wrapper for sciter using nimterop
import nimterop/[cimport]
cIncludeDir(@[
"/usr/include/gtk-3.0",
"/usr/include/glib-2.0",
"/usr/lib/x86_64-linux-gnu/glib-2.0/include",
"/usr/include/pango-1.0",
"/usr/include/cairo",
"/usr/include/gdk-pixbuf-2.0",
"/usr/include/atk-1.0"
@genotrance
genotrance / pkcs7.nim
Created July 12, 2020 18:34
Nim wrapper for pkcs7 using nimterop
# nim c -d:FLAGS pkcs.nim
#
# FLAGS
# -d:pkcs7Std | -d:pkcs7Conan | -d:pkcs7JBB
# -d:pkcs7Static
import strutils
import nimterop/[build, cimport]
@genotrance
genotrance / gtk3.nim
Last active July 3, 2020 21:12
Nim wrapper for gtk+-3.0 using nimterop
import nimterop/cimport
cPlugin:
import strutils
proc onSymbol(sym: var Symbol) {.exportc, dynlib.} =
# Get rid of some problematic symbols
if sym.name.contains("CSET"):
sym.name = ""
else:
@genotrance
genotrance / tensorflow.nim
Created July 3, 2020 06:42
Nim wrapper for tensorflow using nimterop
# nim c -d:FLAGS tensorflow.nim
#
# FLAGS
# -d:capiDL
# -d:capiSetVer=
import os
import nimterop/[build, cimport]
@genotrance
genotrance / quickjs.nim
Last active July 15, 2020 16:57
Nim wrapper for quickjs using nimterop
# nim c -d:FLAGS quickjs.nim
#
# FLAGS
# -d:quickjsGit
# -d:quickjsSetVer=
# -d:quickjsStatic
import os
import nimterop/[build, cimport]
@genotrance
genotrance / nghttp2.nim
Created July 3, 2020 05:34
Nim wrapper for nghttp2 using nimterop
# nim c -d:FLAGS nghttp2.nim
#
# FLAGS
# -d:nghttp2Git | -d:nghttp2DL | -d:nghttp2Conan | -d:nghttp2JBB
# -d:nghttp2SetVer=v0.4
# -d:nghttp2Static
import os
import nimterop/[build, cimport]