https://github.com/bunland/larzig
Lar javascript runtime
https://github.com/bunland/larzig
javascript javascriptcore runtime zig
Last synced: 11 months ago
JSON representation
Lar javascript runtime
- Host: GitHub
- URL: https://github.com/bunland/larzig
- Owner: Bunland
- Created: 2023-12-07T04:57:21.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-10T00:00:01.000Z (over 1 year ago)
- Last Synced: 2025-03-30T17:01:46.122Z (12 months ago)
- Topics: javascript, javascriptcore, runtime, zig
- Language: Zig
- Homepage:
- Size: 5.44 MB
- Stars: 5
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Lar Runtime
A javascript runtime written in zig that uses javascriptcore as the javascript engine.
## Api List
### Console Api Status
```typescript
console.assert(value[, ...message]) // ready
console.clear() // ready
console.count([label]) // ready
console.countReset([label]) // ready
console.debug(data[, ...args]) // ready
console.dir(obj[, options]) // soon
console.dirxml(...data) // soon
console.error([data][, ...args]) // soon
console.group([...label]) // soon
console.groupCollapsed() // soon
console.groupEnd() // soon
console.info([data][, ...args]) // soon
console.log([data][, ...args]) // ready
console.table(tabularData[, properties]) // soon
console.time([label]) // soon
console.timeEnd([label]) // soon
console.timeLog([label][, ...data]) // soon
console.trace([message][, ...args]) // soon
console.warn([data][, ...args]) // soon
console.prompt([labe]) // ready
```
### FS Api Status
``` typescript
lar.writeFile([path], [data]) // ready
lar.readFile([path]) // ready
lar.existsFile([path]) // ready
lar.removeFile([path]) // ready
```
### Shell Api Status
```typescript
lar.shell("ls -l") // ready
```
### Learning Project
This is a personal learning project focused on understanding how JavaScript runtimes written in C, Go, or Zig are created. As such, it's not recommended to use the Lar Runtime for production purposes.
### Code Usage
If you decide to use any code from this runtime, I kindly request that you mention Lar Runtime in your project documentation, as well as in your code comments.