This commit is contained in:
Alex Kotov 2022-09-07 17:52:34 +04:00
parent e674a2da7e
commit 2664eca633
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08
7 changed files with 37 additions and 3 deletions

1
.gitignore vendored
View file

@ -2,5 +2,6 @@
/config/2-conditionals.mk
/polytreewm
/src/*.o
/target/
/tests/*.o
/tests/*.test

7
Cargo.lock generated Normal file
View file

@ -0,0 +1,7 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 3
[[package]]
name = "polytreewm"
version = "0.0.0"

17
Cargo.toml Normal file
View file

@ -0,0 +1,17 @@
[package]
name = "polytreewm"
version = "0.0.0"
authors = ["Alex Kotov <kotovalexarian@gmail.com>"]
edition = "2021"
description = "PolytreeWM is an extremely fast, small, and dynamic tiling window manager for X"
readme = true
homepage = "https://github.com/PolytreeDE/polytreewm"
repository = "https://github.com/PolytreeDE/polytreewm.git"
license = "MIT"
keywords = []
categories = []
publish = false
[lib]
name = "polytreewm"
crate-type = ["staticlib"]

View file

@ -58,10 +58,10 @@ ALL_EXE = polytreewm $(TEST_EXE)
# Executables #
###############
polytreewm: src/main.o $(MODULES_OBJ)
polytreewm: src/main.o $(MODULES_OBJ) target/debug/libpolytreewm.a
$(CC) -o $@ $^ $(LDFLAGS)
%.test: %.o tests/main.o $(MODULES_OBJ)
%.test: %.o tests/main.o $(MODULES_OBJ) target/debug/libpolytreewm.a
$(CC) -o $@ $^ $(LDFLAGS)
################
@ -73,6 +73,9 @@ polytreewm: src/main.o $(MODULES_OBJ)
dwm.o: $(DWM_SRC) $(DWM_HDR)
target/debug/libpolytreewm.a:
$(CARGO) build
#########
# Tasks #
#########
@ -82,6 +85,7 @@ test: $(TEST_EXE)
clean:
rm -f $(ALL_OBJ) $(ALL_EXE)
$(CARGO) clean
distclean: clean
rm -f $(CONFIGMKS_TO_REMOVE)

View file

@ -6,7 +6,7 @@ PolytreeWM is an extremely fast, small, and dynamic tiling window manager for X.
Requirements
------------
In order to build PolytreeWM you need the Xlib header files.
In order to build PolytreeWM you need Cargo for Rust and the Xlib header files.
Installation
------------

View file

@ -1,3 +1,4 @@
CARGO = cargo
CC = cc
PKGCONFIG = pkg-config

4
src/lib.rs Normal file
View file

@ -0,0 +1,4 @@
#[no_mangle]
pub extern "C" fn foo() -> u32 {
123
}