1 of 12

IDE-level coding in web apps

A POC PROJECT BUILD WITH RUST/AXUM/REACT

ROLAND BRAND, RUST MEETUP BASEL 2023-03-09

2 of 12

Use case

  • Configurable systems
  • Tools
    • UI (configurators, builders, wizards)
    • DSL ”snippets”

3 of 12

Developers

  • We also configure a lot
    • Systems
    • Components
    • Libraries
  • Our tools
    • IDE
    • Type systems
    • Syntax highlighting,
    • Linting
    • refactoring tools

4 of 12

Why not give this to users?

  • Non-developers won’t use an IDE because of setup and context

  • Possible low-code Solution:
    • IDE within a context

5 of 12

POC goals

  • Developer experience in textfield
  • e2e System setup
  • Showcase for a configurator

6 of 12

System design

  • Rust based server API (that can be enhanced to a product backend)
  • Communication:
    • JSONRPC over websockets
      • (inspectable)
  • Front End: React

7 of 12

Repo

  • https://github.com/bar9/lsp-expression-calculator

8 of 12

POC demo

9 of 12

Goals reached?

  • Developer experience in textfield (✓)
  • e2e System setup
  • Showcase for a configurator (✓)

10 of 12

Characteristics

  • Everything can be controlled from the API
    • = Context
  • Not everything is in the POC yet
    • Can I dynamically provide autocomplete suggestions from DB? [should]
    • How well can Monaco handle DSLs?

11 of 12

Next

  • Direction
    • Library?
    • Framework?
    • Template App?
    • Specific Apps
      • CMS
      • Coding competitions?
      • Hackathon
  • TODOs
    • Dynamically build config
    • Interaction with model state

12 of 12

Learnings

  • If let is good for gradually unwrapping and debugging values of types you don’t know well yet
  • Axum never got in my way
  • Struggles:
    • Protocols (ws, LSP) -> you just need to know them well
  • Initial expectation: I can “just plug in the tower-lsp middleware
    • Did not achieve this yet. Maybe possible but not obvious.
  • The rust type system helps you a lot in “not getting things wrong”. They just won’t build