You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@teaclave.apache.org by ms...@apache.org on 2021/08/24 18:15:00 UTC

[incubator-teaclave] branch master updated: Doc: C code can also be compiled using Zig (#550)

This is an automated email from the ASF dual-hosted git repository.

mssun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-teaclave.git


The following commit(s) were added to refs/heads/master by this push:
     new e3274f6  Doc: C code can also be compiled using Zig (#550)
e3274f6 is described below

commit e3274f60236ba14d353557798ff984334f129bd2
Author: Frank Denis <12...@users.noreply.github.com>
AuthorDate: Tue Aug 24 20:14:53 2021 +0200

    Doc: C code can also be compiled using Zig (#550)
    
    No need for another full LLVM installation if Zig is already
    installed.
---
 docs/executing-wasm.md | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/docs/executing-wasm.md b/docs/executing-wasm.md
index 552182b..c1af0fb 100644
--- a/docs/executing-wasm.md
+++ b/docs/executing-wasm.md
@@ -49,6 +49,13 @@ You can also use `clang` provided by
 payload written in
 C](https://github.com/apache/incubator-teaclave/tree/master/examples/python/wasm_c_millionaire_problem_payload).
 
+Alternatively, C and C++ code can be compiled with [zig](https://ziglang.org):
+
+```sh
+zig cc  -Os --target=wasm32-freestanding -shared -o example.wasm example.c
+zig c++ -Os --target=wasm32-freestanding -shared -o example.wasm example.cpp
+```
+
 ## From Rust
 
 First of all, your cargo should support `wasm32` target and `wasm-gc` is

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@teaclave.apache.org
For additional commands, e-mail: commits-help@teaclave.apache.org