japgolly / Scala Graal
Licence: apache-2.0
Make usage of Graal features easy and safe from Scala. Also features Scala-based React SSR.
Stars: ✭ 152
Projects that are alternatives of or similar to Scala Graal
Egg React Ssr
最小而美的Egg + React + SSR 服务端渲染应用骨架,同时支持JS和TS
Stars: ✭ 1,837 (+1108.55%)
Mutual labels: ssr
Use Http
🐶 React hook for making isomorphic http requests
Stars: ✭ 2,066 (+1259.21%)
Mutual labels: ssr
Shadowrocket Adblock Rules
提供多款 Shadowrocket 规则,带广告过滤功能。用于 iOS 未越狱设备选择性地自动翻墙。
Stars: ✭ 12,447 (+8088.82%)
Mutual labels: ssr
React Prerendered Component
🤔Partial hydration and caching in a pre-suspense era
Stars: ✭ 141 (-7.24%)
Mutual labels: ssr
Monix
Asynchronous, Reactive Programming for Scala and Scala.js.
Stars: ✭ 1,819 (+1096.71%)
Mutual labels: fp
Nostalgie
Nostalgie is an opinionated, full-stack, runtime-agnostic framework for building web apps and web pages using react.
Stars: ✭ 130 (-14.47%)
Mutual labels: ssr
Reactql
Universal React+GraphQL starter kit: React 16, Apollo 2, MobX, Emotion, Webpack 4, GraphQL Code Generator, React Router 4, PostCSS, SSR
Stars: ✭ 1,833 (+1105.92%)
Mutual labels: ssr
Interviews
A list of fancy questions I've been asked during the interviews I had. Some of them I ask when interviewing people.
Stars: ✭ 140 (-7.89%)
Mutual labels: fp
Cra Serverless
Serverless pre-rendering (SSR) for React SPA using AWS Lambda, S3, and CloudFront.
Stars: ✭ 137 (-9.87%)
Mutual labels: ssr
Angular9 Example App
Angular 13 Example App + Angular CLI + i18n + GraphQL
Stars: ✭ 1,769 (+1063.82%)
Mutual labels: ssr
Rendora
dynamic server-side rendering using headless Chrome to effortlessly solve the SEO problem for modern javascript websites
Stars: ✭ 1,853 (+1119.08%)
Mutual labels: ssr
Surmon.me
🆒 My personal website and blog, powered by @vuejs (3)
Stars: ✭ 1,767 (+1062.5%)
Mutual labels: ssr
React Fondue
⚛ ReactFondue is minimal React boilerplate with support for code splitting, hot module reload and server side rendering.
Stars: ✭ 146 (-3.95%)
Mutual labels: ssr
Goober
🥜 goober, a less than 1KB 🎉 css-in-js alternative with a familiar API
Stars: ✭ 2,317 (+1424.34%)
Mutual labels: ssr
Gantt
Gantt chart library using jsx support SVG, Canvas and SSR
Stars: ✭ 148 (-2.63%)
Mutual labels: ssr
scala-graal
libraryDependencies ++= Seq(
"com.github.japgolly.scala-graal" %% "core" % "1.1.1"
"com.github.japgolly.scala-graal" %%% "core-js" % "1.1.1"
"com.github.japgolly.scala-graal" %%% "ext-boopickle" % "1.1.1"
"com.github.japgolly.scala-graal" %% "ext-prometheus" % "1.1.1"
)
Goals
- Make it quick, easy and safe to interface with embedded languages from Scala
- Hide and automate a lot of required GraalVM boilerplate
- Support React SSR for Scala.JS applications
Demo
import japgolly.scalagraal._
// Use semantics and implicit config for JS
// (GraalVM also supports Python, R, Ruby, LLVM)
import japgolly.scalagraal.js._
import GraalJs._
// 1. Pre-compile expression functions for fast invocation.
// 2. Typeclasses translate and/or marshall data between JVM and JS.
val expr: (Int, Int) => Expr[String] =
Expr.apply2((a, b) => s"($a + $b) * 2 + '!'").compile(_.asString)
// Use a basic synchronous JS environment
val ctx = GraalContext()
val result = ctx.eval(expr(3, 8))
assert(result == Right("22!"))
Learning
Features
- Expressions
- composition
- purity
- result parsing
- error handling
- null handling
- binding typeclasses
- binding codecs (eg binary/json/whatever)
- Service
- single-threaded
- multi-threaded pool
- synchronous
- asynchronous
- optional time limits
- before/around/after hooks
- automatic metrics
- Warmup
- ability to warmup VM
- rules (eg.
up to 10000 reps/thread & up to 30 sec | until completes within 20ms
)
- React SSR (Server-Side Rendering)
- support for rendering JS components from JVM
- conversion to constant-time (conditionally)
-
window
and especiallywindow.location
management
- Integrations
- Prometheus - export metrics to Prometheus
- BooPickle - marshall data back and forth using binary codecs
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].