Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions arch/wasm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ quiet_cmd_wasm_objcopy = OBJCOPY $@
--add-section=.linux.initramfs=usr/initramfs_inc_data \
$< $@

tools/wasm/vmlinux.wasm: vmlinux.o arch/wasm/sections.json FORCE
vmlinux.wasm: vmlinux.o arch/wasm/sections.json FORCE
$(call if_changed,wasm_objcopy)

define archhelp
echo '* tools/wasm - WebAssembly host library'
echo '* vmlinux.wasm - WebAssembly kernel image'
endef
7 changes: 2 additions & 5 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
let
pkgs = nixpkgs.legacyPackages.${system};
llvm = pkgs.llvmPackages_19;
sourceRev = self.rev or self.dirtyRev or "unknown";
npmVersion = "0.0.0-${builtins.substring 0 8 sourceRev}";
in
{
default = pkgs.stdenvNoCC.mkDerivation {
Expand All @@ -42,16 +40,15 @@
llvm.libllvm

wabt
typescript
];

HOSTCC = "${llvm.clang}/bin/clang";
KBUILD_BUILD_TIMESTAMP = "1970-01-01 00:00:00 UTC";

enableParallelBuilding = true;
configurePhase = "make HOSTCC=$HOSTCC -j$NIX_BUILD_CORES defconfig";
buildPhase = "make HOSTCC=$HOSTCC -j$NIX_BUILD_CORES -C tools/wasm PACKAGE_VERSION=${npmVersion} pack";
installPhase = "cp tools/wasm/linux.tgz $out";
buildPhase = "make HOSTCC=$HOSTCC -j$NIX_BUILD_CORES vmlinux.wasm";
installPhase = "cp vmlinux.wasm $out";
};
}
);
Expand Down
8 changes: 0 additions & 8 deletions tools/wasm/.gitignore

This file was deleted.

24 changes: 0 additions & 24 deletions tools/wasm/LICENSE

This file was deleted.

50 changes: 0 additions & 50 deletions tools/wasm/Makefile

This file was deleted.

25 changes: 3 additions & 22 deletions tools/wasm/README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,4 @@
<!-- SPDX-License-Identifier: MIT -->
# WebAssembly host code

# `@tombl/linux`

`@tombl/linux` runs a Linux kernel compiled to WebAssembly and exposes low-level machine and virtio device APIs.

## Installation

```sh
npm install @tombl/linux
```

## Documentation

See [linux.tombl.dev](https://linux.tombl.dev/getting-started/).

## API

See the [`@tombl/linux` reference](https://linux.tombl.dev/reference/linux/).

## License

The TypeScript and JavaScript sources are available under the MIT license. The published package also contains `vmlinux.wasm`, which remains `GPL-2.0-only WITH Linux-syscall-note`.
The host-side code has moved to
[tombl/distro](https://github.com/tombl/distro/tree/main/packages/kernel).
34 changes: 0 additions & 34 deletions tools/wasm/package.json

This file was deleted.

Loading
Loading