{"id":23392370,"url":"https://github.com/tamaroning/wanco","last_synced_at":"2025-04-11T10:23:19.867Z","repository":{"id":245531805,"uuid":"817784102","full_name":"tamaroning/wanco","owner":"tamaroning","description":"WebAssembly AOT compiler with cross-CPU checkpoint/restore support","archived":false,"fork":false,"pushed_at":"2024-10-29T09:05:07.000Z","size":8341,"stargazers_count":6,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-29T10:56:52.207Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tamaroning.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-20T12:37:52.000Z","updated_at":"2024-10-29T09:05:11.000Z","dependencies_parsed_at":"2024-06-27T07:23:32.850Z","dependency_job_id":"870646f6-e0d8-4614-9dba-dbaa9e68eb72","html_url":"https://github.com/tamaroning/wanco","commit_stats":null,"previous_names":["tamaroning/wanco"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tamaroning%2Fwanco","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tamaroning%2Fwanco/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tamaroning%2Fwanco/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tamaroning%2Fwanco/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tamaroning","download_url":"https://codeload.github.com/tamaroning/wanco/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230794027,"owners_count":18281161,"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","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":"2024-12-22T04:30:07.745Z","updated_at":"2025-04-11T10:23:19.857Z","avatar_url":"https://github.com/tamaroning.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# wanco 🐶\n\n![plot](docs/assets/animal_dance_dog.png)\n\nwanco is a WebAssembly AOT compiler which supports cross-platform (CPU and OS) Checkpoint/Restore functionalities. wanco is forked from [Wasker](https://github.com/mewz-project/wasker).\n\n\nSee [examples](./examples) for quick start.\n\n## Build\n\nPrerequisites:\n\n- POSIX compliant OS (Linux, TODO: support macOS)\n- Cargo (Rust)\n    - Install from the [website](https://www.rust-lang.org/learn/get-started)\n\nTo install dependencies in Linux/Debian, run the following commands:\n\n```bash\n# Install LLVM 17\nwget https://apt.llvm.org/llvm.sh\nchmod +x llvm.sh\nsudo ./llvm.sh 17\necho 'export LLVM_SYS_170_PREFIX=\"/usr/lib/llvm-17\"' \u003e\u003e ~/.bashrc\n\n# Install all other deps\nsudo apt install build-essential cmake libpolly-17-dev　libprotobuf-dev protobuf-compiler libunwind-dev libelf-dev libzstd-dev\n```\n\nFirst, clone the repository:\n\n```sh\n$ git clone git@github.com:tamaroning/wanco.git\n$ cd wanco\n```\n\nTo build the compiler and runtime, run the following commands:\n\n```sh\n$ mkdir build\n$ cmake .. -DCMAKE_BUILD_TYPE=Release\n\n# Install the compiler and the runtime libraries\n$ sudo make install\n```\n\n## Run\n\nTo compile the hello-world example, run:\n\n```sh\n$ wanco examples/hello.wat -o hello\n$ ./hello\nHello World!\n```\n\nTo show the help, run:\n\n```sh\n$ wanco --help\n```\n\nFor debugging, run the compiler with `RUST_LOG=\"debug\" wanco \u003cARGS\u003e`.\n\n### Enable Checkpoint/Restore functionalities\n\nCompile a WebAssembly file with C/R enabled and run it:\n\n```sh\n$ wanco --enable-cr demo/fib.wat\n$ a.out\n```\n\nWhile the process is running, you can trigger checkpoint by sending `SIGUSR1` signal (No.10) from another teminal:\n\n(The running process is automatically terminated and the snapshot file is created.)\n\n```sh\n$ pkill -10 a.out\n```\n\nTo restore the execution, run:\n\n```sh\n$ ./a.out --restore checkpoint.json\n```\n\nNote: Snapshot files are named `checkpoint.json` or `checkpoint.pb`.\n\nRead [the document](docs/cr.md) if you are interested in how this works.\n\n### Compile and assemble only\n\nIf you want to see the compiled Wasm module, specify the `-c` option when running the compiler:\nLLVM assembly file (`.ll`) will be generated.\n\n```sh\n$ wanco examples/hello.wat -c -o hello.ll\n```\n\nAfter that, you can link it with the runtime library together by using clang\n\n```\n$ clang-17 -flto -no-pie hello.ll /usr/local/lib/libwanco_rt.a /usr/local/lib/libwanco_wasi.a -o hello\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftamaroning%2Fwanco","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftamaroning%2Fwanco","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftamaroning%2Fwanco/lists"}