Open-source News

Linux Schedutil Governor's Quirky Behavior Persists In 2023

Phoronix - Fri, 02/10/2023 - 00:00
Earlier this week I posted benchmarks looking at how the AMD Ryzen Threadripper 3990X performance has evolved in the three years to the day since that 64-core / 128-thread HEDT chip launched. While overall the Threadripper 3990X performance has evolved nicely under Linux since 2020, when it came to the video encoding tests in particular they performed worse overall. As I had raised in that earlier article and now elaborated with some follow-up tests, that regression is driven by the default "schedutil" frequency scaling governor used by default.

Intel's Mesa Drivers Begin Preparing For The New Xe Kernel Driver

Phoronix - Thu, 02/09/2023 - 22:00
One of the open-source Intel Linux graphics driver milestones we have to look forward to this year is the introduction of the new "Xe" kernel graphics driver to effectively succeed the existing "i915" Direct Rendering Manager driver for recent generations of Intel graphics. More prep code was merged this week to Mesa's Intel "ANV" Vulkan driver in preparing to be able to make use of that new kernel mode driver once its upstreamed into the Linux kernel...

GTK5 Development Likely To Heat Up Following GTK 4.12

Phoronix - Thu, 02/09/2023 - 20:00
A new GTK blog post summarized a recent meet-up of GTK core developers for better sorting out active GTK4 work as well as some planning toward GTK5...

A Call For More Collaboration & Harmony Among BSD Hardware Drivers

Phoronix - Thu, 02/09/2023 - 19:36
The BSD operating system projects tend to not receive as much support from hardware vendors as Linux and their driver support is made even more fragmented on the BSD side due to many subtle as well as not so subtle differences between the major BSDs. NetBSD developer Pierre Pronchery has proposed more "harmony" among BSD drivers with increased collaboration between the major BSD players on driver development...

FreeType 2.13 Released With New Qt-Based Font Program

Phoronix - Thu, 02/09/2023 - 19:00
FreeType 2.13 is out today as the newest version of this widely-used font rendering library. New to FreeType 2.13 is a new Qt-based demo program...

More Aquacomputer Devices To Be Supported With Linux 6.3

Phoronix - Thu, 02/09/2023 - 18:50
Over the past two years since an Aquacomputer HWMON driver was first introduced to the mainline Linux kernel, it's continued to be extended to support more products from this German PC cooling/peripheral retailer. With Linux 6.3 additional Aquacomputer components are now supported by this kernel driver...

Start developing for WebAssembly with our new guide

opensource.com - Thu, 02/09/2023 - 16:00
Start developing for WebAssembly with our new guide sethkenlon Thu, 02/09/2023 - 03:00

Over the past few decades, the web browser has endured as the most popular cross-platform application. Looking at the browser from a different angle, it is one of the most popular platforms for application delivery. Think of all the websites you use that take the place of activities you used to do with software running on your desktop. You're still using software, but you're accessing it through a browser, and it's running on somebody else's Linux server. In the eternal effort to optimize the software we all use, the world of software development introduced WebAssembly back in 2019 as a way to run compiled code through a web browser. Application performance is better than ever, and the options for coding go far beyond the usual list of PHP, Python, and JavaScript.

Programming and development Red Hat Developers Blog Programming cheat sheets Try for free: Red Hat Learning Subscription eBook: An introduction to programming with Bash Bash shell scripting cheat sheet eBook: Modernizing Enterprise Java An open source developer's guide to building applications A target and a language

One of the powerful but also most confusing things about WebAssembly is that the term "webassembly" refers to both a language and a target. WebAssembly is an assembly language, but not many people choose to write code directly in assembly. Even the assembly language is ultimately converted to a binary format, which is what a computer requires to run code. This binary format is also called WebAssembly. This is good, though, because it means that you can use your choice of languages to write something that's ultimately delivered in WebAssembly, including C, C++, Rust, Javascript, and many others.

The gateway into WebAssembly is Emscripten, an LLVM compiler toolchain that produces WebAssembly from your code.

Install Emscripten

To install Emscripten on your Linux or macOS computer, use Git:

$ git clone \ https://github.com/emscripten-core/emsdk.git

Change directory into the emsdk directory and run the install command:

$ ./emsdk install latest $ ./emsdk activate latest

Everything in the Emscripten toolchain is installed within the emsdk directory and has no effect on the rest of your system. For this reason, before you use emsdk, you must source its environment:

$ source ./emsdk_env.sh

If you plan on using emsdk often, you can also source its environment setup script in .bashrc.

To install Emscripten on Windows, you can run Linux in the WSL environment.

Visit the Emscripten website for more information on installation.

Hello world

Here's a simple "hello world" application in written in C++.

#include <iostream> using namespace std; int main() { cout << "Hello world"; return 0; }

Test it as a standard binary for your system first:

$ g++ hello.cpp -o world $ ./world Hello world

Seeing that it works as expected, use emcc to build it as WebAssembly:

$ emcc hello.cpp -o world.html

Finally, run it with emrun:

$ emrun ./world.html

The emrun utility is a convenience command for local testing. When you host your application on a server, emrun isn't necessary.

Learning more about WebAssembly

Developing for WebAssembly can go in many different directions, depending on what you already know and what you're trying to build. If you know C or C++, then you can write your project using those. If you're learning Rust, then you can use Rust. Even Python code can use the Pyodide module to run as WebAssembly. You have lots of options, and there's no wrong way to start (there's even a COBOL-to-WebAssembly compiler). If you're keen to get started with WebAssembly, download our complimentary eBook.

Developing for WebAssembly can go in many different directions, depending on what you already know and what you're trying to build. Download our new guide to WebAssembly.

Image by:

opensource.com

Programming What to read next A guide to WebAssembly This work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License. Register or Login to post a comment.

Pages