@elide-tools/gust
Gust is beta software. Consider yourself warned...
Gust is a polyglot software application development framework. Bring the most road-tested toolchain on the planet to your development process, with Bazel, Protobuf, gRPC, Soy, and more, all pre-integrated and tested out of the box. Early support is included for Java, Kotlin, Python, and NodeJS on the backend; Closure, TypeScript, or even Java on the frontend (transpiled to highly-optimized and type-checked JS); and Java, Kotlin, Swift, Objective-C and C/C++ for mobile applications.
Runtime libraries are also published to support easy development of web applications (in Java and Python using Soy), and mobile applications (in Java and Swift). The framework is also capable of leveraging GraalVM to build your app into a native application (where supported), alleviating the need entirely for a JVM or Python runtime in your app containers. Native apps also have the nice benefit of way shorter startup times (try 30ms
, lol!), and, in some cases, significant latency and memory use improvements.
Framework development
Right now, the primary goal of this work is a functional framework. This work is tracked in the following over-arching tickets:
- App Framework - tracks progress toward a useful runtime layer for app development
- MVP Functionality Matrix - tracks progress toward basic development and app features
- Example Apps - tracks progress toward a set of representative sample apps
Developing apps with Gust
Documentation is in the works. For now, there is API documentation in Java and some in JS. If you're familiar with the Closure/Bazel universe, navigating the framework should be relatively easy. If not, you may have a bad time.
If you'd like to use Gust for your own app, drop us a line by filing an issue, and we'll help you get there. Gust is already in use for production apps, but only inside our own team - so we can support it, but only on an individual/one-off basis, for now.
Sample Apps
As part of the framework code, a few sample apps are included. Each of these is usable as its own project, simply by copying the files in that directory to another location on disk, and then running bazel build //...
from inside the new directory. Each sample app demonstrates diverse functionality supported by Gust, including supported languages and use cases, and at least one holistic application:
-
rest_mvc
(Java): Example of RESTful servers with Micronaut. -
soy_ssr
(Java): Server-side-rendered pages with Soy and Micronaut. -
node_mvc
(TypeScript/JS): Server-side MVC app running in Node -
todolist
(Java/Closure): Full holistic app example (see below for more)
Demo)
Todolist App (Until this framework is out of beta
, the below is a list of goals, not a current feature-list.
The richest and best example app is Todolist, which is designed to be an example SaaS startup in a box. This includes a server app, a web app, mobile apps (for Android and iOS), and full-blown declarative infrastructure to support it all. The app includes the following components and features:
- Devops toolkit
-
Hosting and serving via GKE/GCLB
- Seamless production deployment from CI
- All-declarative infrastructure, from scratch
- Anycast hosting (IPv4 and IPv6) with Cloud CDN support
- Canary and blue/green deployment support
- Rich error reporting and production debugging/logging
-
Server-side app written in Java and Micronaut
- Central schema via Protobuf
- SSR-based page serving with Soy
- Schema-driven gRPC services with seamless Firebase auth
- JSON/REST and Protobuf service invocation, via Endpoints Service Proxy (ESP) and Envoy
- Seamless GraphQL support atop Protobuf/gRPC with Rejoiner
- Automatic schema-driven object storage and querying via Firestore
- Caching support via JSR-107 (JCache) and Redis
- Packaging via Docker with intelligent layering
- Native image support via GraalVM
- Rich support for frontend security and performance features
- Content Security Policy (CSP), with automatic JS nonces
- Style rewriting for CSS classes and IDs via Soy
-
Client-side app written in Closure and J2CL
- Strict type-checking of all frontend code
- Shared critical code between frontend and backend (via Java/J2CL/Elemental2)
- Re-hydrated Hybrid S3R/CSR with Incremental DOM
- Automatic, individual browser-tailored styles and scripts, built/served on the fly and aggressively cached
- Scripts compiled and bundled via Closure Compiler
- Styles compiled and bundled via SCSS/SASS, GSS, and PostCSS
- Android and iOS apps
Contributing
To build the framework, you'll need Bazel/Bazelisk and a standard toolchain of stuff (C/C++ compilers, Docker, JDK 11+, Git, and so on). Bazel should tell you what you need if it can't fetch it for you. Otherwise, file a bug on this repo if you have trouble building the framework itself.
Most development tasks on the framework involve the Makefile
, which offers convenient invocation of common dev tools, including Bazelisk and ibazel
. Running make help
shows the commands supported, and generally returns something like this:
$ make help
GUST Framework Tools:
all Build and test all framework targets.
bases Build base images and push them.
build Build all framework targets.
builder-image Build a new version of the CI builder image for Gust.
clean-docs Clean built documentation.
clean-reports Clean built reports.
clean Clean ephemeral targets.
decrypt Decrypt private key material.
dev Develop against the specified target.
devtools Install local development dependencies.
distclean Clean targets, caches and dependencies.
docs Build documentation for the framework.
encrypt Encrypt private key material.
forceclean Clean everything, and sanitize the codebase (DANGEROUS).
help Show this help text.
release-images Pull, tag, and release Docker images.
report-coverage Report coverage results to Codecov.
report-tests Report test results to Report.CI.
run Run the specified target.
samples Build and push sample app images.
serve-coverage Serve the current coverage report (must generate first).
serve-docs Serve the docs locally (must generate first).
test Run all framework testsuites.
update-deps Re-seal and update all dependencies.
Obviously, decrypting keys or pushing release images may require permissions, however there should be no barrier to simple dev tasks like building the framework, building sample apps, and so on.
Licensing
Below we specify licensing details for the Gust/Elide framework, including pointers to licenses for any dependent software. Gust/Elide itself is licensed under the Prosperity Public License 2.0.0, which is enclosed in the LICENSE.txt
file. Licenses for any dependent software (as required/applicable) are embedded in the LICENSES/
directory, each within their own text file named for the software or framework.
- Gust/Elide: Prosperity License
-
rules_closure
: Apache 2.0 (Entry 1 inLICENSES.txt
) - gRPC Gateway: Roughly Apache 2.0 (Entry 2 in
LICENSES.txt
)