diff --git a/.gitignore b/.gitignore index e4b488e..bf4cf1d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +# FIXME: Move in '.git/info/exclude' once branch is determined ? + # Autogenerated by Cargo no need to keep in repo Cargo.lock @@ -8,4 +10,5 @@ Cargo.lock **/*.rs.bk # Exclude build result -/target \ No newline at end of file +/target +/build \ No newline at end of file diff --git a/Makefile b/Makefile index 1016678..83e06ac 100644 --- a/Makefile +++ b/Makefile @@ -1,31 +1,44 @@ # FIXME: in-code docs needed +# FIXME: Windows doesn't support makefiles natively -> if you have a better method then please MR it or make an issue + +## Syntax capture ## + all: - @ printf '%s\n' "Unknown option parsed in target all" ; exit 2 + @ printf '%s\n' "Unknown option '$1' parsed in target all" + @ exit 2 -## DEVELOPMENT ## +## BUILD ## +# All build targets are expected in 'build/build-LANG' where 'LANG' is the unique identifier of the language used -run: - @ cargo run \ - --jobs "$$(nproc)" \ - --bin main \ - -- "$*" +# FIXME: Build in '$repodir/build/build-rustlang' instead of '$repodir/target' for multilang support +build-rustlang: + @ cargo build -build: - @ cargo build \ - --jobs "$$(nproc)" \ - --bin main \ - -- "$*" +# FIXME: Replace 'exit 1' with helpful messages +build-gcc: + @ # Make a build directory + @ [ ! -d build ] && { mkdir build || exit 1 ;} + @ [ ! -d build/target-gcc ] && { mkdir build/build-gcc || exit 1 ;} -## RELEASE ## + @ # Compilation + @ [ ! -f build/build-gcc ] && { gcc src/bin/main.c -o build/build-gcc/gcc-zernit || exit 1 ;} + @ printf '%s\n' "Compilation of target for gcc finished" -release: - @ printf '%s\n' "FIXME: Release logic needed, currently unknown usecase" ; exit 1 +build-clang: + @ printf 'FIXME: %s\n' "translate zernit in clang" + @ exit 1 -## EXPERIMENTS ## +build-brainfuck: + @ printf 'FIXME: %s\n' "translate zernit in brainfuck" + @ exit 1 -experiment: - @ cargo run \ - --jobs "$$(nproc)" \ - --bin main-experiment \ - -- "$*" \ No newline at end of file +build-python: + @ printf 'FIXME: %s\n' "translate zernit in python" + @ exit 1 + +## CLEAN ## + +clean: + @ [ -d build ] && { rm -r build || exit 1 ;} + @ printf '%s\n' "Build directory has been cleaned" \ No newline at end of file diff --git a/src/bin/README.md b/src/bin/README.md index 21688c5..533d4f8 100644 --- a/src/bin/README.md +++ b/src/bin/README.md @@ -1,3 +1,14 @@ -The core binary used as a backend to determine which subcommand to use (grabbing from src/subcoms depending on programming language used) +FIXME: `main` is a place-holder -> Looking for a good name for backend resolver for zernit's backend i.e [paludis](https://paludis.exherbo.org/) using `cave` -Standard directory recognized by cargo for alternative binaries to `main.rs` \ No newline at end of file +--- + +# Core binary +This directory is used for core binary meaning that this binary is executed first and should resolve to required commands i.e if end-user executes `main help` expecting usage instructions then this binary should resolve the argument and execute `$repodir/src/subcoms/help` in it's appropriate place on the system once compiled (if applies) unless the language has more efficient method to handle this scenario through library alike rustlang's clap that generates the help message based on arguments provided. + +## ABSTRACT +Resolve arguments to subcommands and provide backend for libraries/modules if requried + +### Practical examples +end-user inputs `main help` through cli -> Display help message + +end-user inputs `main resolve app-compat/wine` -> Resolve wine on end-user's system if compatible system and toolchain is used \ No newline at end of file diff --git a/src/bin/main.bf b/src/bin/main.bf index dcc4519..b35e5c8 100644 --- a/src/bin/main.bf +++ b/src/bin/main.bf @@ -1 +1 @@ -+[-[<<[+[--->]-[<<<]]]>>>-]>-.---.>..>.<<<<-.<+.>>>>>.>.<<.<-. \ No newline at end of file +-[------->+<]>---.+++.>+[--->++<]>++.-----------.--------.-----------.[-->+<]>+++.>-[--->+<]>-.-[--->+<]>+.+++[->+++<]>++.+++++++++++++.+++++.-------.-----------.--[--->+<]>-.+++[->+++<]>.--[--->+<]>-.-[->++++<]>--.---[->+++<]>.+++++++++++++.----.-----.+++++++++++.[---->+<]>+++.-[--->++<]>-.+++++.++++++.-----.[--->+<]>-----.[->+++<]>+.-[->+++<]>.[->+++<]>++.[--->+<]>----.+++[->+++<]>++.++++++++.+++++.--------.-[--->+<]>--.+[->+++<]>+.++++++++. \ No newline at end of file diff --git a/src/bin/main.c b/src/bin/main.c index 0b19c26..0eb733d 100644 --- a/src/bin/main.c +++ b/src/bin/main.c @@ -1,5 +1,6 @@ #include int main() { - printf("%s\n", "ping"); + printf("FIXME: %s\n", "Translate zernit into C lang"); + return 1; } \ No newline at end of file diff --git a/src/bin/main.cpp b/src/bin/main.cpp index 36ffbd6..8cd73a2 100644 --- a/src/bin/main.cpp +++ b/src/bin/main.cpp @@ -1,9 +1,8 @@ - #include +#include - using namespace std; +using namespace std; - int main() - { - cout << "ping"; - return 0; - } \ No newline at end of file +int main() { + cout << "FIXME: Translate zernit into a C++++"; + return 1; +} \ No newline at end of file diff --git a/src/bin/main.py b/src/bin/main.py index 15a75bd..f663d10 100644 --- a/src/bin/main.py +++ b/src/bin/main.py @@ -1 +1 @@ -print("ping") \ No newline at end of file +print("FIXME: Translate zernit in python") \ No newline at end of file