This commit is contained in:
Kreyren 2020-02-05 09:06:21 +00:00
parent 302cc1842e
commit 3cd88eafd3
7 changed files with 61 additions and 34 deletions

5
.gitignore vendored

@ -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
/target
/build

@ -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 \
-- "$*"
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"

@ -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`
---
# 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

@ -1 +1 @@
+[-[<<[+[--->]-[<<<]]]>>>-]>-.---.>..>.<<<<-.<+.>>>>>.>.<<.<-.
-[------->+<]>---.+++.>+[--->++<]>++.-----------.--------.-----------.[-->+<]>+++.>-[--->+<]>-.-[--->+<]>+.+++[->+++<]>++.+++++++++++++.+++++.-------.-----------.--[--->+<]>-.+++[->+++<]>.--[--->+<]>-.-[->++++<]>--.---[->+++<]>.+++++++++++++.----.-----.+++++++++++.[---->+<]>+++.-[--->++<]>-.+++++.++++++.-----.[--->+<]>-----.[->+++<]>+.-[->+++<]>.[->+++<]>++.[--->+<]>----.+++[->+++<]>++.++++++++.+++++.--------.-[--->+<]>--.+[->+++<]>+.++++++++.

@ -1,5 +1,6 @@
#include <stdio.h>
int main() {
printf("%s\n", "ping");
printf("FIXME: %s\n", "Translate zernit into C lang");
return 1;
}

@ -1,9 +1,8 @@
#include <iostream>
#include <iostream>
using namespace std;
using namespace std;
int main()
{
cout << "ping";
return 0;
}
int main() {
cout << "FIXME: Translate zernit into a C++++";
return 1;
}

@ -1 +1 @@
print("ping")
print("FIXME: Translate zernit in python")