-
Notifications
You must be signed in to change notification settings - Fork 419
Stylus v0.10 #2867
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
anegg0
wants to merge
67
commits into
master
Choose a base branch
from
stylus-v0.1
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Stylus v0.10 #2867
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add lint:markdown:fix to the format script to automatically fix markdown linting issues when running yarn format. This ensures markdown files are both formatted (prettier) and linted (markdownlint) in one command. The new format workflow: 1. Format docs with prettier 2. Format app files with prettier 3. Auto-fix markdown linting issues 4. Verify all files pass prettier check
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Add detailed documentation for all Stylus SDK primitive types including: - Boolean (bool) with usage examples and Solidity mappings - Unsigned integers (u8-u128, U256, Uint<BITS, LIMBS>) - Signed integers (i8-i128, I256, Signed<BITS, LIMBS>) - Address type with constants and validation examples - String type with literal and formatting examples - Bytes types (dynamic Bytes and fixed FixedBytes<N>) - Hex literal usage examples - Complete type mapping tables for all primitives - Best practices for each primitive type - Type conversion examples Each section includes: - Practical code examples - Solidity type mappings - Storage size information - ABI signature details - Common usage patterns
Add detailed documentation for all Stylus SDK compound types including: - Tuples with destructuring and pattern matching examples - Structs using sol! macro with AbiType derivation - Nested structs for complex data structures - Fixed-size arrays with iteration and operations - Vectors (dynamic arrays) with filter, map, and fold operations - Bytes types (dynamic Bytes and fixed FixedBytes<N>) - Complete type mapping tables for all compound types - Best practices for each compound type - Type conversion helpers and iterator patterns - Common patterns (batch operations, pagination) Each section includes: - Practical code examples from SDK examples - Solidity type mappings - ABI signature details - Memory and gas efficiency considerations - Complete working examples with nested structures - Iterator and functional programming patterns
Add comprehensive documentation comparing EVM and Nitro WASM VM. Covers: - Execution model differences (stack-based vs register-based) - Memory model (32-byte chunks vs 64KB pages) - Gas metering with ink system and conversion formula - Instruction sets (EVM opcodes vs WASM instructions) - Size limits (24KB for both with optimization notes) - Storage model compatibility and caching benefits - Performance characteristics (10-100x cheaper compute) - Call semantics and interoperability examples - Contract lifecycle (deployment, activation, execution) - Developer experience comparison - Feature compatibility matrix - State sharing across VMs - Gas economics and cost structures - Best practices for each environment - Hybrid approach strategies - Migration considerations from Solidity to Stylus - Future developments for both platforms Includes practical examples of: - Memory growth with pay_for_memory_grow - Storage caching in Stylus - Cross-VM contract calls - Hybrid contract architectures Based on stylus-sdk-rs implementation including hostio.rs, entrypoint.rs, host.rs, and SDK examples showing WASM execution patterns compared to traditional EVM operations.
Add detailed documentation covering WASM basics in the context of Arbitrum Nitro and Stylus: - WASM fundamentals and why it's used in Nitro - Compilation target (wasm32-unknown-unknown) configuration - Binary structure (exports, imports, memory, custom sections) - Compression with brotli and 0xEFF000 prefix - Contract activation process and caching - Development workflow and best practices - Size limitations and optimization strategies - Memory model and supported WASM instructions
Add buildSoliditySidebar and buildStylusSidebar to provide focused navigation experiences. Each sidebar contains only its relevant content category, eliminating the need for collapse/expand behavior.
Change displayed_sidebar frontmatter from buildAppsSidebar to buildSoliditySidebar for all Solidity documentation pages.
Change displayed_sidebar frontmatter from buildAppsSidebar to buildStylusSidebar for all Stylus documentation pages.
Add detailed documentation for validating and deploying Stylus contracts: - Prerequisites and setup requirements - Two-step deployment process (deploy + activate) - cargo stylus check command with validation details - cargo stylus deploy command with all options - Activation process and data fee calculation - Development and production workflows - Best practices for secure deployment - Comprehensive troubleshooting section - Non-Rust WASM deployment support - Command reference and examples
Add detailed documentation for exporting Solidity ABIs from Stylus contracts: - Overview of ABI generation process - Basic usage of cargo stylus export-abi - Solidity interface and JSON format output - Writing ABI-compatible contracts with #[public] macro - Function visibility mapping (view, pure, payable) - Type mapping between Rust and Solidity - Custom errors and events - Trait implementation and interface inheritance - Constructor signature export - Front-end integration (ethers.js, viem, wagmi) - Solidity contract integration - Export configuration options - Best practices for ABI management - Troubleshooting common issues - Multi-contract workspace support
Add detailed documentation for deploying WebAssembly contracts from languages other than Rust: - Overview of non-Rust WASM deployment with --wasm-file flag - When to choose non-Rust vs Rust (use case comparison) - WASM module requirements (exports, imports, memory) - WebAssembly Text (WAT) examples (minimal, echo, counter) - C/C++ development with Stylus C SDK - C SDK features and building with Makefile - Cryptography example in C - AssemblyScript contract development - Complete deployment workflow (prepare, optimize, check, deploy) - Best practices for size optimization and memory management - Troubleshooting common issues (entrypoint, imports, memory, size) - Language support matrix (Rust, C/C++, WAT, AssemblyScript, etc.) - Advanced custom language integration guide
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
WIP PR:
The proposed temporary structure is the following: