Files
herolib/examples
despiegk 8472d20609 Merge branch 'development_heropods' into development
* development_heropods: (21 commits)
  test: Ignore virt/heropods/network_test.v in CI
  feat: implement container keep-alive feature
  test: Add comprehensive heropods network and container tests
  refactor: Refactor Mycelium configuration and dependencies
  feat: Add Mycelium IPv6 overlay networking
  test: Replace hero binary checks with network test
  feat: Add iptables FORWARD rules for bridge
  Revert "feat: Add `pods` command for container management"
  feat: Add `pods` command for container management
  chore: Enable execution of cmd_run
  feat: Add `run` command for Heroscript execution
  feat: Separate initialization and configuration
  refactor: Remove hero binary installation from rootfs
  refactor: Integrate logger and refactor network operations
  feat: Implement container networking and improve lifecycle
  feat: Auto-install hero binary in containers
  feat: Add container management actions for heropods
  feat: Add heropods library to plbook
  refactor: Rename heropods variable and method
  refactor: Rename container factory to heropods
  ...
2025-11-25 18:40:41 +01:00
..
...
2025-11-23 08:29:37 +01:00
2025-11-15 01:19:33 +02:00
...
2025-10-29 07:53:34 +04:00
2025-11-24 05:48:13 +01:00
...
2025-11-06 09:40:59 +04:00
...
2025-11-23 06:38:12 +01:00
...
2025-08-28 21:28:03 +02:00
...
2025-10-14 13:34:29 +04:00
...
2025-01-31 15:39:44 +03:00
...
2025-09-24 21:06:37 +04:00

HeroLib Examples

This repository contains examples and utilities for working with HeroLib, a comprehensive library for V language.

Sync Do Script

The sync_do.sh script is a utility for development that:

  • Synchronizes the local HeroLib codebase with a remote server
  • Uses rsync to efficiently transfer only changed files
  • Automatically connects to a tmux session on the remote server
  • Helps maintain development environment consistency

Examples Structure

The examples directory demonstrates various capabilities of HeroLib:

  • builder/: Examples of builder patterns and remote execution
  • core/: Core functionality examples including configuration, database operations, and API integrations
  • data/: Data handling examples including encryption and encoding
  • develop/: Development tools including git integration and OpenAI examples
  • hero/: Hero-specific implementations and API examples
  • installers/: Various installation scripts for different tools and services
  • lang/: Language integration examples (e.g., Python)
  • osal/: Operating system abstraction layer examples
  • threefold/: ThreeFold Grid related examples and utilities
  • tools/: Utility examples for imagemagick, tmux, etc.
  • ui/: User interface examples including console and telegram
  • virt/: Virtualization examples for Docker, Lima, Windows, etc.
  • webtools/: Web-related tools and utilities

V Script Requirements

When creating V scripts (.vsh files), always use the following shebang:

#!/usr/bin/env -S v -n -w -gc none  -cc tcc -d use_openssl -enable-globals run

This shebang ensures:

  • Direct execution of V shell scripts without needing to use the V command
  • No main() function requirement in .vsh files
  • Proper compilation flags and settings
  • OpenSSL support enabled
  • Global variables enabled
  • TCC compiler usage
  • No retry compilation

These examples serve as practical demonstrations and reference implementations for various HeroLib features and integrations.