pebble
  • Tutorials
  • Get the SDK
  • Guides
  • Documentation
  • Examples
  • Community
  • Blog
  • More
Privacy
Cookies
Publish

Pebble C API

  • Pebble C API
  • Moddable API (Alloy)
  • PebbleKit JS
  • PebbleKit iOS
  • PebbleKit Android
  • Foundation
    • App
    • App Communication
    • App Glance
    • AppMessage
    • AppSync
    • AppWorker
    • DataLogging
    • DataStructures
      • UUID
    • Dictation
    • Dictionary
    • Event Service
      • AccelerometerService
      • AppFocusService
      • BatteryStateService
      • CompassService
      • ConnectionService
      • HealthService
      • TickTimerService
    • Exit Reason
    • Internationalization
    • Launch Reason
    • Logging
    • Math
    • Memory Management
    • Platform
    • Resources
      • File Formats
    • Rocky
    • Storage
    • Timer
    • Wakeup
    • Wall Time
    • WatchInfo
    • Alloy
  • Graphics
    • Draw Commands
    • Drawing Paths
    • Drawing Primitives
    • Drawing Text
    • Fonts
    • Graphics Context
    • Graphics Types
      • Color Definitions
  • User Interface
    • Animation
      • PropertyAnimation
    • Clicks
    • Layers
      • ActionBarLayer
      • BitmapLayer
      • MenuLayer
      • RotBitmapLayer
      • ScrollLayer
      • SimpleMenuLayer
      • StatusBarLayer
      • TextLayer
    • Light
    • Preferences
    • UnobstructedArea
    • Vibes
    • Window
      • ActionMenu
      • NumberWindow
    • Window Stack
  • Standard C
    • Format
    • Locale
    • Math
    • Memory
    • String
    • Time

The APIs on this page will only work with SDK 3.x.

Alloy

Data Structure Documentation

  • SDK 3
  • SDK 4

The struct ModdableCreationRecord does not exist in SDK 3.

struct ModdableCreationRecord

Configuration record for creating a Moddable XS virtual machine. Used with moddable_createMachine() to customize the JS runtime. Set recordSize to sizeof(ModdableCreationRecord) for version compatibility.

Data Fields

uint32_t recordSize

Size of this struct in bytes (for versioning)

uint32_t stack

Stack size in bytes (0 for default)

uint32_t slot

Slot heap size in bytes (0 for default)

uint32_t chunk

Chunk heap size in bytes (0 for default)

uint32_t flags

Combination of kModdableCreationFlag* values.

Macro Definition Documentation

  • SDK 3
  • SDK 4

The define kModdableCreationFlagLogInstrumentation does not exist in SDK 3.

#define kModdableCreationFlagLogInstrumentation (1 << 0)

Flag to enable XS instrumentation logging over Bluetooth. When set, the Moddable XS engine will log instrumentation data (e.g. memory usage, slot/chunk/stack statistics) via app_log. Logging is only active when a Bluetooth log listener is connected; otherwise this flag has no effect.

See Also

ModdableCreationRecord
  • SDK 3
  • SDK 4

The define moddable_createMachine does not exist in SDK 3.

#define moddable_createMachine ( ...)

Need some help?

Data Structures

  • ModdableCreationRecord

Macro Defintions

  • kModdableCreationFlagLogInstrumentation
  • moddable_createMachine

Getting Help

Do you have questions about the Pebble SDK?

Do you need some help understanding something on this page?

You can either take advantage of our awesome developer community and check out the SDK Help forums, or you can join us on the Discord!