1
0
mirror of https://github.com/containers/youki synced 2025-09-15 23:31:29 +02:00
youki/tools/wasm-sample
Toru Komatsu d0e6c8cf1f
Upgrade to Rust 1.89 and Edition 2024 (#3244)
* Rust 1.89

Signed-off-by: utam0k <k0ma@utam0k.jp>

* Rust 2024 Edition

Signed-off-by: utam0k <k0ma@utam0k.jp>

* fixup! Rust 2024 Edition

---------

Signed-off-by: utam0k <k0ma@utam0k.jp>
2025-09-15 11:40:56 +00:00
..
src fix the warns from cargo clippy 2023-02-12 20:15:56 +09:00
Cargo.toml Upgrade to Rust 1.89 and Edition 2024 (#3244) 2025-09-15 11:40:56 +00:00
README.md docs: update github pages links (#2969) 2024-11-03 21:38:55 +09:00

This is a simple wasm module for testing purposes. It prints out the arguments given to the program and all environment variables. You can compile the module with

cargo build --target wasm32-wasi

If you want youki to execute the module you must copy it to the root file system of the container and reference it in the args of the config.json. You must also ensure that the annotations contain "run.oci.handler": "wasm" and that youki has been compiled with one of the supported wasm runtimes. For further information please check the documentation.

"ociVersion": "1.0.2-dev",
	"annotations": {
		"run.oci.handler": "wasm"
	},
	"process": {
		"terminal": true,
		"user": {
			"uid": 0,
			"gid": 0
		},
		"args": [
			"/wasm-sample.wasm",
			"hello",
			"wasm"
		],