-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
29 lines (23 loc) · 830 Bytes
/
Copy pathMakefile
File metadata and controls
29 lines (23 loc) · 830 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Local development without luarocks. Builds the native module for the
# chosen Lua and symlinks it next to the Lua sources so require() finds it.
#
# make dev # build for Lua 5.5
# make dev LUA=lua54 # build for Lua 5.4
# make dev LUA=luajit # build for LuaJIT
# make test # build + busted specs
LUA ?= lua55
dev:
cargo build --release --features $(LUA)
ln -sf target/release/libbcryptlua_core.so bcryptlua_core.so
# Lua specs need busted (luarocks install busted). `luarocks test` works too.
test: dev
busted
# Format Rust (rustfmt) and Lua (stylua) sources in place.
fmt:
cargo fmt
stylua bcryptlua.lua spec/
# Verify formatting without writing; fails if anything is out of style.
fmt-check:
cargo fmt --check
stylua --check bcryptlua.lua spec/
.PHONY: dev test fmt fmt-check