aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorXavier Del Campo Romero <xavi.dcr@tutanota.com>2025-03-06 16:37:12 +0100
committerXavier Del Campo Romero <xavi92@disroot.org>2025-11-07 09:55:58 +0100
commit0086ccf0272fa195dca36845fde9c54149c72f0e (patch)
treedc025e30b7e0a6830e44c9558f3b800295cc79df /README.md
downloadnwc-0086ccf0272fa195dca36845fde9c54149c72f0e.tar.gz
First commit
Diffstat (limited to 'README.md')
-rw-r--r--README.md55
1 files changed, 55 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..7e5243a
--- /dev/null
+++ b/README.md
@@ -0,0 +1,55 @@
+# `nwc`, a NanoWasm compiler
+
+`nwc` is a command-line tool that takes a MVP WebAssembly file and appends
+[NanoWasm custom sections](https://gitea.privatedns.org/xavi/nanowasm-design)
+to it, so that NanoWasm-capable interpreters such as
+[`nanowasm`](https://gitea.privatedns.org/xavi/nanowasm) can consume them.
+
+## Building from source
+
+`nwc` only requires a C99 environment to build. The build system is based on
+CMake and can be configured using the conventional process in CMake projects:
+
+```
+cmake -B build
+```
+
+Then, build with:
+
+```
+cmake --build build/
+```
+
+## Usage
+
+The command below shall generate a NanoWasm-compatible file given by `out`
+from a MVP WebAssembly file given by `infile`:
+
+```
+nwc <infile> <outfile>
+```
+
+Take into account that `infile` **must not** contain any NanoWasm custom
+sections.
+
+## License
+
+```
+nwc, a NanoWasm compiler
+Copyright (C) 2025 Xavier Del Campo Romero
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU Affero General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU Affero General Public License for more details.
+
+You should have received a copy of the GNU Affero General Public License
+along with this program. If not, see <https://www.gnu.org/licenses/>.
+```
+
+Also, see [`LICENSE`](LICENSE).