{"id":31769238,"url":"https://github.com/second-state/wasmedge-sel4","last_synced_at":"2026-03-10T18:08:46.240Z","repository":{"id":37936559,"uuid":"413318744","full_name":"second-state/wasmedge-seL4","owner":"second-state","description":"Integrate WasmEdge with seL4","archived":false,"fork":false,"pushed_at":"2022-06-14T08:51:52.000Z","size":703,"stargazers_count":42,"open_issues_count":3,"forks_count":9,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-05-07T18:57:36.011Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/second-state.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-10-04T07:32:02.000Z","updated_at":"2025-05-04T08:03:44.000Z","dependencies_parsed_at":"2022-08-26T01:02:44.429Z","dependency_job_id":null,"html_url":"https://github.com/second-state/wasmedge-seL4","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/second-state/wasmedge-seL4","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/second-state%2Fwasmedge-seL4","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/second-state%2Fwasmedge-seL4/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/second-state%2Fwasmedge-seL4/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/second-state%2Fwasmedge-seL4/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/second-state","download_url":"https://codeload.github.com/second-state/wasmedge-seL4/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/second-state%2Fwasmedge-seL4/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279002541,"owners_count":26083403,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-10T02:42:14.996Z","updated_at":"2025-10-10T02:42:21.351Z","avatar_url":"https://github.com/second-state.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WasmEdge on seL4\n\n[Video demo](https://youtu.be/2Qu-Trtkspk) | [Build logs](https://github.com/second-state/wasmedge-seL4/runs/3982081148?check_suite_focus=true) | [Build artifact](https://github.com/second-state/wasmedge-seL4/actions/runs/1374510169)\n\nIn this project, we demonstrate how to run WasmEdge on the seL4 RTOS, there are two parts:\n\n1. Guest Linux OS on seL4: This is the controller of WasmEdge runtime, which will send wasm program to WasmEdge runner that is a agent on seL4 to execute.\n2. WasmEdge runner on seL4: This is the wasm program runtime, which will execute the given wasm program from Guest Linux OS.\n\nThe figure below illustrates the architecture of the system.\n\n![](docs/wasmedge-sel4.png)\n\nThis demo is based on the seL4 simulator on Linux.\n\n## Getting Started\n\n### System requirements\n\nHardware:\n- at least 4Gb of RAM\n- at least 20Gb of disk storage (the wasmedge_sel4 directory will contain over 11 Gb of data after the following installation completes) \n\nSoftware: Ubuntu 20.04 with dev tools packages (ep. Python) installed. We recommend the [GitHub Actions Ubuntu 20.04 VM](https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-README.md) (See a list of [installed apt packages](https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-README.md#installed-apt-packages)). Or, you could use our Docker image (see the [Dockerfile](docs/Dockerfile.sel4_build)).\n\n```bash\n$ docker pull wasmedge/sel4_build\n$ docker run --rm -v $(pwd):/app -it wasmedge/sel4_build\n(docker) root#\n```\n\n\u003e If you do not want to build the seL4 system simulator yourself, you can download the [build artifact](https://github.com/second-state/wasmedge-seL4/actions/runs/1374510169) from our GitHUb Actions, and skip directly to [Boot wasmedge-seL4](#boot-wasmedge-sel4)\n\n### Automatic installation: all-in-one script\n\nUse our all-in-one build script:\n\n```bash\nwget -qO- https://raw.githubusercontent.com/second-state/wasmedge-seL4/main/build.sh | bash\n```\n\nAnd this will clone and build our wasmedge on seL4 to an image.\n\nAfter finishing the build script, you will have a folder `sel4_wasmedge`. \n\nIf this automatic installation completed successfully, skip over the manual installation information and proceed to [boot wasmedge-sel4](https://github.com/second-state/wasmedge-seL4#boot-wasmedge-sel4)\n\n### Manual installation: managing memory usage\n\nThe above all-in-one script will work in most cases. However, if your system resources were stressed and you encountered an error such as `ninja: build stopped: subcommand failed` please note that you can decrease the parallelization of the install by explicitly passing in a `-j` parameter to the `ninja` command (on the last line of the `build.sh` file). You see, Ninja runs the most amount of parallel processes by default and so the following proceedure is a way to explicitly set/reduce parallelization.\n\nManually fetch the `wasmedge-sel4 repository.\n\n```bash\ncd ~\ngit clone https://github.com/second-state/wasmedge-seL4.git\ncd wasmedge-seL4\n```\n\nManually edit the `build.sh` file.\n\n```bash\nvi build.sh\n```\n\nAdd the following `-j` parameter to the last line of the file i.e.\n```bash\nninja -j 2\n```\n\nMake the `build.sh` file executable.\n```bash\nsudo chmod a+x build.sh\n```\n\nRun the edited `build.sh file.\n```bash\n./build.sh\n```\n\nOnce this manual installation is complete, follow along with the following steps; boot wasmedge-sel4\n\n### Use our pre-built binary\n\nIf you want to do a quick test on wasmedge-seL4, you could try our pre-built binary:\n\n```bash\nmkdir build\ncd build\nwget https://github.com/second-state/wasmedge-seL4/releases/download/0.0.1/wasmedge-seL4-0.0.1-build.tar.gz\ntar zxvf wasmedge-seL4-0.0.1-build.tar.gz\n```\n\nYou'll get the following pre-built files:\n\n```\nbuild/\n|-- images/\n|   `-- capdl-loader-image-arm-qemu-arm-virt\n|-- simulate\n`-- wasmedge-seL4-0.0.1-build.tar.gz\n```\n\n### Boot wasmedge-seL4\n\n```bash\ncd sel4_wasmedge/build\n./simulate\n```\n\nExpected output:\n\n```bash\n./simulate: qemu-system-aarch64 -machine virt,virtualization=on,highmem=off,secure=off -cpu cortex-a53 -nographic  -m size=2048  -kernel images/capdl-loader-image-arm-qemu-arm-virt\nELF-loader started on CPU: ARM Ltd. Cortex-A53 r0p4\n  paddr=[6abd8000..750cf0af]\nNo DTB passed in from boot loader.\nLooking for DTB in CPIO archive...found at 6ad18f58.\nLoaded DTB from 6ad18f58.\n   paddr=[60243000..60244fff]\nELF-loading image 'kernel' to 60000000\n  paddr=[60000000..60242fff]\n  vaddr=[ff8060000000..ff8060242fff]\n  virt_entry=ff8060000000\nELF-loading image 'capdl-loader' to 60245000\n  paddr=[60245000..6a7ddfff]\n  vaddr=[400000..a998fff]\n  virt_entry=408f38\nEnabling hypervisor MMU and paging\nJumping to kernel-image entry point...\n\nBootstrapping kernel\nWarning: Could not infer GIC interrupt target ID, assuming 0.\nBooting all finished, dropped to user space\n\u003c\u003cseL4(CPU 0) [decodeUntypedInvocation/205 T0xff80bf85d400 \"rootserver\" @4006f8]: Untyped Retype: Insufficient memory (1 * 2097152 bytes needed, 0 bytes available).\u003e\u003e\nLoading Linux: 'linux' dtb: 'linux-dtb'\n\n...(omitted)...\n\nStarting syslogd: OK\nStarting klogd: OK\nRunning sysctl: OK\nInitializing random number generator... [    3.512482] random: dd: uninitialized urandom read (512 bytes read)\ndone.\nStarting network: OK\n[    4.086059] connection: loading out-of-tree module taints kernel.\n[    4.114686] Event Bar (dev-0) initalised\n[    4.123771] 2 Dataports (dev-0) initalised\n[    4.130626] Event Bar (dev-1) initalised\n[    4.136096] 2 Dataports (dev-1) initalised\n\nWelcome to Buildroot\nbuildroot login:\n```\n\n### Login on guest linux\n\nEnter `root` to login\n\n```bash\nbuildroot login: root\n```\n\nExpected output:\n\n```bash\nbuildroot login: root\n#\n```\n\n### Execute wasm examples\n\n#### Example A: nbody-c.wasm\n\nRun nbody simulation.\n\n```bash\nwasmedge_emit /usr/bin/nbody-c.wasm 10\n```\n\nExpected output:\n\n```bash\n[1900-01-00 00:00:00.000] [info] executing wasm file\n-0.169075164\n-0.169073022\n[1900-01-00 00:00:00.000] [info] execution success, exit code:0\n```\n\nYou can also deploy AOT compiled wasm files to seL4. The AOT compiler requires WasmEdge 0.9.0-rc.5 and above.\n\n```bash\nwasmedgec nbody-c.wasm nbody-c.aot.wasm\n```\n\nWe already have the `nbody-c.aot.wasm` packaged in the guest OS. So, you can just deploy and run it.\n\n```bash\nwasmedge_emit /usr/bin/nbody-c.aot.wasm 10\n```\n\n#### Example B: hello.wasm\n\nRun an easy application to print `hello, sel4` and a simple calculation.\n\n```bash\nwasmedge_emit /usr/bin/hello.wasm\n```\n\nExpected output:\n\n```bash\n[1900-01-00 00:00:00.000] [info] executing wasm file\nhello, sel4\n1+2-3*4 = -9\n[1900-01-00 00:00:00.000] [info] execution success, exit code:0\n```\n\nYou can also deploy AOT compiled wasm files to seL4. The AOT compiler requires WasmEdge 0.9.0-rc.5 and above.\n\n```bash\nwasmedgec hello.wasm hello.aot.wasm\n```\n\nWe already have the `hello.aot.wasm` packaged in the guest OS. So, you can just deploy and run it.\n\n```bash\nwasmedge_emit /usr/bin/hello.aot.wasm\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsecond-state%2Fwasmedge-sel4","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsecond-state%2Fwasmedge-sel4","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsecond-state%2Fwasmedge-sel4/lists"}