Skip to content

Commit c6b4360

Browse files
Noviq-Rust-Nebula-0.1.0
Noviq-Rust-Nebula-0.1.0
2 parents d5e0f9d + f60f108 commit c6b4360

68 files changed

Lines changed: 1636 additions & 4045 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build.yml

Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
name: Build Noviq for All Platforms
2+
3+
on:
4+
push:
5+
branches: [ main, Rust-reimpl ]
6+
pull_request:
7+
branches: [ main, Rust-reimpl ]
8+
workflow_dispatch:
9+
10+
env:
11+
CARGO_TERM_COLOR: always
12+
13+
jobs:
14+
build:
15+
name: Build on ${{ matrix.os }}
16+
runs-on: ${{ matrix.os }}
17+
strategy:
18+
matrix:
19+
include:
20+
- os: ubuntu-latest
21+
target: x86_64-unknown-linux-gnu
22+
artifact_name: noviq
23+
asset_extension: ''
24+
- os: windows-latest
25+
target: x86_64-pc-windows-msvc
26+
artifact_name: noviq.exe
27+
asset_extension: .exe
28+
- os: macos-latest
29+
target: x86_64-apple-darwin
30+
artifact_name: noviq
31+
asset_extension: ''
32+
- os: macos-latest
33+
target: aarch64-apple-darwin
34+
artifact_name: noviq
35+
asset_extension: ''
36+
37+
steps:
38+
- name: Checkout code
39+
uses: actions/checkout@v4
40+
41+
- name: Install Rust toolchain
42+
uses: dtolnay/rust-toolchain@stable
43+
with:
44+
targets: ${{ matrix.target }}
45+
46+
- name: Cache cargo registry
47+
uses: actions/cache@v4
48+
with:
49+
path: ~/.cargo/registry
50+
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
51+
restore-keys: |
52+
${{ runner.os }}-cargo-registry-
53+
54+
- name: Cache cargo index
55+
uses: actions/cache@v4
56+
with:
57+
path: ~/.cargo/git
58+
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
59+
restore-keys: |
60+
${{ runner.os }}-cargo-index-
61+
62+
- name: Cache target directory
63+
uses: actions/cache@v4
64+
with:
65+
path: target
66+
key: ${{ runner.os }}-${{ matrix.target }}-target-${{ hashFiles('**/Cargo.lock') }}
67+
restore-keys: |
68+
${{ runner.os }}-${{ matrix.target }}-target-
69+
70+
- name: Build snapshot (optimized)
71+
run: |
72+
cargo build --profile snapshot --target ${{ matrix.target }}
73+
env:
74+
SNAPSHOT: 1
75+
76+
- name: Get version
77+
id: version
78+
shell: bash
79+
run: |
80+
if [ "${{ runner.os }}" = "Windows" ]; then
81+
VERSION=$(./target/${{ matrix.target }}/snapshot/noviq.exe | grep "Version:" | awk '{print $2}')
82+
else
83+
VERSION=$(./target/${{ matrix.target }}/snapshot/noviq | grep "Version:" | awk '{print $2}')
84+
fi
85+
echo "version=$VERSION" >> $GITHUB_OUTPUT
86+
echo "Version: $VERSION"
87+
88+
- name: Prepare artifact name
89+
id: artifact
90+
shell: bash
91+
run: |
92+
OS_NAME="${{ runner.os }}"
93+
OS_LOWER=$(echo "$OS_NAME" | tr '[:upper:]' '[:lower:]')
94+
TARGET="${{ matrix.target }}"
95+
ARCH=$(echo "$TARGET" | cut -d'-' -f1)
96+
VERSION="${{ steps.version.outputs.version }}"
97+
ARTIFACT_NAME="noviq-${VERSION}-${OS_LOWER}-${ARCH}${{ matrix.asset_extension }}"
98+
echo "name=$ARTIFACT_NAME" >> $GITHUB_OUTPUT
99+
echo "Artifact name: $ARTIFACT_NAME"
100+
101+
- name: Rename and prepare artifact
102+
shell: bash
103+
run: |
104+
mkdir -p artifacts
105+
cp target/${{ matrix.target }}/snapshot/${{ matrix.artifact_name }} artifacts/${{ steps.artifact.outputs.name }}
106+
107+
- name: Upload artifact
108+
uses: actions/upload-artifact@v4
109+
with:
110+
name: ${{ steps.artifact.outputs.name }}
111+
path: artifacts/${{ steps.artifact.outputs.name }}
112+
if-no-files-found: error
113+
114+
- name: Display artifact info
115+
shell: bash
116+
run: |
117+
ls -lh artifacts/
118+
file artifacts/${{ steps.artifact.outputs.name }} || true
119+
120+
release:
121+
name: Create Release
122+
needs: build
123+
runs-on: ubuntu-latest
124+
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/Rust-reimpl')
125+
126+
steps:
127+
- name: Download all artifacts
128+
uses: actions/download-artifact@v4
129+
with:
130+
path: artifacts
131+
132+
- name: Display downloaded artifacts
133+
run: |
134+
ls -R artifacts/
135+
136+
- name: Get current date
137+
id: date
138+
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT

.github/workflows/gcc-compile.yml

Lines changed: 0 additions & 67 deletions
This file was deleted.

.gitignore

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,17 @@
1+
# Rust build artifacts
2+
/target/
3+
Cargo.lock
4+
5+
# Build outputs
6+
/libs/
7+
8+
# IDE files
9+
.idea/
10+
.vscode/
11+
*.swp
12+
*.swo
13+
*~
14+
15+
# OS files
116
.DS_Store
2-
/.vscode
3-
noviq
4-
noviq.exe
17+
Thumbs.db

CMakeLists.txt

Lines changed: 0 additions & 46 deletions
This file was deleted.

Cargo.toml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
[package]
2+
name = "noviq"
3+
version = "0.1.0"
4+
edition = "2021"
5+
authors = ["Noviq Contributors"]
6+
description = "A simple, interpreted programming language written in Rust"
7+
license = "GPL-3.0"
8+
9+
[dependencies]
10+
chrono = "0.4"
11+
12+
[lib]
13+
name = "noviq"
14+
path = "src/lib.rs"
15+
16+
[[bin]]
17+
name = "noviq"
18+
path = "src/main.rs"
19+
20+
[profile.release]
21+
opt-level = 3 # Maximum optimization
22+
lto = true # Link-time optimization
23+
codegen-units = 1 # Better optimization, slower compile
24+
panic = "abort" # Smaller binary, no unwinding
25+
strip = true # Strip symbols from binary
26+
27+
[profile.snapshot]
28+
inherits = "release" # Inherits all optimizations from release

0 commit comments

Comments
 (0)