diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3c5a552..3a0208f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -13,14 +13,6 @@ repos: hooks: - id: clang-format types_or: [c++, c, cuda] - - repo: local - hooks: - - id: clang-tidy - name: clang-tidy - language: system - entry: clang-tidy -p build/compile_commands.json -extra-arg=-std=c++20 - files: cpp - exclude: "^build/" - repo: https://github.com/cmake-lint/cmake-lint rev: 1.4.3 hooks: diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a20162..13e451c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ### main/HEAD * Add new Cursor::move overload to accept two integers * Handle bug in border rendering crashing with no lines of text +* Removed zig build system ### v4.0.7 * Added unit testing in `tests/` directory diff --git a/README.md b/README.md index e4cc975..ae7f78c 100644 --- a/README.md +++ b/README.md @@ -5,9 +5,8 @@ Documentation is mostly provided in the `docs/` directory, where every header file has a partner mardown file to describe it's methods usecases. ### How to use -As of `v4.0.0`, rawterm can be imported with cmake fetchcontent. Add the -following passage to your CMakeLists.txt file then link to the `rawterm` -library using `target_link_libraries` +Add the following passage to your CMakeLists.txt file then link to the +`rawterm` library using `target_link_libraries` ```cmake include(FetchContent) @@ -19,14 +18,6 @@ fetchcontent_declare( fetchcontent_makeavailable(rawterm) ``` -Alternatively, if you use `zig` as your build system, you can run - -```console -zig fetch --save=rawterm git+https://github.com/ttibsi/rawterm -``` - -This has only been tested with zig 0.13.0 - #### Example A minimal hello world example looks like this: diff --git a/build.zig b/build.zig deleted file mode 100644 index a32edc7..0000000 --- a/build.zig +++ /dev/null @@ -1,76 +0,0 @@ -const std = @import("std"); - -const examples = [_][]const u8{ - "examples/cells.cpp", - "examples/colors.cpp", - "examples/cursor_position.cpp", - "examples/hello_world.cpp", - "examples/keys.cpp", - "examples/raw_escapes.cpp", - "examples/red_blue_panes.cpp", -}; - - -pub fn build(b: *std.Build) void { - const target = b.standardTargetOptions(.{}); - const optimize = b.standardOptimizeOption(.{}); - const lib = b.addStaticLibrary(.{ - .name = "rawterm", - .target = target, - .optimize = optimize, - }); - - lib.linkLibCpp(); - lib.root_module.addIncludePath(b.path("")); - lib.addCSourceFiles(.{ - .flags = &.{"-Wall", "-Wextra", "-std=c++20"}, - .files = &.{ - "rawterm/color.cpp", - "rawterm/core.cpp", - "rawterm/cursor.cpp", - "rawterm/extras/extras.cpp", - "rawterm/screen.cpp", - "rawterm/text.cpp", - } - }); - b.installArtifact(lib); - - for (examples) |example| { - const exec = b.addExecutable(.{ - // .name = "hello-world", - .name = std.fs.path.stem(example), - .target = b.host, - }); - - exec.linkLibrary(lib); - exec.root_module.addIncludePath(b.path("")); - exec.addCSourceFile(.{ - .file = b.path(example), - .flags = &.{ "-std=c++20" } - }); - - b.installArtifact(exec); - } - - // Tests - const test_bin = b.addExecutable(.{ - .name = "test-exe", - .target = b.host, - }); - - test_bin.linkLibrary(lib); - test_bin.root_module.addIncludePath(b.path("")); - test_bin.addCSourceFiles(.{ - .flags = &.{"-g", "-Wall", "-Wextra", "-std=c++20"}, - .files = &.{ - "color_test.cpp", - "core_test.cpp", - "cursor_test.cpp", - "main.cpp", - "screen_test.cpp", - "text_test.cpp", - } - }); - - b.installArtifact(test_bin); -}