Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rust rewrite #7

Open
38 of 59 tasks
qknight opened this issue Dec 10, 2024 · 5 comments
Open
38 of 59 tasks

rust rewrite #7

qknight opened this issue Dec 10, 2024 · 5 comments

Comments

@qknight
Copy link
Member

qknight commented Dec 10, 2024

i consider a rust rewrite because:

  • the rust workflow is better: go language feels too limited, the compiling process like a patchwork, standard project structure freaks me out
  • rust makes WASM possible and has leptosUIs

requirements

this is mainly a rewrite of

i want to use these components for

  • tour_of_nix (specialized teaching module)
  • labsystem (generalized teaching module)
  • nixcloud remote editor
  • nixcloud.io webpage

for now this rust rewrite mainly focuses on the lastlog.de/blog module

ux

pankat main mission is a static page generator but with highly interactive elements:

  • using websocket with live editing updates/rebuilds
  • permission schema with login

backend

  • REST intgerface concept
  • execute pandoc from shell
  • replace diffDOM.js by rust implementation
  • pankat in rust rewrite
    • create index.html (most recent page)

    • timeline support

    • show menu entries to draft/special_page/roadmap after login

    • config file support

    • command line toggle for

      • basic command line interface concept
      • site brand
      • static blog generator command line option: --build-only
    • article logic

      • integrate websocket life-updates using sauron dom/vdom updates
      • a global flat switch to output input/libnix/libnix_roadmap.mdwn to either output/libnix/libnix_roadmap.html or output/libnix_roadmap.html
      • rewrite ArticleWithTags so id is not optional (same as Article) and use NewArticle/NewArticleWithTags for creating new entries
      • GC check after traverse_and_collect_articles to remove old articles from db
      • cache table
        • write cache into db
        • render optimization: implement checks (hash on the html string after plugin run has finished) so we can use the previous render and don't have to redo it on each article change
      • article finder
      • fs-change finder
      • plugins decode support
      • database support (https://diesel.rs/guides/relations.html)
        • Article / NewArticle sqlite/diesel concept
        • sqlite abstraction (convert GORM to DIESEL logic)
        • reimplement the tests from go for db interface
        • extend set()/del() to return affected neighbours in next/prev article, next/prev series and most_recent_article
        • relational support for tags
        • Articles' src/dst filenames (in db) should be relative to $input (ATM they are $input/dir/file.mdwn)
        • support for series queries
        • next/previous in article / series
          • fix bug with series
        • garbage collection in $output of unreferences files with scan+fs-notify
    • https://github.com/notify-rs/notify/tree/main/examples prototype integration

    • rendering

      • tempaltes support using https://docs.rs/handlebars/latest/handlebars/
      • markdown to html pandoc conversion
      • article rendering using the two templates
      • article navigation i.e. next/previous link
      • article series i.e. next/prevous link
    • README.md documentation

frontend

https://leptos.dev/

  • in leptos rewrite

    • timeline (from javascript to rust)
    • /api/ws-draft with websocket (leptos)
    • /api/ws-specialpage with websocket (leptos)
  • terminal support for git

textarea editor

  • integrate rustpad (coop editing)
    • integrate it into the page for fast article editing with preview
    • use /api/login for auth
    • generate error messages with position annotations on parse/plugin/rendering issues

rustpad

https://rustpad.io (uses https://github.com/microsoft/monaco-editor/)

it builds on top of https://github.com/spebern/operational-transform-rs which means FS writes from normal editors don't work anymore (maybe i can write a FS-watcher which creates a bunch of transformations so that it wraps an override of a file into a 'huge' update of the document state)

see also:

https://github.com/siku2/rust-monaco

related issues

future

@qknight
Copy link
Member Author

qknight commented Jan 4, 2025

sever side events, http3 (quic)

@qknight
Copy link
Member Author

qknight commented Jan 13, 2025

leptos SSR, hydration

@qknight
Copy link
Member Author

qknight commented Jan 13, 2025

CRDT als OT alternative (https://github.com/automerge/automerge)

@qknight
Copy link
Member Author

qknight commented Jan 14, 2025

@qknight
Copy link
Member Author

qknight commented Feb 24, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant