Skip to content

Commit

Permalink
feat: entrypoint work pt 4 (#1084)
Browse files Browse the repository at this point in the history
* feat: entrypoint work pt 4

- feat(base): optimized rust routines for encodings
- feat(base): build under `no_std`
- feat(model): `model` crate initial structure
- feat(sqlite): implement rust sqlite api layer
- feat(project): new project crate
- fix: sqlite symbol access from umbrella
- fix: don't strip cargo outputs
- fix: many fixes for `builder` crates
- fix: don't move around third party libs
- fix: clean for zlib and sqlite
- fix: sqlite build flags aren't making it in
- fix: rename `core` crate to `base`
- fix: dynamic/static library builds for crates
- fix(sqlite): loading of native sqlite libs in native image
- chore: run `cargo test` with `make test`
- chore: add some basic jvm and native encoding benchmarks
- chore: merge `cli-bridge` module into `cli`
- chore: rewrite `CliNativeBridge` in kotlin
- chore: initial build wiring for protocol models in rust
- chore: makefile support for ccache and sccache
- chore: `cargo fuzz` support
- chore: run `cargo update`
- chore: run clippy
- chore: run fmt
- chore: update module pins, baselines
- chore: update verification metadata + lockfiles
- chore: update kotlinx benchmark → `0.4.11`
- chore: update gradle → `8.9`
- chore: update kotlin → `2.0.10-RC`
- chore: update ksp → `2.0.10-RC-1.0.23`

Signed-off-by: Sam Gammon <[email protected]>

* feat: first use of new entrypoint, set ELIDE_EXPERIMENTAL to try

Signed-off-by: Sam Gammon <[email protected]>

* fix: python/shell build and init params

Signed-off-by: Sam Gammon <[email protected]>

* fix: language aliases should trigger engine init for langs

Signed-off-by: Sam Gammon <[email protected]>

* fix: detect version of graalpy/python for home paths

Signed-off-by: Sam Gammon <[email protected]>

* chore: `base` crate prelude/smartstring support

Signed-off-by: Sam Gammon <[email protected]>

* fix: consistent language init, engine lang support from args

Signed-off-by: Sam Gammon <[email protected]>

* feat: initial project, protocol, deps crate structures

Signed-off-by: Sam Gammon <[email protected]>

* chore: wiring for rust coverage in makefile/scripts

Signed-off-by: Sam Gammon <[email protected]>

* chore: cargo update/relock

Signed-off-by: Sam Gammon <[email protected]>

* chore: wire native tests into ci

Signed-off-by: Sam Gammon <[email protected]>

* chore: update detekt baseline for `cli` module

Signed-off-by: Sam Gammon <[email protected]>

* chore: run fmt

Signed-off-by: Sam Gammon <[email protected]>

* fix: coverage report overwrite with json

Signed-off-by: Sam Gammon <[email protected]>

* chore: native coverage reporting in ci

Signed-off-by: Sam Gammon <[email protected]>

* chore: `make check` task

Signed-off-by: Sam Gammon <[email protected]>

* chore: continued rust coverage/python support in ci

Signed-off-by: Sam Gammon <[email protected]>

* chore: ci refactors for native layer build steps

Signed-off-by: Sam Gammon <[email protected]>

* chore: run fmt, small build nits

Signed-off-by: Sam Gammon <[email protected]>

* chore: clean natives on `make clean`

Signed-off-by: Sam Gammon <[email protected]>

* chore: force deps to build for `make test` or `make check`

Signed-off-by: Sam Gammon <[email protected]>

* chore: more build/ci fixes

Signed-off-by: Sam Gammon <[email protected]>

* chore: task to enforce native lib existence before tests

Signed-off-by: Sam Gammon <[email protected]>

* fix: pip install during ci test

Signed-off-by: Sam Gammon <[email protected]>

* fix: yeet extra profiles after running jvm tests

Signed-off-by: Sam Gammon <[email protected]>

* fix: build `third-party` before running tests in ci

Signed-off-by: Sam Gammon <[email protected]>

* chore: add llvm install step to ci

Signed-off-by: Sam Gammon <[email protected]>

* fix: rust coverage depends on `llvm-profdata`

Signed-off-by: Sam Gammon <[email protected]>

* chore: ci support for rust checks, biome

Signed-off-by: Sam Gammon <[email protected]>

* chore: name nits

Signed-off-by: Sam Gammon <[email protected]>

* chore: adjust what runs in draft mode in ci

Signed-off-by: Sam Gammon <[email protected]>

* fix: llvm version in ci

Signed-off-by: Sam Gammon <[email protected]>

* chore: package of build consistency and reliability fixes

Signed-off-by: Sam Gammon <[email protected]>

* chore(deps): Bump actions/download-artifact from 4.1.7 to 4.1.8

Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 4.1.7 to 4.1.8.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](actions/download-artifact@65a9edc...fa0a91b)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: Sam Gammon <[email protected]>

* chore(deps): Bump docker/setup-buildx-action from 3.3.0 to 3.4.0

Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 3.3.0 to 3.4.0.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](docker/setup-buildx-action@d70bba7...4fd8129)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: Sam Gammon <[email protected]>

* chore(deps): Bump docker/setup-qemu-action from 3.0.0 to 3.1.0

Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 3.0.0 to 3.1.0.
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](docker/setup-qemu-action@6882732...5927c83)

---
updated-dependencies:
- dependency-name: docker/setup-qemu-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: Sam Gammon <[email protected]>

* chore(deps): Bump actions/upload-artifact from 4.3.3 to 4.3.4

Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.3.3 to 4.3.4.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](actions/upload-artifact@6546280...0b2256b)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: Sam Gammon <[email protected]>

* chore: clippy/fmt

Signed-off-by: Sam Gammon <[email protected]>

---------

Signed-off-by: Sam Gammon <[email protected]>
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
sgammon and dependabot[bot] authored Jul 15, 2024
1 parent 4e85082 commit f5081fa
Show file tree
Hide file tree
Showing 184 changed files with 6,967 additions and 2,773 deletions.
4 changes: 4 additions & 0 deletions .cargo/config.aarch64.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@

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

# Enables access to unstable options.
"-Zunstable-options",

Expand Down
4 changes: 4 additions & 0 deletions .cargo/config.macos-aarch64.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@

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

# 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",
Expand Down
2 changes: 1 addition & 1 deletion .cargo/config.nightly.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

[build]
# See main config for docs on each flag.
rustflags = ["-Zunstable-options", "-Zbranch-protection=bti,pac-ret", "-Zbuild-std"]
rustflags = ["--cfg", "tokio_unstable", "-Zunstable-options", "-Zbranch-protection=bti,pac-ret", "-Zbuild-std"]

[unstable]
build-std = ["core", "alloc", "test", "proc_macro"]
Expand Down
25 changes: 16 additions & 9 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,23 @@
#

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

# Enforce completely position-independent executables.
"-Crelocation-model=pic",

# Enables access to unstable options.
"-Zunstable-options",

# Enable multithreaded compiler frontend.
"-Zthreads=8",
]

[env]
ELIDE_ROOT = { value = ".", relative = true }
INCLUDE = { value = "target/include", relative = true }
LIB = { value = "target/lib", relative = true }
SQLITE3_STATIC = { value = "1" }
BORING_BSSL_PATH = { value = "target/lib/boringssl", relative = true }
BORING_BSSL_INCLUDE_PATH = { value = "target/include", relative = true }
OPENSSL_LIB_DIR = { value = "target/lib", relative = true }
OPENSSL_INCLUDE_DIR = { value = "target/include", relative = true }
SQLITE3_LIB_DIR = { value = "target/lib", relative = true }
SQLITE3_INCLUDE_DIR = { value = "target/include", relative = true }
SQLITE3_LIB_DIR = { value = "third_party/sqlite/install/lib", relative = true }
SQLITE3_INCLUDE_DIR = { value = "third_party/sqlite/install/include", relative = true }
4 changes: 4 additions & 0 deletions .cargo/config.x86_64.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@

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

# Enables access to unstable options.
"-Zunstable-options",

Expand Down
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,3 @@ packages/*/packaging/** -linguist-detectable
.github/** -linguist-detectable
.devcontainer/Dockerfile -linguist-detectable
.devcontainer/*/Dockerfile -linguist-detectable

37 changes: 34 additions & 3 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,41 +8,72 @@ The following guide should help you get started and submit a PR.
Follow the directions in the main [README](../README.md). You will need a recent copy of GraalVM for Java 20, and several other components.
Once you have these installed, you can try the `Makefile`:

### Notable tasks

- `make info`: Show build environment
- `make build`: Build all targets
- `make test`: Build all targets, run all tests
- `make check`: Build all targets, run all tests, run all checks
- `make native`: Build the native binary for the CLI
- `make natives`: Rebuild native dependencies
- `make help`: Show all make tasks

### All tasks

```
$ make help
Elide:
api-check Check API/ABI compatibility with current changes.
build Build the main library, and code-samples if SAMPLES=yes.
check Build all targets, run all tests, run all checks.
clean-cli Clean built CLI targets.
clean-docs Clean documentation targets.
clean-site Clean site targets.
clean-natives Clean local native targets.
clean Clean build outputs and caches.
cli-local Build the Elide command line tool and install it locally (into ~/bin, or LOCAL_CLI_INSTALL_DIR).
cli-release Build an Elide command-line release.
cli Build the Elide command-line tool (native target).
dependency-packages Print the suite of dependencies to install for this OS.
distclean DANGER: Clean and remove any persistent caches. Drops changes.
docs Generate docs for all library modules.
fmt Run all formatter tools.
forceclean DANGER: Clean, distclean, and clear untracked files.
format Alias for `make fmt`.
gvm Build a custom copy of GraalVM for use locally.
help Show this help text ('make help').
image-base-alpine Build base Alpine image.
image-base Build base Ubuntu image.
image-gvm17 Build GVM17 builder image.
image-gvm21 Build GVM21 builder image.
image-gvm22 Build GVM22 builder image.
image-jdk17 Build JDK17 builder image.
image-jdk21 Build JDK21 builder image.
image-jdk22 Build JDK20 builder image.
image-native-alpine Build native Alpine base image.
image-native Build native Ubuntu base image.
image-runtime-jvm17 Build runtime GVM17 builder image.
image-runtime-jvm21 Build runtime GVM21 builder image.
image-runtime-jvm22 Build runtime GVM22 builder image.
images Build all Docker images.
info Show info about the current codebase and toolchain.
model-update Update the proto model and re-build it.
model Build proto model targets.
native Build Elide's native image target; use BUILD_MODE=release for a release binary.
natives-coverage Show the current native coverage report; only run if `natives-test` is run first.
natives-test Run Cargo and native tests, optionally buildin coverage if COVERAGE=yes.
natives Rebuild natives (C/C++ and Rust).
publish Publish a new version of all Elide packages.
release Perform a full release, including publishing to Maven Central and the Elide repository.
relock-deps Update dependency locks and hashes across Yarn and Gradle.
reports Generate reports for tests, coverage, etc.
runtime-build Build the JS runtime facade and the builtin modules bundle
runtime-update Rebuild and copy the JS runtime facade
runtime Build and update the JS runtime if needed.
serve-docs Serve documentation locally.
serve-site Serve Elide site locally.
site Generate the static Elide website.
setup Setup development pre-requisites.
test Run the library testsuite, and code-sample tests if SAMPLES=yes.
third-party Build all third-party embedded projects.
umbrella Build the native umbrella tooling library.
update-deps Perform interactive dependency upgrades across Yarn and Gradle.
update-jdeps Interactively update Gradle dependencies.
update-jsdeps Interactively update Yarn dependencies.
Expand Down
1 change: 1 addition & 0 deletions .github/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,4 @@ ignore:
- "packages/cli-bridge/**/*.*"
- "packages/graalvm-ts/src/main/java/elide/runtime/lang/typescript/TypeScriptModuleLoader.java"
- "packages/graalvm-ts/src/main/java/elide/runtime/lang/typescript/TypeScriptFileTypeDetector.java"
- "crates/sqlite/src/lib.rs"
2 changes: 2 additions & 0 deletions .github/codeql/codeql-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@ name: "CodeQL"

languages:
- javascript-typescript
- java-kotlin

queries:
- uses: security-and-quality

paths:
- packages
- crates

paths-ignore:
- .codebase
Expand Down
Loading

0 comments on commit f5081fa

Please sign in to comment.