Skip to content

Commit

Permalink
core: make path a builtin
Browse files Browse the repository at this point in the history
It's needed by internal modules and will also come handy in the future.
  • Loading branch information
saghul committed Sep 29, 2023
1 parent 2bfb33b commit 5ec31d8
Show file tree
Hide file tree
Showing 7 changed files with 6,848 additions and 7,024 deletions.
4,589 changes: 3,000 additions & 1,589 deletions src/bundles/c/core/core.c

Large diffs are not rendered by default.

4,513 changes: 2,259 additions & 2,254 deletions src/bundles/c/core/run-main.c

Large diffs are not rendered by default.

1,644 changes: 23 additions & 1,621 deletions src/bundles/c/stdlib/path.c

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions src/js/core/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ const core = globalThis.__bootstrap;

import { alert, confirm, prompt } from './alert-confirm-prompt.js';
import { open, mkdir, mkstemp, rm } from './fs.js';
import pathModule from './path.js';
import { PosixSocket } from './posix-socket.js';
import { signal } from './signal.js';
import { connect, listen } from './sockets.js';
Expand Down Expand Up @@ -197,6 +198,7 @@ const kInternal = Symbol.for('tjs.internal');
tjs[kInternal] = Object.create(null);
tjs[kInternal]['bootstrapWorker'] = bootstrapWorker;
tjs[kInternal]['core'] = core;
tjs[kInternal]['pathModule'] = pathModule;

// tjs global.
Object.defineProperty(globalThis, 'tjs', {
Expand Down
Loading

0 comments on commit 5ec31d8

Please sign in to comment.