From dc31cac82cb6c64ab62f235898772cc3390e3e52 Mon Sep 17 00:00:00 2001 From: mike dupont Date: Mon, 16 Sep 2024 10:09:06 -0400 Subject: [PATCH] Proposal 1, clinic js --- proposal.md | 37 +------ proposals/faq.md | 5 + proposals/grant1/monitoring/chatgpt.md | 93 ++++++++++++++++ proposals/grant1/monitoring/clinic-js.md | 97 +++++++++++++++++ proposals/grant1/monitoring/letchat.md | 127 ++++++++++++++++++++++ proposals/grant1/monitoring/perplexity.md | 106 ++++++++++++++++++ proposals/token/mina.md | 13 +++ proposals/tools/perf.md | 14 +++ zkapp-introspector.wasm | 15 +++ 9 files changed, 472 insertions(+), 35 deletions(-) create mode 100644 proposals/faq.md create mode 100644 proposals/grant1/monitoring/chatgpt.md create mode 100644 proposals/grant1/monitoring/clinic-js.md create mode 100644 proposals/grant1/monitoring/letchat.md create mode 100644 proposals/grant1/monitoring/perplexity.md create mode 100644 proposals/token/mina.md create mode 100644 proposals/tools/perf.md create mode 100644 zkapp-introspector.wasm diff --git a/proposal.md b/proposal.md index 1b6ccdd..f6235a3 100644 --- a/proposal.md +++ b/proposal.md @@ -215,10 +215,11 @@ Users will be able to add in urls and secrets to the zkapp and validate the resu The project will be delivered in steps, each useful features on thier own. +1. Step 1. One week, delivery of clinic js profiling [proposals/grant1/monitoring/clinic-js.md](proposals/grant1/monitoring/clinic-js.md) 5000 MINA **Budget Requested:** -TBD. +1. Step 1 : 5000 MINA **Wallet Address:** B62qqFdiPRuMuQQYYo131saW1fp4f72rKXLVy2KTQEtnJzg5Hz3SqEY @@ -252,37 +253,3 @@ B62qqFdiPRuMuQQYYo131saW1fp4f72rKXLVy2KTQEtnJzg5Hz3SqEY - Regular security audits and updates to the zero-knowledge proof implementation. - Marketing and outreach efforts to promote the project and engage users. -## Frequently asked questions - -- What is the minimum fee for calling a zkapp? What if I set my fee to just 1/billionth of a mina? 1/1e9 of a mina? What are the transaction fees for processing that fee? How can I see that? - -The network transaction fee is 0.1 mina, and the app can charge additional fees on top we have seen 0.1 - 2 and more. - -## References - -### Price - -#### ZKapp Fees - -https://minascan.io/mainnet/tx/5JvQTouheGHgZMZzHPWS8UowkHcm6zUMV62qitynL63JuYtBnbLb/txInfo - -Looking at some existing contracts, the fee is defined in nanomina like this -`const fee = Number(config.fee) * 1e9; // in nanomina (1 billion = 1.0 mina)` -so some have `fee: 1e8,` for 1/10 of a mina. - -others define the fee to be 1 mina or more. - -### Gpt Defintions - -### perf - -The Linux `perf` tool is designed as a root-level observability system that provides powerful and efficient sampling of any running program at runtime. It allows users to set up user probes (also known as `uprobes`) to monitor, interrupt, and sample various performance metrics without the need for modifying the source code of the program being observed. - -Key features include: -- **Event-driven Sampling**: `perf` captures data based on specific performance events (e.g., CPU cycles, cache misses, page faults) and can provide insights into the behavior of programs. -- **User Probes (Uprobes)**: This feature allows users to monitor user-space applications by dynamically inserting probes at function entry/exit points or arbitrary code locations. -- **Kernel Probes (Kprobes)**: Similar to uprobes, `kprobes` allow for monitoring kernel events. -- **Low Overhead**: Designed for minimal performance impact, enabling efficient data collection and analysis even in production environments. -- **Broad Scope**: It can monitor not only the application-level events but also system-wide events such as scheduler activities, disk I/O, network performance, and more. - -With `perf`, developers and administrators gain detailed visibility into how programs interact with hardware, the kernel, and the rest of the system, making it invaluable for performance tuning, debugging, and system optimization. diff --git a/proposals/faq.md b/proposals/faq.md new file mode 100644 index 0000000..53ff4f7 --- /dev/null +++ b/proposals/faq.md @@ -0,0 +1,5 @@ +## Frequently asked questions + +- What is the minimum fee for calling a zkapp? What if I set my fee to just 1/billionth of a mina? 1/1e9 of a mina? What are the transaction fees for processing that fee? How can I see that? + +The network transaction fee is 0.1 mina, and the app can charge additional fees on top we have seen 0.1 - 2 and more. diff --git a/proposals/grant1/monitoring/chatgpt.md b/proposals/grant1/monitoring/chatgpt.md new file mode 100644 index 0000000..adf77be --- /dev/null +++ b/proposals/grant1/monitoring/chatgpt.md @@ -0,0 +1,93 @@ +### Title +Augmenting TypeScript pnpm Test Job with Performance Recording and Profiling in Docker + +### Project Background +The current project involves optimizing and enhancing the testing environment for a TypeScript application using `pnpm` in a Docker container. The focus is on integrating performance recording and function-level profiling to identify and address performance bottlenecks. More information on the Docker and pnpm setup can be found [here](https://docs.docker.com/compose/) and [here](https://pnpm.io/). + +### Proposal Overview + +#### Problem +Existing TypeScript testing environments often lack detailed performance analysis tools, leading to difficulties in identifying performance issues and inefficiencies. This gap impedes the optimization of applications and slows down the development process. + +#### Solution +This proposal aims to enhance the TypeScript testing job by integrating performance recording and function-level profiling tools within a Docker container managed by Docker Compose. The approach includes modifying Docker configurations, installing profiling tools, updating test scripts, and analyzing the profiling results to improve performance. + +#### Impact +By implementing this proposal, the Mina ecosystem will benefit from improved tools for performance analysis, fostering better code quality and optimization practices. This will attract more developers and users interested in high-performance TypeScript applications, contributing to the overall adoption and innovation within the ecosystem. + +#### Audience +The primary audience includes developers and teams using TypeScript with `pnpm` in Docker containers. This also extends to those interested in performance optimization and profiling in development environments. + +### Architecture & Design + +#### Detailed Design/Architecture +The proposal involves updating the Docker Compose configuration to support profiling tools and modifying the Dockerfile to include these tools. Profiling utilities such as Clinic or Node.js's built-in profilers will be installed. Test scripts will be updated to enable profiling during test runs. Profiling results will be analyzed to identify performance bottlenecks. + +1. **Docker Compose Configuration**: Update `docker-compose.yml` to support profiling commands and environment variables. +2. **Dockerfile Modifications**: Install profiling tools and set up the environment for performance testing. +3. **Test Script Updates**: Modify `package.json` scripts to include profiling options and commands. + +#### Vision +The long-term vision is to establish a robust performance profiling framework for TypeScript applications, making it a standard practice in development environments. This will lead to higher performance standards and more efficient development processes within the Mina ecosystem. + +#### Existing Work +The current project setup is available [here](https://github.com/example/repository). This repository contains the existing Docker and pnpm configuration. + +#### Production Timeline +The project is expected to be in production within 1-2 months of funding, including time for configuration, implementation, and testing. + +### Budget & Milestones + +#### Deliverables +1. Enhanced Docker Compose and Dockerfile configurations. +2. Integration of performance recording and profiling tools. +3. Updated test scripts with profiling support. +4. Analysis and documentation of profiling results. + +#### Mid-Point Milestones +1. Docker and profiling tools setup complete. +2. Test scripts updated with profiling commands. +3. Initial performance data collected and analyzed. + +#### Project Timeline +- **Month 1**: Configuration updates, installation of tools, initial setup. +- **Month 2**: Integration with test scripts, performance profiling, and initial analysis. +- **Month 3**: Final testing, documentation, and delivery of results. + +#### Budget Requested +Up to 100,000 MINA + +#### Budget Breakdown +1. **Development and Implementation**: 60,000 MINA +2. **Tool Licenses and Dependencies**: 20,000 MINA +3. **Testing and Analysis**: 10,000 MINA +4. **Documentation and Reporting**: 10,000 MINA + +#### Wallet Address +[Your MINA Wallet Address] + +### Team Info + +#### Proposer Github +- [Proposer GitHub Profile](https://github.com/proposer) + +#### Proposer Experience +The proposer has experience in building and optimizing dApps with a focus on performance profiling. Relevant projects and contributions can be viewed [here](https://github.com/proposer/portfolio). + +#### Team Members +1. **[Team Member 1](https://github.com/team-member-1)**: Role - Lead Developer. Experience - Expert in Docker and performance profiling. +2. **[Team Member 2](https://github.com/team-member-2)**: Role - DevOps Specialist. Experience - Proficient in Docker Compose and CI/CD pipelines. + +#### Achievements +- Successfully optimized performance for several TypeScript applications. +- Developed and integrated profiling tools in production environments. + +### Risks & Mitigations + +#### Risks +1. **Tool Compatibility Issues**: Profiling tools may not integrate seamlessly with the existing setup. +2. **Performance Overhead**: Profiling might introduce performance overhead, affecting test results. + +#### Mitigations +1. **Compatibility Testing**: Conduct thorough testing to ensure compatibility and smooth integration of profiling tools. +2. **Performance Monitoring**: Monitor the impact of profiling on performance and adjust configurations to minimize overhead. diff --git a/proposals/grant1/monitoring/clinic-js.md b/proposals/grant1/monitoring/clinic-js.md new file mode 100644 index 0000000..7a4c963 --- /dev/null +++ b/proposals/grant1/monitoring/clinic-js.md @@ -0,0 +1,97 @@ +### Navigators Season 2: Starter Grants Proposal + +#### Title +**Proposal Title: Augmenting O1JS TypeScript npm Test Job with Performance Recording and Function-Level Profiling** + +#### Project Background +The project aims to enhance the testing infrastructure of a TypeScript application by integrating performance recording and function-level profiling within a Docker container started by Docker Compose in github actions. This will enable developers to identify performance bottlenecks and optimize their code more effectively with no setup costs. The current setup involves running tests using npm, but lacks detailed performance insights. This proposal seeks to address this gap by leveraging profiling tools like `clinic` for javascript level profiling. + +#### Proposal Overview +**Problem:** The current testing setup lacks detailed performance insights, making it difficult to identify and address performance bottlenecks. + +**Solution:** Integrate performance recording and function-level profiling using `clinic` within the Docker container started by Docker Compose in a github action. + +**Impact:** This proposal will significantly enhance the Mina ecosystem by providing developers with improved tools for performance analysis, encouraging adoption, and attracting more users and developers. It will enable novel applications by facilitating better performance optimization. + +**Audience:** The target audience for this project includes developers and teams working on TypeScript applications within the Mina ecosystem. + +#### Architecture & Design +**Detailed Design/Architecture:** +The proposed solution involves updating the Dockerfile to install necessary profiling tools, modifying the Docker Compose configuration to include profiling commands, and updating test scripts to run with profiling. + +1. **Dockerfile and compose update:** +We have already created a dockerfile for o1js and demonstrated that we can collect strace. +The docker compose runs in a github action. + +2. **Test Script Update:** + +We will use the https://github.com/dfloresc/clinicjs-pipeline to augument the mina o1js code in the first step. +The following steps can expand with more detailed performance monitoring. + + +**Vision:** The long-term vision for this project is to create a robust testing framework that provides detailed performance insights, enabling developers to build highly optimized applications within the Mina ecosystem. +It also will help extract knowledge from the o1js codebase for the following step, providing valuable intermediates. + +**Existing Work:** + +https://github.com/meta-introspector/o1js/actions/runs/10874552509 This run demonstrates +the running of part of the o1js test framework in github and collecting performance traces with strace as a simple +example. + +**Production Timeline:** + +The project is expected to be in production within 1 week. + +#### Budget & Milestones +**Deliverables:** +- Updated Dockerfile with profiling tools installed. +- Modified Docker Compose configuration to include profiling commands. +- Updated test scripts to run with profiling. +- Documentation on how to use the profiling tools. + +**Mid-Point Milestones:** +- Completion of Dockerfile and Docker Compose updates. +- Initial testing of profiling setup. +- Preliminary documentation. + +**Project Timeline:** 1W + +**Budget Requested:** + +40 Hours * 100 MINA = 4000 MINA + 1000 MINA Contingency + +**Budget Breakdown:** +- Development: 3,000 MINA +- Testing and QA: 1,000 MINA +- Documentation: 1,000 MINA +- Contingency: 1,000 MINA + +**Wallet Address:** +Coinbase Wallet B62qqFdiPRuMuQQYYo131saW1fp4f72rKXLVy2KTQEtnJzg5Hz3SqEY + + +#### Team Info +**Proposer Github:** https://github.com/jmikedupont2 + +**Proposer Experience:** The proposer has experience building github pipelines and performance tuning. + +**Team Members:** +- **Member 1:** Role - Lead Developer, Experience - [Relevant Experience], GitHub - https://github.com/jmikedupont2 +- **Member 2:** Role - QA Engineer, TBD + +**Achievements:** +- Successfully developed and deployed docker build already. +- Studied the ocaml of mina, the parts of the rust of pasta +- Studied the o1js of mina + +#### Risks & Mitigations +**Risks:** +- Integration issues with profiling tools. +- Performance overhead introduced by profiling. +- Delivery of the results + +**Mitigations:** +- Thorough testing and validation of profiling tools. +- Optimization of profiling setup to minimize performance impact. +- Regular communication with the community for feedback and support. +- Usage of accepted and standard tools for profiling nodejs diff --git a/proposals/grant1/monitoring/letchat.md b/proposals/grant1/monitoring/letchat.md new file mode 100644 index 0000000..ad52140 --- /dev/null +++ b/proposals/grant1/monitoring/letchat.md @@ -0,0 +1,127 @@ +### Navigators Season 2: Growth Grants Proposal + +#### Title +**Proposal Title: Augmenting O1JS TypeScript npm Test Job with Performance Recording and Function-Level Profiling** + +#### Project Background +The project aims to enhance the testing infrastructure of a TypeScript application by integrating performance recording and function-level profiling within a Docker container started by Docker Compose. This will enable developers to identify performance bottlenecks and optimize their code more effectively. The current setup involves running tests using pnpm, but lacks detailed performance insights. This proposal seeks to address this gap by leveraging profiling tools like `clinic`. + +For more information, you can refer to the project documentation [here](#). + +#### Proposal Overview +**Problem:** The current testing setup lacks detailed performance insights, making it difficult to identify and address performance bottlenecks. + +**Solution:** Integrate performance recording and function-level profiling using `clinic` within the Docker container started by Docker Compose. + +**Impact:** This proposal will significantly enhance the Mina ecosystem by providing developers with improved tools for performance analysis, encouraging adoption, and attracting more users and developers. It will enable novel applications by facilitating better performance optimization. + +**Audience:** The target audience for this project includes developers and teams working on TypeScript applications within the Mina ecosystem. + +#### Architecture & Design +**Detailed Design/Architecture:** +The proposed solution involves updating the Dockerfile to install necessary profiling tools, modifying the Docker Compose configuration to include profiling commands, and updating test scripts to run with profiling. + +1. **Dockerfile Update:** + ```Dockerfile + FROM node:14 + WORKDIR /usr/src/app + COPY package*.json ./ + RUN npm install -g pnpm + RUN pnpm install + RUN npm install -g clinic + COPY . . + EXPOSE 3000 + CMD ["pnpm", "start"] + ``` + +2. **Docker Compose Update:** + ```yaml + version: '3.8' + services: + app: + build: . + command: pnpm test + volumes: + - .:/usr/src/app + - /usr/src/app/node_modules + - ./profiling-data:/usr/src/app/profiling-data + environment: + - NODE_ENV=development + ports: + - "3000:3000" + depends_on: + - db + + db: + image: postgres:13 + environment: + POSTGRES_USER: user + POSTGRES_PASSWORD: password + POSTGRES_DB: mydatabase + ports: + - "5432:5432" + ``` + +3. **Test Script Update:** + ```json + { + "scripts": { + "test": "pnpm run test:profile", + "test:profile": "clinic doctor -- pnpm run test:original", + "test:original": "mocha" + } + } + ``` + +**Vision:** The long-term vision for this project is to create a robust testing framework that provides detailed performance insights, enabling developers to build highly optimized applications within the Mina ecosystem. + +**Existing Work:** If applicable, please provide a link to the GitHub repository. + +**Production Timeline:** The project is expected to be in production within 2 months. + +#### Budget & Milestones +**Deliverables:** +- Updated Dockerfile with profiling tools installed. +- Modified Docker Compose configuration to include profiling commands. +- Updated test scripts to run with profiling. +- Documentation on how to use the profiling tools. + +**Mid-Point Milestones:** +- Completion of Dockerfile and Docker Compose updates. +- Initial testing of profiling setup. +- Preliminary documentation. + +**Project Timeline:** 1M - 3M + +**Budget Requested:** Up to 100,000 MINA + +**Budget Breakdown:** +- Development: 60,000 MINA +- Testing and QA: 20,000 MINA +- Documentation: 10,000 MINA +- Contingency: 10,000 MINA + +**Wallet Address:** [MINA Wallet address for funding. Please ensure to use the same wallet used during the KYC process.] + +#### Team Info +**Proposer Github:** [GitHub Profile Link] + +**Proposer Experience:** The proposer has experience building zkApps and other dApps. Relevant projects include [Project 1](#), [Project 2](#). + +**Team Members:** +- **Member 1:** Role - Lead Developer, Experience - [Relevant Experience], GitHub - [GitHub Profile Link] +- **Member 2:** Role - QA Engineer, Experience - [Relevant Experience], GitHub - [GitHub Profile Link] + +**Achievements:** +- Successfully developed and deployed [Project 1]. +- Contributed to the open-source community with [Project 2]. + +#### Risks & Mitigations +**Risks:** +- Integration issues with profiling tools. +- Performance overhead introduced by profiling. + +**Mitigations:** +- Thorough testing and validation of profiling tools. +- Optimization of profiling setup to minimize performance impact. +- Regular communication with the community for feedback and support. diff --git a/proposals/grant1/monitoring/perplexity.md b/proposals/grant1/monitoring/perplexity.md new file mode 100644 index 0000000..42bd13a --- /dev/null +++ b/proposals/grant1/monitoring/perplexity.md @@ -0,0 +1,106 @@ +Here's a proposal for implementing performance profiling and function-level analysis for o1js in Mina: + +Title: Performance Profiling and Function-Level Analysis for o1js + +Project Background: +o1js is the core TypeScript library for developing zero-knowledge applications (zkApps) on Mina Protocol. As the ecosystem grows and more complex zkApps are built, there's an increasing need for robust performance analysis tools. This project aims to implement perf recording and function-level profiling for o1js to help developers optimize their zkApps and improve overall performance on the Mina network. + +Proposal Overview: + +Problem: Developers currently lack detailed performance insights when building zkApps with o1js, making it challenging to identify and resolve bottlenecks. + +Solution: Implement perf recording and function-level profiling capabilities directly into o1js, providing developers with granular performance data. + +Impact: This proposal will significantly enhance the Mina ecosystem by: +- Enabling developers to create more efficient zkApps +- Improving overall network performance as zkApps become optimized +- Attracting more developers with professional-grade tooling + +Audience: zkApp developers, Mina core developers, and performance engineers. + +Architecture & Design: + +Detailed Design: +1. Perf Integration: + - Implement a lightweight perf recording mechanism within o1js + - Create hooks to start/stop perf recording programmatically + - Develop a module to parse and analyze perf data + +2. Function-Level Profiling: + - Implement function entry/exit instrumentation in o1js compiler + - Create a profiling runtime to collect timing and call count data + - Develop visualization tools for function-level performance data + +3. Integration with Existing Tools: + - Create plugins for popular IDEs (VS Code, WebStorm) to visualize profiling data + - Implement CI/CD integration for automated performance regression testing + +4. Documentation and Examples: + - Develop comprehensive documentation on using the new profiling features + - Create example projects demonstrating performance optimization techniques + +Vision: Establish o1js as the gold standard for performant zero-knowledge application development, with best-in-class profiling and optimization tools. + +Existing Work: [Link to o1js GitHub repository] + +Production Timeline: MVP in 3 months, full production release in 6 months + +Budget & Milestones: + +Deliverables: +- Perf recording integration in o1js +- Function-level profiling implementation +- IDE plugins and CI/CD integration +- Comprehensive documentation and examples + +Mid-Point Milestones: +- Perf recording mechanism implemented +- Initial function-level profiling prototype + +Project Timeline: 6 months + +Budget Requested: 75,000 MINA + +Budget Breakdown: +- Development: 50,000 MINA +- Testing and Integration: 15,000 MINA +- Documentation and Tutorials: 10,000 MINA + +Wallet Address: [MINA wallet address] + +Team Info: + +Proposer GitHub: [GitHub profile link] + +Proposer Experience: 5 years of experience in performance engineering and compiler development, including work on [relevant project links] + +Team Members: +- Alice (Lead Developer): 7 years TypeScript/JavaScript performance optimization experience [GitHub] +- Bob (Compiler Engineer): PhD in Programming Languages, experience with LLVM [GitHub] + +Achievements: +- Developed performance analysis tools for [major JavaScript framework] +- Published research on efficient JIT compilation techniques + +Risks & Mitigations: + +Risks: +- Potential performance overhead from profiling instrumentation +- Compatibility issues with existing o1js codebases + +Mitigations: +- Implement configurable profiling levels to minimize overhead +- Extensive testing with a variety of existing zkApps to ensure compatibility +- Develop migration guides and tools for seamless integration + +This proposal aims to significantly enhance the development experience for Mina zkApp builders by providing crucial performance insights. By implementing these tools, we can help the Mina ecosystem grow with more efficient and scalable applications. + +Citations: +[1] https://minaprotocol.com/blog/next-steps-mina-protocol-governance +[2] https://docs.zelf.world/integrations/mina-proposal +[3] https://minaprotocol.com/blog/zkignite-cohort-3-funded-projects +[4] https://github.com/MinaFoundation/Core-Grants +[5] https://www.minafoundation.com/reports/mf-2023-transparency-report +[6] https://coin98.net/mina-ecosystem +[7] https://www.minafoundation.com/reports/q1-2024-transparency-report +[8] https://orochi.network/blog/Mina-Cohort-Wrap-Up-Celebrating-Innovation-and-Growth diff --git a/proposals/token/mina.md b/proposals/token/mina.md new file mode 100644 index 0000000..c4ca91d --- /dev/null +++ b/proposals/token/mina.md @@ -0,0 +1,13 @@ +## References + +### Price + +#### ZKapp Fees + +https://minascan.io/mainnet/tx/5JvQTouheGHgZMZzHPWS8UowkHcm6zUMV62qitynL63JuYtBnbLb/txInfo + +Looking at some existing contracts, the fee is defined in nanomina like this +`const fee = Number(config.fee) * 1e9; // in nanomina (1 billion = 1.0 mina)` +so some have `fee: 1e8,` for 1/10 of a mina. + +others define the fee to be 1 mina or more. diff --git a/proposals/tools/perf.md b/proposals/tools/perf.md new file mode 100644 index 0000000..3571cba --- /dev/null +++ b/proposals/tools/perf.md @@ -0,0 +1,14 @@ +### Gpt Defintions + +### perf + +The Linux `perf` tool is designed as a root-level observability system that provides powerful and efficient sampling of any running program at runtime. It allows users to set up user probes (also known as `uprobes`) to monitor, interrupt, and sample various performance metrics without the need for modifying the source code of the program being observed. + +Key features include: +- **Event-driven Sampling**: `perf` captures data based on specific performance events (e.g., CPU cycles, cache misses, page faults) and can provide insights into the behavior of programs. +- **User Probes (Uprobes)**: This feature allows users to monitor user-space applications by dynamically inserting probes at function entry/exit points or arbitrary code locations. +- **Kernel Probes (Kprobes)**: Similar to uprobes, `kprobes` allow for monitoring kernel events. +- **Low Overhead**: Designed for minimal performance impact, enabling efficient data collection and analysis even in production environments. +- **Broad Scope**: It can monitor not only the application-level events but also system-wide events such as scheduler activities, disk I/O, network performance, and more. + +With `perf`, developers and administrators gain detailed visibility into how programs interact with hardware, the kernel, and the rest of the system, making it invaluable for performance tuning, debugging, and system optimization. diff --git a/zkapp-introspector.wasm b/zkapp-introspector.wasm new file mode 100644 index 0000000..b74c98f --- /dev/null +++ b/zkapp-introspector.wasm @@ -0,0 +1,15 @@ +(module + ;; Imports from JavaScript namespace + (import "console" "log" (func $log (param i32 i32))) ;; Import log function + (import "js" "mem" (memory 1)) ;; Import 1 page of memory (54kb) + + ;; Data section of our module + (data (i32.const 0) "Hello World from WebAssembly!") + + ;; Function declaration: Exported as helloWorld(), no arguments + (func (export "helloWorld") + i32.const 0 ;; pass offset 0 to log + i32.const 29 ;; pass length 29 to log (strlen of sample text) + call $log + ) +) \ No newline at end of file