Skip to content

Latest commit

 

History

History
102 lines (90 loc) · 1.66 KB

TODO_RUNTIME.md

File metadata and controls

102 lines (90 loc) · 1.66 KB

Runtime Builtins Todo List

Core Types and Functions

  • File (pryst::io)

    • Constructor
    • readToString
    • writeAll
    • close
  • Error (pryst::core)

    • Constructor with message and code
    • toString method
    • getCode method
    • getMessage method
  • String (pryst::core)

    • length
    • substring
    • indexOf
    • lastIndexOf
    • replace
    • split
    • trim
  • Array (pryst::core)

    • length
    • push
    • pop
    • shift
    • unshift
    • indexOf
    • slice
    • join
  • Map (pryst::core)

    • set
    • get
    • has
    • delete
    • clear
    • keys
    • values
    • size

IO Functions

  • print (pryst::io)
  • println (pryst::io)
  • readLine (pryst::io)
  • getChar (pryst::io)

Web Framework

  • Server (pryst::web)

    • Constructor
    • listen
    • get
    • post
    • put
    • delete
    • use
  • Request (pryst::web)

    • getPath
    • getMethod
    • getHeaders
    • getBody
    • getQuery
    • getParams
  • Response (pryst::web)

    • setStatus
    • setHeader
    • send
    • json
    • html

Math Functions (pryst::math)

  • abs
  • ceil
  • floor
  • round
  • max
  • min
  • pow
  • sqrt
  • random

System Functions (pryst::sys)

  • exit
  • getEnv
  • setEnv
  • sleep
  • time
  • clock

Each builtin needs to be implemented as a proper class or function in the runtime system with:

  1. LLVM IR generation
  2. Extern "C" bindings
  3. Registration in RuntimeRegistry
  4. Proper error handling
  5. Type safety
  6. Memory management
  7. Documentation