タグ

2024年3月12日のブックマーク (2件)

  • WinterJS 1.0 · Blog · Wasmer

    Back to articlesWinterJS 1.0Announcing WinterJS 1.0, the fastest Javascript web server now also supporting Cloudflare applications and React Server Components WinterJS 1.0 is finally here. WinterJS is an incredibly fast WinterCG-compatible Javascript runtime written in Rust using the SpiderMonkey engine to execute JavaScript, and Tokio to handle the underlying HTTP requests and JS event loop. Wint

    WinterJS 1.0 · Blog · Wasmer
    mizchi
    mizchi 2024/03/12
  • RustでもGCを使いたい

    はじめに Rustには優れた所有権システムおよびRc<T>/Arc<T>があるので通常はGCを必要としないのですが、どうしても循環参照(それもrc::Weak<T>では解決できないタイプの)が必要となるケースというのが多数存在します。具体的には言語処理系および…… いや言語処理系くらいしかないな。しかしながら、言語処理系を実装するにあたってRustを選択するのは一般的な選択肢なので、これはゆゆしき問題です。 gcクレートによるGC導入 GC機能を提供するクレートはいくつかありますが、何も考えずシングルスレッドでGCしたいだけならgcクレートが手軽です。 Rc<T>/RefCell<T>の代わりにgc::Gc<T>/gc::GcCell<T>を使用するだけでOK。管理したい型にはgc::Traceおよびgc::Finalize traitを実装する必要があります。 // Gc<T>で管理した

    RustでもGCを使いたい
    mizchi
    mizchi 2024/03/12