From ad1391ea1cdd33167339d25dbff2567f5a8d5c68 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Fri, 23 Dec 2022 20:58:58 -0400 Subject: Began work on C++ back-end. --- lux-c++/commands.md | 79 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 lux-c++/commands.md (limited to 'lux-c++/commands.md') diff --git a/lux-c++/commands.md b/lux-c++/commands.md new file mode 100644 index 000000000..53ad68455 --- /dev/null +++ b/lux-c++/commands.md @@ -0,0 +1,79 @@ +# Develop +``` +cd ~/lux/lux-c++/ \ +&& lux clean \ +&& lux with python auto build +``` + +# Build + +``` +cd ~/lux/lux-c++/ \ +&& lux clean \ +&& lux with c++ auto build + +## Build JVM-based compiler +cd ~/lux/lux-c++/ \ +&& lux clean \ +&& lux with jvm build \ +&& mv target/program.jar jvm_based_compiler.jar + +## Use JVM-based compiler to produce a c++/Node-based compiler. +cd ~/lux/lux-c++/ \ +&& lux clean \ +&& time java -jar jvm_based_compiler.jar build --source ~/lux/lux-c++/source --target ~/lux/lux-c++/target --module program --program _ \ +&& mv target/program.c++ node_based_compiler.c++ + +## Use C++/Node-based compiler to produce another c++/Node-based compiler. +cd ~/lux/lux-c++/ \ +&& lux clean \ +&& node --stack_size=8192 node_based_compiler.c++ build --source ~/lux/lux-c++/source --target ~/lux/lux-c++/target --module program --program _ +``` + +# Try + +``` +cd ~/lux/lux-c++/ \ +&& conda activate WORK \ +&& python3 target/program.py + +## Compile Lux's Standard Library's tests using a c++/Node-based compiler. +cd ~/lux/stdlib/ \ +&& lux clean \ +&& node --stack_size=8192 ~/lux/lux-c++/target/program.c++ build --source ~/lux/stdlib/source --target ~/lux/stdlib/target --module test/lux --program _ \ +&& node ~/lux/stdlib/target/program.c++ +``` + +# Deploy + +``` +cd ~/lux/lux-c++/ \ +&& mvn install:install-file -Dfile=target/program.c++ -DgroupId=com.github.luxlang -DartifactId=lux-c++ -Dversion=0.8.0-SNAPSHOT -Dpackaging=c++ + +cd ~/lux/lux-c++/ && mvn deploy:deploy-file \ +-Durl=https://$NEXUS_USERNAME:$NEXUS_PASSWORD@oss.sonatype.org/content/repositories/snapshots/ \ +-Dfile=target/program.c++ \ +-DgroupId=com.github.luxlang \ +-DartifactId=lux-c++ \ +-Dversion=0.8.0-SNAPSHOT \ +-Dpackaging=c++ +``` + +# Release + +``` +LUX_PROJECT=lux-c++ && \ +LUX_VERSION=0.7.0 && \ +cd ~/lux/$LUX_PROJECT/ && \ +lux pom && \ +mv pom.xml RELEASE/$LUX_PROJECT-$LUX_VERSION.pom && \ +mv target/program.c++ RELEASE/$LUX_PROJECT-$LUX_VERSION.c++ && \ +cd RELEASE && \ +touch README.md && \ +zip $LUX_PROJECT-$LUX_VERSION-sources.jar README.md && \ +zip $LUX_PROJECT-$LUX_VERSION-javadoc.jar README.md && \ +zip $LUX_PROJECT-$LUX_VERSION.jar README.md && \ +rm README.md && \ +for file in *.*; do gpg -ab $file; done +``` + -- cgit v1.2.3