# @objj/runtime

> JavaScript (ECMAScript) and Objective-J runtime

Latest version **1.2.4** (published 2025-09-09) · 0 weekly downloads

## Install

```sh
npm install @objj/runtime
pnpm add @objj/runtime
yarn add @objj/runtime
bun add @objj/runtime
```

Provides the command `objj`.

## Health

**Score 35/100 (D)** — status: stable.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 1.2.4 |
| Published | 2025-09-09 |
| First published | 2021-08-12 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=14.0.0 |
| Dependencies | 5 |
| Unpacked size | 1.1 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 14 |
| Maintainers | alfredwarnsater, mrcarlberg |
| Keywords | runtime, source, source code, JavaScript, ECMAScript, Objective-J, preprocessor, pre-processor, pre processor, processor, utility |

## Links

- npm: https://www.npmjs.com/package/@objj/runtime
- Repository: https://github.com/mrcarlberg/objj-runtime
- Homepage: http://github.com/mrcarlberg/objj-runtime
- Issues: https://github.com/mrcarlberg/objj-runtime/issues
- npm.io page: https://npm.io/package/@objj/runtime

## Dependencies (5)

- [@objj/utils](https://npm.io/package/@objj/utils.md) >=1.0.23
- [@xmldom/xmldom](https://npm.io/package/@xmldom/xmldom.md) ^0.8.10
- [objj-transpiler](https://npm.io/package/objj-transpiler.md) ^1.0.0-1
- [readline-history](https://npm.io/package/readline-history.md) >=1.2.0
- [xmlhttprequest-ssl](https://npm.io/package/xmlhttprequest-ssl.md) ^2.0.0

## Alternatives

- [lodash.assign](https://npm.io/package/lodash.assign.md) — 2.3M weekly downloads
- [lodash.chunk](https://npm.io/package/lodash.chunk.md) — 1.8M weekly downloads
- [react-native-ios-utilities](https://npm.io/package/react-native-ios-utilities.md) — 138.5K weekly downloads
- [@technically/lodash](https://npm.io/package/@technically/lodash.md) — 50.9K weekly downloads
- [@fluid-topics/ft-icon](https://npm.io/package/@fluid-topics/ft-icon.md) — 20.6K weekly downloads

## Recent versions

- 1.2.4 (latest) — 2025-09-09
- 1.2.3 — 2024-09-21
- 1.2.2 — 2024-01-09
- 1.2.1-2 — 2022-12-09
- 1.2.1-1 — 2022-08-25
- 1.2.0 — 2022-08-25
- 1.1.17 — 2022-03-24
- 1.1.16 — 2022-03-16
- 1.1.15 — 2021-12-03
- 1.1.14 — 2021-10-04
- 1.1.13 — 2021-10-01
- 1.1.12 — 2021-09-30
- 1.1.11 — 2021-09-28
- 1.1.10 — 2021-09-24
- 1.1.9 — 2021-09-20
- … 26 more at https://npm.io/package/@objj/runtime/versions

## README

Objective-J Runtime
=================

A Node runtime for the [Objective-J][objj] language.

[objj]: http://www.cappuccino-project.org/learn/objective-j.html

It uses an Objective-J to JavaScript [compiler][objj-transpiler] by Martin Carlberg.

[objj-transpiler]: https://github.com/mrcarlberg/ObjJAcornCompiler

## How to use

Install using npm

```
npm install objj-runtime
```

Make sure you have grunt commandline installed. If not install with

```
npm install -g grunt-cli

```

Compile and build the runtime with grunt from inside the objj-runtime directory.

```
grunt
```

Copy a built Cappuccino Foundation framework to the Framework directory. You might need to create the Framework directory inside the objj-runtime directory.

Create an Objective-J main.j file

```
@import <Foundation/Foundation.j>

@implementation MyClass : CPObject

- (CPString)myMethod {
    return [CPString stringWithFormat:@"Node version: %@", process.version];
}

@end

function main(args, namedArgs)
{
    console.log("Hello World");
    console.log([[[MyClass alloc] init] myMethod]);
}
```

Compile and run
```
bin/objj main.j
```

You can debug with the node-inspector and Chrome.

```
node --inspect-brk bin/objj main.j
```

A framework that is already built can be use if placed inside the Framework directory.

To update the Objective-J runtime you need to copy the files from the Cappuccino Objective-J directory into the Objective-J directory. (This will not work yet as there are some changes to the Objective-J runtime that is not pushed to the Cappuccino project. Should work if you merge in your changes)

Compile and build the runtime with grunt

```
grunt
```

There are many things that don't work yet. For example you can't just compile your files. You have to compile and run.

## Example

Example of very simple backend webserver in Objective-J can be downloaded [here][objj-node-webserver] as a zip file.

[objj-node-webserver]: http://mini.carlberg.org/dev/objj-node-webserver.zip

Start the backend webserver from the command prompt with
```
bin/objj main.j
```

From another command prompt json data can be stored with:
```
curl 127.0.0.1:1337/Name/42 -d '{"name": "martin"}'
```

It can be retrieved with:
```
curl 127.0.0.1:1337/Name/42
```

The url uses a pattern with entity and identifier for storage. It looks like this:
```
curl 127.0.0.1:1337/<entity>/<identifier>
```

---
_Source: https://npm.io/package/@objj/runtime · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
