You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@plc4x.apache.org by "chrisdutz (via GitHub)" <gi...@apache.org> on 2025/03/04 18:54:49 UTC

Re: [PR] feat(plc4rs): Add transport layer with TCP/UDP implementations

chrisdutz commented on PR #2010:
URL: https://github.com/apache/plc4x/pull/2010#issuecomment-2698595908

   Soooooo ... when checking out your PR, I see two directories "plc4rs" and "plc4x-rust" ... which is used for what?
   
   However it looked as if plc4x-rust seems to the the interesting directory. I took the liberty to add a pom.xml to that, which runs the build within the maven build. 
   
   A few things, I would like to ask you to change:
   - Call the directory "plc4rs" or "plc4rust" (without the x and without a dash) (I would probably choose the "plc4rs" to match the naming of the other modules.
   - We need Apache headers on all source-files
   
   Here's the pom file for calling the build from within maven: 
   ```
   <?xml version="1.0" encoding="UTF-8"?>
   <!--
     Licensed to the Apache Software Foundation (ASF) under one
     or more contributor license agreements.  See the NOTICE file
     distributed with this work for additional information
     regarding copyright ownership.  The ASF licenses this file
     to you under the Apache License, Version 2.0 (the
     "License"); you may not use this file except in compliance
     with the License.  You may obtain a copy of the License at
   
         http://www.apache.org/licenses/LICENSE-2.0
   
     Unless required by applicable law or agreed to in writing,
     software distributed under the License is distributed on an
     "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
     KIND, either express or implied.  See the License for the
     specific language governing permissions and limitations
     under the License.
     -->
   <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   
     <modelVersion>4.0.0</modelVersion>
   
     <parent>
       <groupId>org.apache.plc4x</groupId>
       <artifactId>plc4x-parent</artifactId>
       <version>0.13.0-SNAPSHOT</version>
     </parent>
   
     <artifactId>plc4x-rust</artifactId>
     <packaging>pom</packaging>
   
     <name>PLC4Rust</name>
     <description>Implementation of the protocol adapters for usage as Rust module.</description>
   
     <build>
       <plugins>
         <!-- Build the project -->
         <plugin>
           <groupId>org.questdb</groupId>
           <artifactId>rust-maven-plugin</artifactId>
           <version>1.2.0</version>
           <executions>
             <execution>
               <id>rust-build-id</id>
               <goals>
                 <goal>build</goal>
               </goals>
               <configuration>
                 <path>${project.basedir}</path>
                 <!--copyTo>${project.build.directory}/classes/io/questdb/jni/example/rust/libs</copyTo-->
                 <copyWithPlatformDir>true</copyWithPlatformDir>
               </configuration>
             </execution>
           </executions>
         </plugin>
       </plugins>
     </build>
   
   </project>
   ```
   
   In order to have it executed by the main project, you would need to add this profile to the parent pom (Root of the plc4x project)
   
   ```
       <profile>
         <id>with-rust</id>
         <modules>
           <module>plc4x-rust</module>
         </modules>
       </profile>
   
   ```
   
   With that you should then be able to call the build with:
   
       mvn -Pwith-rust clean install
       
   We would need to also add code to the prerequisite check in order to give people some hints at what's missing in order to build the project.
   
   If you could give me access to your fork? I could probably work on this with you.
   Another alternative would be I push your branch into the plc4x repo ... however then you would need to do PRs against that
   Another alternative would be, I create a fork of your repo and then create PRs against that (Which feels a bit silly)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@plc4x.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org