aglundahl

aglundahl

Hi all!

I’ve put together DenoRider, a JavaScript runtime embedded in Elixir via Rustler and the deno_runtime crate.

My use case is server side rendering of a ClojureScript app. Please let me know if you use it, because it would be interesting to hear about your use case!

Example

iex> DenoRider.eval("1 + 2")
{:ok, 3}
iex> DenoRider.eval("globalThis.foo = 'bar'")
{:ok, "bar"}
iex> DenoRider.eval("globalThis.foo")
{:ok, "bar"}

Links

https://github.com/aglundahl/deno_rider

Showing Posts 1 to 10

hxgdzyuyi

hxgdzyuyi

If I use it to implement React SSR (Server-Side Rendering), will there be any problem?

aglundahl

aglundahl OP

No, that’s basically what I use it for.

Wigny

Wigny

Do you have a example of how to achieve that? I would like to know if it’s possible to use DenoRider with a JS library such as CortexJS.

akoutmos

akoutmos

Author of Build a Weather Station with Elixir and Nerves

Thank you for doing this! I wanted to create a Rustler NIF around deno_runtime as well for https://github.com/akoutmos/deno_ex....but now it appears I won’t have to do that :smiley:. Thanks for checking that off my todo list!

hubertlepicki

hubertlepicki

this is very nice, I’ll be playing with it. This can be a basis for LiveView/React Server Components-like hybrid solution!

rekkice

rekkice

my implementation’s a bit hacky, but i made a custom SSR renderer for live_svelte with it:
https://github.com/Rekkice/chat-translate/commit/951bbb322010fb440cda2046fa54f5fdef2b598d

aglundahl

aglundahl OP

I think CortexJS would work just fine. There’s no support for npm integration yet, though, so you need a build step to convert CortexJS to something consumable by the runtime. I suggest you take a look at what @rekkice does in his repo. :slightly_smiling_face:

aglundahl

aglundahl OP

Awesome! Thanks for sharing!

Wigny

Wigny

It worked great! We are compiling our TS file using the bun lib and then passing the resulting JS file to the DenoRider supervisor. Thanks for your effort in building it!

Do you have a roadmap with the changes/features you still want to implement or may we consider this library production-ready/stable?

aglundahl

aglundahl OP

Cool! Glad to hear it’s working for you.

There’s currently no roadmap, but that’s mostly because it has everything I need for now. If you have feature requests, just put up an issue on GitHub. :slightly_smiling_face:

Where Next? Top

Trending in Announcing Top

wojtekmach
Hey everyone! Req is an HTTP client for Elixir that I’ve been working on for quite some time. There is already a lot of HTTP clients out...
New
handnot2
Samly can be used to enable SAML 2.0 Single Sign On in a Plug/Phoenix application. This library uses Erlang esaml to provide plug enabl...
New
woylie
Flop is an Elixir library that applies filtering, ordering and pagination parameters to your Ecto queries. offset-based pagination with...
New
restlessronin
The repo is at GitHub - cyberchitta/openai_ex: Community maintained Elixir library for OpenAI API · GitHub. Docs are at OpenaiEx User Gu...
152 11030 135
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
fuelen
Hi all! I want to present a small library which provides a mix task for generating an Entity-Relationship Diagram for Ecto schemas. You...
New
woylie
Phoenix components for pagination, sortable tables and filter forms with Flop and (optionally) Ecto. pagination cursor pagination sorta...
New

Other Trending Topics Top

mudasobwa
I am seeing a lot of aplications of Argumentum ad Vericundiam in software discussions. They do link some piece of writing and point us to...
New
bartblast
Hey folks, I just published a post about Hologram’s funding and where the project goes next - the short version: Curiosum as Main Spons...
New
sorenone
Today we’re releasing Oban for Python. Not an Oban client in Python. Not a pythonx wrapper embedded in Elixir. Nope, it’s a fully operati...
New
Herve37
We’re evaluating API mocking tools for OpenAPI-based projects and would love to hear what other teams are using. We’re particularly inte...
New
AstonJ
This showed up on my feed.. anyone heard of it? Just hype? Ox Alpha is a reasoning model designed for coding, sustained ag...
New
akoutmos
@hugobarauna, Dr. Dimitrios Koutmos (my brother) and I (Alex Koutmos) have been hard at work on writing a book on how you can use Elixir ...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews