Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,5 @@ appendonly.aof
*.kvfail
*.kv.skip
tutorial/test_failures.csv

/bin/
48 changes: 0 additions & 48 deletions CMakeLists.txt

This file was deleted.

49 changes: 37 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,17 +1,42 @@
.PHONY: build test vet clean kvspace install
# kvlang 统一构建:产物全部输出到 bin/,各组件独立编译。
# make runtime C runtime 库(libkvlang_runtime.so,经 CMake)
# make term Rust term 扩展(term 可执行文件,独立进程)
# make run 测试执行器(run,链接 runtime)
# make layout Rust layout(layout_file)
# make json Go json 扩展(json-rwirext 可执行文件)
# make oldhero Go 旧 runtime(kvlang,兼容保留)
# make all 全部
# make clean 清理 bin/ 与各构建目录

export GOPROXY ?= https://goproxy.cn,direct
PREFIX ?= ~/.local
BIN := bin
KVSPACE_LIB ?= kvspace-c

build:
go mod tidy
go build -ldflags="-s -w" -o kvlang ./cmd/kvlang/
install -d $(PREFIX)/bin
install kvlang $(PREFIX)/bin/kvlang
.PHONY: all runtime term run layout json oldhero clean

vet:
go vet ./...
all: runtime term run layout json

runtime:
cmake -S runtime -B build/runtime -DCMAKE_BUILD_TYPE=Release -DKVSPACE_LIB=$(KVSPACE_LIB)
cmake --build build/runtime --target kvlang_runtime -j

term:
cargo build --release --manifest-path runtime-rwirext/rust/term/Cargo.toml
cp runtime-rwirext/rust/term/target/release/term $(BIN)/

run: runtime
cmake --build build/runtime --target run -j

layout:
KVLANG_KVSPACE_LIB=$(KVSPACE_LIB) cargo build --release --manifest-path layout/Cargo.toml --example layout_file
cp layout/target/release/examples/layout_file $(BIN)/

json:
cd runtime-rwirext/go/json && go build -o ../../../bin/json-rwirext ./cmd/

oldhero:
cd oldhero && go build -ldflags="-s -w" -o ../bin/kvlang ./cmd/kvlang/

clean:
go clean
rm -f kvlang
rm -rf $(BIN) build
cargo clean --manifest-path layout/Cargo.toml
cargo clean --manifest-path runtime-rwirext/rust/term/Cargo.toml
26 changes: 0 additions & 26 deletions cmd/kvlang/main.cppx

This file was deleted.

42 changes: 0 additions & 42 deletions keytree/const.h

This file was deleted.

11 changes: 0 additions & 11 deletions keytree/dev.h

This file was deleted.

10 changes: 0 additions & 10 deletions keytree/entry.h

This file was deleted.

13 changes: 0 additions & 13 deletions keytree/frame.h

This file was deleted.

1 change: 0 additions & 1 deletion keytree/keytree_stub.cppx

This file was deleted.

10 changes: 0 additions & 10 deletions keytree/member.h

This file was deleted.

11 changes: 0 additions & 11 deletions keytree/sys.h

This file was deleted.

11 changes: 0 additions & 11 deletions keytree/vthread.h

This file was deleted.

35 changes: 0 additions & 35 deletions kvcpu/cpu.h

This file was deleted.

Loading
Loading