Skip to content

Instantly share code, notes, and snippets.

View genotrance's full-sized avatar

genotrance genotrance

View GitHub Profile
@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 / 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 / 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 / duktape.nim
Created June 28, 2020 02:21
Nim wrapper for duktape using nimterop
# nim c -d:FLAGS duktape.nim
#
# FLAGS
# -d:duktapeStd | -d:duktapeDL | -d:duktapeConan
# -d:duktapeSetVer=2.5.0
# -d:duktapeStatic
import nimterop/[build, cimport]
static:
import asyncdispatch
import asynctools
import docopt
import json
import nre
import os
import ospaths
import sequtils
import sha256/sha256sum
import strutils
@genotrance
genotrance / vimrc.vim
Last active September 11, 2020 16:35
vimrc
" Syntax and colors
filetype plugin indent on
syntax on
colorscheme default
" Tabs
set tabstop=2
set shiftwidth=2
set expandtab
@genotrance
genotrance / travis.sh
Last active August 29, 2020 22:14
Travis CI setup for Nim - moved to https://github.com/genotrance/nim-travis
#!/bin/bash
curl https://raw.githubusercontent.com/genotrance/nim-travis/master/travis.sh -LsSf -o travis2.sh
source travis2.sh
@genotrance
genotrance / README.md
Last active August 19, 2020 17:11
Nimble RFC for project local dependencies

Following is the RFC for providing project local dependencies in Nimble. This is being tracked in issue 131 and discussed in the Nim forum.

Definitions:

  • local deps mode - this RFC to enable project local dependencies where $prj/nimbledeps is used by Nimble on a per project basis
  • user deps mode - current Nimble behavior of using ~/.nimble since dependencies are usable across projects for a specific user
  • global deps mode - tracked in issue 80 where a system-wide folder can be used to store dependencies across users and projects. It is not covered in this RFC.

Motivations:

  • The main value of local deps mode is to provide dependency isolation from other projects. Isolation simply makes development easier and avoids any conflicts caused by mixing dependencies across projects.
  • local deps mode is simply a mode of operation during development and is not e
@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 / 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]