What Would be the Sentiment to an Experimental Rust Port of Inform7 Made With AI Assistance?

I understand how controversial AI is, so I wanted to ask folks what the impression would be for a possible use of it that I had considered.

I was thinking of using it to help make an alternate implementation of Inform7, but with an attempt to make a much more deeply interactive IDE experience.

I’ve realized that the biggest blockers for me when learning / using Inform has been:

  • I’m unsure how the different words in my sentences are being interpreted by the compiler.
    • For example, it’s hard to tell sometimes when some long name is being referenced or whether we are triggering some more meaningful inform sentence parsing.
  • I’m unsure what it’s even possible to say in different scenarios
    • For example, when I’m programming and I’m using a new library, IDE documentation or autocomplete is extremely useful for figuring out what I’m allowed to do where.
    • Like it’s somewhat arbitrary and hard to learn the exact structure of a rule with may or may not start with Rule for and may be followed by when <condition> and finally by a during <scene> which could have also have been provided by when <scene> is happening.

These things aren’t necessarily possible to fix just by a deep IDE integration, but what I was imagining was being able to do things like color-code or “reveal on hover” parts of speech, autocomplete different kinds of clauses that may be parsed in different positions, autocomplete existing nouns and verbs, having “go to definition” and hover context for things, etc.

I also wanted to try to leverage incremental computation so that you could do things like update the index incrementally in realtime without having to re-compile.

I was thinking of using the incremental compiler library used in rust-analyzer which implements a lot of these features for Rust.

Anyway, I know Inform is an awesome and massive project, so it may not even be feasible.

But I was curious if people would be offended if I made something like that.

Obviously I’d be using the Inform7 source code as reference, and I would distribute it as a “modified” version of the Inform7 source according to the terms of it’s Artistic license. As far as I read, it’s not against the licensing terms, but that doesn’t mean it wouldn’t be against the good graces of the community.


Personally I’m somewhat enthralled by what Inform7 has accomplished with it’s compiler and, even when it feels somewhat impractical to me, the whole idea is just something so different as a means of world modeling and “programming” that I like it just for it’s uniqueness and how it exercises my brain differently than all the “normal” coding I do.

This is just kind of moonshot idea of “what if we could really streamline an interactive understanding of how the Inform compiler is working while you write”. I’ve no idea if it would actually work, and it’s not like I’m trying to steal Inform’s thunder or get attention or anything like that.

If it did work, then I’d probably want to use the examples as a test suite to keep in in sync with Inform as it updates.

I could imagine possibly wanting to make changes to the language eventually, but not sure if I’d end up wanting to maintain that or not. So there’s not necessarily a big plan end goal. Mostly just thinking about something to have kind of a playground for experimenting with this kind of “natural language” modeling system, maybe even outside of interactive fiction, such as user experience test case / scenario definition or things like that for software development.


It seems like folks on this forum are pretty conscientious so I’m interested to hear your honest thoughts.

1 Like

Oh, also, to be clear, I’m really not for AI when it comes to actually making the stories.

AI for coding is something I’m open to because I have functional criteria to meet, and even though I think a lot of coding and system design is absolutely art, the measure of value in the end, for me, is functionality, and then maintainability for most projects.

But when it comes to creative pursuits like writing stories, painting pictures, etc. I really don’t value taking the human soul out of it. That’s like the whole reason I’m interested in that kind of art.

The point here would be using AI to help produce tools that I can use to help me understand the language “code” I’m writing while working on a creative game that is wholly my own work.

The biggest question I have is whether that feels like I’d be “stealing” Inform’s code.

2 Likes

While a language server would be great, the Inform 7 compiler is a massive project. I don’t know how well AI systems even handle literate programming? Rust is a better language than C, but an AI port of Inform would require a huge amount of manual quality control to be reliable enough to use.

That said, how much do you use the Index? It does seem like a lot of your issues with Inform could be helped by using the Index more.

2 Likes

I use it a bit, but I kept not being able to find what I was looking for in it.

Sometimes it was that I didn’t know where to look, like I had a hard time internalizing whether I should look in the actions section or the phrases section. Other times it was strange to me that some things seemed to be excluded from the index and they worked in game but weren’t listed in the index. It also took me a while to find the tokens section.

I started having more luck when using search in the general index for Writing with Inform. And I haven’t had as much trouble recently as the ideas have started to stick and I’ve started to get the hang of what the mechanisms are and how to search for things.

I’m not 100% sure. It seems like it would actually help with things because the code comes with in-depth explanations.

I’ve started experimenting with things a bit locally and it seems to get it fine, but I don’t know for sure.

Yeah, it’d be a pretty big experiment to see if it could use the inform examples, along with the inform compiler itself as a test-case to make sure it’s producing identical code to the original.

From an ethical perspective, the problem with using AI to port a project isn’t with the license of that project, it’s all the other code the AI company ingested to create their models. Was the AI trained on GPL code? On proprietary code? AI opponents would say that putting all the code in a blender doesn’t erase the ethical obligations of the licenses the code was provided under.

And there’s the environmental costs of AI too..

I think a language server based on the outputs of the existing Inform compiler would be a better place to start. Still very tricky.

6 Likes

without going into ethical considerations, it would be interesting to know whether AI could even tackle something as complex as Inform. Because (1) if it can’t do it then the idea is moot anyhow and (2) if it can do it, that would make it a really helpful tool in maintaining the codebase, rust ports notwithstanding.

I would suggest first that you make a game for a game jam with Inform X (whatever X is) and see it through.

2 Likes

I think others have already said it, but it bears repeating: the Inform-7 compiler and IDE and tools are so complex, that even if an AI could translate it all to rust, you’d be spending a huge amount of effort to validate that everything is working correctly (that no new issues were introduced).

It also bears repeating: make a game or two in the language, just knuckle down and learn it, maybe even try some other authoring systems – Inform-6 still has a lot to offer, and Dialog has a rule-based architechture that resembles Inform-7 in many aspects.

4 Likes

Oh, yeah, I’m definitely going to be writing some games. :slight_smile:

I’m already working with my brother for a small Disney Lion Guard fan fiction for my little siblings as a first project where I can focus more on the learning and less on getting the story perfect. I’m about 1/3 of the way through that project.

I’ve also got at least one solid idea for a story that fits the capability of the genre really well I think. An old house on a farm exploration game with some mystery and mild fantasy elements to it.

And you’re probably right about making a game or more first. I would love it if people ended up playing games I made.


I do hate that world is getting totally flooded with AI garbage from people who don’t care.

I use AI for coding at work trying to make open source communication tools that we can use to take back ownership of our online “lives” from big tech. It helps me and my team get important stuff done faster and the stuff that we are investing our AI use in is in many ways in combat with the takeover of the big companies behind AI.

I also only use “open source” models, which at least are more transparent than things like Claude or ChatGPT, and I’m using relatively efficient models, too, partially because I get the most out of the $20/month Ollama cloud subscription like that. Ollama is relatively nice and aligns the incentives there to use more efficient models when possible.

I think a lot of AI’s problems comes from how people use it; some people can be extremely disrespectful of other people’s time and attention, shoveling AI garbage at other people without caring how much effort it takes the reader compared to how little effort they put into what the AI wrote for them. It’s a big problem for some open source projects unfortunately. Just shows how little people care about each-other in lots of cases.

Yeah, that’s a fair argument. Unfortunately I feel like this is a battle that’s already been lost.

We aren’t allowed to download copyrighted books for individual, non-profit self-benefit, but the big AI companies can download terabytes of copyrighted books to make a profit off of without penalty. They should be forced to pay royalties to the authors. At the very least it seems like making a proprietary AI off it should be illegal and if it’s going to be allowed at all you should have to release the weights.

Whatever makes sense, though, they’re just going to do what they want. I don’t know that avoiding using open source models that are already released helps the situation.

Yeah, that’s a fair argument too. It also sucks the way they are forcing datacenters on towns across the country ( looks like they’ll do that to my town, too. :frowning: ), not giving them a choice but to host a datacenter for things they never asked for and will not benefit directly from.


I think my tech work is important enough that using big tech’s own tools against it is a fair play. But the concerns are enough to doubt how much usage makes sense for recreational applications like a big experimental inform compiler that might not even work and will take a lot of usage.

There is a point where it could be like driving a car to take your family on a camping trip or something like that where cars aren’t the best thing for the environment, but spread out in little bits across the world, it’s not bad enough that you should feel guilty for taking your family on a road trip.

AI usage is hard to calculate the impact of in some small cases, but it can be a pretty big amount of electricity depending on what you’re using it for, though, so it deserves some thought.

It’s only lost if you give in. Just like how lots of people buy from Temu, but that’s an ethical choice they all make as individuals.

I love that people are trying to get religious exemptions to AI :grinning_face_with_smiling_eyes:

1 Like

Yeah, this is bad enough that it’s reached a tipping point. For example the Godot Engine people changed their contribution policy just a few days ago to deny AI-authored pull requests.

Leaving the ethical perspective of code generative “AI” and the “is there a need for another Inform 7 like compiler” question aside, from a purely technical aspect, the fact that Inform 7’s source repository includes a range of Intest based compiler related tests does make “porting” Inform 7 to another programming language / environment easier.

note: the reason I quoted “porting” is because the resulting Rust based project would not actually be “Inform 7”, but rather another product that can be used generate Inform 7 compatible outputs.

1 Like

Please don’t put ideas in my head.

1 Like

AI aside, it would be very interesting to see different implementations of the Inform 7 language. Be aware, though, that Inform is currently undergoing a major version bump, so some things are in a bit of a flux (and unfortunately it’s hard to know when it will be released).

2 Likes

There are two things it’s hard to get attention to here: AI projects and new development systems. Combine the two (as I have for Lamp) and you’ve got a steep hill to climb.

1 Like

Hehe, yeah, makes sense. :slight_smile:

This thread has got me thinking a bit more, and maybe I’ll just play around with a very inform inspired language instead, and read more of the literate source of Inform to learn how it works as more of a learning experience.

I’ve played with natural language parsing tools like Spacy a while back ( way before generative AI ) and it would do things like parse out the nouns, verbs, prepositional phrases, etc.

I might look for a Rust alternative to that layer, maybe use it as an alternative to preform, and just see what kind of custom language thing I might be able to play with as a learning experiment.

It’s pretty neat to have the whole literate source of Inform as reference, and I’d like to learn how inform works on the inside more.

I was surprised how much of inform appears to be written in the inform language. I like the idea of trying to make a small language that can be used to extend itself. Something maybe somewhat similar to what dialog did.

This would probably be a more useful rabbit hole, at least while the interest sticks. I do lots of little learning experiments which are cool for just getting into something new while it stays interesting.

out of curiosity, why rust?

Rust is by far my favorite programing language for one.

I use it a lot, I’ve written a game engine[1] from scratch in it, along with a game.[2]

I’ve used a lot of other languages. I’ve used TypeScript and JavaScript extensively, I wrote a lot of Haxe at one point, a good amount of Python, though I haven’t used it in a while, along with a bit of C# and Java a long while ago.

Rust is just great because it’s got a high performance ceiling and really good compile-time checking that lets me stop thinking about a lot of potential problems and focus on what I’m designing.

The ecosystem and tooling is also really nice. After spending ~2 years writing TypeScript extensively, I’m really dying to get back into Rust because TypeScript and JavaScript just carries so much extra cognitive load. Rust helps me focus on good design and has a way higher level of “just working” when I get it going.


  1. The Bones game engine. ↩︎

  2. The Fishfolk Jumpy game. ↩︎

1 Like
I asked Claude using Fable 5:

Rust Migration Assessment

Date: 2026-07-08
Session: e6eec0

Question

What effort would be needed to migrate this (fork of the Inform 7 v10 repo) to Rust?

Assessment

What you’d be porting

Component Size What it is
inform7 ~128k lines (.w) The main compiler: assertions, knowledge model, imperative code, runtime emission
inter ~59k lines Intermediate representation, pipelines, final codegen (to Inform 6 and C)
services ~43k lines Shared modules: words, syntax, calculus, kinds, linguistics, Preform
inbuild ~21k lines Build manager, extension/kit dependency resolution
inform6 ~107k lines (plain C) The bundled classic I6 compiler — a separate 30-year-old codebase
foundation (inweb) ~40k lines, external The standard library everything sits on: memory pools, streams, strings

The literate line counts include prose, so figure roughly 200–250k lines of actual C end to end. This is dense compiler code, not CRUD.

Why it’s harder than the line count suggests

The tangler is a code generator, not just documentation sugar. inweb doesn’t merely strip prose — it implements CLASS_DEFINITION object machinery, cross-web module linking, and critically the Preform system: Inform’s natural-language grammar is written in a BNF-like DSL inside the .w files, and inweb generates the parser code for every nonterminal during tangling. A Rust port has to reimplement that generator or hand-expand thousands of grammar productions. This is a hidden subsystem people always miss when sizing this codebase.

The C idioms are maximally hostile to Rust. Arena allocation that never frees, pervasive global mutable state, giant linked lists of every allocated object traversed by macros (LOOP_OVER), function pointers threaded through parse nodes. None of it translates mechanically — every module is a re-design into ownership semantics, not a transliteration. Tools like c2rust would produce unsafe-everywhere output that’s worse than the C.

You’d be forking the project’s future, not just its present. Graham Nelson actively develops upstream. The day the Rust port works, every upstream commit becomes a manual re-port into a structurally different codebase. This is the biggest ongoing cost and it never ends.

The prose is the spec. The .w files weave into “Inform: The Program” — effectively a multi-volume book that is the only real documentation of the language semantics. Abandon literate form and you lose it; keep it and you’re also porting inweb’s weaver.

The one big asset

The ~2,500 intest fixtures are black-box: they feed source in and diff compiler output/transcripts. They don’t care what language the compiler is written in, so any port can be validated case-by-case against the exact same suite. That’s rare and valuable for a rewrite.

Effort estimate

  • Full faithful port: 3–5 person-years minimum for someone who already knows both the codebase and Rust — realistically a 2–3 person team for ~2 years, plus permanent upstream-tracking tax. This is a “quit your job” rathole.

  • Strangler approach (the only sane path if serious): the Inter layer is a real serialization boundary — Inter code can be written to disk and processed by standalone pipeline stages. Rewrite inter/final (codegen) or a pipeline stage in Rust first (~10–20k lines), running as a separate process consuming Inter files, validated against intest. That’s a 2–4 month rathole that teaches you whether the rest is worth it. Replacing the bundled inform6 compiler is a similar self-contained candidate.

  • Foundation-first is a trap — everything depends on it, and nothing ships until it’s all done.

The real question

What would the migration buy? If the goal is memory safety or embedding/WASM, Inform already emits C (which can compile to WASM), so there may be a much cheaper path to the underlying goal. If the goal is “understand the compiler by rewriting it” — the strangler slice at the Inter boundary is the best entry point.

1 Like
The language server is a different story:

Inform 7 Language Server — Sizing Assessment

Date: 2026-07-08
Session: e6eec0
Context: Follow-up to the Rust migration assessment. The intfiction thread
(#80953)
converged on “a language server based on the existing compiler” (Dannii’s suggestion) as the better
route to the OP’s actual goal — IDE tooling. This sizes that.

Bottom line

A useful Inform 7 LSP wrapping the existing compiler is a ~3–4 month part-time project
(~10k lines of server code plus well under 1k lines of small, upstreamable compiler patches) —
versus 3–5 person-years for the Rust port. Nothing like it exists anywhere; the field is empty
and there is documented community demand. An MVP needing zero compiler changes is
achievable in 2–4 weeks.

What the compiler already exposes (verified in this repo)

Capability What exists Where
Parseable diagnostics -silence mode emits Unix-style file:line: problem: …; -sigils prefixes each problem with its stable internal ID (e.g. PM_PropertyNameTooLong) services/problems-module/Chapter 2/Problems, Level 1.w (SIG mode); inform7/Chapter 1/Main.w (testing switches)
Document outline The compiler already writes an XML headings file (plist: Filename/Line/Title/Level/Indentation per heading) expressly for IDEs to consume inbuild/supervisor-module/Chapter 6/Headings.w, Headings::write_as_XML
Definition locations The Index lexicon records a source word number (^at Inter metadata → file+line) for every kind, object, phrase, verb, adjective inter/index-module/Chapter 2/Lexicon.w; inter/index-module/Chapter 1/Indexing API.w
Project metadata inbuild -inspect -json with formal JSON schemas (per IE-0017) for extensions/kits/projects inbuild/Chapter 1/Main.w; inform7/Internal/Miscellany/*.jsonr
Single-problem test hooks -require-problem SIGIL, -diagnostics X (includes a syntax-tree dump) inform7/Chapter 1/Main.w

Hard constraints (also verified)

  1. One-shot process. Task::carry_out can run once per process by explicit design decision
    (inform7/core-module/Chapter 1/What To Compile.w); arena allocation, global state everywhere.
    → The LSP is a subprocess orchestrator, not an embedded library. Compile on save, debounced.
    No incremental compilation, ever, without the multi-year rewrite this replaces.

  2. No columns. Positions are source_location { file, line } plus word-index ranges
    (wording {word_A, word_B}) — nowhere does the compiler record character offsets
    (services/words-module/Chapter 3/Lexer.w). → MVP diagnostics are line-granular (LSP allows
    whole-line ranges); precise ranges need a small word→column re-lexer in the server (later phase).

  3. Compilation halts at the first failing stage. The BENCH macro skips all later steps once
    problem_count > 0 (inform7/core-module/Chapter 1/How To Compile.w). Multiple problems can
    still surface within one stage, but errors in later stages stay hidden until earlier ones are fixed.
    Fixing this properly is compiler surgery — out of scope.

  4. Latency = full compile time (seconds to tens of seconds on large projects). Fine for
    on-save diagnostics; rules out on-keystroke feedback. -silence already implies -no-index,
    making diagnostic-only compiles cheaper.

  5. No formal grammar. Inform 7 syntax is defined operationally by the Preform grammar inside
    the compiler. No tree-sitter grammar is feasible; syntax feedback only comes from compiling.

Prior art (researched 2026-07)

  • No Inform 7 language server exists in any state. GitHub and intfiction searches come up empty.

  • Best existing tooling: Natrium729’s VS Code extension — TextMate highlighting + shell-out compile
    with regex-scraped errors. Users asked for an outline provider in its announcement thread; never built.

  • Inform 6 (not 7) has an alpha LSP (toerob/ls4inform6). The one tree-sitter-inform7 attempt died in 2021.

  • All three official IDEs use the same pattern this LSP would: spawn the compiler, scrape progress
    text, display Problems.html and the Index in webviews. No structured diagnostics channel exists anywhere.

  • No inform-evolution proposal touches LSP/editor tooling — IE-0017 (apps & extensions JSON) is the
    nearest neighbor and shows upstream is receptive to machine-readable interchange.

Phased plan and effort

Phase 1 — MVP, zero compiler changes (2–4 weeks part-time)

LSP server (TypeScript or Rust — Rust here is cheap and scratches the original itch) that:

  • watches the workspace, runs inform7 -silence -sigils on save (debounced)

  • parses file:line: output → publishDiagnostics (line-granular, sigil as diagnostic code)

  • parses the XML headings file → documentSymbol outline + folding ranges

  • surfaces inbuild -inspect -json for extension/project info

Roughly 3–6k lines. Already exceeds every existing Inform 7 editor integration.

Phase 2 — structured diagnostics via fork patch (2–4 weeks)

Add -problems-json to the fork: the problems module has a single choke point
(ProblemBuffer::output_problem_buffer + redirect/callback hooks in
inform7/core-module/Chapter 2/Using Problems.w), and each problem internally carries sigil,
file, line, wording, and the fully rendered prose (Inform’s famously good error text — worth
shipping verbatim in the JSON). Estimated at a few hundred lines of literate C, including
learning the inweb tangle/test workflow. Candidate inform-evolution proposal — small,
additive, in the spirit of IE-0017.

Phase 3 — symbols: go-to-definition, hover, completion (1–2 months)

Add a JSON dump of the Index lexicon/phrasebook (names, kinds, ^at word-number locations) —
the data is already collected for the HTML Index; this is a new serializer, not new analysis.
Server keeps a last-good-compile symbol table: go-to-definition, hover with kind info,
workspace symbols, and naive completion (things/kinds/phrases by name). This is the
“rust-analyzer illusion” at 1% of the cost — stale between successful compiles, useful anyway.

Phase 4 — polish (optional, open-ended)

Word→column mapping for precise diagnostic ranges (re-lex the reported line using the lexer’s
simple word-breaking rules); semantic tokens; quick-fix mappings keyed on sigils. Anything
beyond this (multi-stage error recovery, incremental anything) re-enters compiler-surgery
territory and should be treated as a separate decision.

Risks

  • 10.2 flux: upstream is at 10.2.0-beta ‘Krypton’; but the surfaces used (CLI switches,
    SIG output, headings XML, inbuild JSON) are stable interfaces, and the fork patches are tiny
    and rebase-friendly — the opposite of the Rust port’s permanent divergence.

  • Latency expectations: users coming from rust-analyzer expect keystroke feedback; this
    delivers save-time feedback. Set expectations in the README.

  • First-failing-stage masking: diagnostics arrive in waves as earlier errors are fixed.
    Inherent; document it.

Comparison with the Rust port

Rust port LSP on existing compiler
Effort to useful 3–5 person-years 2–4 weeks (MVP), 3–4 months (v1)
Compiler changes total rewrite < 1k lines, additive, upstreamable
Upstream relationship permanent fork of the project’s future rebase-friendly; plausible IE proposal
Community sentiment (thread #80953) skeptical explicitly suggested (Dannii)
Delivers Zicklag’s goals eventually, maybe diagnostics/outline/go-to-def/completion, minus incremental