KernelScript 0.1 Debuts as a New Language for eBPF Development

KernelScript 0.1 introduces an experimental type-safe DSL for writing eBPF, userspace, and kernelspace code from one codebase.

KernelScript 0.1 is now available as the first public release of a new open-source programming language for eBPF-focused Linux kernel development, published under the Apache 2.0 license.

KernelScript is described as a type-safe domain-specific language that unifies eBPF, userspace, and kernelspace development in a single codebase. Rather than manually writing eBPF programs in C, userspace loaders, and kernel modules, KernelScript generates the necessary C code, userspace programs, Makefiles, and kernel module integration from one source file.

It targets developers working with eBPF, a Linux kernel technology that enables small, verified programs to run in kernel context without modifying the kernel. While eBPF is widely used for networking, tracing, observability, security, and performance analysis, its development typically demands in-depth knowledge of verifier constraints, BPF helpers, maps, program loading, and libbpf-based userspace coordination.

KernelScript addresses this complexity with a higher-level syntax tailored for eBPF workflows. It supports major eBPF program types, including XDP for packet processing, TC for traffic control, probes for kernel function tracing, and perf event programs for performance counters.

Additionally, KernelScript provides built-in support for eBPF maps, including hash maps, per-CPU arrays, LRU maps, and pinned maps. These are available as language-level variables, allowing eBPF programs and userspace code to share state without manual libbpf boilerplate.

KernelScript also supports advanced eBPF features, including automatic tail call orchestration, transparent dynptr handling, program lifecycle checks, struct_ops support, and built-in kfunc integration.

However, it is important to note that this release is experimental. The repository marks KernelScript as beta software and warns that syntax, APIs, and features may change without backward compatibility. At the moment, the developers do not recommend production use.

For additional details, see the project’s GitHub repo.

Bobby Borisov

Bobby Borisov

Bobby, an editor-in-chief at Linuxiac, is a Linux professional with over 20 years of experience. With a strong focus on Linux and open-source software, he has worked as a Senior Linux System Administrator, Software Developer, and DevOps Engineer for small and large multinational companies.

Leave a Reply

Your email address will not be published. Required fields are marked *