Comments (7)
Lots of interesting data here: plentico/plenti#3
And follow-up here: plentico/plenti#169
Looks like Matthew Mueller wound up using v8 for Bud though: https://github.com/livebud/bud/tree/de977798451d9b3f84695254a84377581a653286/package/svelte
from algernon.
@tooolbox yes, the plenti(v8go) performance is very close to the nodejs:
from algernon.
Thanks for the feature request!
from algernon.
Hey ๐
Achieving a zero dependency, reactive UI for Go is a problem we're still trying to solve with Plenti. We're currently compiling Svelte in V8 at the moment, and that works, but it's not without blemishes. If you're ever interested in talking through what we've tried, I'd be happy to hop on a call. Thanks!
from algernon.
@jimafisk Sounds interesting! ๐ I'm on vacation, but I want to take a look at Plenti when I get back.
from algernon.
I found svelte-bun (https://github.com/terrywh/svelte-bun) which realized realtime building of svelte components on dev environment.
The performance of Bun is touted to be twice that of Deno and six times that of Node.
But Bun is not on golang.
from algernon.
I've tested svelte-bun with bun, its performance is amazing, the building is realtime.
And I've tried to run svelte-bun with v8go, but I failed.
I packaged the whole svelte-bun project with:
./node_modules/.bin/esbuild ./sbin/server.js --bundle --outfile=out.js --format=esm --platform=node
then run it with test.go:
package main
import (
"fmt"
"io/ioutil"
v8 "rogchap.com/v8go"
)
func main() {
js, _ := ioutil.ReadFile("./out.js")
ctx:= v8.NewContext()
val, err := ctx.RunScript(string(js), "main.js")
if err != nil {
fmt.Printf("failed to run JavaScript file: %v\n", err)
return
}
fmt.Println(val)
}
it shows error:
failed to run JavaScript file: SyntaxError: Cannot use import statement outside a module
I guess the corresponding lines are:
import { stat as asyncStat } from "fs/promises";
import { extname, join as join2 } from "path";
import { resolve as resolve2 } from "path";
Maybe an experienced guy can work around it, but I can't.
ref: plentico/plenti#276
ref: terrywh/svelte-bun#2
from algernon.
Related Issues (20)
- pug and jade template support HOT 6
- %2F in URL
- low ulimit on macOS HOT 1
- Lua tables that contains objects are not rendered with pongo2 HOT 13
- Authrefresh crashes randomly at startup HOT 2
- Command line arg --internal=filename ignores filename HOT 3
- Can Algernon be configured to run over SSL but with a self-signed cert
- ability to close the response stream early HOT 5
- gopherlua doesn't support package.loadlib HOT 3
- MultiMarkdown CriticMarkup Support
- lua to wasm HOT 2
- .alg files are persisted to /tmp HOT 2
- sqlite support HOT 2
- examples for data validations
- Create more documentation and learning materials (like tutorial + reference) HOT 7
- Vhost handling HOT 1
- Automatic ACME / LetsEncrypt HOT 4
- Unable to serve files with embedded new line HOT 2
- Algernon flags precedence issue HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from algernon.