n2-clotho 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,16 @@
1
+ # compiler/
2
+
3
+ QLN 2.0 `.n2` 언어 컴파일러 (Rust + pest PEG 파서).
4
+
5
+ ## 실행
6
+ ```bash
7
+ cargo build
8
+ cargo run -- examples/soul-boot.n2
9
+ ```
10
+
11
+ ## 구조
12
+ - `src/grammar.pest` — PEG 문법 정의
13
+ - `src/ast.rs` — AST 노드 구조체
14
+ - `src/parser.rs` — pest → AST 변환
15
+ - `src/main.rs` — CLI 엔트리포인트
16
+ - `examples/` — .n2 예제 파일
@@ -0,0 +1,2 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
package/n2_compiler.js ADDED
@@ -0,0 +1,26 @@
1
+ /* @ts-self-types="./n2_compiler.d.ts" */
2
+
3
+ function __wbg_get_imports() {
4
+ const import0 = {
5
+ __proto__: null,
6
+ __wbindgen_init_externref_table: function() {
7
+ const table = wasm.__wbindgen_externrefs;
8
+ const offset = table.grow(4);
9
+ table.set(0, undefined);
10
+ table.set(offset + 0, undefined);
11
+ table.set(offset + 1, null);
12
+ table.set(offset + 2, true);
13
+ table.set(offset + 3, false);
14
+ },
15
+ };
16
+ return {
17
+ __proto__: null,
18
+ "./n2_compiler_bg.js": import0,
19
+ };
20
+ }
21
+
22
+ const wasmPath = `${__dirname}/n2_compiler_bg.wasm`;
23
+ const wasmBytes = require('fs').readFileSync(wasmPath);
24
+ const wasmModule = new WebAssembly.Module(wasmBytes);
25
+ let wasm = new WebAssembly.Instance(wasmModule, __wbg_get_imports()).exports;
26
+ wasm.__wbindgen_start();
Binary file
package/package.json ADDED
@@ -0,0 +1,22 @@
1
+ {
2
+ "name": "n2-clotho",
3
+ "description": "🧵 Compiled instruction language for AI agents. Replace GEMINI.md, .cursorrules, CLAUDE.md with enforceable .n2 rules.",
4
+ "version": "0.1.0",
5
+ "license": "Apache-2.0",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/choihyunsus/n2-clotho.git"
9
+ },
10
+ "homepage": "https://nton2.com",
11
+ "keywords": [
12
+ "ai", "mcp", "ai-agents", "compiler", "rust", "wasm",
13
+ "llm", "rules-engine", "state-machine", "clotho"
14
+ ],
15
+ "files": [
16
+ "n2_compiler_bg.wasm",
17
+ "n2_compiler.js",
18
+ "n2_compiler.d.ts"
19
+ ],
20
+ "main": "n2_compiler.js",
21
+ "types": "n2_compiler.d.ts"
22
+ }