[HN Gopher] Show HN: Tritium - The Legal IDE in Rust
       ___________________________________________________________________
        
       Show HN: Tritium - The Legal IDE in Rust
        
       $1,500 an hour and still using the software my grandma used to make
       bingo fliers!?  Hi HN! I'd like to submit for your consideration
       Tritium (https://tritium.legal). Tritium aims to bring the power of
       the integrated development environment (IDE) to corporate lawyers.
       My name is Drew Miller, and I'm lawyer admitted to the New York
       bar. I have spent the last 13 years in and out of corporate
       transactional practice, while building side projects in various
       languages using vanilla Vim. One day at work, I was asked to
       implement a legal technology product at my firm. Of course the only
       product available for editing and running programs in a locked-down
       environment was VS Code and its friends like Puppeteer from
       Microsoft.  I was really blown away at all of the capabilities of
       go-to definition and out-of-the box syntax highlighting as well as
       the debugger integration. I made the switch to a full IDE for my
       side projects immediately. And it hit me: why don't we have this
       exact same tool in corporate law?  Corporate lawyers spent hours
       upon hours fumbling between various applications and instances of
       Word and Adobe. There are sub-par differencing products that make
       `patch` look like the future. They do this while charging you
       ridiculous rates.  I left my practice a few months later to build
       Tritium. Tritium aims to be the lawyer's VS Code: an all-in-one
       drafting cockpit that treats a deal's entire document suite as a
       single, searchable, AI-enhanced workspace while remaining fast,
       local, and secure.  Tritium is implemented in pure Rust. It is
       cross-platform and I'm excited for the prospect of lawyers running
       Linux as their daily driver. It leverages a modified version of the
       super fast egui.rs immediate-mode GUI library. The windows build
       includes a Rust COM implementation which was probably one of the
       more technical challenges other than laying out and rendering the
       text.  Download a copy at https://tritium.legal/download or try out
       a web-only WASM preview here: https://tritium.legal/preview  Let me
       know your thoughts! Your criticisms are the most important. Thank
       you for the time.
        
       Author : piker
       Score  : 87 points
       Date   : 2025-06-12 12:06 UTC (10 hours ago)
        
 (HTM) web link (tritium.legal)
 (TXT) w3m dump (tritium.legal)
        
       | jenadine wrote:
       | Really cool to see a native app instead of another Electron or
       | browser-based tool.
       | 
       | I'm curious what was your experience like building this in Rust?
       | Also, how did you find working with egui, what made you choose
       | egui over other UI frameworks?
        
         | piker wrote:
         | Agreed! I don't think lawyers would have accepted an Electron
         | alternative to super fast Word. Rust gives the raw speed and
         | safety necessary to compete.
         | 
         | It's my first Rust project, and I've found Rust to be amazing
         | once you cross over the learning hurdle. The biggest issue was
         | of course the borrow checker, but for a project like this where
         | you aren't really iterating much on the design (as opposed to
         | say a game dev), it lets you fly. It saves you from all the big
         | mistakes and allows you to comfortably use threads and things.
         | No idea how I would have made it without rust_analyzer, though.
         | 
         | Egui was simple to get going, while it has some downsides being
         | an immediate mode UI, those are mostly overcome by the caching
         | necessary for rendering documents, etc.
        
       | nashashmi wrote:
       | Not familiar with law enough to understand how to use it. Maybe
       | you could show some boring hours long streams of using it in the
       | real world and we would understand
        
         | piker wrote:
         | It probably wouldn't make sense to show lawyers what we do,
         | either, but there's a kernel of truth there: the product needs
         | some development on the onboarding.
        
       | rafram wrote:
       | This is pretty interesting! Did you implement the DOCX support
       | and rich-text editor from scratch? I'd be concerned about
       | interoperability with other editors -- a semi-compatible editor
       | losing content/comments added by other software could be a huge
       | problem.
        
         | piker wrote:
         | Yes! From scratch. It started with a docx library but had to be
         | re-implemented from the beginning because that library dropped
         | data that wasn't implemented. Tritium's docx implementation is
         | more permissive such that it can gracefully failover to just
         | pure XML if it can't parse an element via the AST.
        
       | tempfile wrote:
       | Spent 15 seconds waiting for the spinner to resolve before I gave
       | up.
        
         | piker wrote:
         | Apologies for that. I thing the pipe is getting hugged a bit
         | here. Unfortunately it's a bit lean so no GCP outages to blame
         | it on!
        
       | giancarlostoro wrote:
       | > Tritium is implemented in pure Rust.
       | 
       | This beautiful software that looks a bit like VS Code, what did
       | you use to make it? I'm guessing Tauri but curious if you used
       | something else.
        
         | piker wrote:
         | That's very kind -- let's hope the legal profession feels the
         | same way. It's certainly inspired by VS code. It's using egui
         | (https://github.com/emilk/egui) under the hood. Big hats off to
         | Emil Ernerfeldt and the team at rerun (https://app.rerun.io/)
         | for the incredible work on a great immediate mode GUI library.
        
       | pavon wrote:
       | Does it have Reveal Codes? :P
        
         | piker wrote:
         | Not yet, and I can't tell if you're being sarcastic, but that's
         | exactly the of question its users should be asking :)
        
       | rahultuladhar wrote:
       | This seems pretty cool! I tried it out but I ran into an error
       | that froze the entire app on the preview. Seems to be related to
       | max pages per paragraph.
        
         | piker wrote:
         | Ah yes, that is a bug where the layout engine can't fit it
         | correctly and gets stuck in a loop. It maxes out rather than
         | overflows, but the same effect. It's being worked on, and sorry
         | for the inconvenience.
        
       | soulofmischief wrote:
       | My understanding working with law firms was that they are pretty
       | bought-in to the Microsoft Office ecosystem, how well does
       | Tritium integrate? Is the docx format fully supported? Can one
       | person use Tritium without affecting others? Other than tabs,
       | what does Tritium offer that two Word panes and a file browser
       | pane tiled on screen can't cover?
       | 
       | I am interested in developing software in this space, so these
       | are earnest questions and not criticism.
        
         | piker wrote:
         | > My understanding working with law firms was that they are
         | pretty bought-in to the Microsoft Office ecosystem, how well
         | does Tritium integrate?
         | 
         | Absolutely. Overbought. They're owned by Microsoft. Go to a
         | legal tech conference and there are thousands of vendors and
         | not a single MSFT representative. All they want to do is push
         | more Azureware on the deep pockets of profitable firms.
         | 
         | > Is the docx format fully supported?
         | 
         | It will be. There are certainly edge case features that don't
         | render correctly yet, but those will come. The 80% that we care
         | about should work. No data will be dropped, as mentioned
         | elsewhere it will just look bad and gracefully degrade behind
         | the scenes to a safe representation that ensures the data isn't
         | lost.
         | 
         | > Can one person use Tritium without affecting others?
         | 
         | Yes, it's totally private and secure. Using Tritium doesn't
         | require any cloud access or anything like that (other than to
         | phone home with the auto-update or your LLM integration). I'm
         | going to link the history to a separate hidden directory in the
         | filesystem a la .git in the future which will allow some basic
         | multi-editor features.
         | 
         | > Other than tabs, what does Tritium offer that two Word panes
         | and a file browser pane tiled on screen can't cover?
         | 
         | Great question! It does the things lawyers care about: help
         | them pick out symbols (defined terms, specifically) and run
         | diffs (redlines) cheap and quick. It also renders PDFs (using
         | pdfium).
         | 
         | > I am interested in developing software in this space, so
         | these are earnest questions and not criticism.
         | 
         | Drop a line to the email in my bio. I'd love to chat offline.
        
       | blacksmith_tb wrote:
       | It's a catchy name, though ironically tritium is not legal in the
       | US, generally[1] (for "frivolous purposes"). Guess this is
       | serious software!
       | 
       | 1: https://www.law.cornell.edu/cfr/text/10/30.19
        
         | piker wrote:
         | Can I trademark that slogan? :)
        
         | philsnow wrote:
         | I pine for a DSL for legal documents, both because it's tedious
         | and tiresome to parse prose like this:
         | 
         | > Except for persons who manufacture, process, produce, or
         | initially transfer for sale or distribution self-luminous
         | products containing tritium, krypton-85, or promethium-147, and
         | except as provided in paragraph (c) of this section, any person
         | is exempt from the requirements for a license set forth in
         | section 81 of the Act and from the regulations in parts 20 and
         | 30 through 36 and 39 of this chapter to the extent that such
         | person receives, possesses, uses, transfers, owns, or acquires
         | tritium, krypton-85, or promethium-147 in self-luminous
         | products manufactured, processed, produced, or initially
         | transferred in accordance with a specific license issued
         | pursuant to SS 32.22 of this chapter, which license authorizes
         | the initial transfer of the product for use under this section.
         | 
         | ... and also because it is ambiguous / error-prone / subject to
         | interpretation, especially when figuring out antecedents of
         | pronouns, referents, and textual boundaries.
         | 
         | I tried four times to read the above by paragraph without
         | reformatting it with some parentheses etc, but failed.
        
           | philsnow wrote:
           | .... I _think_ it means that you can make self-luminous
           | products without needing a license, as long as you got them
           | from somebody who does have a license.
        
       | piker wrote:
       | Hey guys - I really appreciate the love from Hacker News. It's a
       | real honor to get all of these votes and comments. If you like
       | the idea and aren't a lawyer but want to help the project move
       | forward, please suggest Tritium to the corporate lawyers you
       | know.
        
       | felixg3 wrote:
       | Super interesting. Working in consulting, often with corporate
       | lawyers. Will check it out.
        
       | brundolf wrote:
       | Feedback: the UI feels like a direct reference to VSCode, which
       | is familiar to software developers, but not to lawyers. If you're
       | hoping this will be adopted by lawyers, I would focus on making
       | the UX familiar to _them_. Look at software that they already
       | use, and mimic those idioms insomuch as it makes sense to do so.
       | I would also have the base web domain link to a normal home /info
       | page, not to the demo directly. And maybe prefill the demo with
       | some actual content (documents/etc) so people can really see what
       | it does and how
       | 
       | Good luck!
        
         | piker wrote:
         | Great feedback; and I do agree. The HN link goes to the app
         | itself because we're impatient, but there is an actual landing
         | page most visitors hit.
         | 
         | I've gone back and forth on the UX idea, and while I do agree,
         | it's important that Tritium selects for users that are going to
         | be able to quickly adopt the newer concepts. Just simply
         | presenting a "better Word" isn't really going to move the
         | needle. It's really a shift in expectations. That said, I have
         | recently backed off defaulting to dark mode to make it feel
         | slightly more familiar.
        
           | brundolf wrote:
           | I think software people tend to underestimate the value of
           | superficial familiarity. By all means, adhere to your new
           | concepts and mental model. But even things like coloring,
           | placement of the menu bar, the icons that you use, the
           | organization of the UI, etc can go a really long way
           | 
           | Think about programming languages- ones that introduce
           | radical new concepts may still employ familiar syntax/naming
           | to smooth the transition for newcomers. Rust mimicked C++,
           | TypeScript extended JS, etc. These languages were made to
           | introduce powerful new ways of thinking about code, but by
           | _appearing_ as similar as possible to what devs already knew,
           | they freed up more brain cycles for people trying to adopt
           | them. They didn 't muddy their concept-space for the sake of
           | familiarity, but they didn't introduce any more _un_
           | familiarity than they actually needed to for the benefits
           | they wanted to give
        
       | tough wrote:
       | minor nit: cmd+z is ctrl+z in macos, which felt counter-intuitive
       | on an editor
       | 
       | IANAL: idk if lawyers dont do pdfs but tried some research papers
       | and PDF rendering could use some love (MacOS)
        
         | piker wrote:
         | Noted, and to be fixed. Thank you
        
           | tough wrote:
           | I had edited prior message but would be great if supported
           | PDF rendering as good as docx! (for research mostly, not a
           | lawyer)
        
             | yauneyz wrote:
             | If this is Electron, try pdf.js - really good rendering,
             | you can create a text layer (for text selection, etc).
             | Probably the best result per effort you can get
        
               | tough wrote:
               | care to link to repo? alwayss good to have one of these
               | at hand
        
             | piker wrote:
             | One thing it does is cast the PDF to grayscale to render
             | for speed (lawyers rarely care about the color of a legal
             | doc in PDF), so perhaps I'll make that an adjustable
             | setting which will trade off speed for clarity. Otherwise,
             | it uses PDFium for PDF rendering so it should come out just
             | as well as what you see in a Chromium-based browser.
        
               | tough wrote:
               | might be an issue with DPI / Retina screens on macOS?
               | 
               | it's really more blurry than any pdf on chrome
               | https://imgur.com/a/AElOuaA
        
               | piker wrote:
               | Oh, yes, that is also a cheat code to render them quicker
               | -- it downsamples the render to save time. That will
               | improve in future versions as Tritium uses spare cycles
               | to increase the resolution.
        
       | handfuloflight wrote:
       | Say you were going to cold email a lawyer to pitch them to use
       | this, what would you write?
        
         | piker wrote:
         | Probably something like: "
         | 
         | [Person] - hope you're well! I wanted to put Tritium on your
         | radar. It's a word processor jacked on steroids built just for
         | transactional lawyers.
         | 
         | From built-in defined term annotation to multi-document
         | search/replace to redlining and much, much more, it will help
         | your team work faster and more effectively on existing Word
         | documents and PDFs. You'll even pick up errors from outside
         | counsel.
         | 
         | Tritium runs on Windows, MacOS and even Linux for your most
         | tech savvy lawyers.
         | 
         | Please let me know if that might be good for your legal team,
         | and I'd love to demo it for you."
        
           | handfuloflight wrote:
           | This is a bit too heavy on the feature side. As in, here is
           | what this is, not what it will do for you.
           | 
           | What would you say if you were going to focus on a pain point
           | and a problem that this specifically solved for you, that it
           | can also solve for the other lawyers who are not using this
           | and that is not being met by the other options?
        
             | piker wrote:
             | Take one feature: redlining. Right now every corporate
             | lawyer knows what a pain in the ass it is to do something
             | as simple as a diff. It takes probably a full minute
             | (imagine if it were like that to run git diff for you!).
             | Tritium runs the redline in microseconds, because it's
             | built for lawyers.
        
       | 29athrowaway wrote:
       | There should be a "build" button that pulled all the legal codes
       | for the target jurisdiction and other legally binding documents
       | and checked if everything checks out.
       | 
       | And to achieve this you would have to create a machine readable
       | format for legal documents, and have a library of them already
       | converted to it.
       | 
       | Then you could have a linter that highlighted that you made a
       | logical mistake or did something wrong from the perspective of a
       | legal guy.
        
       | sanufar wrote:
       | This looks great! I'm really stoked to see egui being used for
       | the desktop app. While I'm not a lawyer, I was wondering about
       | the potential for external references to cases, i.e doc1
       | references a case which isn't present locally, which can then be
       | navigated to via something like "go to definition". Maybe
       | something like an indexer that crossrefs on a database of legal
       | cases? Do you have any thoughts on some other use cases? The idea
       | of an IDE for lawyers is super cool, can't wait to see where this
       | goes!
        
         | piker wrote:
         | Thanks so much. Yes, the plan is to package libraries along
         | with the product to allow for all kinds of external entities to
         | be resolved.
         | 
         | Egui is great!
        
       | aidenn0 wrote:
       | Probably dumb question:
       | 
       | Given that many lawfirms bill by the hour, are there incentives
       | to make their work more efficient? I.e. if a firm were to adopt
       | this tool, can they practically charge more per hour than a firm
       | that does not?
        
         | piker wrote:
         | Yes, they are not incentivized to adopt new technology in their
         | current state. The senior partners don't want to wait around
         | for the eventuality of charging more per hour. That's why
         | Tritium is marked to in-house lawyers for now.
         | 
         | I talked a little about this back in September:
         | https://www.legalinnovators.co.uk/post/legal-innovators-uk-t...
        
       | remich wrote:
       | As someone who is a (current) software engineer and (former)
       | lawyer I find this interesting. Not sure if I'm willing to bet on
       | big uptake, though, unless it was through an acquisition by one
       | of the big e-discovery companies.
        
       | pbronez wrote:
       | Looks great, sharing it with my legal team.
       | 
       | The "Fetch Example" button on the web demo doesn't seem to work.
       | It would be nice if the web demo was pre-loaded with some stuff.
        
       | LorenDB wrote:
       | I tried coming back to HN using my mouse's back button, but it
       | seems Tritium is eating mouse back button events.
        
         | piker wrote:
         | Apologies if that's the case. It's just a WASM application
         | intended to demo the real desktop application. No nefarious
         | purpose there, but perhaps the limitations of the "preview".
         | Try the desktop version!
        
       | socalgal2 wrote:
       | Couldn't enter Japanese into the web version. Looks like it
       | trying to read keys directly. Copy and paste don't work. Right
       | clicking doesn't bring up a context menu with system options so
       | no looking up words using the locally installed dictionary. No OS
       | level spell checking that uses the user's dictionary.
       | 
       | I guess all of that is TBD though I suspect based on the tech
       | choices will be way harder than it sounds.
        
         | piker wrote:
         | Copy and paste don't work on the web version, but they should
         | work (including pasting formatting out into Office products) on
         | desktop. Similarly for fonts. If you're using a font that
         | contains Japanese characters it should render. It doesn't (yet)
         | do a great job on falling back.
         | 
         | Try the download!
        
       | rubyfan wrote:
       | I've been dreaming of a better contract writing tool for a while
       | now.
       | 
       | I'm not a lawyer but I draft insurance contracts and work with
       | reviewing lawyers closely. As a former software developer I miss
       | version control, partial includes, conditional logic, etc. I am
       | shocked at how poorly supported the business world is by the
       | ubiquity of MS Word.
       | 
       | I've been experimenting with Typst now for some time and it has a
       | lot of what I want in creating and versioning documents but I
       | believe may be too technical to become integrated with existing
       | workflows and the non-technical users engaged in the development
       | process. Basically my experience is normal users tune out once
       | you get outside of even basic MS Word.
       | 
       | I really want a great tool to exist but I'm afraid I'm an outlier
       | and unique in my technical ability in this space. Nice to see
       | others interested in such a tool.
        
       | segmondy wrote:
       | Good stuff on your launch, You need a better demo page. I can't
       | see the video, fonts are too small.
        
         | piker wrote:
         | Noted, and will be done. Thank you for the feedback. Were you
         | on mobile or desktop?
        
       | righthand wrote:
       | Recognizing touch controls on the document viewer tab would be
       | nice (ex two finger drag is pan, pinch to zoom, etc).
        
       ___________________________________________________________________
       (page generated 2025-06-12 23:00 UTC)