HackerTrans
TopNewTrendsCommentsPastAskShowJobs

Princesseuh

74 karmajoined vor 8 Jahren

Submissions

Show HN: Sätteri, high-performance Markdown pipeline for JavaScript

github.com
1 points·by Princesseuh·vor 3 Monaten·0 comments

Show HN: Maudit, a Rust library to build static websites

maudit.org
4 points·by Princesseuh·vor 9 Monaten·4 comments

comments

Princesseuh
·vor 4 Tagen·discuss
We don't intend on removing support for the unified ecosystem, we on purpose made the Markdown processing pipeline pluggable so that it was possible for both to exists!

The vast majority of our users don't use any sort of unified plugins, so a pipeline that's faster (and about 100 deps leaner) felt like a better default.
Princesseuh
·vor 4 Tagen·discuss
If you are using every single feature Astro has, your code somehow goes through every single branch (of every single dependency), etc then yes, but that'd be a pretty far-fetched scenario!

In practice, our users typically comment quite positively on how little (if any) work major updates requires, and we offer pretty extensive upgrade guides, if that helps.
Princesseuh
·vor 4 Tagen·discuss
Love everything you do Steve, consider that I've done it for you
Princesseuh
·vor 4 Tagen·discuss
Yeah, the parts rewritten in Rust here as only parts of the bottleneck. A lot of it is still JavaScript (including the user's code!). If Astro was just .md -> HTML, it'd of course be much faster.
Princesseuh
·vor 4 Tagen·discuss
It was tough to create a plugin API that was both performant and intuitive. Especially since the library people were migrating from (remark/rehype) was very laissez-faire in regard to the data you have access to, visiting patterns, etc.

Crossing data between Rust and JS is inherently kinda slow (relatively), so there's a constant push and pull between flexibility and performance that's not always easy to reason about!
Princesseuh
·vor 4 Tagen·discuss
This was actually part of the reason I made the Rust markdown processing, the unified ecosystem is a lot of deps!

I still have some plans in this area that should reduce the overall count further, though.
Princesseuh
·vor 4 Tagen·discuss
It was partially that, but mostly the Vite version with the Rolldown bundling etc. We typically always need to do a major whenever Vite releases one because it tends to impact us a lot compared to other frameworks for various reasons.
Princesseuh
·vor 4 Tagen·discuss
It depends in what regards you mean, I have some benchmarks here if you'd like to take a look at those: https://github.com/Princesseuh/web-markdown-benchmark

The TL;DR is that `marked` is very light, but a bit on the slower side compared to Sätteri and `markdown-it` (and its forks). I'm not sure how friendly the extensibility is, but Sätteri re-use the same AST format as the unified ecosystem, which might feel more friendly.

Both good options, though!
Princesseuh
·vor 4 Tagen·discuss
This does not affect remote content, only the content written in .astro files. If you have remote content you'd use something like `set:html`: https://docs.astro.build/en/reference/directives-reference/#...

See this example: https://stackblitz.com/edit/github-ug3paw61?file=src%2Fpages...
Princesseuh
·vor 4 Tagen·discuss
I made the Rust compiler and the Rust Markdown pipeline (https://satteri.bruits.org) in this, let me know if you have any questions, glad to answer anything!
Princesseuh
·vor 2 Monaten·discuss
Zed has semantic highlighting: https://zed.dev/docs/semantic-tokens

It was added a few months ago if I remember correctly.
Princesseuh
·vor 3 Monaten·discuss
Not intending this to be an ad, but a friend of mine has been working on a changesets-based tool that has native polyglot support: https://github.com/bruits/sampo

Hopefully easier than hacking around changesets, but less mature, of course.

(Disclaimer: Him and I are in the same org and I have sent PRs to said tool)
Princesseuh
·vor 9 Monaten·discuss
Working on Maudit, a Rust library to make static websites. Emphasis on library instead of framework. I aim that you could integrate Maudit into existing Rust apps, building pages individually, rendering Markdown where you need etc, instead of a black box magic "build website" command.

https://maudit.org https://github.com/bruits/maudit
Princesseuh
·vor 9 Monaten·discuss
Thank you! Let me know if you have any questions or encounter any problems, always happy to help.
Princesseuh
·vor 9 Monaten·discuss
Ah! Thank you for taking interest.

At this time there's no built-in way to generate RSS feeds, you'd need to use a "Endpoint" route and return a .xml from it: https://maudit.org/docs/routing/#endpoints.

It's pretty straightforward, but it does require some manual work. Crates like `rss_gen` can help making the generation easier, though