You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "yf13 (via GitHub)" <gi...@apache.org> on 2024/06/09 04:06:18 UTC
[PR] docs/wamr: initial guide [nuttx]
yf13 opened a new pull request, #12477:
URL: https://github.com/apache/nuttx/pull/12477
## Summary
This briefs how to getting started with WAMR on NuttX.
## Impacts
None
## Testing
- CI checks
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] docs/wamr: initial guide [nuttx]
Posted by "hartmannathan (via GitHub)" <gi...@apache.org>.
hartmannathan commented on code in PR #12477:
URL: https://github.com/apache/nuttx/pull/12477#discussion_r1633235137
##########
Documentation/applications/interpreters/wamr/index.rst:
##########
@@ -1,3 +1,53 @@
==================================
``wamr`` Webassembly Micro Runtime
==================================
+
+This guides explains how to try WAMR on NuttX.
+
+Install WASI SDK
+================
+
+We need be able to build WASM programs. this can be done by installing the ``wasi-sdk`` as shown in the `WAMR guide <https://wamr.gitbook.io/document/basics/getting-started/host_prerequsites>`_.
Review Comment:
```suggestion
We need to be able to build WASM programs. This can be done by installing the ``wasi-sdk`` as shown in the `WAMR guide <https://wamr.gitbook.io/document/basics/getting-started/host_prerequsites>`_.
```
##########
Documentation/applications/interpreters/wamr/index.rst:
##########
@@ -1,3 +1,53 @@
==================================
``wamr`` Webassembly Micro Runtime
==================================
+
+This guides explains how to try WAMR on NuttX.
+
+Install WASI SDK
+================
+
+We need be able to build WASM programs. this can be done by installing the ``wasi-sdk`` as shown in the `WAMR guide <https://wamr.gitbook.io/document/basics/getting-started/host_prerequsites>`_.
+
+Make sure the installation is reachable via ``/opt/wasi-sdk`` on your host, as this is expected by the build script of the WASM hello world sample below.
+
+Building NuttX
+==============
+
+We use the `sim/wamr` config to build WAMR with NuttX. Note that CMake scripts doesn't work, use makefile instead:
Review Comment:
```suggestion
We use the `sim/wamr` config to build WAMR with NuttX. Note that at this writing, the CMake scripts don't work for this configuration. For now, please use the makefile build instead:
```
##########
Documentation/applications/interpreters/wamr/index.rst:
##########
@@ -1,3 +1,53 @@
==================================
``wamr`` Webassembly Micro Runtime
==================================
+
+This guides explains how to try WAMR on NuttX.
+
+Install WASI SDK
+================
+
+We need be able to build WASM programs. this can be done by installing the ``wasi-sdk`` as shown in the `WAMR guide <https://wamr.gitbook.io/document/basics/getting-started/host_prerequsites>`_.
+
+Make sure the installation is reachable via ``/opt/wasi-sdk`` on your host, as this is expected by the build script of the WASM hello world sample below.
+
+Building NuttX
+==============
+
+We use the `sim/wamr` config to build WAMR with NuttX. Note that CMake scripts doesn't work, use makefile instead:
+
+.. code:: console
+
+ $ cd nuttx
+ $ tools/configure.sh sim/wamr
+ $ make -j4
+ $ ls -l nuttx
+ -rwxrwxr-x 1 yf yf 4176376 Jun 10 08:11 nuttx
+
+This will generate a ``nutxx`` binary, also a WASM sample will be available in ``apps/interpreters/wamr/wamr/product-mini/app-samples/hello-world`` folder, we build there like below:
Review Comment:
```suggestion
This will generate a ``nuttx`` binary. Also a WASM sample is available in the folder ``apps/interpreters/wamr/wamr/product-mini/app-samples/hello-world``. We build the sample as follows:
```
##########
Documentation/applications/interpreters/wamr/index.rst:
##########
@@ -1,3 +1,53 @@
==================================
``wamr`` Webassembly Micro Runtime
==================================
+
+This guides explains how to try WAMR on NuttX.
+
+Install WASI SDK
+================
+
+We need be able to build WASM programs. this can be done by installing the ``wasi-sdk`` as shown in the `WAMR guide <https://wamr.gitbook.io/document/basics/getting-started/host_prerequsites>`_.
+
+Make sure the installation is reachable via ``/opt/wasi-sdk`` on your host, as this is expected by the build script of the WASM hello world sample below.
+
+Building NuttX
+==============
+
+We use the `sim/wamr` config to build WAMR with NuttX. Note that CMake scripts doesn't work, use makefile instead:
+
+.. code:: console
+
+ $ cd nuttx
+ $ tools/configure.sh sim/wamr
+ $ make -j4
+ $ ls -l nuttx
+ -rwxrwxr-x 1 yf yf 4176376 Jun 10 08:11 nuttx
+
+This will generate a ``nutxx`` binary, also a WASM sample will be available in ``apps/interpreters/wamr/wamr/product-mini/app-samples/hello-world`` folder, we build there like below:
+
+.. code:: console
+
+ $ cd apps/interpreters/wamr/wamr/product-mini/app-samples/hello-world
+ $ ./build.sh
+ $ ls -l test.wasm
+ -rwxrwxr-x 1 yf yf 413 Jun 10 08:18 test.wasm
+
+The ``test.wasm`` program should be accessbile from NuttX later.
Review Comment:
```suggestion
The ``test.wasm`` program should be accessible from NuttX later.
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] docs/wamr: initial guide [nuttx]
Posted by "yf13 (via GitHub)" <gi...@apache.org>.
yf13 commented on code in PR #12477:
URL: https://github.com/apache/nuttx/pull/12477#discussion_r1633978728
##########
Documentation/applications/interpreters/wamr/index.rst:
##########
@@ -1,3 +1,23 @@
==================================
``wamr`` Webassembly Micro Runtime
==================================
+
+This captures how to try WAMR on NuttX.
Review Comment:
updated
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] docs/wamr: initial guide [nuttx]
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 merged PR #12477:
URL: https://github.com/apache/nuttx/pull/12477
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] docs/wamr: initial guide [nuttx]
Posted by "acassis (via GitHub)" <gi...@apache.org>.
acassis commented on PR #12477:
URL: https://github.com/apache/nuttx/pull/12477#issuecomment-2156429720
@yf13 could you please grow this guide a little more before we merge it?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] docs/wamr: initial guide [nuttx]
Posted by "acassis (via GitHub)" <gi...@apache.org>.
acassis commented on code in PR #12477:
URL: https://github.com/apache/nuttx/pull/12477#discussion_r1632227962
##########
Documentation/applications/interpreters/wamr/index.rst:
##########
@@ -1,3 +1,23 @@
==================================
``wamr`` Webassembly Micro Runtime
==================================
+
+This captures how to try WAMR on NuttX.
Review Comment:
This guides explains how to test WAMR on NuttX and how to get it working correctly.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] docs/wamr: initial guide [nuttx]
Posted by "acassis (via GitHub)" <gi...@apache.org>.
acassis commented on code in PR #12477:
URL: https://github.com/apache/nuttx/pull/12477#discussion_r1632228106
##########
Documentation/applications/interpreters/wamr/index.rst:
##########
@@ -1,3 +1,23 @@
==================================
``wamr`` Webassembly Micro Runtime
==================================
+
+This captures how to try WAMR on NuttX.
+
+Preparing test.wasm
+===================
+
+Before trying WAMR, we need a test.wasm program, we need follow the "wasi-sdk" part in this `WAMR guide <https://wamr.gitbook.io/document/basics/getting-started/host_prerequsites>`_ to get the SDK and build the test.wasm program on our host.
Review Comment:
Maybe you could include a simple test.wasm example here
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] docs/wamr: initial guide [nuttx]
Posted by "yf13 (via GitHub)" <gi...@apache.org>.
yf13 commented on code in PR #12477:
URL: https://github.com/apache/nuttx/pull/12477#discussion_r1633978588
##########
Documentation/applications/interpreters/wamr/index.rst:
##########
@@ -1,3 +1,23 @@
==================================
``wamr`` Webassembly Micro Runtime
==================================
+
+This captures how to try WAMR on NuttX.
+
+Preparing test.wasm
+===================
+
+Before trying WAMR, we need a test.wasm program, we need follow the "wasi-sdk" part in this `WAMR guide <https://wamr.gitbook.io/document/basics/getting-started/host_prerequsites>`_ to get the SDK and build the test.wasm program on our host.
Review Comment:
The path to WASM sample is added in the updated version.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] docs/wamr: initial guide [nuttx]
Posted by "yf13 (via GitHub)" <gi...@apache.org>.
yf13 commented on PR #12477:
URL: https://github.com/apache/nuttx/pull/12477#issuecomment-2156925514
@acassis I added some console logs, please check.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] docs/wamr: initial guide [nuttx]
Posted by "yf13 (via GitHub)" <gi...@apache.org>.
yf13 commented on PR #12477:
URL: https://github.com/apache/nuttx/pull/12477#issuecomment-2159498692
@hartmannathan, many thanks! I've pushed a version with your suggestions.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] docs/wamr: initial guide [nuttx]
Posted by "hartmannathan (via GitHub)" <gi...@apache.org>.
hartmannathan commented on PR #12477:
URL: https://github.com/apache/nuttx/pull/12477#issuecomment-2159545823
> @hartmannathan, many thanks! I've pushed a version with your suggestions.
Glad to help!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org