Project Description

A few months ago, the YaST team released cockpit-wicked. Compared to YaST, this module contains a pretty simple data model, but there is still some duplication with YaST logic.

The idea of this project is to write some simple logic and try to reuse the same code from a YaST-like application and a web-based one (like Cockpit). Here is the (over-simplified) plan:

  • Write a simple model that represents the network configuration (most probably, in Rust).
  • Compile the model to WASM and try to use it from cockpit-wicked.
  • Build a desktop/console UI that relies on this model too.

Goal for this Hackweek

To be honest, we do not plan to finish this project in a single week. However, we would like to achieve these goals:

  • Find out how realistic is the overall approach (reusing logic in WASM and desktop apps). Try to identify threats and missing pieces.
  • Learn the basics about WASM.
  • Explore a GUI/TUI toolkit different from libyui that allows us to write some async code. We are not limited to Rust for this part.




You can find the outcome of this project in the y3network repository.

Looking for hackers with the skills:

yast cockpit wasm web systemsmanagement networking rust

This project is part of:

Hack Week 20


  • 10 months ago: joseivanlopez joined this project.
  • 10 months ago: mvidner liked this project.
  • 11 months ago: mkoutny liked this project.
  • 11 months ago: locilka liked this project.
  • 11 months ago: mbrugger liked this project.
  • 11 months ago: aplanas liked this project.
  • 11 months ago: ancorgs liked this project.
  • 11 months ago: teclator joined this project.
  • 11 months ago: dgdavid joined this project.
  • 11 months ago: cfconrad liked this project.
  • All Activity


    • bmwiedemann
      11 months ago by bmwiedemann | Reply

      On the topic of WASM and shared code:

    • ancorgs
      11 months ago by ancorgs | Reply

      Regarding the "explore a GUI/TUI toolkit different from libyui" and thinking about how to make this project useful for the YaST mid-term, I would like to explore

    • ancorgs
      10 months ago by ancorgs | Reply

      I have focused my experiments in two areas:

      1) Developing a really interactive GUI with Ruby (intentionally avoiding libyui).

      In that regard, I found the Observer and data-binding implementations of Glimmer to be really convenient and straightforward to use. See my experiments at ancorgs/y3network-ruby-ui.

      2) Interfacing WASM with Ruby and/or Python (no browser involved)

      The results in this area were discouraging. In theory WASM should be able to communicate back and forward with Javascript when running in a browser and with any "host" language (let's call it that way) when running out of the browser, inside a "native" WASM runtime. But that communication is limited to passing integers and floats. Anything more advanced (like a string or any structured data) needs extra mechanisms on top that are understood by both the code running in WASM (Rust in our case) and its caller (Ruby/Python/Javascript).

      For the browser, we used wasm-bindgen to interface the WASM code written in Rust with Javascript. That works pretty well, but is useless (even counterproductive) to connect the resulting WASM to any other "host" language. See below.

      In Ruby I tried to use both Wasmer and Wasmtime as runtimes. But wasmer-ruby is in the middle of a major rewrite and is basically unusable with recent versions of Wasmer and/or Ruby. On the other hand, wasmtime-ruby is very basic, lacking basically all features that would be useful for a good integration.

      Integration of Python with both Wasmer and Wastime is much better and more mature. But still the current limits of WASM regarding interfacing with the outer world are a huge limiting factor. These are the three solutions I explored:

      2.1) Using WASM Interface Types, which is expected to become the standard multi-language mechanism to do what we wanted. But it's currently far from being a real option. In the Rust=>WASM side, wasm-bindgen could be used to generate the corresponding specification... but it only worked with an old version. Even that was useless because we couldn't use the Interface Types from the Python or Ruby side. Wasmer has never supported it. Wasmtime supported it for some time but now they dropped the support.

      2.2) Reusing what wasm-bingen generated for the communication with Javascript by writing some connectors in Python that are equivalent to the Javascript ones auto-generated by wasm-bingen. It's not trivial and there is absolutely no guarantee it will keep working. wasm-bingen is a pure Rust<-WASM->Javascript solution with no interest in making it easy (or even possible) to reuse their mechanisms for/from other languages.

      2.3) Handcrafting a mechanism to pass a string in which we could even serialize more complex data. That would be similar to this example that uses C++ in the WASM side and Javascript outside. Valid as a proof of concept, but definitely not a real solution in the mid-term.

    • ancorgs
      10 months ago by ancorgs | Reply

      wasm-bindgen could be used to generate the corresponding specification

      I meant wasm-pack

    Similar Projects

    openSUSE on ZoL from OpenZFS project by jkohoutek

    __Idea is to have SUSE system with OpenZFS as r...

    Cockpit for YES Certification by nm75

    [comment]: # (Please use the project descriptio...

    knots by LarsMB


    knots aims to be a multi-node S3...

    WASM Serverless by davidko

    Project Description

    Support WASM serverle...

    WebRTC individual track recorder by avicenzi

    [comment]: # (Please use the project descriptio...

    Chimera Policy Hub by flavio_castelli

    [comment]: # (Please use the project descriptio...

    Cockpit for YES Certification by nm75

    [comment]: # (Please use the project descriptio...

    Convert openqa-mon to webassembly by ybonatakis

    [comment]: # (Please use the project descriptio...

    Test drive some Kubernetes network plugins by doreilly

    [comment]: # (Please use the project descriptio...

    multithreaded network benchmark by mkubecek

    Project Description

    There are multiple ne...

    Get familiar with by creating the training "Network basics" by mstrigl

    Create a course in


    Write an url shortener in Rust (And learn in the way) by szarate

    So I have :), it's currently doing noth...

    Improve packaging of Rust in OBS by aplanas

    Project Description

    • Complete the pull r...

    Semi-automated XMLRPC based tool for uyuni testing written in Rust language by lkotek

    [comment]: # (Please use the project descriptio...

    Rust Bootcamp by SMorlan

    [comment]: # (Please use the project descriptio...

    Kanidm - A modern opensource IDM by firstyear

    Project Description

    Kanidm is a modern, fas...