turn into a cell package
This commit is contained in:
@@ -26,3 +26,39 @@ cell update - update all packages in the shop, and builds their code for local u
|
||||
cell install <package> - install a package
|
||||
cell remove <package> - remove a package
|
||||
cell build - build the package in the current directory into a cell executable
|
||||
cell version - the version of cell being used
|
||||
|
||||
## building
|
||||
cell builds itself from source on your compuer!
|
||||
|
||||
all source for every single part of a cell program are located in the cell shop.
|
||||
|
||||
the cell shop looks like this:
|
||||
.cell
|
||||
packages
|
||||
gitea.pockle.world/john/cell <--- this is the root cell
|
||||
gitea.pockle.world/john/prosperon
|
||||
cell.toml <--- the manifest of the package
|
||||
mod1.cm
|
||||
mod2.cm
|
||||
actor1.ce
|
||||
addon.c <--- a C file for compiling into the cell executable
|
||||
etc
|
||||
gitea.pockle.world/john/accio
|
||||
/Users/john/work/prosperon
|
||||
...
|
||||
link.toml - temporary links for this cell shop
|
||||
lock.toml - manifest of installed packages
|
||||
cache
|
||||
<downloaded packages>
|
||||
build - content addressed hash
|
||||
fajfola214o12
|
||||
90823tjoag
|
||||
...
|
||||
|
||||
## getting a module or actor
|
||||
When a module <name/mod> is requested, from a within package <a> ..
|
||||
|
||||
1) cell looks within package <a> for a folder <name> and loads <name/mod>, if present
|
||||
2) cell looks for a package <name> with a top level <mod>
|
||||
3) cell looks in the core for <name/mod>
|
||||
@@ -10,6 +10,13 @@ var utf8 = use('utf8')
|
||||
var blob = use('blob')
|
||||
var build_utils = use('build')
|
||||
|
||||
function content_hash(content)
|
||||
{
|
||||
return text(crypto.blake2(utf8.encode(content)), 'h')
|
||||
}
|
||||
|
||||
log.console(content_hash("hello"))
|
||||
|
||||
// a package string is what is used to import a module, like prosperon/sprite
|
||||
// in prosperon/sprite, sprite is the module, and prosperon is the package (usually, an alias)
|
||||
// a canonical package name relates prosperon to its source, like gitea.pockle.world/john/prosperon
|
||||
Reference in New Issue
Block a user