legacy-paperclip icon indicating copy to clipboard operation
legacy-paperclip copied to clipboard

PHP base compiler

Open crcn opened this issue 3 years ago • 2 comments

crcn avatar Dec 14 '21 17:12 crcn

  • Ideally developers won't need to compile PC files for them to be used in PHP.
    • We can also dynamically serve assets by having a sort-of mapping functionality that serves files from their original file path (like symlinks)
    • Will need to be cognizant about serving assets from a CDN. Might be nice to have the option to emit files to a directory, and then dynamically compile files when used in PHP
    • need to be cognizant about caching
    • this will require a rust compiler + FFI for PHP
  • I think the base compiler can just emit pure functions, this can be vanilla enough to be used in any context. Developers can then create integrations into whatever framework they want.
  • Look into other PHP frameworks to see how
  • Need to be cognizant about Performance

crcn avatar Jan 11 '22 17:01 crcn

Pseudocode:

var $ui = Paperclip::use("./file.pc");

$ui->button("child");

crcn avatar Jan 11 '22 17:01 crcn