Skip to content

Commit

Permalink
feat: omnibus release cleanup
Browse files Browse the repository at this point in the history
feat: support for exact metadata in native image
feat: static-umbrella and prefer-shared linkage modes
feat: stronger hardening flags for both clang and gcc
feat: use oxc parser from truffle typescript
feat: integrate cargo and gradle builds
feat: switch to explicit target triples for cargo
feat: early musl support for rustlibs
feat: build conventions for target info + triples
feat: use native typescript parser by default
feat: ability to enforce custom cargo configs by name
fix: javascript format for esm should follow ts
fix: gc of sections by linker
fix: lto and cflags alignment
fix: cross-lang lto with linker plugins
fix: always produce debug symbols on linux
fix: remove vendored native tls in orogene
fix: remove vendored boringssl
fix: native access to oxc parser
fix: bloat from static rust libs
fix: make orogene and uv conditional
fix: target `x86-64-v3`
fix: better support for clang
fix: aligned cflags for hardening
fix: some issues building against musl
fix: drop sqlite math fns for libm dep
fix: build embedded + benchmarks by default
fix: consolidate `elide.target` and related props
fix: entirely eliminate the "elide natives" root
fix: drop bouncycastle (unused)
fix: drop mosaic and compose (tmp, unused)
fix: respect cflags from all native builds
fix: continued support for cfi/branch protection
fix: drop unused / irrelevant resources
fix: colors break native error printing
fix: copy method visibility for node child process records
fix: drop module preloading
chore: bump version for release
chore: add support for es2024 setting
chore: add run configurations for idea
chore: update llvm/clang → `19.x`
chore: update gradle → `8.13`
chore: update typescript → `5.8.2`
chore: update pnpm → `10.5.2`
chore: update protobuf → `4.28.2`
chore: generate initial new-format reachability metadata
chore: update crates
chore: update pnpm deps
chore: update maven deps
chore: trim unused crates and deps
chore: relocate vm feature classes to `engine`
chore: update api pins
chore: update detekt baselines
chore: update pgo profiles

Signed-off-by: Sam Gammon <sam@elide.dev>
  • Loading branch information
sgammon committed Mar 2, 2025
1 parent cf62b54 commit c99bf57
Show file tree
Hide file tree
Showing 214 changed files with 9,673 additions and 17,011 deletions.
File renamed without changes.
43 changes: 43 additions & 0 deletions .cargo/config.clang-arm64.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#
# Copyright (c) 2024 Elide Technologies, Inc.
#
# Licensed under the MIT license (the "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# https://opensource.org/license/mit/
#
# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
# an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under the License.
#

[build]
rustflags = [
# Enforce completely position-independent executables.
"-Crelocation-model=pic",

# Link with LLD through clang; enable linker plugin LTO.
"-Clinker=clang-19",
"-Clink-arg=-fuse-ld=lld",
"-Clinker-plugin-lto",

# Target CPU.
"-Ctarget-cpu=armv8-a+crypto+crc+simd",

# Use clang to drive linking via linker plugins, with lld as the linker. Wire in the linker script which fixes LTO
# arguments via linker plugins.
"-Clinker=$CARGO_MANIFEST_DIR/tools/scripts/macos-linker.sh",
"-Clink-arg=-fuse-ld=ld64.lld",

# Target the native host CPU.
"-Ctarget-cpu=apple-m1",

# Enables NEON support awareness on ARM64 macOS platforms.
"-Ctarget-feature=+neon,+aes,+crc,+sha2,+sha3,+mte,+sve,+sm4,+sve2,+sve2-aes,+sve2-bitperm,+sve2-sha3,+sve2-sm4",
]

[env]
ELIDE_ROOT = { value = ".", relative = true }
SQLITE3_STATIC = { value = "1" }
SQLITE3_LIB_DIR = { value = "third_party/sqlite/install/lib", relative = true }
SQLITE3_INCLUDE_DIR = { value = "third_party/sqlite/install/include", relative = true }
32 changes: 32 additions & 0 deletions .cargo/config.clang-x86_64.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#
# Copyright (c) 2024 Elide Technologies, Inc.
#
# Licensed under the MIT license (the "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# https://opensource.org/license/mit/
#
# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
# an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under the License.
#

[build]
rustflags = [
# Enforce completely position-independent executables.
"-Crelocation-model=pic",

# Link with LLD through clang; enable linker plugin LTO.
"-Clinker=clang-19",
"-Clink-arg=-fuse-ld=lld-19",
"-Clinker-plugin-lto",

# Target CPU.
"-Ctarget-cpu=x86-64-v3",
]

[env]
ELIDE_ROOT = { value = ".", relative = true }
SQLITE3_STATIC = { value = "1" }
SQLITE3_LIB_DIR = { value = "third_party/sqlite/install/lib", relative = true }
SQLITE3_INCLUDE_DIR = { value = "third_party/sqlite/install/include", relative = true }
40 changes: 40 additions & 0 deletions .cargo/config.pgo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#
# Copyright (c) 2024 Elide Technologies, Inc.
#
# Licensed under the MIT license (the "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# https://opensource.org/license/mit/
#
# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
# an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under the License.
#

[build]
rustflags = [
# Enforce completely position-independent executables.
"-Crelocation-model=pic",

# Link with LLD through clang; enable linker plugin LTO.
"-Clinker=clang",
"-Clink-arg=-fuse-ld=lld",
"-Clinker-plugin-lto",

# Enable PGO.
"-Cprofile-use=./tools/merged.profdata",

# Target CPU.
"-Ctarget-cpu=x86-64-v3",
]

[env]
CC = { value = "clang" }
CXX = { value = "clang++" }
LD = { value = "lld" }
AR = { value = "llvm-ar" }

ELIDE_ROOT = { value = ".", relative = true }
SQLITE3_STATIC = { value = "1" }
SQLITE3_LIB_DIR = { value = "third_party/sqlite/install/lib", relative = true }
SQLITE3_INCLUDE_DIR = { value = "third_party/sqlite/install/include", relative = true }
40 changes: 40 additions & 0 deletions .cargo/config.profiler-x86_64.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#
# Copyright (c) 2024 Elide Technologies, Inc.
#
# Licensed under the MIT license (the "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# https://opensource.org/license/mit/
#
# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
# an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under the License.
#

[build]
rustflags = [
# Enforce completely position-independent executables.
"-Crelocation-model=pic",

# Link with LLD through clang; enable linker plugin LTO.
"-Clinker=clang-19",
"-Clink-arg=-fuse-ld=lld",
"-Clinker-plugin-lto",

# Generate profile data.
"-Cprofile-generate=/tmp/pgo-data",

# Target CPU.
"-Ctarget-cpu=x86-64-v3",
]

[env]
CC = { value = "clang" }
CXX = { value = "clang++" }
LD = { value = "lld" }
AR = { value = "llvm-ar" }

ELIDE_ROOT = { value = ".", relative = true }
SQLITE3_STATIC = { value = "1" }
SQLITE3_LIB_DIR = { value = "third_party/sqlite/install/lib", relative = true }
SQLITE3_INCLUDE_DIR = { value = "third_party/sqlite/install/include", relative = true }
4 changes: 0 additions & 4 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@

[build]
rustflags = [
# Enable Tokio unstable.
# "--cfg",
# "tokio_unstable",

# Enforce completely position-independent executables.
"-Crelocation-model=pic",
]
Expand Down
6 changes: 6 additions & 0 deletions .cargo/config.x86_64.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@

[build]
rustflags = [
# Enforce completely position-independent executables.
"-Crelocation-model=pic",

# Enable Tokio unstable.
"--cfg",
"tokio_unstable",
Expand All @@ -22,6 +25,9 @@ rustflags = [

# Enables Control-Flow Enforcement (CET) on x86 architectures.
"-Zcf-protection=full",

# Target CPU.
"-Ctarget-cpu=x86-64-v3",
]

[env]
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ FROM mcr.microsoft.com/devcontainers/base:ubuntu-24.04
LABEL org.opencontainers.image.vendor=Elide
LABEL org.opencontainers.image.title="Elide Codespace"
LABEL org.opencontainers.image.description="Elide runtime within a GitHub Codespace"
LABEL org.opencontainers.image.version=1.0.0-alpha13
LABEL org.opencontainers.image.version=1.0.0-alpha14
LABEL org.opencontainers.image.url=https://github.com/elide-dev/elide
LABEL org.opencontainers.image.base.name=mcr.microsoft.com/devcontainers/base
LABEL org.opencontainers.image.source=https://github.com/elide-dev/elide/blob/main/.devcontainer/Elide.devcontainer
Expand Down
4 changes: 2 additions & 2 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,13 +172,13 @@ Check the `gradle.properties` file at the project root to see all available opti
If you are building a JVM application that runs guest code in one of the languages supported by Elide, you can use the Runtime DSL to configure your own embedded polyglot engine:

```kotlin
implementation("dev.elide:elide-graalvm:1.0.0-alpha13")
implementation("dev.elide:elide-graalvm:1.0.0-alpha14")
```

or for Groovy scripts:

```groovy
implementation 'dev.elide:elide-graalvm:1.0.0-alpha13'
implementation 'dev.elide:elide-graalvm:1.0.0-alpha14'
```

The DSL is used internally by the Elide binaries and by the SSR packages and provides a simplified API to harness the power of the underlying [GraalVM](https://graalvm.org) engine:
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/checks.apicheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ jobs:
- name: "Setup: PNPM"
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
with:
version: "9.2.0"
version: "10.5.2"
run_install: |
- recursive: true
args: [--frozen-lockfile, --strict-peer-dependencies]
Expand Down Expand Up @@ -132,4 +132,7 @@ jobs:
-x test \
-x nativeCompile \
-x nativeOptimizedCompile \
-x :packages:sqlite:checkNative
-x :packages:sqlite:checkNative \
-x :packages:graalvm:buildThirdPartyNatives \
-x :packages:graalvm:buildRustNativesForHost \
-x :packages:graalvm:natives
2 changes: 1 addition & 1 deletion .github/workflows/checks.clippy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
- name: "Setup: Rust"
uses: actions-rust-lang/setup-rust-toolchain@11df97af8e8102fd60b60a77dfbf58d40cd843b8 # v1.10.1
with:
toolchain: nightly
toolchain: stable
components: clippy,rustfmt
rustflags: "-Dwarnings"
- name: "Setup: Rust Tooling"
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/checks.formatting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ jobs:
- name: "Setup: PNPM"
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
with:
version: "9.2.0"
version: "10.5.2"
run_install: |
- recursive: true
args: [--frozen-lockfile, --strict-peer-dependencies]
Expand All @@ -109,7 +109,7 @@ jobs:
- name: "Setup: Rust"
uses: actions-rust-lang/setup-rust-toolchain@11df97af8e8102fd60b60a77dfbf58d40cd843b8 # v1.10.1
with:
toolchain: nightly
toolchain: stable
components: clippy,rustfmt
rustflags: "-Dwarnings"
- name: "Setup: Gradle"
Expand Down Expand Up @@ -139,4 +139,7 @@ jobs:
spotlessCheck \
-x nativeCompile \
-x nativeOptimizedCompile \
-x :packages:sqlite:checkNative
-x :packages:sqlite:checkNative \
-x :packages:graalvm:buildThirdPartyNatives \
-x :packages:graalvm:buildRustNativesForHost \
-x :packages:graalvm:natives
2 changes: 1 addition & 1 deletion .github/workflows/checks.rustfmt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- name: "Setup: Rust"
uses: actions-rust-lang/setup-rust-toolchain@11df97af8e8102fd60b60a77dfbf58d40cd843b8 # v1.10.1
with:
toolchain: nightly
toolchain: stable
components: clippy,rustfmt
rustflags: "-Dwarnings"
- name: "Checks: Rust Formatting"
Expand Down
46 changes: 24 additions & 22 deletions .github/workflows/job.build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,6 @@ name: Framework

env:
BUILDLESS_APIKEY: ${{ secrets.BUILDLESS_APIKEY }}
# SCCACHE_WEBDAV_ENDPOINT: "https://sccache.less.build"
# SCCACHE_WEBDAV_USERNAME: "apikey"
# SCCACHE_WEBDAV_PASSWORD: ${{ secrets.BUILDLESS_APIKEY }}
# SCCACHE_REDIS: "rediss://apikey:${{ secrets.BUILDLESS_APIKEY }}@redis.less.build:6380"

permissions:
contents: read
Expand Down Expand Up @@ -191,8 +187,6 @@ jobs:
hashes: ${{ steps.hash.outputs.hashes }}

steps:
- name: "Setup: Apt Dependencies"
run: sudo apt-get install -y libtool-bin build-essential libc6-dev
- name: "Setup: Harden Runner"
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
Expand Down Expand Up @@ -230,6 +224,26 @@ jobs:
repo.maven.apache.org:443
scans-in.gradle.com:443
services.gradle.org:443
- name: "Setup: Apt Dependencies"
run: |
sudo apt-get install -y libtool-bin build-essential libc6-dev libssl-dev
- name: "Setup: LLVM 19"
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo apt-get remove clang clangd lld llvm || echo "No LLVM installed; skipping error."
sudo ./llvm.sh 19 all
export LLVM_PATH=/usr/lib/llvm-19
export PATH="$LLVM_PATH/bin:$PATH"
export LD_LIBRARY_PATH="$LLVM_PATH/lib:$LD_LIBRARY_PATH"
export LLVM_CONFIG="$LLVM_PATH/bin/llvm-config"
echo LLVM_PATH=$LLVM_PATH >> $GITHUB_ENV
echo LD_LIBRARY_PATH=$LD_LIBRARY_PATH >> $GITHUB_ENV
echo LLVM_CONFIG=$LLVM_CONFIG >> $GITHUB_ENV
echo PATH=$PATH >> $GITHUB_ENV
sudo apt-get remove clang-18 clangd-18 lld-18 llvm-18 || echo "No LLVM 18 installed; skipping error."
sudo apt-get autoremove;
sudo apt-get clean;
- name: "Setup: Clear Tooling Cache"
run: rm -rf /opt/hostedtoolcache
- name: "Setup: Checkout"
Expand All @@ -241,7 +255,7 @@ jobs:
- name: "Setup: Rust"
uses: actions-rust-lang/setup-rust-toolchain@11df97af8e8102fd60b60a77dfbf58d40cd843b8 # v1.10.1
with:
toolchain: nightly
toolchain: stable
components: clippy,rustfmt
rustflags: ""
- name: "Setup: SCCache"
Expand Down Expand Up @@ -274,23 +288,10 @@ jobs:
- name: "Setup: PNPM"
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
with:
version: "9.2.0"
version: "10.5.2"
run_install: |
- recursive: true
args: [--frozen-lockfile, --strict-peer-dependencies]
- name: "Setup: LLVM 18"
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 18 all
export LLVM_PATH=/usr/lib/llvm-18
export PATH="$LLVM_PATH/bin:$PATH"
export LD_LIBRARY_PATH="$LLVM_PATH/lib:$LD_LIBRARY_PATH"
export LLVM_CONFIG="$LLVM_PATH/bin/llvm-config"
echo LLVM_PATH=$LLVM_PATH >> $GITHUB_ENV
echo LD_LIBRARY_PATH=$LD_LIBRARY_PATH >> $GITHUB_ENV
echo LLVM_CONFIG=$LLVM_CONFIG >> $GITHUB_ENV
echo PATH=$PATH >> $GITHUB_ENV
- name: "Setup: Dependencies"
run: |
cargo install cargo-fuzz cargo-insta rustfilt
Expand Down Expand Up @@ -349,7 +350,8 @@ jobs:
--stacktrace \
-Pelide.ci=true \
-PbuildSamples=false \
-PbuildDocs=false
-PbuildDocs=false \
-Pelide.buildMode=dev
- name: "Artifact: Build Outputs"
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
with:
Expand Down
Loading

0 comments on commit c99bf57

Please sign in to comment.